query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Display a VAT summary on the invoice page.
Показать итог по НДС на странице счета.
function it_exchange_easy_eu_value_added_taxes_display_vat_summary_on_invoice() { if ( ! function_exists( 'it_exchange_invoice_addon_get_invoice_transaction_id' ) ) { return; } $txn_id = it_exchange_invoice_addon_get_invoice_transaction_id( $GLOBALS['it_exchange']['product']->ID ); if ( ! $txn_id ) { echo '<div class="it-exchange-vat-invoice-summary">'; echo '<style type="text/css">#it-exchange-add-edit-vat-number {vertical-align: top;margin-top: 0;margin-left: 0;display: block;}' . '.it-exchange-vat-invoice-summary .it-exchange-cart-totals-amount .it-exchange-table-column-inner { padding: 0;}</style>'; it_exchange( 'eu-value-added-taxes', 'taxes', array( 'before_label' => '<span class="label">', 'after_label' => '</span>' ) ); echo '</div>'; } else { $GLOBALS['it_exchange']['transaction'] = it_exchange_get_transaction( $txn_id ); echo '<div class="it-exchange-vat-invoice-summary">'; it_exchange( 'eu-value-added-taxes', 'vat-summary', array( 'label_tag_open' => '<span class="label">', 'label_tag_close' => '</span>' ) ); echo '</div>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "function view ()\n {\n $this->tran = get_customer_trans($this->tran_no, ST_SALESINVOICE);\n $this->tran_branch = get_branch($this->tran[\"branch_code\"]);\n \n \n box_start(sprintf(_(\"SALES INVOICE #%d\"), $this->tran_no));\n \n $this->info();\n echo \"<hr>\";\n $this->tran_header();\n \n box_start(\"Invoice Items\");\n $this->items();\n \n $voided = is_voided_display(ST_SALESINVOICE, $this->tran_no, \n _(\"This invoice has been voided.\"));\n \n if (! $voided) {\n display_allocations_to(PT_CUSTOMER, $this->tran['debtor_no'], \n ST_SALESINVOICE, $this->tran_no, $this->tran['Total']);\n }\n box_end();\n }", "function showVentas()\n {\n $botines = $this->modelProductos->GetBotines();\n $marcas = $this->modelMarcas->GetMarcas();\n $logged = $this->CheckLoggedIn();\n\n $this->view->RenderVentas($botines, $marcas, $logged);\n }", "public function VAT($VAT)\n {\n $this->accessTitle->setVAT($VAT);\n return $this;\n }", "public function getVatDetails()\n {\n return $this->vatDetails;\n }", "public function getVatAmount();", "public static function vat($value)\n {\n $vat = 20; //VAT rate\n $total = ($value / 100) * $vat;\n return number_format($total, 2, '.', '');\n }", "function it_exchange_easy_eu_value_added_taxes_after_payment_details_vat_details( $transaction ) {\n $tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes', true );\n $vat_moss_tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_vat_moss_taxes', true );\n $customer_country = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes_customer_vat_country', true );\n $customer_vat = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes_customer_vat_number', true );\n\t$memberstates = it_exchange_get_data_set( 'eu-member-states' );\n\t$result = '';\n\n\tif ( !empty( $tax_items ) ) {\n\t\t$result .= '<h3>VAT Summary</h3>';\n\t\tif ( !empty( $customer_vat ) )\n\t\t\t$result .= '<p>' . sprintf( __( 'Customer VAT Number: %s-%s', 'LION' ), $customer_country, $customer_vat ) . '</p>';\n\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row vat-summary-heading-row\">';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'VAT Type', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'Net Taxable Amount', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'VAT', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '</div>';\n\n\t\tif ( !empty( $tax_items ) ) {\n\t\t\tforeach( $tax_items as $tax ) {\n\t\t\t\t$net = empty( $tax['taxable_amount'] ) ? 0 : $tax['taxable_amount'];\n\t\t\t\t$taxed = empty( $tax['total'] ) ? 0 : $tax['total'];\n\n\t\t\t\tif ( empty( $taxed ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row\">';\n\n\t\t\t\t$result .= '<div class=\"vat-label it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= sprintf( __( '%s %s (%s%%)', 'LION' ), $memberstates[$tax['country']], $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-net-taxable-amount it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $net );;\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-amount-taxed it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $taxed );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $vat_moss_tax_items ) ) {\n\t\t\tforeach ( $vat_moss_tax_items as $tax ) {\n\t\t\t\t$net = empty( $tax['taxable_amount'] ) ? 0 : $tax['taxable_amount'];\n\t\t\t\t$taxed = empty( $tax['total'] ) ? 0 : $tax['total'];\n\n\t\t\t\tif ( empty( $taxed ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row\">';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-label it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= sprintf( __( '%s %s (%s%%)', 'LION' ), $memberstates[$tax['country']], $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-net-taxable-amount it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $net );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-amount-taxed it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $taxed );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\t$result .= '</div>';\n\n\t\t?>\n\t\t<div class=\"clearfix spacing-wrapper\">\n\t\t\t<div class=\"transaction-vat-taxes left\">\n\t\t\t\t<?php echo $result; ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}\n}", "function total_cost_to_pay()\n\t{\n\t\t$t=$this->total;\n\t\t$vat=$t*0.14;\n\t\treturn \"<br/><br/>\".\"Overall Total: R\".$this->total.\"<br/> VAT: R\".$vat;\t\n\t}", "public function getTotalVat()\n {\n $value = $this->get(self::TOTALVAT);\n return $value === null ? (string)$value : $value;\n }", "public function testPricesIncludeVat()\n {\n $total = new Total();\n\n $total\n ->addLineItem(new LineItem(780, 19, true, 1))\n ->addLineItem(new LineItem(2500, 7, true, 1))\n ;\n\n $this->assertEquals(3280, $total->getPrice()->getGrossAmount(), \"\", DELTA);\n $this->assertEquals(2992, $total->getPrice()->getNetAmount(), \"\", DELTA);\n $this->assertEquals(288, $total->getPrice()->getVatAmount(), \"\", DELTA);\n $this->assertEquals($total->getPrice()->getGrossAmount(), $total->getPrice()->getNetAmount() + $total->getPrice()->getVatAmount(), \"\", DELTA);\n }", "public function show(Vet $vet)\n {\n //\n }", "public function saleVat() {\n \treturn $this->sale_price != NULL ? $this->sale_price * env('VAT_PERCENTAGE') : 0.0;\n }", "public function getVatTaxAmount();", "public function getVat()\n {\n return $this->vat;\n }", "public function getVatAmounts();", "function calculateVAT($check, $vat = 15){\r\n $total =$check * (100+$vat)/100;\r\n $amount =$total;\r\n echo $amount;\r\n }", "public function get_total_VAT()\n\t{\n\t\treturn $this->get_total_price() - $this->get_total_price(FALSE);\n\t}", "public function customer_ledger_summary()\n\t{\n\t\t$template['page']='Reports/show_customer_individual_ledger';\n\t\t$template['title']='Balance Summary';\n\t\t$template['client']= $this->basic->get_data('{PRE}users', '', 'user_id, client_name');\n\t\t$this->load->view('template', $template);\n\n\n\t}", "public function show(VTA $vTA)\n {\n //\n }", "public function index()\n {\n\n //get all the vat\n\n\n $ids = \\DB::table('tblVat')\n ->select('intVatID')\n ->orderBy('created_at', 'desc')\n ->orderBy('intVatID', 'desc')\n ->take(1)\n ->get();\n\n $ID = $ids[\"0\"]->intVatID;\n $newID = $this->smartCounter($ID); \n $tax = UtilitiesVat::all();\n \n\n return view('utilities.utilities-VAT')\n ->with('tax', $tax);\n\n }", "public function getVatAmount()\n {\n return $this->vatAmount;\n }", "public function getVat()\n {\n $value = $this->get(self::VAT);\n return $value === null ? (string)$value : $value;\n }", "public function display($tpl = null)\r\n\t{\r\n\t\t$venta \t = $this->getModel('Venta');\r\n\r\n\t\t$serviciosTO = $venta->getServiciosAdicionales(\"TO\");\r\n\t\t$serviciosTV = $venta->getServiciosAdicionales(\"TV\");\r\n\t\t$serviciosBA = $venta->getServiciosAdicionales(\"BA\");\r\n\t\t\r\n\t\r\n\t\t//Calculo de totales\r\n\t\t$serviciosAdi \t\t= Session::getVar(\"venta_servicios_adicionales\");\r\n\t\t$totalPlan \t\t\t= $venta->getTotalesOferta();\r\n\t\t$totalesAdicionales = $venta->getTotalesServiciosAdicionales();\r\n\t\t$totales \t\t\t= $venta->calcularTotalesVenta($totalPlan, $totalesAdicionales);\r\n\t\t$data = $venta->getDatosClienteActual();\r\n\t\t\r\n\t\t\r\n\t\t//$oferta = Session::getVar(\"nuevaOferta\");\r\n\t\t$this->assignRef('serviciosTO', $serviciosTO);\r\n\t\t$this->assignRef('serviciosTV', $serviciosTV);\r\n\t\t$this->assignRef('serviciosBA', $serviciosBA);\r\n\t\t$this->assignRef('serviciosAdi', $serviciosAdi);\r\n\t\t$this->assignRef('data', $data);\r\n\t\t\r\n\t\t//Totales \r\n\t\t$this->assignRef('totalPlan', $totalPlan);\r\n\t\t$this->assignRef('totalesAdcionales', $totalesAdicionales);\r\n\t\t$this->assignRef('totales', $totales );\r\n\t\t\r\n\t\tparent::display($tpl);\r\n\t}", "function vatTot($sumtotal)\r\n\t{\r\n\t /*$netTot = 50;*/\r\n\t\t$data = addVat();\r\n\t\t$sumtotal($data);\r\n\t}", "function show_record_summary() {\n //\n echo \"<section>\";\n echo \"<p class='name'>Summary</p>\";\n //\n //Print a table tag.\n echo \"<table>\";\n //\n //Step through all the items of a record and display each one of them.\n foreach ($this->record->items as $key => $item) {\n //\n //Exclude the invoice.\n if ($key !== 'invoice') {\n //\n //Get teh summary data from the item and show in the label forma.\n $this->show_record_summary_item($item);\n }\n }\n //\n //Close the table.\n echo \"</table>\";\n echo \"</section>\";\n //\n }", "public function setTotalVat($value)\n {\n return $this->set(self::TOTALVAT, $value);\n }", "public function VAT($VAT)\n {\n $this->abonement->setVAT($VAT);\n return $this;\n }", "function calcVat(float $amount, bool $format = false)\n {\n $markup = $amount * MARKUP;\n $markedamount = $amount + $markup;\n $vat = $markedamount * VAT;\n return $format ? round($vat, 2) . ' ' . userCurShort() : round($vat, 2);\n }", "public static function vat()\n {\n if (Session::get('cart'))\n {\n $vat = 0;\n\n $products = Product::findMany(array_keys(Session::get('cart')));\n\n foreach ($products as $product)\n {\n if ($product->price_discount)\n {\n $vat += ($product->price_discount / 100) * $product->vat;\n }\n else\n {\n $vat += ($product->price / 100) * $product->vat;\n }\n\n return $vat;\n }\n\n }\n\n return 0;\n }", "public function show(Vignette $vignette)\n {\n //\n }", "function detail() {\n\n\t\t$attr = array(\n\t\t\t\t\t\t'invoice' => $this->db->query(\"SELECT vendor.name AS 'vendor_name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t vendor.address AS 'vendor_address',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t invoice.id AS 'invoice_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t invoice_number,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t date_invoice,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t total_price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ppn, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t d_cost,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t disc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IF(with_matoa_shipping = 0, total_price - disc + ppn + d_cost, total_price - disc + ppn) AS 'grand_total',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t payment_status,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t payment_date,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t with_matoa_shipping\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM invoice\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t JOIN vendor ON vendor.id = invoice.vendor_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT JOIN payment ON payment.invoice_id = invoice.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE invoice.id = \" . $this->input->get('invoice_id'))->row_array()\n\t\t\t\t\t);\n\n\t\t$this->layout_lib->default_template('transaction/invoice/detail-invoice', $attr);\n\n\t}", "public function get_vat_total() {\n\t\treturn $this->vat_total;\n\t}", "function summary()\r\n {\r\n $view = new Template();\r\n echo $view->render('views/summary.html');\r\n }", "public function viewdetailsAction()\n {\n $invoiceId = $this->_getParam('invoice_id');\n $invoiceModel = new Core_Model_Invoice($invoiceId);\n $this->view->invoiceId = $invoiceId;\n $this->view->invoiceData = $invoiceModel->fetch();\n $this->view->invoiceItems = $invoiceModel->getItems();\n }", "public function showtaxAction() {\r\n\r\n $this->view->objectId = $this->objectId;\r\n $this->view->check = TaxDBAccess::checkUsedTax($this->objectId);\r\n $this->view->facette = TaxDBAccess::findObjectFromId($this->objectId);\r\n $this->_helper->viewRenderer(\"category/tax/show\");\r\n }", "public function show(Vaccination $vaccination)\n {\n //\n }", "public function detailsTaxedTotal();", "public function detailsTotal($withTax = false);", "public function display() {\n\t\t$sum = $this->subtotal();\n\t\techo \"<table><tr><th>Name</th><th>Anzahl</th><th>Einzelpreis</th><th>Preis</th></tr>\";\n\t\ttry {\n\t\t\tif($this->orderid != null) {\n\t\t\t\t$checkStmt = $this->db->prepare('SELECT name, quantity, price, quantity*price as sum FROM shoppingcart WHERE orderid=:orderid');\n\t\t\t\t$checkStmt->bindParam(':orderid', $this->orderid);\n\t\t\t\t$checkStmt->execute();\n\t\t\t\t$result = $checkStmt->fetchAll();\n\t\t\t\tforeach($result as $item) {\n\t\t\t\t\tprintf(\"<tr><td>%s</td><td>%d</td><td>%f</td><td>%f</td>\", $item['name'], $item['quantity'], $item['price'], $item['sum']);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch(PDOException $e) {\n\t\t\tprint_r($e->getMessage());\n\t\t}\n\t\tprintf(\"<tr><th>Gesamtpreis:</th><td colspan='3'>%f</td></tr></table>\", $sum);\n\t}", "public function show(Venta $venta)\n {\n //\n }", "public function show(Venta $venta)\n {\n //\n }", "public function show(Venta $venta)\n {\n //\n }", "public function actionSummary()\n\t{\n\t\t$this->render('summary');\n\t}", "public function view_invoice() {\n $slipId = $this->input->get('sid', TRUE);\n $data['invoice'] = $this->accountmodel->invoice($slipId);\n $data['schoolName'] = $this->common->schoolName();\n $data['currency'] = $this->common->currencyClass();\n $this->load->view('temp/header');\n $this->load->view('invoice', $data);\n $this->load->view('temp/footer');\n }", "function printSumTotal($data)\r\n\t{\r\n\t $data = 50;\r\n\t echo 'VAT is: ', $data, \"\\n\";\r\n\t}", "public function show(Variant $variant)\n {\n //\n }", "public function getVatNumber()\n {\n return $this->vatNumber;\n }", "public function getVatNumber()\n {\n return $this->vatNumber;\n }", "public function getVat();", "public function summary()\n\t{\n\t\t$payments = Payment::getPayments(Input::get('from', null), Input::get('to', null));\n\t\tif ( $payments ) \n\t\t{\n\t\t\t$payment_data = Payment::process_payment($payments->toArray());\n\n\t\t} else {\n\t\t\t//Display a message if there are no payers or payments. Payers need to be added first so we'll show that before.\n\t\t\tSession::flash('message', 'There are no payments. ' . HTML::linkRoute('payments.add', 'Add one') );\n\t\t\tSession::flash('alert-class', 'alert-info');\n\t\t}\n\t\treturn View::make('payments.summary')\n\t\t->with(compact(['payments']));\n\t}", "public function summary()\n { \n $dates = $this->retrieveDates();\n $report = Report::generateSummary($dates);\n\n\t\t$data = [\n\t\t\t'report' => $report,\n\t\t\t'dates' => $this->formatDates()\n\t\t];\n\n\t\treturn view('report.summary', $data);\t\n }", "public function voucher_payment_details($id){\n\t//\tpermittedArea();\n\t\t$data['vouchers'] = singleDbTableRow($id,'vouchers');\n\t\n\t\ttheme('voucher_payment_details', $data);\n\t}", "public function get_price_withvat() {\n return $this->get_count() * ($this->price + $this->price * $this->vat / 100);\n }", "public function effectiveVat() {\n \treturn $this->effectivePrice() * env('VAT_PERCENTAGE');\n }", "public function show(Voiture $voiture)\n {\n //\n }", "public function show(Voiture $voiture)\n {\n //\n }", "public function test_FixedDiscount_specified_using_amountIncVat_in_order_with_single_vat_rate()\n {\n $config = ConfigurationService::getDefaultConfig();\n $order = WebPay::createOrder($config);\n $order->addOrderRow(WebPayItem::orderRow()\n ->setAmountExVat(4.0)\n ->setVatPercent(25)\n ->setQuantity(1)\n )\n ->addOrderRow(WebPayItem::orderRow()\n ->setAmountIncVat(5.0)\n ->setVatPercent(25)\n ->setQuantity(1)\n )\n ->addOrderRow(WebPayItem::orderRow()\n ->setAmountExVat(4.0)\n ->setAmountIncVat(5.0)\n ->setQuantity(1)\n )\n ->addDiscount(WebPayItem::fixedDiscount()\n ->setDiscountId(\"f1i\")\n ->setName(\"couponName\")\n ->setDescription(\"couponDesc\")\n ->setAmountIncVat(1.0)\n ->setUnit(\"kr\")\n );\n\n $formatter = new WebServiceRowFormatter($order);\n $resultRows = $formatter->formatRows();\n $testedRow = $resultRows[3];\n $this->assertEquals(\"f1i\", $testedRow->ArticleNumber);\n $this->assertEquals(\"couponName: couponDesc\", $testedRow->Description);\n $this->assertEquals(-0.8, $testedRow->PricePerUnit);\n $this->assertEquals(25, $testedRow->VatPercent);\n $this->assertEquals(0, $testedRow->DiscountPercent);\n $this->assertEquals(1, $testedRow->NumberOfUnits);\n $this->assertEquals(\"kr\", $testedRow->Unit);\n }", "public function test_FixedDiscount_specified_using_amountExVat_in_order_with_single_vat_rate()\n {\n $config = ConfigurationService::getDefaultConfig();\n $order = WebPay::createOrder($config);\n $order->addOrderRow(WebPayItem::orderRow()\n // cover all three ways to specify items here: iv+vp, ev+vp, iv+ev\n ->setAmountExVat(4.0)\n ->setVatPercent(25)\n ->setQuantity(1)\n )\n ->addOrderRow(WebPayItem::orderRow()\n ->setAmountIncVat(5.0)\n ->setVatPercent(25)\n ->setQuantity(1)\n )\n ->addOrderRow(WebPayItem::orderRow()\n ->setAmountExVat(4.0)\n ->setAmountIncVat(5.0)\n ->setQuantity(1)\n )\n ->addDiscount(WebPayItem::fixedDiscount()\n ->setDiscountId(\"f1e\")\n ->setName(\"couponName\")\n ->setDescription(\"couponDesc\")\n ->setAmountExVat(1.0)\n ->setUnit(\"st\")\n );\n\n $formatter = new WebServiceRowFormatter($order);\n $resultRows = $formatter->formatRows();\n $testedRow = $resultRows[3];\n\n $this->assertEquals(\"f1e\", $testedRow->ArticleNumber);\n $this->assertEquals(\"couponName: couponDesc\", $testedRow->Description);\n $this->assertEquals(-1.0, $testedRow->PricePerUnit);\n $this->assertEquals(25, $testedRow->VatPercent);\n $this->assertEquals(0, $testedRow->DiscountPercent);\n $this->assertEquals(1, $testedRow->NumberOfUnits);\n $this->assertEquals(\"st\", $testedRow->Unit);\n }", "public function ex_tax_or_vat()\n {\n }", "public function getVatAmountSumAttribute()\n {\n return $this->invoiceLines()->sum('vat_amount');\n }", "public function display_prices_including_tax()\n {\n }", "public function getVatNo() : string\n {\n return $this->vatNo;\n }", "public function show(Ventas $ventas)\n {\n //\n }", "public function inc_tax_or_vat()\n {\n }", "public function tax_or_vat()\n {\n }", "public function serviceinvoicedetailsAction()\n {\n $invoiceId = $this->_getParam('invoice_id');\n $invoiceModel = new Core_Model_Invoice($invoiceId);\n $this->view->invoiceId = $invoiceId;\n $this->view->invoiceData = $invoiceModel->fetch();\n $this->view->invoiceItems = $invoiceModel->getServiceItems();\n }", "public function getShowPriceWithTax();", "public function getTotalVatAttribute(): float\n {\n return (float)number_format($this->total_with_vat - $this->total_without_vat, 2, '.', '');\n }", "public function show(Invoice $invoice)\n {\n $purchaseLineItems = PurchaseLineItem::where('invoice_id', $invoice->id)->orderBy('created_at', 'ASC')->get();\n $paymentLineItems = PaymentLineItem::where('invoice_id', $invoice->id)->orderBy('created_at', 'ASC')->get();\n $paymentLineItemsTotal = 0;\n $purchaseLineItemsTotal = 0;\n \n foreach ($purchaseLineItems as $key => $value) {\n $purchaseLineItemsTotal += ($value->price + $value->tax) * $value->quantity;\n }\n\n foreach ($paymentLineItems as $key => $value) {\n $paymentLineItemsTotal += $value->amount;\n }\n\n $purchaseLineItemsTotal = number_format($purchaseLineItemsTotal, 2);\n $paymentLineItemsTotal = number_format($paymentLineItemsTotal, 2);\n $overallTotal = number_format($purchaseLineItemsTotal + $paymentLineItemsTotal, 2);\n\n return view('invoices.show', \n [\n 'invoice' => $invoice,\n 'products' => Product::orderBy('name', 'ASC')->get(),\n 'purchaseLineItems' => $purchaseLineItems,\n 'paymentLineItems' => $paymentLineItems,\n 'purchaseLineItemsTotal' => $purchaseLineItemsTotal,\n 'paymentLineItemsTotal' => $paymentLineItemsTotal,\n 'overallTotal' => $overallTotal,\n ]\n );\n }", "public function getShowTaxString();", "public function views()\n {\n $this->global['pageTitle'] = 'Outgoing Transaction - '.APP_NAME;\n $this->global['pageMenu'] = 'Outgoing Transaction';\n $this->global['contentHeader'] = 'Outgoing Transaction';\n $this->global['contentTitle'] = 'Outgoing Transaction';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n \n $data['list_coverage'] = $this->get_list_warehouse(\"array\");\n $this->loadViews($this->view_dir.'lists', $this->global, $data);\n }", "function summary(){\r\n $member = unserialize($_SESSION['$member']);\r\n\r\n\r\n $this->_f3->set('fName', $member->getFname());\r\n $this->_f3->set('lName', $member->getLname());\r\n $this->_f3->set('age' , $member->getAge());\r\n $this->_f3->set('gender', $member->getGender());\r\n $this->_f3->set('phone', $member->getPhone());\r\n $this->_f3->set('email', $member->getEmail());\r\n $this->_f3->set('state', $member->getState());\r\n $this->_f3->set('seeking', $member->getSeeking());\r\n $this->_f3->set('bio', $member->getBio());\r\n\r\n\r\n if ($member->ispremMember()===true){\r\n $this->_f3->set('inDoorInterests', array($member->getInDoorInterests()));\r\n $this->_f3->set('outDoorInterests', array($member->getOutDoorInterests()));\r\n }\r\n\r\n\r\n $view = new Template();\r\n echo $view-> render('views/summary.html');\r\n }", "function calculate_vat($price, $vat) {\n $calculated_price = ( $price * $vat ) + $price;\n return $calculated_price;\n }", "public function getVatPrice()\n {\n return $this->getPrice() * $this->vat->getAsPercentage();\n }", "function it_exchange_easy_eu_vat_set_checkout_mode_on_invoice_page() {\n\n\t$product_id = it_exchange_get_the_product_id();\n\n\tif ( it_exchange_get_product_type( $product_id ) !== 'invoices-product-type' ) {\n\t\treturn;\n\t}\n\n\techo '<script> var ITExchangeEasyValueAddedTaxesCheckoutPage = true;</script>';\n}", "public function show(VentaUniforme $ventaUniforme)\n {\n \n }", "public function show($id)\n {\n $invoices = Invoice::findOrFail($id);\n $bookings = Booking::with('tenants','rooms')->find($invoices->booking_id);\n $tenants = $bookings->tenants;\n $rooms = $bookings->rooms;\n $rent_days = $invoices->countRentDays($bookings->checkin_date, $bookings->checkout_date);\n $subtotal_room = $invoices->countSubTotalRoomPrice($invoices->booking_id);\n $total_payment = $invoices->countTotalPayment($invoices);\n\n return view('invoices.show',compact('invoices','tenants','rooms','bookings','rent_days','subtotal_room','total_payment'));\n }", "public function orderSummaryAction()\n {\n $this->getOnepage()->getQuote()->collectTotals()->save();\n try {\n $this->loadLayout(false);\n $this->renderLayout();\n } catch (Mage_Core_Exception $e) {\n $this->_message($e->getMessage(), self::MESSAGE_STATUS_ERROR);\n } catch (Exception $e) {\n $this->_message($this->__('Unable to load order review.'), self::MESSAGE_STATUS_ERROR);\n Mage::logException($e);\n }\n }", "public function show(Venta $venta)\n {\n $origen = DB::table('productos_damage')->select('origin_id')->where('destinate_id',$venta->id)->get();\n $cambio = DB::table('historial_cambios_venta')->select('venta_id')->where('destinate_id',$venta->id)->get();\n \n return view('venta.show', ['venta' => $venta,'origen'=>$origen,'cambio'=>$cambio]);\n }", "public function summary() {}", "public function DisplayUnpaidInvoice() {\n $invoices = Invoice::where([\n 'status' => 'Pending',\n ])->orWhere([\n 'status' => 'Late',\n ])->orWhere([\n 'status' => 'Deferred',\n ])->orderByDesc('invoice_id')->paginate(50);\n\n $totalAmount = Invoice::where([\n 'status' => 'Pending',\n ])->orWhere([\n 'status' => 'Late',\n ])->orWhere([\n 'status' => 'Deferred',\n ])->sum('invoice_amount');\n\n return view('miningtax.admin.display.unpaid')->with('invoices', $invoices);\n }", "public function new_vat_line() {\n\t\t$vat_line = new SalesInvoiceVatLine();\n\n\t\t$this->add_vat_line( $vat_line );\n\n\t\treturn $vat_line;\n\t}", "public function showAddVoucher()\n {\n $voucher = new Voucher();\n return view('developers.accounting.vouchers.add', compact('voucher'));\n }", "function show_record_summary_item(item $item) {\n //\n //Condition for displaying a summary arecord are:-\n //a) the summary must exist\n //b) the amount is not null\n $valid = (count($item->statements['summary']->results)>0) \n && (!is_null($item->statements['summary']->results[0][0])); \n //\n //Only cases with data will be shown\n if ($valid){\n //\n //Get the data\n //\n //Let $x be the amount to display. Only one result is expected\n $x = $item->statements['summary']->results[0][0];\n //\n //Format it as an amount, i/r., no decimal and a thousand separator.\n $amount = number_format($x); \n //\n //Show the data\n //\n echo \"<tr name='$item->name'>\";\n //\n //Now show the data\n echo \"<td>\";\n echo $item->name;\n echo \"</td>\";\n //\n //The values should be right aligned\n echo \"<td class='double'>\";\n //\n //Format the amount to currency\n echo $amount;\n echo \"</td>\";\n //\n //Close tr.\n echo \"</tr>\";\n }\n }", "public function displayIncludeTax ()\n\t{\n\t\treturn Mage::helper( \"tax\" )->displayCartPriceInclTax();\n\t}", "public function getPayPalGiftCardVat()\n {\n }", "function showVins($id = 0, $name = false) {\n\n\n\tif($id > 0) {\n\t\t$vins = getApi()->invoke('/vins.json', EpiRoute::httpGet, array('_GET' => array('id' => $id)));\n\n\t\t//this is where the templating goes for a specific page\n\t\techo '<ul>';\n\t\tforeach($vins as $vin) {\n\t\t\techo \"<li>{$vin['id']} - {$vin['name']}</li>\";\n\t\t}\n\t\techo '</ul>';\n\t} else {\n\t\t// redirect to main page's carte de vins\n\t\t$vins = getApi()->invoke('/vins.json', EpiRoute::httpGet);\n\n\t\t//this is where the templating goes for a specific page\n\t\techo '<ul>';\n\t\tforeach($vins as $vin) {\n\t\t\techo \"<li>{$vin['id']} - {$vin['name']}</li>\";\n\t\t}\n\t\techo '</ul>';\n\t}\n}", "public function print_Agt()\r\n {\r\n $data['anggota'] = $this->adminModel->get_list_saldoAgt();\r\n $this->load->view('admin/cetak/print_data', $data);\r\n }", "public function showImpressum()\n {\n $this->show(1, null, true);\n }", "public function DisplayBalance(){ //methods can also be private, public or protected\n return 'Balance: '.$this->balance.'<br>'; //$this references the object, doesnt need $ before balance property\n }", "function display() {\n\n\t\techo \"<pre>\";\n\t\techo \"<b>Numero: </b> \".$this->numero;\n\t\techo \"<br>\";\n\t\techo \"<b>Partenza: </b>\".$this->stazioneP;\n\t\techo \"</pre>\";\n\t\techo \"<hr>\";\n\n\n\t}", "public function getPayPalBasketVatValue()\n {\n }", "public function show(DetalleVenta $detalleVenta)\n {\n //\n }", "public function show(ComisionVenta $comisionVenta)\n {\n //\n }", "public function display()\n {\n $taxType = $this->getTaxType();\n\n $translate = $this->getTranslate();\n\n $taxAmount = $taxType['amount'];\n\n $taxAmountDisplay = ($taxAmount == intval($taxAmount)) ?\n round($taxAmount) : LocaleFormat::getInstance()->numericToLocalized($taxType['amount']);\n\n return sprintf($translate->_('+%s %s'),\n $taxAmountDisplay . '%', $taxType['description']);\n }", "public function show()\n {\n return view('accounting::show');\n }", "public function showPrice(){\n echo 'This vehicle costs '.$this->price.'.<br />';\n}", "public function summary();", "public function summary();" ]
[ "0.6339603", "0.629288", "0.62129724", "0.6176688", "0.6175033", "0.61738306", "0.6071754", "0.6039997", "0.6035963", "0.60305417", "0.60137075", "0.6007355", "0.59861016", "0.59674436", "0.5923015", "0.5909396", "0.58970517", "0.58669007", "0.58631235", "0.5857052", "0.5830734", "0.58065605", "0.5783217", "0.57319957", "0.57192206", "0.56907094", "0.56600505", "0.565215", "0.56288403", "0.56284463", "0.56141216", "0.5591193", "0.5590185", "0.5579342", "0.5566876", "0.5563187", "0.55587137", "0.5553654", "0.5513528", "0.54889274", "0.54730976", "0.54730976", "0.54730976", "0.54597396", "0.5447624", "0.54474396", "0.54420483", "0.5429419", "0.5429419", "0.54238427", "0.5422008", "0.5420557", "0.54133874", "0.54089206", "0.5406525", "0.5402764", "0.5402764", "0.5393005", "0.5389258", "0.5386354", "0.53537405", "0.5351139", "0.53452224", "0.5332036", "0.5327853", "0.5322471", "0.53022826", "0.5289927", "0.52848244", "0.52795476", "0.5277833", "0.527271", "0.5268171", "0.52510583", "0.5246254", "0.52459", "0.52398515", "0.5232474", "0.5213791", "0.5213705", "0.5213504", "0.52011913", "0.5198819", "0.5197922", "0.5194564", "0.5191442", "0.5191279", "0.519115", "0.51868886", "0.51845837", "0.51773816", "0.5176629", "0.5174324", "0.517154", "0.516843", "0.51654714", "0.5164189", "0.5163988", "0.51628226", "0.51628226" ]
0.7233633
0
Add taxes to the receipt.
Добавить налоги в чек.
function it_exchange_easy_eu_value_added_taxes_add_taxes_row_to_receipt() { if ( empty( $GLOBALS['it_exchange']['transaction'] ) ) { return; } $transaction = $GLOBALS['it_exchange']['transaction']; $tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes', true ); $vat_moss_tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_vat_moss_taxes', true ); $memberstates = it_exchange_get_data_set( 'eu-member-states' ); ?> <?php if ( ! empty( $tax_items ) ) : ?> <?php foreach ( $tax_items as $tax ) : ?> <?php if ( empty( $tax['total'] ) ) { continue; } $tax_total = it_exchange_format_price( $tax['total'] ); $tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] ); ?> <tr> <td></td> <td align="right" style="padding: 10px; "> <strong><?php echo $tax_type; ?></strong> </td> <td align="right" style="padding: 10px 0 10px 10px; "> <?php echo $tax_total; ?> </td> </tr> <?php endforeach; ?> <?php endif; ?> <?php if ( ! empty( $vat_moss_tax_items ) ) : ?> <?php foreach ( $vat_moss_tax_items as $tax ) : ?> <?php if ( empty( $tax['total'] ) ) { continue; } $tax_total = it_exchange_format_price( $tax['total'] ); $tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] ); ?> <tr> <td></td> <td align="right" style="padding: 10px; "> <strong><?php echo $tax_type; ?></strong> </td> <td align="right" style="padding: 10px 0 10px 10px; "> <?php echo $tax_total; ?> </td> </tr> <?php endforeach; ?> <?php endif; ?> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_order_tax()\n {\n }", "public function add_tax($tax_rate_id, $tax_amount = 0, $shipping_tax_amount = 0)\n {\n }", "public function update_taxes()\n {\n }", "public function tax($tax_settings = array()) {\r\n\t\t// populate defaults, and verify fields\r\n\t\t$tax_settings = array_merge(configure::read('GoogleCheckout.Tax'), set::filter($tax_settings));\r\n\t\t$tax_settings = array_merge(array('us_rate' => null, 'us_states' => null, 'international_rate' => null, 'international_areas' => null), $tax_settings);\r\n\t\textract($tax_settings);\r\n\r\n\t\t// Add US tax rules\r\n\t\tif (!empty($tax_rule_us)) {\r\n\t\t\t$tax_rule_us = new GoogleDefaultTaxRule($us_rate);\r\n\t\t\t$tax_rule_us->SetStateAreas($us_states);\r\n\t\t\t$this->cart->AddDefaultTaxRules($tax_rule_us);\r\n\t\t}\r\n\r\n\t\t// Add International tax rules\r\n\t\tif (!empty($international_areas)) {\r\n\t\t\t$tax_rule_international = new GoogleDefaultTaxRule($international_rate);\r\n\t\t\tforeach ( $international_areas as $area ) {\r\n\t\t\t\t$tax_rule_international->AddPostalArea($area);\r\n\t\t\t}\r\n\t\t\t$this->cart->AddDefaultTaxRules($tax_rule_international);\r\n\t\t}\r\n\t}", "function it_exchange_easy_eu_value_added_taxes_add_cart_taxes_to_txn_object() {\n $formatted = ( 'it_exchange_set_transaction_objet_cart_taxes_formatted' == current_filter() );\n return it_exchange_easy_eu_value_added_taxes_addon_get_total_taxes_for_cart( $formatted );\n}", "public static function get_tax_total($taxes)\n {\n }", "public function calculateTaxesAndTotals(): void\n {\n $subtotal = '0';\n $discount = '0';\n\n // Initialize variables to hold the Taxes\n $transfers = [];\n $retentions = [];\n\n $totalTransferredAmount = '0';\n $totalRetainedAmount = '0';\n\n foreach ($this->itemList->getItems() as $it) {\n\n $subtotal = Math::add($subtotal, $it->getAmount());\n\n $itemDiscount = $it->getDiscount() ?? '0';\n $discount = Math::add($discount, $itemDiscount);\n\n // Process any Transferred taxes\n if ($it->getTaxes() && $it->getTaxes()->getTransferredList()) {\n foreach ($it->getTaxes()->getTransferredList()->getTransfers() as $tax) {\n $key = $tax->getTax() . '-' . $tax->getFactorType() . '-' . $tax->getRate();\n\n if (!array_key_exists($key, $transfers)) {\n $transfers[$key] = [\n 'tax' => $tax->getTax(),\n 'factorType' => $tax->getFactorType(),\n 'rate' => $tax->getRate(),\n 'amount' => '0',\n ];\n }\n\n $taxAmount = $tax->getAmount() ?? '0';\n $transfers[$key]['amount'] = Math::add($transfers[$key]['amount'], $taxAmount);\n $totalTransferredAmount = Math::add($totalTransferredAmount, $taxAmount);\n }\n }\n\n // Process any Retained taxes\n if ($it->getTaxes() && $it->getTaxes()->getRetainedList()) {\n foreach ($it->getTaxes()->getRetainedList()->getRetentions() as $tax) {\n $key = $tax->getTax();\n\n if (!array_key_exists($key, $retentions)) {\n $retentions[$key] = [\n 'tax' => $key,\n 'amount' => '0',\n ];\n }\n\n $taxAmount = $tax->getAmount() ?? '0';\n $retentions[$key]['amount'] = Math::add($retentions[$key]['amount'], $taxAmount);\n $totalRetainedAmount = Math::add($totalRetainedAmount, $taxAmount);\n }\n }\n }\n\n // Purge the taxes that amount to 0\n foreach ($transfers as $k => $t) {\n if (Math::equal($t['amount'], '0')) {\n unset($transfers[$k]);\n }\n }\n foreach ($retentions as $k => $t) {\n if (Math::equal($t['amount'], '0')) {\n unset($retentions[$k]);\n }\n }\n\n\n // Process Local Taxes\n $totalLocalTransferredAmount = '0';\n $totalLocalRetainedAmount = '0';\n\n if ($this->getLocalTaxes()) {\n foreach ($this->getLocalTaxes()->getTaxesTransferred() as $tax) {\n $totalLocalTransferredAmount = Math::add($totalLocalTransferredAmount, $tax->getAmount());\n }\n\n foreach ($this->getLocalTaxes()->getTaxesRetained() as $tax) {\n $totalLocalRetainedAmount = Math::add($totalLocalRetainedAmount, $tax->getAmount());\n }\n\n $this->getLocalTaxes()->setTotalTransferred($totalLocalTransferredAmount);\n $this->getLocalTaxes()->setTotalRetained($totalLocalRetainedAmount);\n }\n\n\n // Calculate the Total Amount\n $total = $subtotal;\n $total = Math::sub($total, $discount);\n $total = Math::add($total, $totalTransferredAmount);\n $total = Math::sub($total, $totalRetainedAmount);\n $total = Math::add($total, $totalLocalTransferredAmount);\n $total = Math::sub($total, $totalLocalRetainedAmount);\n\n // Update the CFDI object\n $this->setSubTotal($subtotal);\n $this->setDiscount($discount);\n $this->setTotal($total);\n\n\n // Build the Taxes node\n $this->taxes = new Taxes([]);\n $this->taxes->setTotalTransferredAmount(Math::round($totalTransferredAmount,2));\n $this->taxes->setTotalRetainedAmount(Math::round($totalRetainedAmount,2));\n\n $transferredList = new TaxesTransferredList([]);\n foreach ($transfers as $k => $t) {\n $tax = new TaxesTransferred($t);\n $transferredList->addTransfer($tax);\n }\n $this->taxes->setTransferredList($transferredList);\n\n\n $retentionList = new TaxesRetainedList([]);\n foreach ($retentions as $k => $t) {\n $tax = new TaxesRetained($t);\n $retentionList->addRetention($tax);\n }\n $this->taxes->setRetainedList($retentionList);\n }", "public function apply_invoice_taxing(&$sales_taxes)\n\t{\n\t\tif(!empty($sales_taxes))\n\t\t{\n\t\t\t$sort = array();\n\t\t\tforeach($sales_taxes as $k => $v)\n\t\t\t{\n\t\t\t\t$sort['print_sequence'][$k] = $v['print_sequence'];\n\t\t\t}\n\t\t\tarray_multisort($sort['print_sequence'], SORT_ASC, $sales_taxes);\n\t\t}\n\n\t\t$decimals = totals_decimals();\n\n\t\tforeach($sales_taxes as $row_number => $sales_tax)\n\t\t{\n\t\t\t$sales_taxes[$row_number]['sale_tax_amount'] = $this->get_sales_tax_for_amount($sales_tax['sale_tax_basis'], $sales_tax['tax_rate'], $sales_tax['rounding_code'], $decimals);\n\t\t}\n\t}", "protected function add_order_item_totals_tax_rows(&$total_rows, $tax_display)\n {\n }", "public function add_taxes() {\n\t\tregister_taxonomy_for_object_type('post_tag', 'page'); \n\t\t// Add category metabox to page\n\t\tregister_taxonomy_for_object_type('category', 'page'); \n\t}", "public function create_order_tax_lines(&$order, $cart)\n {\n }", "public function setTaxAmount($anount);", "public function get_tax_totals()\n {\n }", "public function get_tax_totals()\n {\n }", "public function get_taxes()\n {\n }", "public function get_taxes()\n {\n }", "protected function add_crumbs_tax()\n {\n }", "private function addTaxTotalNode(UXML $parent, InvoiceTotals $totals) {\n $xml = $parent->add('cac:TaxTotal');\n\n // Add tax amount\n $this->addAmountNode($xml, 'cbc:TaxAmount', $totals->vatAmount, $totals->currency);\n\n // Add each tax details\n foreach ($totals->vatBreakdown as $item) {\n $vatBreakdownNode = $xml->add('cac:TaxSubtotal');\n $this->addAmountNode($vatBreakdownNode, 'cbc:TaxableAmount', $item->taxableAmount, $totals->currency);\n $this->addAmountNode($vatBreakdownNode, 'cbc:TaxAmount', $item->taxAmount, $totals->currency);\n $this->addVatNode($vatBreakdownNode, 'cac:TaxCategory', $item->category, $item->rate,\n $item->exemptionReasonCode, $item->exemptionReason);\n }\n }", "public function inc_tax_or_vat()\n {\n }", "function tep_add_tax($price, $tax) {\n global $currencies;\n\n if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) && $_SESSION['sppc_customer_group_show_tax'] == '1') {\n return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + tep_calculate_tax($price, $tax);\n } else {\n return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);\n }\n }", "public function priceTax()\n {\n return $this->price()->add($this->tax());\n }", "public function output_tax_rates()\n {\n }", "public function addToTax($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The Tax property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Tax[] = $item;\n return $this;\n }", "function osc_add_tax($price, $tax) {\n if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) ) {\n return $price + osc_calculate_tax($price, $tax);\n } else {\n return $price;\n }\n }", "public function calculate_taxes($args = array())\n {\n }", "public function detailsTaxedTotal();", "public static function _insert_tax_rate($tax_rate)\n {\n }", "public function itemsTaxedTotal();", "function insert_tax() \r\n\t{\r\n\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\r\n\t\tif ($this->input->post('insert_tax'))\r\n\t\t{\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_insert_tax();\r\n\t\t}\r\n\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'tiered' into the location type groups, so locations can be listed \r\n\t\t// over multiple html select menus.\r\n\t\t$this->data['locations_tiered'] = $this->flexi_cart_admin->locations_tiered();\r\n\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t$this->load->view('admin/tax/tax_insert_view', $this->data);\r\n\t}", "public function get_total_tax()\n {\n }", "function insert_outlet_tax($outletID, $grossTotal, $promotional_discount, $invoiceID)\n {\n $outlet_tax_list = $this->outlet_tax_list($outletID);\n $amount_with_discount = $grossTotal - $promotional_discount;\n foreach ($outlet_tax_list as $outlet_tax) {\n $taxPercentage = $outlet_tax->taxPercentage;\n $tax_amount = ($amount_with_discount / 100) * $taxPercentage;\n //print_r($amount_with_discount);\n //print_r($outlet_tax);\n //print_r($tax_amount);\n $amount_with_tax = $amount_with_discount + $tax_amount;\n $menusalesoutlettaxes = array(\n \"wareHouseAutoID\" => $outletID,\n \"menuSalesID\" => $invoiceID,\n \"outletTaxID\" => $outlet_tax->outletTaxID,\n \"taxmasterID\" => $outlet_tax->taxMasterID,\n \"GLCode\" => $outlet_tax->supplierGLAutoID,\n \"taxPercentage\" => $taxPercentage,\n \"taxAmount\" => $tax_amount\n );\n $this->db->insert('srp_erp_pos_menusalesoutlettaxes', $menusalesoutlettaxes);\n }\n }", "public function set_taxes($raw_tax_data)\n {\n }", "public function set_taxes($raw_tax_data)\n {\n }", "public function set_taxes($raw_tax_data)\n {\n }", "function addAllTaxes($finalPrice,$fedTax,$stateTax,$ssn,$medical){\r\n\t\t$fedTax = $finalPrice * $fedTax / 100;\r\n\t\t$stateTax = $finalPrice * $stateTax / 100;\r\n\t\t$ssn = $finalPrice * $ssn / 100;\r\n\t\t$medical = $finalPrice * $medical / 100;\r\n\t\t$total = $fedTax + $stateTax + $ssn + $medical;\r\n\t\treturn $total;\r\n\t}", "protected function _addTaxPercents()\n {\n $classToRate = array();\n $request = Mage::getSingleton('tax/calculation')->getRateRequest();\n foreach ($this as &$item) {\n if (null === $item->getTaxClassId()) {\n $item->setTaxClassId($item->getMinimalTaxClassId());\n }\n if (!isset($classToRate[$item->getTaxClassId()])) {\n $request->setProductClassId($item->getTaxClassId());\n $classToRate[$item->getTaxClassId()] = Mage::getSingleton('tax/calculation')->getRate($request);\n }\n $item->setTaxPercent($classToRate[$item->getTaxClassId()]);\n }\n }", "public function getTotalTaxAmount();", "public static function calc_tax($price, $rates, $price_includes_tax = \\false, $deprecated = \\false)\n {\n }", "public function apply_before_tax()\n {\n }", "public function setTax(float $tax);", "public function addToTax(\\Devlabs91\\TravelgateNotify\\Models\\Ota\\AirTaxType $tax)\n {\n $this->tax[] = $tax;\n return $this;\n }", "function oos_add_tax($price, $tax) {\n\n if( ($_SESSION['member']->group['show_price_tax'] == 1) && ($tax > 0) )\n {\n return $price + oos_calculate_tax($price, $tax);\n } else {\n return $price;\n }\n}", "function it_exchange_easy_eu_value_added_taxes_addon_add_taxes_to_template_totals_elements( $elements ) {\n\t// Locate the discounts key in elements array (if it exists)\n\t$index = array_search( 'totals-savings', $elements );\n\tif ( false === $index )\n\t\t$index = -1;\n\n\t// Bump index by 1 to show tax after discounts\n\tif ( -1 != $index )\n\t\t$index++;\n\n\tarray_splice( $elements, $index, 0, 'easy-eu-value-added-taxes' );\n\treturn $elements;\n}", "function tax() \r\n\t{\r\n\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\r\n\t\tif ($this->input->post('update_tax'))\r\n\t\t{\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_update_tax();\r\n\t\t}\r\n\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'tiered' into the location type groups, so locations can be listed \r\n\t\t// over multiple html select menus.\r\n\t\t$this->data['locations_tiered'] = $this->flexi_cart_admin->locations_tiered();\r\n\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t// Get an array of all tax rates.\r\n\t\t$this->data['tax_data'] = $this->flexi_cart_admin->get_db_tax_query()->result_array();\r\n\r\n\t\t// Get any status message that may have been set.\r\n\t\t$this->data['message'] = (!isset($this->data['message'])) ? $this->session->flashdata('message') : $this->data['message'];\r\n\t\r\n\t\t$this->load->view('admin/tax/tax_update_view', $this->data);\r\n\t}", "public function getTaxCalculator();", "public function getTaxes()\n {\n $taxes = array();\n foreach ($this->lineItems as $lineItem) {\n // Create tax record\n $newTax = array(\n 'name' => $lineItem->getTaxName(),\n 'rate' => $lineItem->getTaxRate(),\n 'total' => $this->round($lineItem->getTotal()),\n );\n\n if (is_null($newTax['rate']) && is_null($newTax['name'])) {\n continue;\n }\n\n // Merge array\n $found = false;\n foreach ($taxes as &$tax) {\n if ($tax['name'] == $newTax['name'] && $tax['rate'] == $newTax['rate']) {\n $found = true;\n $tax['total'] = bcadd($tax['total'], $newTax['total']);\n }\n }\n unset($tax);\n\n if (!$found) {\n $taxes[] = $newTax;\n }\n }\n\n // Calculate taxes\n foreach ($taxes as &$tax) {\n $tax['total'] = $this->calculateTax($tax['total'], $tax['rate']);\n }\n unset($tax);\n\n return $taxes;\n }", "public function addTax(Request $request)\n {\n $tax = $request->input('tax');\n\n // Insert new vendor\n if( !empty($tax['country_id']) && !empty($tax['percent']) ) {\n // Check if country name is unique\n if( Tax::where('country_id', $tax['country_id'])->count() > 0 ) {\n return response()->json(\n array('status' => 'fail','message' => 'Tax Setup exists')\n );\n }\n \n // Initialise country object\n $tax = new Tax(\n array(\n 'country_id' => $tax['country_id'],\n 'percent' => $tax['percent'],\n )\n );\n\n // Save new country\n $tax->save();\n\n $return = array(\n 'status' => 'succcess'\n );\n } else {\n $return = array(\n 'status' => 'fail',\n 'message' => 'Name or Tax ID value not set'\n );\n }\n\n return response()->json($return);\n }", "public function get_total_ex_tax()\n {\n }", "protected function set_total_tax($value)\n {\n }", "public function add_tax_form(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$this->data['heading'] = 'Add New Tax';\n\t\t\t$this->data['countryDisplay'] = $this->product_model->SelectAllCountry();\n\t\t\t$this->load->view('admin/tax/add_tax',$this->data);\n\t\t}\n\t}", "function hardcode_tax()\n\t{\n\t\t$output = true;\n\n\t\t$convert_tax = $this->convert_tax();\n\t\t\n\t\tif ($convert_tax['invoices'])\n\t\t{\n\t\t\t## do the stuff\n\t\t\t$sql_select_invoices = $this->query(\"SELECT * FROM \" . DB_PREFIX . \"invoices WHERE tax_calculated=0 LIMIT 100\");\n\n\t\t\twhile ($invoice_details = $this->fetch_array($sql_select_invoices))\n\t\t\t{\n\t\t\t\t$tax_settings = $this->tax_amount($invoice_details['amount'], $this->setts['currency'], $invoice_details['user_id'], $this->setts['enable_tax']);\n\n\t\t\t\t$this->query(\"UPDATE \" . DB_PREFIX . \"invoices SET\n\t\t\t\t\ttax_amount='\" . $tax_settings['amount'] . \"', \n\t\t\t\t\ttax_rate='\" . $tax_settings['tax_rate'] . \"', \n\t\t\t\t\ttax_calculated='1' WHERE invoice_id='\" . $invoice_details['invoice_id'] . \"'\");\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif ($convert_tax['winners'])\n\t\t\t{\n\t\t\t\t$sql_select_winners = $this->query(\"SELECT w.*, a.name, a.apply_tax, a.currency FROM \" . DB_PREFIX . \"winners w\n\t\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"auctions a ON a.auction_id=w.auction_id WHERE \n\t\t\t\t\tw.tax_calculated='0' AND w.invoice_sent='1' LIMIT 10\");\n\t\t\t\t\n\t\t\t\twhile ($invoice_details = $this->fetch_array($sql_select_winners))\n\t\t\t\t{\n\t\t\t\t\t$seller_details = $this->get_sql_row(\"SELECT u.name, u.address, u.city, u.zip_code,\n\t\t\t\t\t\tc.name AS country_name, s.name AS state_name, u.state FROM \" . DB_PREFIX .\"users u\n\t\t\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"countries s ON u.state=s.id\n\t\t\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"countries c ON u.country=c.id WHERE u.user_id=\" . $invoice_details['seller_id']);\n\t\n\t\t\t\t\t$buyer_details = $this->get_sql_row(\"SELECT u.name, u.address, u.city, u.zip_code,\n\t\t\t\t\t\tc.name AS country_name, s.name AS state_name, u.state FROM \" . DB_PREFIX .\"users u\n\t\t\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"countries s ON u.state=s.id\n\t\t\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"countries c ON u.country=c.id WHERE u.user_id=\" . $invoice_details['buyer_id']);\n\t\n\t\t\t\t\t$auction_tax = $this->auction_tax($invoice_details['seller_id'], $this->setts['enable_tax'], $invoice_details['buyer_id']);\n\t\t\t\t\t$invoice_details['apply_tax'] = ($this->setts['enable_tax']) ? $invoice_details['apply_tax'] : 0;\n\t\t\t\t\t\t\n\t\t\t\t\t$tax_details = array(\n\t\t\t\t\t\t'apply' => $invoice_details['apply_tax'],\n\t\t\t\t\t\t'tax_rate' => (($invoice_details['apply_tax']) ? $auction_tax['amount'] . '%' : '-')\n\t\t\t\t\t);\n\t\n\t\t\t\t\t$product_no_tax = $invoice_details['bid_amount'] * $invoice_details['quantity_offered'];\n\t\t\t\t\t$product_postage = ($invoice_details['postage_included']) ? $invoice_details['postage_amount'] : 0;\n\t\t\t\t\t$product_insurance = ($invoice_details['insurance_included']) ? $invoice_details['insurance_amount'] : 0;\n\t\t\t\t\t\t\n\t\t\t\t\t//$product_no_tax_pi = $product_no_tax + $product_postage + $product_insurance;\n\t\t\t\t\t\t\n\t\t\t\t\t$product_tax = ($invoice_details['apply_tax']) ? $product_no_tax * $auction_tax['amount'] / 100 : 0;\n\t\t\t\t\t\n\t\t\t\t\t## postage_amount and insurance_amount are specific for each invoice (not for each auction)!\n\t\t\t\t\t$this->query(\"UPDATE \" . DB_PREFIX . \"winners SET tax_amount='\" . $product_tax . \"', \n\t\t\t\t\t\ttax_rate='\" . $tax_details['tax_rate'] . \"', tax_calculated='1' WHERE \n\t\t\t\t\t\twinner_id='\" . $invoice_details['winner_id'] . \"'\");\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$output = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "public function get_coupon_discount_tax_totals()\n {\n }", "function saveOrderTaxes(&$order)\r\n\t{\r\n\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_tienda/tables');\r\n\r\n\t\t$taxclasses = $order->getTaxClasses();\r\n\t\tforeach($taxclasses as $taxclass)\r\n\t\t{\r\n\t\t\tunset($row);\r\n\t\t\t$row = JTable::getInstance('OrderTaxClasses', 'TiendaTable');\r\n\t\t\t$row->order_id = $order->order_id;\r\n\t\t\t$row->tax_class_id = $taxclass->tax_class_id;\r\n\t\t\t$row->ordertaxclass_amount = $order->getTaxClassAmount($taxclass->tax_class_id);\r\n\t\t\t$row->ordertaxclass_description = $taxclass->tax_class_description;\r\n\t\t\t$row->save();\r\n\t\t}\r\n\r\n\t\t$taxrates = $order->getTaxRates();\r\n\t\tforeach($taxrates as $taxrate)\r\n\t\t{\r\n\t\t\tunset($row);\r\n\t\t\t$row = JTable::getInstance('OrderTaxRates', 'TiendaTable');\r\n\t\t\t$row->order_id = $order->order_id;\r\n\t\t\t$row->tax_rate_id = $taxrate->tax_rate_id;\r\n\t\t\t$row->ordertaxrate_rate = $taxrate->tax_rate;\r\n\t\t\t$row->ordertaxrate_amount = $order->getTaxRateAmount($taxrate->tax_rate_id);\r\n\t\t\t$row->ordertaxrate_description = $taxrate->tax_rate_description;\r\n\t\t\t$row->ordertaxrate_level = $taxrate->level;\r\n\t\t\t$row->ordertaxclass_id = $taxrate->tax_class_id;\r\n\t\t\t$row->save();\r\n\t\t}\r\n\r\n\t\t// TODO Better error tracking necessary here\r\n\t\treturn true;\r\n\t}", "public function insertTax ($insertTax)\n {\n $this->cattermtaxonomy->insert($insertTax);\n }", "protected function combine_item_taxes($item_taxes)\n {\n }", "public function createTaxes(BodyWrapper $request)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/org/taxes'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_POST); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_CREATE); \n\t\t$handlerInstance->setContentType('application/json'); \n\t\t$handlerInstance->setRequest($request); \n\t\t$handlerInstance->setMandatoryChecker(true); \n\t\treturn $handlerInstance->apiCall(ActionHandler::class, 'application/json'); \n\n\t}", "public function addTaxPercents()\n {\n $this->_addTaxPercents = true;\n return $this;\n }", "public function addTaxPercents()\n {\n $this->_addTaxPercents = true;\n return $this;\n }", "protected function calculateTotals()\n {\n $this->attributes['subtotal'] = $this->quantity * $this->price;\n\n $taxFactor = optional($this->taxes)->sum('percentage_decimal') ?? 0;\n\n $tax = $this->is_before_tax\n ? $this->subtotal * $taxFactor\n : $this->subtotal / (1 + $taxFactor) * $taxFactor;\n\n $this->attributes['tax_amount'] = round($tax);\n\n if ($this->is_before_tax) {\n $this->attributes['total'] = $this->subtotal + $this->tax_amount;\n } else {\n $this->attributes['total'] = $this->subtotal;\n }\n }", "public function get_fee_tax()\n {\n }", "public static function ajax_update_order_tax() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$order_id = absint( $_POST['order_id'] );\r\n\t\t$country = strtoupper( esc_attr( $_POST['country'] ) );\r\n\r\n\t\t// Get WC_WooTax_Order object\r\n\t\t$order = self::get_order( $order_id );\r\n\t\r\n\t\tif ( $country != 'US' && $country != 'United States' ) {\r\n\t\t\treturn; // Returning here allows WC_AJAX::calc_line_taxes to take over for non-US orders\r\n\t\t} else {\r\n\t\t\t// Build items array\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.2', '>=' ) ) {\r\n\t\t\t parse_str( $_POST['items'], $items );\r\n\t\t\t} else if ( version_compare( WOOCOMMERCE_VERSION, '2.1.0', '>=' ) ) {\r\n\t\t\t\t$items = array(\r\n\t\t\t\t\t'order_item_id' => array(),\r\n\t\t\t\t\t'order_item_qty' => array(),\r\n\t\t\t\t\t'line_total' => array(),\r\n\t\t\t\t\t'shipping_method_id' => array(),\r\n\t\t\t\t\t'shipping_cost' => array(),\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Add cart items/fees\r\n\t\t\t\tforeach ( $_POST['items'] as $item_id => $item ) {\r\n\t\t\t\t\t$items['order_item_id'][] = $item_id;\r\n\r\n\t\t\t\t\tif ( get_post_type( $order->get_item_meta( $item_id, '_product_id' ) ) == 'product' ) {\r\n\t\t\t\t\t\t$items['order_item_qty'][$item_id] = isset( $item['quantity'] ) ? $item['quantity'] : 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$items['line_total'][$item_id] = $item['line_total'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add item for shipping cost\r\n\t\t\t\tif ( isset( $_POST['shipping'] ) && $_POST['shipping'] != 0 ) {\r\n\t\t\t\t\t$items['shipping_cost'][ WT_SHIPPING_ITEM ] = $_POST['shipping'];\r\n\t\t\t\t\t$items['shipping_method_id'][] = WT_SHIPPING_ITEM;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$order_items = array();\r\n\t\t\t$final_items = array();\r\n\r\n\t\t\t// Add cart items and fees\r\n\t\t\t$order_items = array_merge( $items['order_item_id'], $order_items );\r\n\r\n\t\t\t// Add shipping items\r\n\t\t\tif ( isset( $items['shipping_method_id'] ) ) {\r\n\t\t\t\t$order_items = array_merge( $items['shipping_method_id'], $order_items );\r\n\t\t\t}\r\n\r\n\t\t\t// Construct items array from POST data\r\n\t\t\tforeach ( $order_items as $item_id ) {\r\n\t\t\t\t$product_id = $order->get_item_meta( $item_id, '_product_id' );\r\n\r\n\t\t\t\tif ( get_post_type( $product_id ) == 'product' ) {\r\n\t\t\t\t\t$product = new WC_Product( $product_id );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ( !$product->is_taxable() ) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\r\n\t\t\t\t$qty = 1;\r\n\r\n\t\t\t\tif ( is_array( $items['shipping_method_id'] ) && in_array( $item_id, $items['shipping_method_id'] ) ) {\r\n\t\t\t\t\t// Shipping method\r\n\t\t\t\t\t$tic = WT_SHIPPING_TIC;\r\n\t\t\t\t\t$cost = $items['shipping_cost'][$item_id];\r\n\t\t\t\t\t$type = 'shipping';\r\n\t\t\t\t} else if ( isset( $items['order_item_qty'][$item_id] ) ) {\r\n\t\t\t\t\t// Cart item\r\n\t\t\t\t\t$tic = get_post_meta( $product_id, 'wootax_tic', true );\r\n\t\t\t\t\t$cost = $items['line_total'][ $item_id ];\r\n\t\t\t\t\t$type = 'cart';\r\n\t\t\t\t\t$qty = WC_WooTax::get_option('tax_based_on') == 'line-subtotal' ? 1 : $items['order_item_qty'][ $item_id ];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Fee\r\n\t\t\t\t\t$tic = WT_FEE_TIC;\r\n\t\t\t\t\t$cost = $items['line_total'][$item_id];\r\n\t\t\t\t\t$type = 'fee';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Calculate unit price\r\n\t\t\t\t$unit_price = $cost / $qty;\r\n\r\n\t\t\t\t// Add item to final items array\r\n\t\t\t\tif ( $unit_price != 0 ) {\r\n\t\t\t\t\t// Map item_id to item type \r\n\t\t\t\t\t$type_array[ $item_id ] = $type == 'shipping' ? 'shipping' : 'cart';\r\n\t\t\t\t\r\n\t\t\t\t\t// Add tax amount to tax array\r\n\t\t\t\t\t$old_taxes[ $item_id ] = $order->get_item_tax( $item_id );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add to items array \r\n\t\t\t\t\t$item_data = array(\r\n\t\t\t\t\t\t'Index' => '', // Leave index blank. It is assigned later.\r\n\t\t\t\t\t\t'ItemID' => $item_id, \r\n\t\t\t\t\t\t'Qty' => $qty, \r\n\t\t\t\t\t\t'Price' => $unit_price,\t\r\n\t\t\t\t\t\t'Type' => $type,\r\n\t\t\t\t\t);\t\r\n\r\n\t\t\t\t\tif ( !empty( $tic ) && $tic ) {\r\n\t\t\t\t\t\t$item_data['TIC'] = $tic;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$final_items[] = $item_data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Send lookup request using the generated items and mapping array\r\n\t\t$res = $order->do_lookup( $final_items, $type_array );\r\n\r\n\t\t// Convert response array to be sent back to client\r\n\t\t// @see WC_AJAX::calc_line_taxes()\r\n\t\tif ( is_array( $res ) ) {\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.2', '>=' ) ) {\r\n\t\t\t\tif ( !isset( $items['line_tax'] ) ) {\r\n\t\t\t\t\t$items['line_tax'] = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !isset( $items['line_subtotal_tax'] ) ) {\r\n\t\t\t\t\t$items['line_subtotal_tax'] = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$items['order_taxes'] = array();\r\n\r\n\t\t\t\tforeach ( $res as $item ) {\r\n\t\t\t\t\t$id = $item->ItemID;\r\n\t\t\t\t\t$tax = $item->TaxAmount; \r\n\r\n\t\t\t\t\tif ( is_array( $items['shipping_method_id'] ) && in_array( $id, $items['shipping_method_id'] ) ) {\r\n\t\t\t\t\t\t$items['shipping_taxes'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$items['line_tax'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t\t$items['line_subtotal_tax'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$items['order_taxes'][ self::get_meta( $order_id, 'tax_item_id' ) ] = absint( WT_RATE_ID );\r\n\r\n\t\t\t\twc_save_order_items( $order_id, $items );\r\n\r\n\t\t\t\t// Return HTML items\r\n\t\t\t\t$data = get_post_meta( $order_id );\r\n\t\t\t\t$order = $order->order;\r\n\r\n\t\t\t\tinclude( ABSPATH . '/'. PLUGINDIR . '/woocommerce/includes/admin/meta-boxes/views/html-order-items.php' );\r\n\r\n\t\t\t\tdie();\r\n\t\t\t} else if ( version_compare( WOOCOMMERCE_VERSION, '2.1', '>=' ) ) {\r\n\t\t\t\t// We are going to send back a JSON response\r\n\t\t\t\theader( 'Content-Type: application/json; charset=utf-8' );\r\n\r\n\t\t\t\t$item_tax = $shipping_tax = 0;\r\n\t\t\t\t$tax_row_html = '';\r\n\t\t\t\t$item_taxes = array();\r\n\r\n\t\t\t\t// Update item taxes\r\n\t\t\t\tforeach ( $res as $item ) {\r\n\t\t\t\t\t$id = $item->ItemID;\r\n\t\t\t\t\t$tax = $item->TaxAmount; \r\n\r\n\t\t\t\t\tif ( $id == WT_SHIPPING_ITEM ) {\r\n\t\t\t\t\t\t$shipping_tax += $tax;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$item_taxes[ $id ] = array(\r\n\t\t\t\t\t\t\t'line_subtotal_tax' => wc_format_localized_price( $tax ),\r\n\t\t\t\t\t\t\t'line_tax' => wc_format_localized_price( $tax ),\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t$item_tax += $tax;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fetch array mapping tax rate ids to tax codes\r\n\t\t\t\t$tax_codes = array();\r\n\t\t\t\t$taxes = $order->order->get_taxes();\r\n\r\n\t\t\t\tforeach ( $taxes as $item_id => $data ) {\r\n\t\t\t\t\t$code = array();\r\n\r\n\t\t\t\t\t$rate_id = $data['rate_id'];\r\n\t\t\t\t\t$rate_data = $wpdb->get_row( \"SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = '$rate_id'\" );\r\n\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_country;\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_state;\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_name ? sanitize_title( $rate_data->tax_rate_name ) : 'TAX';\r\n\t\t\t\t\t$code[] = absint( $rate_data->tax_rate_priority );\r\n\r\n\t\t\t\t\t$tax_codes[ $rate_id ] = strtoupper( implode( '-', array_filter( $code ) ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Loop through tax items to build tax row HTML\r\n\t\t\t\tob_start();\r\n\r\n\t\t\t\tforeach ( $taxes as $item_id => $item ) {\r\n\t\t\t\t\tinclude( ABSPATH . '/'. PLUGINDIR . '/woocommerce/includes/admin/post-types/meta-boxes/views/html-order-tax.php' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$tax_row_html = ob_get_clean();\r\n\r\n\t\t\t\t// Return\r\n\t\t\t\techo json_encode( array(\r\n\t\t\t\t\t'item_tax' \t\t=> $item_tax,\r\n\t\t\t\t\t'item_taxes' \t=> $item_taxes,\r\n\t\t\t\t\t'shipping_tax' \t=> $shipping_tax,\r\n\t\t\t\t\t'tax_row_html' \t=> $tax_row_html,\r\n\t\t\t\t) );\r\n\r\n\t\t\t\t// Quit out\r\n\t\t\t\tdie();\r\n\t\t\t} \r\n\t\t} else {\r\n\t\t\tdie( json_encode( array( \r\n\t\t\t\t'status' => 'error', \r\n\t\t\t\t'message' => $res,\r\n\t\t\t) ) ); \r\n\t\t}\r\n\t}", "public function taxTotal()\n {\n return $this->tax()->multiply($this->qty);\n }", "public function getTaxAmount();", "public function getTaxAmount();", "public function set_total_tax($value)\n {\n }", "public function create_tax($data)\n {\n $data['TAX_USER'] = $this->session->userdata('user_id');\n $data['TAX_MODDATE'] = date(\"Y-m-d\");\n \n return $this->create($data, 'TAXONOMY');\n }", "public function set_total_tax($value)\n {\n }", "public static function calc_shipping_tax($price, $rates)\n {\n }", "public static function get_taxes($args)\n {\n }", "public function setTaxes($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->taxes = $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function addVoucherSums () {\n\t\t$tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables');\n\t\t$voucher = $tablesObj->get('voucher');\n\t\t$voucherAmount = $voucher->getRebateAmount();\n\n\t\t$this->calculatedArray['priceNoTax']['vouchertotal'] = $this->calculatedArray['priceNoTax']['total'] - $voucherAmount - $this->calculatedArray['priceNoTax']['creditpoints'];\n\t\t$this->calculatedArray['priceTax']['vouchertotal'] = $this->calculatedArray['priceTax']['total'] - $voucherAmount - $this->calculatedArray['priceTax']['creditpoints'];\n\n\t\t$this->calculatedArray['priceNoTax']['vouchergoodstotal'] = $this->calculatedArray['priceNoTax']['goodstotal'] - $voucherAmount - $this->calculatedArray['priceNoTax']['creditpoints'];\n\t\t$this->calculatedArray['priceTax']['vouchergoodstotal'] = $this->calculatedArray['priceTax']['goodstotal'] - $voucherAmount - $this->calculatedArray['priceTax']['creditpoints'];\n\t}", "public static function remove_order_tax()\n {\n }", "public function set_subtotal_tax($value)\n {\n }", "public function applyTaxRules( $rules )\n {\n // Do the Mambo!\n // $this->load('customershippingslip');\n\n // Reset\n $this->taxes()->delete();\n\n $base_price = $this->quantity*$this->unit_final_price;\n // $base_price = $this->getTaxableAmount();\n // Rounded $base_price is the same, no matters the value of ROUND_PRICES_WITH_TAX\n\n // Initialize totals\n $this->total_tax_incl = $this->total_tax_excl = $base_price;\n\n foreach ( $rules as $rule ) {\n\n $taxClass = $this->getClassName().'Tax';\n $line_tax = new $taxClass();\n// $line_tax = new CustomerShippingSlipLineTax();\n\n $line_tax->name = $rule->fullName;\n $line_tax->tax_rule_type = $rule->rule_type;\n\n $p = Price::create([$base_price, $base_price*(1.0+$rule->percent/100.0)], $this->currency, $this->currency->conversion_rate);\n\n // $p->applyRounding( );\n\n $line_tax->taxable_base = $base_price;\n $line_tax->percent = $rule->percent;\n $line_tax->amount = $rule->amount * $this->quantity;\n $line_tax->total_line_tax = $p->getPriceWithTax() - $p->getPrice() + $p->as_priceable($line_tax->amount);\n\n $line_tax->position = $rule->position;\n\n $line_tax->tax_id = $rule->tax_id;\n $line_tax->tax_rule_id = $rule->id;\n\n $line_tax->save();\n $this->total_tax_incl += $line_tax->total_line_tax;\n\n $this->taxes()->save($line_tax);\n $this->save();\n\n }\n\n }", "function valueAddedTax(int $number): float\n{\n\treturn $number + ($number * 0.12);\n}", "public function getTaxes();", "public function taxes()\n {\n return $this->hasMany(Tax::class);\n }", "public function get_cart_tax()\n {\n }", "public function addTax($data)\n\t{\n\t\t// Do not allow several vat with the same name.\n\t\tif(!$tax = $this->checkVatExists($data['name'])) {\n\n\t\t\t// Create new tax entity.\n\t\t\t$tax= new Tax();\n\t\t\t$tax->setName($data['name']);\n\t\t\t$tax->setAmount($data['amount']);\n\t\t\t$tax->setAccountDebitId($data['debit']);\n\t\t\t$tax->setAccountCreditId($data['credit']);\n\t\t\t\n\t\t\t// Add the entity to the entity manager.\n\t\t\t$this->entityManager->persist($tax);\n\t\t\t\n\t\t\t// Apply changes to database.\n\t\t\t$this->entityManager->flush();\n\t\t\n\t\t}\n\t\t\n\t\treturn $tax;\n\t}", "public function get_cart_discount_tax_total()\n {\n }", "public function setTaxRates(array $rates);", "function it_exchange_easy_eu_value_added_taxes_transaction_hook( $transaction_id ) {\n\t$tax_session = it_exchange_get_session_data( 'addon_easy_eu_value_added_taxes' );\n\n\tif ( !empty( $tax_session['taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes', $tax_session['taxes'] );\n\t}\n\tif ( !empty( $tax_session['vat_moss_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_vat_moss_taxes', $tax_session['vat_moss_taxes'] );\n\t}\n\tif ( !empty( $tax_session['product_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_product_taxes', $tax_session['product_taxes'] );\n\t}\n\tif ( !empty( $tax_session['vat_country'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_customer_vat_country', $tax_session['vat_country'] );\n\t}\n\tif ( !empty( $tax_session['vat_number'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_customer_vat_number', $tax_session['vat_number'] );\n\t}\n\tif ( !empty( $tax_session['total_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_taxes_total', $tax_session['total_taxes'] );\n\t}\n\tif ( !empty( $tax_session['summary_only'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_summary_only', $tax_session['summary_only'] );\n\t}\n\n\tit_exchange_clear_session_data( 'addon_easy_eu_value_added_taxes' );\n\treturn;\n}", "public function add_tax_post() {\n\n try {\n $doctor_id = !empty($this->Common_model->escape_data($this->post_data['doctor_id'])) ? $this->Common_model->escape_data($this->post_data['doctor_id']) : '';\n $tax_data = !empty($this->post_data['tax_data']) ? $this->post_data['tax_data'] : '';\n $tax_data = json_decode($tax_data, true);\n\n if (empty($doctor_id) ||\n empty($tax_data)\n ) {\n $this->bad_request();\n }\n\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'module' => 16,\n 'key' => 1\n );\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n\n foreach ($tax_data as $tax) {\n\n $tax_value = $tax['tax_value'];\n $tax_name = $tax['tax_name'];\n\n if (!is_numeric($tax_value)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('mycontroller_invalid_request');\n $this->send_response();\n }\n\n \n if (validate_percentage($tax_value)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('mycontroller_invalid_request');\n $this->send_response();\n }\n\n //check same tax name already added or not\n $where = array(\n 'tax_name' => strtolower($tax_name),\n 'tax_doctor_id' => $doctor_id,\n 'tax_status' => 1\n );\n\n $get_tax_data = $this->Common_model->get_single_row(TBL_TAXES, 'tax_id', $where);\n\n if (empty($get_tax_data)) {\n $tax_data_array[] = array(\n 'tax_name' => $tax_name,\n 'tax_value' => $tax_value,\n 'tax_doctor_id' => $doctor_id,\n 'tax_created_at' => $this->utc_time_formated\n );\n }\n }\n\n if (!empty($tax_data_array)) {\n $this->Common_model->insert_multiple(TBL_TAXES, $tax_data_array);\n }\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('tax_added');\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "public function set_coupon_discount_tax_totals($value = array())\n {\n }", "public function calc_tax( $price, $rates, $price_includes_tax = true, $suppress_rounding = false ) {\n\n\t\t$price = $price * 100;\t// To avoid float rounding errors, work with integers (pence)\n\n\t\t// Taxes array\n\t\t$taxes = array();\n\n\t\t// Price inc tax\n\t\tif ( $price_includes_tax ) {\n\n\t\t\t$regular_tax_rates = $compound_tax_rates = 0;\n\n\t\t\tforeach ( $rates as $key => $rate )\n\t\t\t\tif ($rate['compound']=='yes')\n\t\t\t\t\t$compound_tax_rates = $compound_tax_rates + $rate['rate'];\n\t\t\t\telse\n\t\t\t\t\t$regular_tax_rates = $regular_tax_rates + $rate['rate'];\n\n\t\t\t$regular_tax_rate \t= 1 + ( $regular_tax_rates / 100 );\n\t\t\t$compound_tax_rate \t= 1 + ( $compound_tax_rates / 100 );\n\t\t\t$tax_rate \t\t\t= $regular_tax_rate * $compound_tax_rate;\n\t\t\t$non_compound_price = ( $price / $compound_tax_rate );\n\n\t\t\tforeach ( $rates as $key => $rate ) {\n\n\t\t\t\t$the_rate = $rate['rate'] / 100;\n\n\t\t\t\tif ( $rate['compound'] == 'yes' )\n\t\t\t\t\t$tax_amount = ( $the_rate / $compound_tax_rate ) * $price;\n\t\t\t\telse\n\t\t\t\t\t$tax_amount = ( $the_rate / $regular_tax_rate ) * $non_compound_price;\n\n\t\t\t\t// ADVANCED: Allow third parties to modify this rate\n\t\t\t\t$tax_amount = apply_filters( 'carton_price_inc_tax_amount', $tax_amount, $key, $rate, $price, $non_compound_price );\n\n\t\t\t\t// Back to pounds\n\t\t\t\t$tax_amount = ( $tax_amount / 100 );\n\n\t\t\t\t// Rounding\n\t\t\t\tif ( get_option( 'carton_tax_round_at_subtotal' ) == 'no' && ! $suppress_rounding ) {\n\t\t\t\t\t$tax_amount = $this->round( $tax_amount );\n\t\t\t\t}\n\n\t\t\t\t// Add rate\n\t\t\t\tif ( ! isset( $taxes[$key] ) )\n\t\t\t\t\t$taxes[ $key ] = $tax_amount;\n\t\t\t\telse\n\t\t\t\t\t$taxes[ $key ] += $tax_amount;\n\n\t\t\t}\n\n\t\t// Prices ex tax\n\t\t} else {\n\n\t\t\t// Multiple taxes\n\t\t\tforeach ( $rates as $key => $rate ) {\n\n\t\t\t\tif ( $rate['compound'] == 'yes' )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$tax_amount = $price * ( $rate['rate'] / 100 );\n\n\t\t\t\t// ADVANCED: Allow third parties to modify this rate\n\t\t\t\t$tax_amount = apply_filters( 'carton_price_ex_tax_amount', $tax_amount, $key, $rate, $price );\n\n\t\t\t\t// Back to pounds\n\t\t\t\t$tax_amount = ( $tax_amount / 100 );\n\n\t\t\t\t// Rounding\n\t\t\t\tif ( get_option( 'carton_tax_round_at_subtotal' ) == 'no' && ! $suppress_rounding ) {\n\t\t\t\t\t$tax_amount = $this->round( $tax_amount );\n\t\t\t\t}\n\n\t\t\t\t// Add rate\n\t\t\t\tif ( ! isset( $taxes[ $key ] ) )\n\t\t\t\t\t$taxes[ $key ] = $tax_amount;\n\t\t\t\telse\n\t\t\t\t\t$taxes[ $key ] += $tax_amount;\n\n\t\t\t}\n\n\t\t\t$pre_compound_total = array_sum( $taxes );\n\n\t\t\t// Compound taxes\n\t\t\tif ( $rates ) {\n\t\t\t\tforeach ( $rates as $key => $rate ) {\n\n\t\t\t\t\tif ( $rate['compound'] == 'no' )\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t$the_price_inc_tax = $price + ( $pre_compound_total * 100 );\n\n\t\t\t\t\t$tax_amount = $the_price_inc_tax * ( $rate['rate'] / 100 );\n\n\t\t\t\t\t// ADVANCED: Allow third parties to modifiy this rate\n\t\t\t\t\t$tax_amount = apply_filters( 'carton_price_ex_tax_amount', $tax_amount, $key, $rate, $price, $the_price_inc_tax, $pre_compound_total );\n\n\t\t\t\t\t// Back to pounds\n\t\t\t\t\t$tax_amount = ( $tax_amount / 100 );\n\n\t\t\t\t\t// Rounding\n\t\t\t\t\tif ( get_option( 'carton_tax_round_at_subtotal' ) == 'no' && ! $suppress_rounding ) {\n\t\t\t\t\t\t$tax_amount = $this->round( $tax_amount );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add rate\n\t\t\t\t\tif ( ! isset( $taxes[ $key ] ) )\n\t\t\t\t\t\t$taxes[ $key ] = $tax_amount;\n\t\t\t\t\telse\n\t\t\t\t\t\t$taxes[ $key ] += $tax_amount;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'carton_calc_tax', $taxes, $price, $rates, $price_includes_tax, $suppress_rounding );\n\t}", "public function testCornerDropFeeAddedWithTax() {\n $values = $this->_getValues();\n $this->assertEquals(10, $values['total_fee']);\n $this->assertEquals(10, $values['base_total_fee']);\n $this->assertEquals(0.83, $values['tax']);\n $this->assertEquals(0.83, $values['base_tax']);\n }", "public function calculate_totals($and_taxes = \\true)\n {\n }", "public function testPOSTExternalTaxCalculators()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function register_existing_tax() {\n\t\tif(is_array($this->post_type)) {\n\t\t\tforeach($this->post_type as $pt) {\n\t\t\t\tregister_taxonomy_for_object_type($this->tax_name, $pt);\n\t\t\t}\n\t\t} else {\n\t\t\tregister_taxonomy_for_object_type($this->tax_name, $this->post_type);\n\t\t}\n\t}", "public function amount_include_tax(){\n\t\treturn 1;\n\t}", "function fn_rus_taxes_install()\n{\n $taxes_exists = db_get_field('SELECT COUNT(*) FROM ?:taxes WHERE status = ?s', 'A');\n\n if ($taxes_exists) {\n return;\n }\n\n $destinations = fn_get_destinations();\n\n $taxes = array(\n array(\n 'tax' => __('rus_taxes.tax.vat20'),\n 'regnumber' => '',\n 'priority' => 0,\n 'address_type' => 'S',\n 'status' => 'A',\n 'price_includes_tax' => 'Y',\n 'tax_type' => TaxType::VAT_20,\n 'rate_value' => 20,\n 'rate_type' => 'P'\n ),\n array(\n 'tax' => __('rus_taxes.tax.vat10'),\n 'regnumber' => '',\n 'priority' => 0,\n 'address_type' => 'S',\n 'status' => 'D',\n 'price_includes_tax' => 'Y',\n 'tax_type' => TaxType::VAT_10,\n 'rate_value' => 10,\n 'rate_type' => 'P'\n ),\n array(\n 'tax' => __('rus_taxes.tax.vat0'),\n 'regnumber' => '',\n 'priority' => 0,\n 'address_type' => 'S',\n 'status' => 'D',\n 'price_includes_tax' => 'Y',\n 'tax_type' => TaxType::VAT_0,\n 'rate_value' => 0,\n 'rate_type' => 'P'\n ),\n );\n\n foreach ($taxes as $tax) {\n $tax['rates'] = array();\n\n foreach ($destinations as $destination) {\n $tax['rates'][$destination['destination_id']] = array(\n 'rate_value' => $tax['rate_value'],\n 'rate_type' => $tax['rate_type']\n );\n }\n\n fn_update_tax($tax, 0);\n }\n}", "function writeTaxes( $overwrite=FALSE ){\n\t\t$q=\"SELECT min(duedate) duedate FROM hb_invoices WHERE status='Paid'\";\n\t\t$res=$this->sdb->query($q)->fetchAll();\n\t\tlist($dateFrom, $dateTo) = Util::getMonthDateRange($res[0]['duedate']);\n\n\t\t$opts=['css'=>[0,'money']];\n\t\twhile(1==1){\n\t\t\t$dateStr=$this->getOutputDateFormat($dateFrom);\n\t\t\t$filename=\"tax_totals_$dateStr\";\n\n\t\t\t// if overwrite, this is the current month, OR the file doesnt exist yet, then overwrite\n\t\t\t$isCurrentMonth = ($dateStr == $this->getOutputDateFormat()) ? TRUE : FALSE;\n\t\t\tif(!file_exists(\"cache/$filename.html\") || $overwrite || $isCurrentMonth){\n\t\t\t\t$tx = $this->getTaxTotals($dateFrom, $dateTo);\n\t\t\t\tksort( $tx );\n\t\t\n\t\t\t\t$this->writeFile(\"cache/$filename.html\", $this->toVertTable($tx, $opts));\n\t\t\t}\n\n\t\t\t$nxtTime = strtotime($dateTo)+(60*60*24*3);\t\t// 3 days in advance of date To\n\t\t\tif($nxtTime > time()) break;\n\t list($dateFrom, $dateTo) = Util::getMonthDateRange($nxtTime);\n\t\n\t\t\tif($c++ > 1000) break;\n\t\t}\n\t}", "protected function addTotals($invoice, $request, $taxes, $sub_total, $discount_total, $tax_total)\n {\n if (!empty($request['totals'])) {\n $sort_order = 1;\n\n foreach ($request['totals'] as $total) {\n $total['invoice_id'] = $invoice->id;\n\n if (empty($total['sort_order'])) {\n $total['sort_order'] = $sort_order;\n }\n\n InvoiceTotal::create($total);\n\n $sort_order++;\n }\n\n return;\n }\n\n $sort_order = 1;\n\n // Added invoice sub total\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'sub_total',\n 'name' => 'invoices.sub_total',\n 'amount' => $sub_total,\n 'sort_order' => $sort_order,\n ]);\n\n $sort_order++;\n\n // Added invoice discount\n if ($discount_total) {\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'discount',\n 'name' => 'invoices.discount',\n 'amount' => $discount_total,\n 'sort_order' => $sort_order,\n ]);\n\n // This is for total\n $sub_total = $sub_total - $discount_total;\n\n $sort_order++;\n }\n\n // Added invoice taxes\n if (isset($taxes)) {\n foreach ($taxes as $tax) {\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'tax',\n 'name' => $tax['name'],\n 'amount' => $tax['amount'],\n 'sort_order' => $sort_order,\n ]);\n\n $sort_order++;\n }\n }\n\n // Added invoice total\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'total',\n 'name' => 'invoices.total',\n 'amount' => $sub_total + $tax_total,\n 'sort_order' => $sort_order,\n ]);\n }", "function wc_prices_include_tax()\n {\n }", "public function TaxCost() {\n // Add any tax that is needed for postage\n $config = SiteConfig::current_site_config();\n $total = 0;\n\n if($config->TaxRate > 0) {\n $total = ($this->SubTotalCost() + $this->PostageCost()) - $this->DiscountAmount();\n $total = ($total > 0) ? ((float)$total / 100) * $config->TaxRate : 0;\n }\n\n return number_format($total,2);\n }", "public function get_line_tax($item)\n {\n }", "public function addTax(TaxEntityInterface $tax)\n {\n $this->taxes[] = $tax;\n }", "public static function store_tax_item_id( $order_id ) {\r\n\t\t$order = self::get_order( $order_id );\r\n\r\n\t\t$tax_item_id = 0;\r\n\r\n\t\t// Find first rate with matching rate id; set $tax_item_id accordingly\r\n\t\tforeach ( $order->order->get_taxes() as $key => $data ) {\r\n\t\t\tif ( $data['rate_id'] == WT_RATE_ID ) {\r\n\t\t\t\t$tax_item_id = $key;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself::update_meta( $order_id, 'tax_item_id', $tax_item_id );\r\n\r\n\t\t// Set subscriptions tax total/shipping tax total\r\n\t\tif ( WT_SUBS_ACTIVE ) {\r\n\t\t\twc_add_order_item_meta( $tax_item_id, 'cart_tax', wc_format_decimal( self::get_meta( $order_id, 'tax_total' ) ) );\r\n\t\t\twc_add_order_item_meta( $tax_item_id, 'shipping_tax', wc_format_decimal( self::get_meta( $order_id, 'shipping_tax_total' ) ) );\r\n\t\t}\r\n\t}", "public function get_cart_contents_tax()\n {\n }", "public function get_tax_total( $taxes ) {\n\t\treturn array_sum( array_map( array( $this, 'round' ), $taxes ) );\n\t}" ]
[ "0.76517946", "0.6920187", "0.6815829", "0.66841936", "0.64733964", "0.6438473", "0.63943166", "0.6337682", "0.6326519", "0.6321325", "0.6280823", "0.62474555", "0.6246831", "0.62458193", "0.6209646", "0.62085146", "0.6161046", "0.6125087", "0.61055666", "0.61040545", "0.6061148", "0.6050751", "0.6047765", "0.6037828", "0.60360366", "0.60279095", "0.6005922", "0.5999591", "0.5958636", "0.5954838", "0.5939162", "0.59383726", "0.5936993", "0.5936807", "0.5919571", "0.5908712", "0.589079", "0.58903027", "0.5883548", "0.5875215", "0.587171", "0.5866799", "0.5863916", "0.585512", "0.5836421", "0.5833735", "0.5832277", "0.5831114", "0.5825443", "0.58202475", "0.5810012", "0.58078647", "0.5803284", "0.57929397", "0.57807916", "0.5768202", "0.5751895", "0.5751895", "0.5749426", "0.57442695", "0.572292", "0.57089025", "0.5704093", "0.5704093", "0.57034016", "0.5702518", "0.5699729", "0.56937975", "0.566575", "0.56500745", "0.56483126", "0.5634366", "0.56326336", "0.5618826", "0.5612384", "0.5612082", "0.56013894", "0.55949587", "0.55850804", "0.5567258", "0.55567634", "0.55566525", "0.5552635", "0.5549436", "0.55362433", "0.5529724", "0.5529259", "0.5522623", "0.5521981", "0.5519144", "0.55169034", "0.5514848", "0.5502856", "0.5488456", "0.5477894", "0.54776496", "0.547375", "0.54594123", "0.54548156", "0.5454658" ]
0.71669096
1
Function that gets the search term submitted through AJAX and retrieves all the data as required by the specification. Retrieves: Question, who posted the question as well as the date All the answers with the person who answered and their rating All users who answered are ranked based on the rating of the provided answer and not by their total user rating
Функция, которая получает термин поиска, отправленный через AJAX, и получает все данные, как требуется в спецификации. Получает: Вопрос, кем был задан вопрос, а также дата. Все ответы с информацией о том, кто дал ответ и его рейтинг. Пользователи, которые дали ответы, ранжируются на основе рейтинга предоставленного ответа, а не по общему рейтингу пользователя.
public function term(){ $search_term = urldecode($this->uri->segment(3)); $data["questions"] = $this->questions_model->search_titles($search_term); if($data["questions"] != false){ for($i=0;$i<count($data["questions"]);$i++){ $data["questions"][$i]["answers"] = $this->answers_model->get_answers($data["questions"][$i]["question_id"]); } $index = 0; for($i=0; $i<count($data["questions"]); $i++){ foreach($data["questions"][$i]["answers"] as $answer){ $result = $this->user_details_model->get_rating($answer["user_id"]); $data["questions"][$i]["answers"][$index]["user_rating"] = $result; $index++; } $index = 0; } $html = ""; foreach($data["questions"] as $question){ $html .= '<div class="results_table"> <div class="answer_info"> <p class="number_of_answers">'; if(count($question["answers"]) == 0){ $html .= '<span class="guest_search_header"> 0 answers </span>'; } else if(count($question["answers"]) == 1){ $html .= '<span class="guest_search_header">1 answer </span>'; $html .= '<p class="small_text">Users who answered(rating):</p><p class="small_text">(ordered by their answer rating)</p>'; } else{ $html .= '<span class="guest_search_header">' . count($question["answers"]) . ' answers </span>'; $html .= '<p class="small_text">Users who answered(rating):</p><p class="small_text">(ordered by their answer rating)</p>'; } $html .= '</p>'; if(count($question["answers"]) > 0){ $html .= '<ul class="who_answered_list">'; foreach($question["answers"] as $answer){ $html .= '<li><b>' . htmlspecialchars($answer["username"]); $html .= ' (' . $answer["user_rating"] . ')'; $html .= '</b></li>'; } $html .= '</ul>'; } $html .= '</div>'; $html .= '<div class="question_info"> <p class="title">'; $html .= '<a href="https://w1416464.users.ecs.westminster.ac.uk/CI_1/index.php/questions/view_question/' . $question["question_id"] . '">'; $html .= htmlspecialchars($question["title"]) . '</a></p>'; $html .= '<span class="posted_by">Posted by: <b>' . htmlspecialchars($question["username"]) . '</b></span>'; $html .= '<span class="posted_on">Posted on: <b>' . date("d.m.Y", strtotime($question["date_posted"])) . '</b></span>'; $html .= '</div> </div>'; } echo $html; } else{ echo ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quickSearchData()\n{\t\n\n\t$query = $_POST[\"query\"];\n\t$reDataManager = new researchDataManager();\n\n\tsession_start();\n\t$user = $_SESSION[\"username\"];\n\n\t$userManager = new userManager();\n\t$userInfo = $userManager->get_info_basedOnName($user);\n\t$permission = $userInfo[0][\"vOrS_a_redata\"];\n\n\n\treturn $reDataManager->quickSearch(getKwId($query),$permission,$user);\n}", "function showRecommendations() {\n // Define the return string variable\n $return_string = \"\";\n \n // Check if the session variable form submitted is set. If yes display the \n // results, otherwise display the form\n if ( isset( $_SESSION['recommendations_form_submitted'] )\n&& $_SESSION['recommendations_form_submitted'] === TRUE ) {\n \n // Initialize some variables;\n $compare = FALSE;\n $compare_results = array();\n $compare_app = \"\";\n $results = array();\n $header = array();\n $rows = array();\n \n // Get the recommender app session var\n $recommender_app = $_SESSION['recommender_app'];\n \n // Get the recommender_type_value session var\n $value = $_SESSION['recommender_type_value'];\n \n // Get the recommender app name\n $recommender_app_name = getRecommenderAppName($recommender_app);\n \n // Check if the user wants to compare two algorithms\n if ( isset($_SESSION['recsys_wb_compare_form_submitted']) \n&& $_SESSION['recsys_wb_compare_form_submitted'] === TRUE) {\n $compare = TRUE;\n }\n \n // Check which recommender type if is\n $type = 'score';\n if ( $_SESSION['recommender_type'] === 'top n' )\n $type = 'top_n';\n \n if ( preg_match(\"/^book/\", $recommender_app_name) ) {\n $results = getBookRecommendations(\n $type, \n user_id, \n $recommender_app, \n $value \n );\n $entity = 'Book';\n \n // Check if compare is set\n if ( $compare ) {\n $compare_app = $_SESSION['recsys_wb_compare_app_id'];\n $compare_results = getBookRecommendations(\n $type, \n user_id, \n $compare_app, \n $value \n );\n }\n } \n else {\n // Get movie recommendations\n $results = getMovieRecommendations(\n $type, \n user_id, \n $recommender_app, \n $value \n );\n $entity = 'Movie';\n \n // Check if compare is set\n if ( $compare ) {\n $compare_app = $_SESSION['recsys_wb_compare_app_id'];\n $compare_results = getMovieRecommendations(\n $type, \n user_id, \n $compare_app, \n $value \n );\n }\n } \n \n if ( sizeof($results) == 0 )\n {\n unset( $_SESSION['recommendations_form_submitted'] );\n return \"You have no recommendations yet. Make sure you rate some movies \"\n . \" and/or books and come back later!\" . drupal_render( \n drupal_get_form('recsys_wb_reset_form') );\n }\n\n if ( $compare ) {\n // Prepare the table headers and rows\n $header = array(\n getRecommenderAppTitle($recommender_app),\n t('Score'),\n getRecommenderAppTitle($compare_app),\n t('Score'),\n );\n $rows = array();\n \n if ( sizeof($compare_results) > sizeof($results) )\n {\n $max = sizeof($compare_results);\n }\n else {\n $max = sizeof($results);\n }\n \n // Loop through all results and fill up the list\n for ($i=0; $i < $max; $i++) { \n $orig = array(\"-\",\"-\");\n $comp = array(\"-\",\"-\");\n \n if ( array_key_exists($i, $results) ) {\n $orig = $results[$i];\n $orig[0] = createEntityLinkByName($orig[0]);\n }\n \n if ( array_key_exists($i, $compare_results) ) {\n $comp = $compare_results[$i];\n $comp[0] = createEntityLinkByName($comp[0]);\n }\n \n $rows[] = array($orig[0],$orig[1],$comp[0],$comp[1]);\n }\n }\n else {\n // Prepare the table headers and rows\n $header = array( $entity, t('Score') );\n $rows = array();\n \n // Loop through the db query results and add each of them to the rows \n // array\n foreach ($results as $result ) {\n $result[0] = createEntityLinkByName($result[0]);\n $rows[] = $result;\n }\n }\n \n // Add some description\n if ( $type === 'score' ) {\n if ( ! $compare )\n {\n $return_string .= \"<h4>Recommendations based on prediction score >= \";\n $return_string .= $value . \" and algorithm \";\n $return_string .= getRecommenderAppTitle($recommender_app) . \"</h4>\";\n }\n else {\n $return_string .= \"<h4>Recommendations based on prediction score >= \";\n $return_string .= $value . \"<br/>\";\n $return_string .= getRecommenderAppTitle($recommender_app) . \" vs. \";\n $return_string .= getRecommenderAppTitle($compare_app) . \"</h4>\";\n }\n }\n else {\n if ( ! $compare )\n {\n $return_string .= \"<h4>Top \" . $value . \" recommendations based on \";\n $return_string .= getRecommenderAppTitle($recommender_app) . \"</h4>\";\n }\n else {\n $return_string .= \"<h4>Top \" . $value . \" recommendations<br/>\";\n $return_string .= getRecommenderAppTitle($recommender_app) . \" vs. \";\n $return_string .= getRecommenderAppTitle($compare_app) . \"</h4>\";\n }\n } \n \n // Assign the renderable array to the return string \n $return_string .= theme(\n 'table', \n array( 'header' => $header, 'rows' => $rows ) \n );\n \n // Add the compare_to form\n if ( ! $compare ) {\n $return_string .= drupal_render( \n drupal_get_form('recsys_wb_compare_form') \n );\n $return_string .= \"<br/><strong>OR</strong><br/>\";\n }\n \n // Add the reset form\n $return_string .= \"<br/>\" . drupal_render( \n drupal_get_form('recsys_wb_reset_form') \n );\n } \n else{\n $return_string .= drupal_render( \n drupal_get_form('recsys_wb_get_recommendations_form')\n );\n }\n\n return $return_string;\n}", "function search(){\n echo \"<form method='get' action='index.php'> Search by\n <label for='searchfield'>Searchfield:</label>\n <input type='radio' name='searchterm' value=bookTitle>Book\n <input type='radio' name='searchterm' value=authorFirst>Name<br>\n <label for='searchfield'>Collection Field:</label>\n <input type='radio' name='collection_term' value='1' checked>My library\n <input type='radio' name='collection_term' value='2'>Wishlist\n <input type='radio' name='collection_term' value='3'>Unread\n <input type='radio' name='collection_term' value='4'>Read<br>\n <label for='searchtext' method='get'>\n <input type='text' name='searchtext' size='10' maxlength='30' placeholder='search text' />\n </label>\n <input type='submit' value='Submit' name='search_term'>\n </form>\";\n }", "function ld_adv_quiz_pro_ajax() {\n\n\t\t// First we unpack the $_POST['results'] string\n\t\tif ( ( isset( $_POST['data']['responses'] ) ) && ( !empty( $_POST['data']['responses'] ) ) && ( is_string( $_POST['data']['responses'] ) ) ) {\n\t\t\t$_POST['data']['responses'] = json_decode( stripslashes( $_POST['data']['responses'] ), true );\n\t\t}\n\n\t\t//error_log('in '. __FUNCTION__ );\n\t\t//error_log('_POST<pre>'. print_r($_POST, true) .'</pre>');\n\n\t\t$func = isset( $_POST['func'] ) ? $_POST['func'] : '';\n\t\t$data = isset( $_POST['data'] ) ? (array)$_POST['data'] : null;\n\n\t\tswitch ( $func ) {\n\t\t\tcase 'checkAnswers':\n\t\t\t\techo $this->checkAnswers( $data );\n\t\t\t\tbreak;\n\t\t}\n\n\t\texit;\n\t}", "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Professor->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "public function getSurveyAction() {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n $data = str_replace(\"?\", \"\\?\", $this->_request->getParam(\"data\"));\n $data = str_replace(\"(\", \"\\(\", $data);\n $data = str_replace(\")\", \"\\)\", $data);\n $start_date = $this->_request->getParam(\"start_date\");\n $end_date = $this->_request->getParam(\"end_date\");\n $this->getResponse()->setHeader('Access-Control-Allow-Origin', '*');\n $ratingSign = \"1\";\n\n $results['positive'] = $this->innerSurveyFunction($data, $ratingSign, $start_date, $end_date);\n $ratingSign = \"-1\";\n $results['negative'] = $this->innerSurveyFunction($data, $ratingSign, $start_date, $end_date);\n //print('<xmp>');\n //$data = Repo_Client::getInstance()->getRows(\"parent_id=\".$this->_getClientContext());\n //print('<xmp>');\n //print_r($data->toArray());\n //print('</xmp>');\n // print('<xmp>');\n // print_r($this->_getClientContext());\n // print('</xmp>');\n\n $bigData = array();\n if (!empty($results['positive'])) {\n foreach ($results['positive'] as $res) {\n $bigData[$res['survey_name']][$res['option']][$res['data']]['positive'] = $res['sum_of_all'];\n }\n }\n if (!empty($results['negative'])) {\n foreach ($results['negative'] as $res) {\n $bigData[$res['survey_name']][$res['option']][$res['data']]['negative'] = $res['sum_of_all'];\n }\n }\n $this->getResponse()->setBody(Zend_Json::encode(array('results' => $bigData)));\n }", "public function get_autocomplete()\n {\n $data['result'] = $this->json_response($this->json_status['error']);\n \n if ($this->is_ajax()) {\n $term = $this->input->get('term', TRUE);\n $user_id = $this->input->get('user_id', TRUE);\n \n $this->object_model->db->like(array(\n 'name' => $term\n ));\n \n if ($user_id)\n $this->object_model->db->where(array(\n 'user_id' => $user_id\n ));\n \n $items = $this->object_model->get(false, \"id, name as label, name as value, rate, description\");\n \n if (! $items) {\n $items[] = array(\n 'id' => 0,\n 'value' => lang(\"no_record_found\")\n );\n }\n \n $data['result'] = json_encode($items);\n }\n \n $this->template('/ajax', $data, TRUE);\n }", "abstract function getTermResult($termData, $selections, $regardingQuestionId = NULL, $regardingAnswerId = NULL, $allowNonNumeric = false);", "public function questionnaire_search(){\n\n if($this->filters['type'] == \"author\"){\n return $this->author_search();\n }\n\n\n $keywordCondition = \"( \";\n foreach($this->termArray as $keyword){\n $keywordCondition .= \"q.`content` LIKE '%\". $this->db->escape_like_str($keyword) .\"%' OR qn.`name` LIKE '%\". $this->db->escape_like_str($keyword) .\"%' OR \";\n }\n $keywordCondition = rtrim($keywordCondition,\"OR \");\n $keywordCondition .= \")\";\n\n\n $this->db->select(\"qn.questionnaire_id, qn.name, qn.author, qn.year, count(qq.question_id) as qCount\");\n $this->db->where($keywordCondition );\n\n if(isset($this->filters['filter']['year'])){\n $this->db->where(\"year\",$this->filters['filter']['year']);\n }\n\n $this->db->from(\"question as q\");\n $this->db->join(\"questionnaire_question as qq\", \"qq.question_id = q.question_id\");\n $this->db->join(\"questionnaire as qn\", \"qn.questionnaire_id = qq.questionnaire_id\");\n\n $this->db->group_by(\"qq.questionnaire_id\");\n $this->db->order_by(\"year\", \"DESC\");\n $this->db->order_by(\"qCount\", \"DESC\");\n\n\n\n $query = $this->db->get();\n $result = $query->result();\n\n $searchResult = array();\n $searchResultIndex = 0;\n foreach ($result as $qn){\n $searchResult[] = new Search_result_model($qn);\n\n // see if they have any relevant questions and if so add them to the questions of the search model\n $keywordCondition = \"( \";\n foreach($this->termArray as $keyword){\n $keywordCondition .= \"q.`content` LIKE '%\". $this->db->escape_like_str($keyword) .\"%' OR \";\n }\n $keywordCondition = rtrim($keywordCondition,\"OR \");\n $keywordCondition .= \")\";\n\n $this->db->select(\"q.question_id, q.content\");\n $this->db->where($keywordCondition);\n\n $this->db->from(\"question as q\");\n $this->db->join(\"questionnaire_question as qq\", \"qq.question_id = q.question_id\");\n $this->db->where(\"qq.questionnaire_id = {$qn->questionnaire_id}\");\n $this->db->limit(3);\n\n $query = $this->db->get();\n $questions = $query->result();\n\n //print_r($questions);\n $searchResult[$searchResultIndex]->set_questions($questions);\n\n $searchResultIndex++;\n }\n\n\n\n return $searchResult;\n\n\n\n\n\n //find all the questions that have the term in them\n if(isset($this->filters)){\n if(isset($this->filters['column'])){\n $this->columns = $this->filters['column'];\n }\n\n if(isset($this->filters['year'])){\n $this->where = \"(`year` = \" . (int)$this->filters['year']. \")\";\n }\n }\n\n }", "function suggest()\n\t{\n\t\t$q = $this->input->post('term');\n\t\t$user_info = $this->Employee->get_logged_in_employee_info();\n\t\t$suggestions = $this->Customer->get_search_suggestions($q , 30 , $user_info);\n\t\t//echo implode(\"\\n\",$suggestions);\n\t\techo json_encode($suggestions);\n\t}", "public function suggestionHelper()\n\t{\n\t\t$result = [];\n\t\t$response = [];\n\t\t$title = '';\n\t\t$builder;\n\n\t\tif (Input::has('title')) {\n\t\t\t$title = Input::get('title');\n\t\t\t$result = SearchEngine::search($title, 'faq', [Faq::getTitleColumnName()]);\n\n\t\t\tif (Input::has('category')) {\n\t\t\t\t$result = $result->where('category', Input::get('category'));\n\t\t\t}\n\n\t\t\t$result = $result->orderBy('popularity', 'desc')->take(5)->lists('id')->all();\n\t\t\n\t\t\tforeach ($result as $key => $id) {\n\t\t\t\t$response[$key] = [];\n\t\t\t\t$response[$key]['title'] = Lang::get('faqDB.' . $id . '.name');\n\t\t\t\t$response[$key]['href'] = Faq::find($id)->getLink();\n\t\t\t}\n\t\t}\n\n\t\treturn json_encode($response);\n\t}", "function show_surveydata ($data) {\r\n\r\n #~ //IN CASE admin, we want to show the result answers next to the answers\r\n #~ if ($_SESSION['auth'] == 1) {\r\n #~ global $survey_id;\r\n #~ $lines_a = '';\r\n #~ $sql = \"select * from answers where survey_id='$survey_id'\";\r\n #~ $res = mysql_query($sql);\r\n #~ $result_summary = array();\r\n #~ while ($row = mysql_fetch_array($res)) {\r\n #~ $answer_data = unserialize($row['data']);\r\n #~ $idx = 0;\r\n #~ foreach ($answer_data as $answer) {\r\n #~ if ($data[$idx]['mode'] == 'M' or $data[$idx]['mode'] == 'O' or $data[$idx]['mode'] == 'C') {\r\n #~ if (is_array($answer)) { // case for checkboxes\r\n #~ foreach ($answer as $ans) {\r\n #~ //for Lainnya, ans is array of answer id + essay\r\n #~ if (is_array($ans)) {\r\n #~ $ans = $ans[0];\r\n #~ }\r\n #~ $result_summary[$idx][$ans] += 1;\r\n #~ }\r\n #~ }\r\n #~ else {\r\n #~ $result_summary[$idx][$answer] += 1;\r\n #~ }\r\n #~ }\r\n #~ $idx++;\r\n #~ }\r\n #~ }\r\n #~ }\r\n\r\n\r\n foreach ($data as $question_id=>$q) {\r\n $number = $question_id + 1;\r\n // show RED when method is POST yet this question has not been answered yet\r\n echo \"\\r\\n<dl>\";\r\n $req_str = $q['required']? '<b><span style=color:red>*</span></b> ' : '';\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST' and $q['required'] and (!array_key_exists('q^'.$question_id, $_REQUEST) or $_REQUEST['q^'.$question_id] == ''))\r\n #~ echo \"$req_str<b><span style=color:red>$number. {$q['text']}</span></b>\";\r\n echo \"<span style=color:red>[belum terisi]</span> $req_str$number. {$q['text']}\";\r\n else\r\n echo \"$req_str$number. {$q['text']}\";\r\n if ($q['mode'] == 'M') {\r\n foreach ($q['answers'] as $answer_id=>$answer_desc) {\r\n $checked = '';\r\n #~ if (strval($_REQUEST['q^'.$question_id]) === strval($answer_id))\r\n if ($_REQUEST['q^'.$question_id] != '' and $_REQUEST['q^'.$question_id] == $answer_id)\r\n $checked = 'checked';\r\n if (substr($answer_desc,0,1) == '@') { //jawaban lainnya\r\n $answer_desc = substr($answer_desc,1);\r\n echo \"\\r\\n<dd><input type='radio' name='q^$question_id' value='$answer_id' $checked> $answer_desc <input type='text' name='q^$question_id^$answer_id^@' value='\".$_REQUEST['q^'.$question_id.'^'.$answer_id.'^@'].\"'>\";\r\n }\r\n else {\r\n echo \"\\r\\n<dd><input type='radio' name='q^$question_id' value='$answer_id' $checked> $answer_desc\";\r\n }\r\n #~ if ($_SESSION['auth'] == 1) { // let's show result for this question\r\n #~ $ca = $result_summary[$question_id][$answer_id];\r\n #~ $ca = $ca? $ca: 0;\r\n #~ echo '<b> = '.$ca.'</b>';\r\n #~ }\r\n }\r\n }\r\n elseif ($q['mode'] == 'O') { //SELECT\r\n echo \"\\r\\n<dd><select name='q^$question_id'><option value=''></option>\";\r\n foreach ($q['answers'] as $answer_id=>$answer_desc) {\r\n $checked = '';\r\n #~ if (strval($_REQUEST['q^'.$question_id]) === strval($answer_id))\r\n if ($_REQUEST['q^'.$question_id] != '' and $_REQUEST['q^'.$question_id] == $answer_id)\r\n $checked = 'selected';\r\n echo \"<option value='$answer_id' $checked> $answer_desc\";\r\n #~ if ($_SESSION['auth'] == 1) { // let's show result for this question\r\n #~ $ca = $result_summary[$question_id][$answer_id];\r\n #~ $ca = $ca? $ca: 0;\r\n #~ echo '<b> = '.$ca.'</b>';\r\n #~ }\r\n echo \"</option>\";\r\n }\r\n echo '</select>';\r\n }\r\n elseif ($q['mode'] == 'C') { //CHECKBOXES\r\n #~ $idx2 = 0;\r\n #~ echo '['.$question_id,']';\r\n #~ print_r($_REQUEST['q^'.$question_id]);\r\n #~ die();\r\n echo \"\\r\\n<dd>\";\r\n foreach ($q['answers'] as $answer_id=>$answer_desc) {\r\n $checked = '';\r\n if ($_REQUEST['q^'.$question_id] != '' and in_array($answer_id,$_REQUEST['q^'.$question_id]))\r\n $checked = 'checked';\r\n if (substr($answer_desc,0,1) == '@') { //jawaban lainnya\r\n $answer_desc = substr($answer_desc,1);\r\n echo \"\\r\\n<br><input type='checkbox' name='q^\".$question_id.\"[]' value='$answer_id' $checked> $answer_desc <input type='text' name='q^$question_id^$answer_id^@' value='\".$_REQUEST['q^'.$question_id.'^'.$answer_id.'^@'].\"'>\";\r\n }\r\n else {\r\n echo \"\\r\\n<input type='checkbox' name='q^\".$question_id.\"[]' value='$answer_id' $checked> $answer_desc &nbsp; \";\r\n }\r\n #~ if ($_SESSION['auth'] == 1) { // let's show result for this question\r\n #~ $ca = $result_summary[$question_id][$answer_id];\r\n #~ $ca = $ca? $ca: 0;\r\n #~ echo '<b> = '.$ca.'</b>';\r\n #~ }\r\n #~ $idx2++;\r\n }\r\n }\r\n elseif ($q['mode'] == 'E') {\r\n echo \"\\r\\n<dd><textarea rows=10 cols=70 name='q^$question_id'>{$_REQUEST['q^'.$question_id]}</textarea>\";\r\n }\r\n elseif ($q['mode'] == 'T') {\r\n echo \"\\r\\n<dd><input type=text name='q^$question_id' value='{$_REQUEST['q^'.$question_id]}'>\";\r\n }\r\n elseif ($q['mode'] == 'U') {\r\n //first of all, extract question variable\r\n foreach ($q['param_2'] as $c_question) {\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST' and $c_question['required']) {\r\n //iterate request for any answers\r\n $found = 0;\r\n foreach ($_REQUEST as $key=>$value) { //qx^1a^*\r\n if (strstr($key,'qx^'.$c_question['id'].'^') and $value != '')\r\n $found = 1;\r\n }\r\n if ($found == 0)\r\n $_REQUEST['qy^'.$c_question['id']] = '<span style=color:red>[belum terisi]</span> '.$c_question['text'];\r\n else\r\n $_REQUEST['qy^'.$c_question['id']] = $c_question['text'];\r\n }\r\n else {\r\n $_REQUEST['qy^'.$c_question['id']] = $c_question['text'];\r\n }\r\n }\r\n include $q['param_1'];\r\n }\r\n else {\r\n exit(\"<h3>unsuported question mode [{$q['mode']}]</h3><pre>{$q['text']}</pre>\");\r\n }\r\n echo \"</dl>\";\r\n }\r\n if ($_SESSION['auth'] == 1) {\r\n echo \"<a href='{$_SERVER['PHP_SELF']}?admin=1'><b>&lt;&lt; Back to Survey Engine Administration</b></a>\";\r\n }\r\n}", "public function process_suggest() {\n\t\tif ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'ctrs-curation' ) )\n\t\t\treturn;\n\n\t\tif ( empty( $_REQUEST['q'] ) )\n\t\t\tdie();\n\n\t\t$search = sanitize_text_field( strtolower( $_REQUEST['q'] ) );\n\t\t$posts = $this->search_posts( $search );\n\n\t\tif ( $posts ) {\n\t\t\tforeach ( $posts as $post ) {\n\t\t\t\techo trim( esc_html( strip_tags( get_the_title( $post ) ) ) ) . \" | \" . $post->ID . \"\\n\";\n\t\t\t}\n\t\t}\n\n\t\tdie();\n\t}", "public function unansweredQuestionsSearch(){\n if($this->request->is('post')){\n\t\t\t$this->visitorlogs('Questions','unansweredQuestionsSearch','More Unanswered Question Listing',NULL,NULL,NULL,NULL);\t//Log details insertion\n\t\t\t$QuestionsTable = TableRegistry::get('Questions');\n\t\t\t//for getting not answered questions\n\t\t\t$QuestionAnswerTable = TableRegistry::get('QuestionAnswer');\n\t\t\t$unanswered_ids = $QuestionAnswerTable->find('list', [/*'conditions'=>['QuestionAnswer.status'=>'I'],*/ 'group'=>'QuestionAnswer.question_id', 'keyField'=>'id','valueField'=>'question_id'])->toArray();\n\t\t\tif(!empty($unanswered_ids)){\n\t\t\t\tif($this->request->query('search') != NULL){\n\t\t\t\t\t$UsersTable = TableRegistry::get('Users');\n\t\t\t\t\t$get_match_users = $UsersTable->find('list',['conditions'=>['OR'=>['Users.name LIKE' => '%'.trim($this->request->query('search')).'%','Users.full_name LIKE' => '%'.trim($this->request->query('search')).'%']]])->toArray();\n\t\t\t\t\tif(!empty($get_match_users)){\n\t\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.user_id IN' => $get_match_users\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];\n\t\t\t\t\t}else{\t\t\t\n\t\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%'\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];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$options['contain'] \t= ['QuestionCategories','Users'=>['fields'=>['id','name','full_name']],'QuestionTags'=>['fields'=>['id','question_id','tag_id']],'QuestionTags.Tags'=>['fields'=>['id','title','slug']],'AnswerUpvote'=>['conditions'=>['AnswerUpvote.status'=>1],'fields'=>['id','question_id']],'QuestionAnswer'=>['conditions'=>['QuestionAnswer.status'=>'I'],'fields'=>['id','question_id']]];\n\t\t\t\t$options['conditions'][]= ['Questions.id NOT IN'=>$unanswered_ids,'Questions.status'=>'A'];\n\t\t\t\t$options['fields'] \t\t= ['id','name','user_id','short_description','view','created','QuestionCategories.id','QuestionCategories.name','QuestionCategories.slug'];\n\t\t\t\t$options['order'] \t\t= ['Questions.created DESC'];\n\t\t\t\t$options['limit'] \t\t= $this->limitLatestQuestions;\n\t\t\t\t$unanswered_questions \t= $this->paginate($QuestionsTable, $options)->toArray();\n\t\t\t}else{\n\t\t\t\t$unanswered_questions = array();\n\t\t\t}\n\t\t\t$this->set(compact('unanswered_questions'));\n }\n }", "function ajax_do_sycle_get_search_results() {\n\t\t\t// TODO validate token\n\t\t\t$request = array();\n\n\t\t\t// Setting defaults\n\t\t\t$proximity = array(); // todo look for and parse any locale data\n\t\t\t$proximity['zip'] = '34239'; // todo debug required\n\t\t\t$proximity['miles'] = '100'; // todo debug \t1-1000 required\n\n\t\t\tif (is_array($_POST['addressfield'])) {\n\t\t\t\tforeach ($_POST['addressfield'] as $adrfield) {\n\t\t\t\t\tif ($adrfield['types'][0]=='street_number') {\n\t\t\t\t\t\t$proximity['street1'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='route') {\n\t\t\t\t\t\t$proximity['street1'] .= ' '.$adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='postal_code') {\n\t\t\t\t\t\t$proximity['zip'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='administrative_area_level_2') {\n\t\t\t\t\t\t$proximity['city'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='administrative_area_level_1') {\n\t\t\t\t\t\t$proximity['state'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$request['token'] = $this->get_token();\n\t\t\t$request['proximity'] = $proximity;\n\n\t\t\t$result = $this->return_search_clinics_results($request);\n\n\t\t\t$clinics_list = json_decode($result);\n\n\t\t\t$output = array();\n\t\t\tif (is_array($clinics_list->clinic_details)) {\n\t\t\t\tforeach ($clinics_list->clinic_details as $clinic) {\n\t\t\t\t\t$output['clinic_details'][] = $this->return_clinic_markup($clinic,$request['token'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\techo json_encode($output);\n\t\t\tdie();\n\t\t}", "function ajax_suggest() {\n\n\t\tif( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'coauthors-search' ) )\n\t\t\tdie();\n\n\t\tif( empty( $_REQUEST['q'] ) )\n\t\t\tdie();\n\n\t\t$search = sanitize_text_field( strtolower( $_REQUEST['q'] ) );\n\t\t$ignore = array_map( 'sanitize_text_field', explode( ',', $_REQUEST['existing_authors'] ) );\n\n\t\t$authors = $this->search_authors( $search, $ignore );\n\n\t\tforeach( $authors as $author ) {\n\t\t\techo $author->ID .\" | \". $author->user_login .\" | \". $author->display_name .\" | \". $author->user_email .\" | \". $author->user_nicename . \"\\n\";\n\t\t}\n\n\t\tdie();\n\n\t}", "function search(){\n\t\t\n\t\t$modelName = $this->_getModelName();\t\t\n\t\tif(!isset($this->params['named']['page']) && !$this->RequestHandler->isAjax()){\n\t\t\tif($this->Session->check('Search')){\n\t\t\t\t$this->Session->delete('Search');\t\t\t\t\t\n\t\t\t}\t\t\n\t\t}elseif(isset($this->params['named']['page'])){\n\t\t\t$this->set('page',$this->params['named']['page']);\n\t\t}\n\t\t$filters[] = array($modelName.'.booked'=>0,$modelName.'.status'=>1,'User.access_permission'=>1,'User.status'=>1);\n\t\tif(isset($this->data[$modelName]['keyword']) && !empty($this->data[$modelName]['keyword'])){\t\t\t\n\t\t\tif($this->data[$modelName]['keyword'] !='Please Enter your keyword here'){\n\t\t\t\t$filters['OR'] = $this->_getConditons($this->data[$modelName]['keyword']);\n\t\t\t}\t\t\t\n\t\t\t$this->Session->write('Search.keyword',$this->data[$modelName]['keyword']);\n\t\t\t//get sameoption's users as logined user\n\t\t\t$this->loadModel('QuestionOptionsUser');\n\t\t\t$sameOptionsUsers = $this->QuestionOptionsUser->getUserList($this->Auth->user('id'));\t\n\t\t\t$filters[] = array($modelName.'.user_id'=>$sameOptionsUsers);\t\t\n\t\t\t$this->Session->write('Search.cond',$filters);\n\t\t}\n\t\t\n\t\tif(!$this->Session->check('Search')){\n\t\t\t$this->Session->write('Search.keyword','Please Enter your keyword here');\n\t\t\t//get sameoption's users as logined user\n\t\t\t$this->loadModel('QuestionOptionsUser');\n\t\t\t$sameOptionsUsers = $this->QuestionOptionsUser->getUserList($this->Auth->user('id'));\t\n\t\t\t$filters[] = array($modelName.'.user_id'=>$sameOptionsUsers);\t\t\n\t\t\t$this->Session->write('Search.cond',$filters);\t\t\n\t\t\t$this->Session->write('Search.cond',$filters);\t\t\n\t\t}\t\n\t\t//pr($this->Session->read('Search.cond'));\n\t\t//pr($this->data);\n\t\t//die;\n\t\t$this->_fetchSearchData();\n\t}", "public function searchResults()\n\t{\n\t\t/* Search Term */\n\t\tif( isset( $this->request['search_term'] ) && !is_string( $this->request['search_term'] ) )\n\t\t{\n\t\t\t$this->registry->getClass('output')->showError( 'invalid_search_term', 10312564 );\n\t\t}\n\t\t\n\t\t$_st = $this->searchController->formatSearchTerm( trim( $this->request['search_term'] ) );\n\t\t$search_term = $_st['search_term'];\n\t\t$removedTerms = $_st['removed'];\n\t\t\n\t\t/* Set up some defaults */\n\t\t$this->settings['max_search_word'] = $this->settings['max_search_word'] ? $this->settings['max_search_word'] : 300;\n\t\t\n\t\t/* Did we come in off a post request? */\n\t\tif ( $this->request['request_method'] == 'post' )\n\t\t{\n\t\t\t/* Set a no-expires header */\n\t\t\t$this->registry->getClass('output')->setCacheExpirationSeconds( 30 * 60 );\n\t\t}\n\t\t\n\t\tif ( is_array( $this->request['search_app_filters'] ) )\n\t\t{\n\t\t\tarray_walk_recursive( $this->request['search_app_filters'], create_function('&$item, $key', '$item = IPSText::htmlspecialchars($item);' ) );\n\t\t}\n\t\t\n\t\t/* App specific */\n\t\tif ( isset( $this->request['search_sort_by_' . $this->request['search_app'] ] ) )\n\t\t{\n\t\t\t$this->request['search_sort_by'] = ( $_POST[ 'search_sort_by_' . $this->request['search_app'] ] ) ? htmlspecialchars( $_POST[ 'search_sort_by_' . $this->request['search_app'] ] ) : $this->request['search_sort_by_' . $this->request['search_app'] ];\n\t\t\t$this->request['search_sort_order'] = ( $_POST[ 'search_sort_order_' . $this->request['search_app'] ] ) ? htmlspecialchars( $_POST[ 'search_sort_order_' . $this->request['search_app'] ] ) : $this->request['search_sort_order_' . $this->request['search_app'] ];\n\t\t}\n\t\t\n\t\t/* Populate the registry */\n\t\tIPSSearchRegistry::set('in.search_app'\t\t , $this->request['search_app'] );\n\t\tIPSSearchRegistry::set('in.raw_search_term' , trim( $this->request['search_term'] ) );\n\t\tIPSSearchRegistry::set('in.clean_search_term', $search_term );\n\t\tIPSSearchRegistry::set('in.raw_search_tags' , str_replace( '&amp;', '&', trim( IPSText::parseCleanValue( IPSText::urldecode_furlSafe( $_REQUEST['search_tags'] ) ) ) ) );\n\t\tIPSSearchRegistry::set('in.search_higlight' , str_replace( '.', '', $this->request['search_term'] ) );\n\t\tIPSSearchRegistry::set('in.search_date_end' , ( $this->request['search_date_start'] && $this->request['search_date_end'] AND ! is_array( $this->request['search_date_end'] ) ) ? $this->request['search_date_end'] : 'now' );\n\t\tIPSSearchRegistry::set('in.search_date_start', ( $this->request['search_date_start'] AND ! is_array( $this->request['search_date_start'] ) ) ? $this->request['search_date_start'] : '' );\n\t\tIPSSearchRegistry::set('in.search_author' , !empty( $this->request['search_author'] ) ? $this->request['search_author'] : '' );\n\t\t\n\t\t/* Set sort filters */\n\t\t$this->_setSortFilters();\n\t\t\n\t\t/* These can be overridden in the actual engine scripts */\n\t//\tIPSSearchRegistry::set('set.hardLimit' , 0 );\n\t\tIPSSearchRegistry::set('set.resultsCutToLimit', false );\n\t\tIPSSearchRegistry::set('set.resultsAsForum' , false );\n\t\t\n\t\t/* Are we option to show titles only / search in titles only */\n\t\tIPSSearchRegistry::set('opt.searchType', ( !empty( $this->request['search_content'] ) AND in_array( $this->request['search_content'], array( 'both', 'titles', 'content' ) ) ) ? $this->request['search_content'] : 'both' );\n\t\t\n\t\t/* Time check */\n\t\tif ( IPSSearchRegistry::get('in.search_date_start') AND strtotime( IPSSearchRegistry::get('in.search_date_start') ) > time() )\n\t\t{\n\t\t\tIPSSearchRegistry::set('in.search_date_start', 'now' );\n\t\t}\n\t\t\n\t\tif ( IPSSearchRegistry::get('in.search_date_end') AND strtotime( IPSSearchRegistry::get('in.search_date_end') ) > time() )\n\t\t{\n\t\t\tIPSSearchRegistry::set('in.search_date_end', 'now' );\n\t\t}\n\t\t\n\t\t/* Do some date checking */\n\t\tif( IPSSearchRegistry::get('in.search_date_end') AND IPSSearchRegistry::get('in.search_date_start') AND strtotime( IPSSearchRegistry::get('in.search_date_start') ) > strtotime( IPSSearchRegistry::get('in.search_date_end') ) )\n\t\t{\n\t\t\t$this->searchAdvancedForm( $this->lang->words['search_invalid_date_range'] );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Lower limit\n\t\t */\n\t\tif ( $this->settings['min_search_word'] && ! IPSSearchRegistry::get('in.search_author') && ! IPSSearchRegistry::get('in.raw_search_tags') )\n\t\t{\n\t\t\tif ( $this->settings['search_method'] == 'sphinx' && substr_count( $search_term, '\"' ) >= 2 )\n\t\t\t{\n\t\t\t\t$_ok = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_words\t= explode( ' ', preg_replace( \"#\\\"(.*?)\\\"#\", '', $search_term ) );\n\t\t\t\t$_ok\t= $search_term ? true : false;\n\n\t\t\t\tforeach( $_words as $_word )\n\t\t\t\t{\n\t\t\t\t\t$_word\t= preg_replace( '#^\\+(.+?)$#', \"\\\\1\", $_word );\n\t\n\t\t\t\t\tif ( ! $_word OR $_word == '|' )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif( strlen( $_word ) < $this->settings['min_search_word'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$_ok\t= false;\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\t\n\t\t\tif( ! $_ok )\n\t\t\t{\n\t\t\t\t$this->searchAdvancedForm( sprintf( $this->lang->words['search_term_short'], $this->settings['min_search_word'] ), $removedTerms );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Ok this is an upper limit.\n\t\t * If you needed to change this, you could do so via conf_global.php by adding:\n\t\t * $INFO['max_search_word'] = #####;\n\t\t */\n\t\tif ( $this->settings['max_search_word'] && strlen( IPSSearchRegistry::get('in.raw_search_term') ) > $this->settings['max_search_word'] )\n\t\t{\n\t\t\t$this->searchAdvancedForm( sprintf( $this->lang->words['search_term_long'], $this->settings['max_search_word'] ) );\n\t\t\treturn;\n\t\t}\n\n\t\t/* Search Flood Check */\n\t\tif( $this->memberData['g_search_flood'] )\n\t\t{\n\t\t\t/* Check for a cookie */\n\t\t\t$last_search = IPSCookie::get( 'sfc' );\n\t\t\t$last_term\t= str_replace( \"&quot;\", '\"', IPSCookie::get( 'sfct' ) );\n\t\t\t$last_term\t= str_replace( \"&amp;\", '&', $last_term );\n\t\t\t\t\n\t\t\t/* If we have a last search time, check it */\n\t\t\tif( $last_search && $last_term )\n\t\t\t{\n\t\t\t\tif( ( time() - $last_search ) <= $this->memberData['g_search_flood'] && $last_term != IPSSearchRegistry::get('in.raw_search_term') )\n\t\t\t\t{\n\t\t\t\t\t$this->searchAdvancedForm( sprintf( $this->lang->words['xml_flood'], $this->memberData['g_search_flood'] - ( time() - $last_search ) ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* Reset the cookie */\n\t\t\t\t\tIPSCookie::set( 'sfc', time() );\n\t\t\t\t\tIPSCookie::set( 'sfct', urlencode( IPSSearchRegistry::get('in.raw_search_term') ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Set the cookie */\n\t\t\telse\n\t\t\t{\n\t\t\t\tIPSCookie::set( 'sfc', time() );\n\t\t\t\tIPSCookie::set( 'sfct', urlencode( IPSSearchRegistry::get('in.raw_search_term') ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Clean search term for results view */\n\t\t$_search_term = trim( preg_replace( '#(^|\\s)(\\+|\\-|\\||\\~)#', \" \", $search_term ) );\n\t\t\n\t\t/* Got tag search only but app doesn't support tags */\n\t\tif ( IPSSearchRegistry::get('in.raw_search_tags') && ! IPSSearchRegistry::get( 'config.can_searchTags' ) && ! IPSSearchRegistry::get('in.raw_search_term') )\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$results = array();\n\t\t}\n\t\telse if ( IPSLib::appIsSearchable( IPSSearchRegistry::get('in.search_app'), 'search' ) )\n\t\t{\n\t\t\t/* Perform the search */\n\t\t\t$this->searchController->search();\n\t\t\t\n\t\t\t/* Get count */\n\t\t\t$count = $this->searchController->getResultCount();\n\t\t\t\n\t\t\t/* Get results which will be array of IDs */\n\t\t\t$results = $this->searchController->getResultSet();\n\t\t\t\n\t\t\t/* Get templates to use */\n\t\t\t$template = $this->searchController->fetchTemplates();\n\t\t\t\t\t\t\n\t\t\t/* Fetch sort details */\n\t\t\t$sortDropDown = $this->searchController->fetchSortDropDown();\n\n\t\t\t/* Set default sort option */\n\t\t\t$_a\t= IPSSearchRegistry::get('in.search_app');\n\t\t\t$_k\t= IPSSearchRegistry::get( $_a . '.searchInKey') ? IPSSearchRegistry::get( $_a . '.searchInKey') : '';\n\n\t\t\tif( $_k AND !$this->request['search_app_filters'][ $_a ][ $_k ]['sortKey'] AND is_array($sortDropDown) AND count($sortDropDown) )\n\t\t\t{\n\t\t\t\t$this->request['search_app_filters'][ $_a ][ $_k ]['sortKey']\t= key( $sortDropDown );\n\t\t\t}\n\t\t\telse if( !$_k AND !$this->request['search_app_filters'][ $_a ]['sortKey'] AND is_array($sortDropDown) AND count($sortDropDown) )\n\t\t\t{\n\t\t\t\t$this->request['search_app_filters'][ $_a ]['sortKey']\t= key( $sortDropDown );\n\t\t\t}\n\t\t\t\n\t\t\t/* Fetch sort details */\n\t\t\t$sortIn = $this->searchController->fetchSortIn();\n\t\t\t\n\t\t\t/* Build pagination */\n\t\t\t$links = $this->registry->output->generatePagination( array( 'totalItems'\t\t=> $count,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'itemsPerPage'\t\t=> IPSSearchRegistry::get('opt.search_per_page'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'currentStartValue'=> IPSSearchRegistry::get('in.start'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'baseUrl'\t\t\t=> $this->_buildURLString() . '&amp;search_app=' . IPSSearchRegistry::get('in.search_app') )\t);\n\t\n\t\t\t/* Showing */\n\t\t\t$showing = array( 'start' => IPSSearchRegistry::get('in.start') + 1, 'end' => ( IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') ) > $count ? $count : IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') );\n\t\t\t\t\t\t\n\t\t\t/* Parse result set */\n\t\t\t$results = $this->registry->output->getTemplate( $template['group'] )->$template['template']( $results, ( IPSSearchRegistry::get('opt.searchType') == 'titles' || IPSSearchRegistry::get('opt.noPostPreview') ) ? 1 : 0 );\n\t\t\t\n\t\t\t/* Check for sortIn */\n\t\t\tif( count( $sortIn ) && !$this->request['search_app_filters'][ $this->request['search_app'] ]['searchInKey'] )\n\t\t\t{\n\t\t\t\t$this->request['search_app_filters'][ $this->request['search_app'] ]['searchInKey'] = $sortIn[0][0];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$results = array();\n\t\t}\n\t\t\n\t\tif ( $count < 1 )\n\t\t{\n\t\t\t$this->registry->output->setHeaderCode( 404 );\n\t\t}\n\t\t\n\t\t/* Output */\n\t\t$this->title = $this->lang->words['search_results'];\n\t\t$this->output .= $this->registry->output->getTemplate( 'search' )->searchResultsWrapper( $results, $sortDropDown, $sortIn, $links, $count, $showing, $_search_term, $this->_buildURLString(), $this->request['search_app'], $removedTerms, IPSSearchRegistry::get('set.hardLimit'), IPSSearchRegistry::get('set.resultsCutToLimit'), IPSSearchRegistry::get('in.raw_search_tags') );\n\t}", "private function search()\n {\n //Load and store parameters\n $criteria = $this->Request->get('criteria');\n $criteria = $criteria ? json_decode($criteria, true) : array();\n $timestamp = $this->Request->get('timestamp');\n $this->responseSetParam('criteria', $criteria);\n $this->responseSetParam('timestamp', $timestamp);\n\n //Search for matching recipes\n $RecipesLib = new RecipesLib($this->DB, $this->User);\n $this->responseSetContent($RecipesLib->search($criteria));\n $this->responseSetParam('overflow', $RecipesLib->searchOverflow());\n }", "function universitySearchResults($data) {\n $mainQuery = new WP_Query(array(\n 'post_type' => array('post', 'page', 'professor', 'program', 'campus', 'event'),\n //The 's' is for search and the keyword 'term' is used with the route for searching any of the type of post listed above\n //sanitized so that the a user cannot add in any miscellaneous type of code \n 's' => sanitize_text_field($data['term']) \n ));\n\n //the instance of results contains an array of posts that also contain empty arrays for the searh queue\n $results = array(\n 'generalInfo' => array(),\n 'professors' => array(),\n 'programs' => array(),\n 'events' => array(),\n 'campuses' => array()\n );\n\n /* while the mainquery instance from the universitySearchResults function contains a list of posts\n those posts will sift through the if statmenets to check the type of posts\n if the post meets a match then those results from the post type will return an array of data */\n while($mainQuery->have_posts()) {\n $mainQuery->the_post();\n\n //This will check if the post type is post or page if so then the results of the data will be displayed on the json page\n //This will return an array of the title, permalink, posttype and author name to the user. \n if (get_post_type() == 'post' OR get_post_type() == 'page') {\n array_push($results['generalInfo'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'postType' => get_post_type(),\n 'authorName' => get_the_author()\n ));\n }\n\n if (get_post_type() == 'professor') {\n array_push($results['professors'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'image' => get_the_post_thumbnail_url(0, 'professorLandscape')\n ));\n }\n\n if (get_post_type() == 'program') {\n $relatedCampuses = get_field('related_campus');\n //note that campuses are a bit more tricky since they lack content but we don't need to worry since we are using the campus page\n if ($relatedCampuses) {\n foreach($relatedCampuses as $campus) {\n array_push($results['campuses'], array(\n 'title' => get_the_title($campus),\n 'permalink' => get_the_permalink($campus)\n ));\n }\n }\n \n array_push($results['programs'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'id' => get_the_id() //note that we need to get the id because we need pinpoint accuracy of what we want to search for\n ));\n }\n\n if (get_post_type() == 'campus') {\n array_push($results['campuses'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink()\n ));\n }\n\n if (get_post_type() == 'event') {\n $eventDate = new DateTime(get_field('event_date'));\n $description = null;\n if (has_excerpt()) {\n $description = get_the_excerpt();\n } else {\n $description = wp_trim_words(get_the_content(), 18);\n }\n\n array_push($results['events'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'month' => $eventDate->format('M'),\n 'day' => $eventDate->format('d'),\n 'description' => $description\n ));\n }\n \n }\n\n if ($results['programs']) {\n $programsMetaQuery = array('relation' => 'OR');\n //check the results from the program id page if it is similar to what the user is searching for \n foreach($results['programs'] as $item) {\n array_push($programsMetaQuery, array(\n //checks the field of related program and compare it to the items id\n 'key' => 'related_programs',\n 'compare' => 'LIKE',\n 'value' => '\"' . $item['id'] . '\"'\n ));\n }\n\n $programRelationshipQuery = new WP_Query(array(\n 'post_type' => array('professor', 'event'),\n 'meta_query' => $programsMetaQuery\n ));\n\n /* This while loop is to help find any data that is related to the search query\n for example if there is a professor that teaches math then this query will also pull him up\n overall as it says in its name: $programRelationshipQuery, its used to find relationship between data */\n while($programRelationshipQuery->have_posts()) {\n $programRelationshipQuery->the_post();\n\n if (get_post_type() == 'event') {\n $eventDate = new DateTime(get_field('event_date'));\n $description = null;\n if (has_excerpt()) {\n $description = get_the_excerpt();\n } else {\n $description = wp_trim_words(get_the_content(), 18);\n }\n\n array_push($results['events'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'month' => $eventDate->format('M'),\n 'day' => $eventDate->format('d'),\n 'description' => $description\n ));\n }\n\n if (get_post_type() == 'professor') {\n array_push($results['professors'], array(\n 'title' => get_the_title(),\n 'permalink' => get_the_permalink(),\n 'image' => get_the_post_thumbnail_url(0, 'professorLandscape')\n ));\n }\n\n }\n\n //These two values below are important because they prevent any duplicate results\n $results['professors'] = array_values(array_unique($results['professors'], SORT_REGULAR));\n $results['events'] = array_values(array_unique($results['events'], SORT_REGULAR));\n }\n\n\n return $results;\n\n}", "public function search()\n {\n $twitter = new TwitterStorage;\n $results = $twitter->searchAndStore($_POST['search']);\n $response = [];\n $tweets = [];\n\n if($results !== false)\n {\n $response['errors'] = false;\n foreach($results as $tweet)\n {\n $tweets[] = $tweet->text;\n }\n $response['tweets'] = $tweets;\n }\n else\n {\n $response['errors'] = true;\n }\n\n echo json_encode($response);\n }", "function ajax_qsearch(){\n global $lang;\n global $INPUT;\n\n $maxnumbersuggestions = 50;\n\n $query = $INPUT->post->str('q');\n if(empty($query)) $query = $INPUT->get->str('q');\n if(empty($query)) return;\n\n $query = urldecode($query);\n\n $data = ft_pageLookup($query, true, useHeading('navigation'));\n\n if(!count($data)) return;\n\n print '<strong>'.$lang['quickhits'].'</strong>';\n print '<ul>';\n $counter = 0;\n foreach($data as $id => $title){\n if (useHeading('navigation')) {\n $name = $title;\n } else {\n $ns = getNS($id);\n if($ns){\n $name = noNS($id).' ('.$ns.')';\n }else{\n $name = $id;\n }\n }\n echo '<li>' . html_wikilink(':'.$id,$name) . '</li>';\n\n $counter ++;\n if($counter > $maxnumbersuggestions) {\n echo '<li>...</li>';\n break;\n }\n }\n print '</ul>';\n}", "function supplier_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Supplier->get_suppliers_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "function fetch_searchable_answer_title($qid = 0, $aid = '', $cattype = '')\r\n{\r\n global $ilance, $myapi;\r\n \r\n $html = '';\r\n \r\n $table = ($cattype == 'service') ? \"project_questions\" : \"product_questions\";\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT multiplechoice\r\n FROM \" . DB_PREFIX . $table . \"\r\n WHERE questionid = '\" . intval($qid) . \"'\r\n LIMIT 1\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($sql) > 0)\r\n {\r\n $res = $ilance->db->fetch_array($sql);\r\n if (!empty($res['multiplechoice']))\r\n {\r\n $choices = explode('|', $res['multiplechoice']);\r\n $i = 0;\r\n foreach ($choices AS $choice)\r\n {\r\n $i++;\r\n if ($i == intval($aid))\r\n {\r\n //$html = stripslashes(htmlentities($choice, ENT_QUOTES));\r\n\t\t\t\t\t$html = stripslashes(ilance_htmlentities($choice));\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $html = $aid; \r\n }\r\n }\r\n \r\n return $html;\r\n}", "public function search_autocomplete() {\n\t\t\t$term = strtolower($_GET['term']);\n\r\n\t\t\t// perform the event query\r\n\t\t\t$events = $this->wpa_db->get_events( $term );\n\t\t\tforeach ( $events as $event ) {\n\t\t\t\t$event->category = 'event';\n\t\t\t}\n\n\t\t\t// perform athlete query\n\t\t\t$athletes = $this->wpa_db->get_athletes( $term );\n\t\t\tforeach ( $athletes as $athlete ) {\r\n\t\t\t\t$athlete->category = 'athlete';\r\n\t\t\t}\n\n\t\t\t// merge both results\n\t\t\t$results = array_merge($events, $athletes);\n\r\n\t\t\t// return as json\r\n\t\t\twp_send_json($results);\r\n\t\t\tdie();\n\t\t}", "function searchResults($sort, $show, $searchq){\nglobal $dbc;\nglobal $lang;\n$approved = 0;\n$place=0;\n$searchq = escape_str($searchq);\n if($sort=='0'){ $sort=\"score\"; }\n else if($sort=='1'){ $sort=\"id\"; } \n else { $sort=\"score\"; }\n \n if($show != '10' && $show != '25' && $show !='50' && $show !='75' && $show !='100'){ $show=25; }\n\n $get = $dbc->query(\"SELECT * FROM quotes WHERE quote like\n '%$searchq%' and approved='1'\");\n /* Find out how many approved quotes there are */\n while ($count = $get->fetchArray()) { \n $approved++;\n }\n if($approved==0){\n echo(\"<div width=80% align=center>\");\n echo(\"$lang[search_comment_6]\");\n } else {\n\n $result = $dbc->query(\"SELECT * FROM quotes WHERE quote like\n '%$searchq%' and approved='1' ORDER BY $sort DESC LIMIT $show\");\n\n outputOpen();\n\n while ( $row = $result->fetchArray()) {\n $id=$row[\"id\"];\n $quote=$row[\"quote\"];\n $vote=$row[\"score\"];\n $comment=$row[\"comment\"];\n $place++;\n output($id, $quote, $vote, $comment, $place);\n }\n \n outputClose();\n}\n}", "public function queryajax(Request $request)\n {\n $permit = ['q', 'page', 'tab'];\n $input = $request->only($permit);\n\n $input['async'] = 2;\n\n $repo = new SearchQuestionsRepository($input);\n $repo->contract();\n\n return response()->json($repo->biz['questions']);\n }", "public function Rating()\n\t{\n\t $quiz_id = intval(@$_POST['quiz_id']);\n\t \n\t $data['quiz_id'] = $quiz_id;\n\t \n\t $data['quiz_list'] = $this->quiz_model->getQuizList(array('active'=>1));\n\t \n\t if($quiz_id) $data['records'] = $this->quiz_model->getTopRatedList($quiz_id);\n\t \n\t // === Current Location === //\n\t\t$data['current_location_arr'] =\n\t\tarray(\n\t\t\t$this->_getBaseURI().\"/index\" => lowercase($this->_getPageTitle('index')),\n\t\t\t$this->_getBaseURI().\"/my\" => lowercase($this->_getPageTitle('my')),\n\t\t\t$this->_getBaseURI().\"/rating\" => lowercase($this->_getPageTitle())\n\t\t);\n\t\t\n\t\tparent::_OnOutput($data);\n\t}", "public function get_question() {\n\t\t$data_id = $_GET['data_id'];\n\t\t$aQuery = <<<SQL\n\t\tSELECT \n\t\t\tf.faq_id,\n\t\t\tf.faq_title,\n\t\t\tf.faq_content,\n\t\t\tf.faq_tag,\n\t\t\tf.faq_author,\n\t\t\tf.faq_created,\n\t\t\tc.client_name,\n\t\t\tc.client_email,\n\t\t\tc.client_avatar\n\t\tFROM \n\t\t\tfaq f,\n\t\t\tclient c\n\t\tWHERE \n\t\t\t\tf.faq_id = {$data_id}\n\t\t\tAND f.faq_client_id = c.client_id\nSQL;\n\t\t$data = $this->db->select($aQuery);\n\n\t\t$data[0]['count_answer'] = self::count_answer($data_id);\n\n\t\tif($data) {\n\t\t\techo json_encode($data[0]);\n\t\t} else {\n\t\t\techo 0;\n\t\t}\n\t\t\n\t}", "public function completedQuiz() {\n\t\tif ( ( isset( $_POST['results'] ) ) && ( !empty( $_POST['results'] ) ) && ( is_string( $_POST['results'] ) ) ) {\n\t\t\t$_POST['results'] = json_decode(stripslashes($_POST['results']), true);\n\t\t}\n\t\t\n\t\tif ( is_user_logged_in() )\n\t\t\t$user_id\t\t\t= \tget_current_user_id();\n\t\telse\n\t\t\t$user_id\t\t\t=\t0;\n\t\t\n\t\tif ( isset( $_POST['quizId'] ) )\n\t\t\t$id \t\t\t\t= \t$_POST['quizId'];\n\t\telse\n\t\t\t$id\t\t\t\t\t= \t0;\n\n\t\tif ( isset( $_POST['quiz'] ) )\n\t\t\t$quiz_post_id \t\t= \t$_POST['quiz'];\n\t\telse\n\t\t\t$quiz_post_id\t\t= \t0;\n\n\n\t\t// LD 2.4.3 - Change in logic. Instead of accepting the values for points, correct etc from JS we now pass the 'results' array on the complete quiz\n\t\t// AJAX action. This now let's us verify the points, correct answers etc. as each have a unique nonce. \n\t\t$total_awarded_points = 0;\n\t\t$total_correct = 0;\n\n\t\t// If the results is not present then abort. \n\t\tif ( !isset( $_POST['results'] ) ) {\n\t\t\treturn array('text' => esc_html__('An error has occurred.', 'learndash'), 'clear' => true);\n\t\t}\n\t\t\n\t\t// Loop over the 'results' items. We verify and tally the points+correct counts as well as the student response 'data'. When we get to the 'comp' results element\n\t\t// we set the award points and correct as well as determine the total possible points. \n\t\t// @TODO Need to test how this works with variabel question quizzes. \n\t\tforeach( $_POST['results'] as $r_idx => $result ) {\n\t\t\tif ( $r_idx == 'comp' ) {\n\t\t\t\t$_POST['results'][$r_idx]['points'] = intval( $total_awarded_points );\n\t\t\t\t$_POST['results'][$r_idx]['correctQuestions'] = intval( $total_correct );\n\n\t\t\t\t//$quizMapper = new WpProQuiz_Model_QuizMapper();\n\t\t\t\t//$total_possible_points = $quizMapper->sumQuestionPoints( $id );\n\t\t\t\t//$_POST['results'][$r_idx]['possiblePoints'] = intval( $total_possible_points );\n\t\t\t\t//$_POST['results'][$r_idx]['result'] = round( intval( $_POST['results'][$r_idx]['points'] ) / intval( $_POST['results'][$r_idx]['possiblePoints'] ) * 100, 2 );\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$points_array = array(\n\t\t\t\t'points' => intval( $result['points'] ),\n\t\t\t\t'correct' => intval( $result['correct'] ),\n\t\t\t\t'possiblePoints' => intval( $result['possiblePoints'] )\n\t\t\t);\n\t\t\tif ( $points_array['correct'] === false ) $points_array['correct'] = 0;\n\t\t\telse if ( $points_array['correct'] === true ) $points_array['correct'] = 1;\n\t\t\t$points_str = maybe_serialize( $points_array );\n\t\t\t\n\t\t\tif ( !wp_verify_nonce( $result['p_nonce'], 'ld_quiz_pnonce'. $user_id .'_'. $id .'_'. $quiz_post_id .'_'. $r_idx .'_'. $points_str ) ) {\n\t\t\t\t$_POST['results'][$r_idx]['points'] = 0;\n\t\t\t\t$_POST['results'][$r_idx]['correct'] = 0;\n\t\t\t\t$_POST['results'][$r_idx]['possiblePoints'] = 0;\n\t\t\t}\n\t\t\t$total_awarded_points += intval( $_POST['results'][$r_idx]['points'] );\n\t\t\t$total_correct += $_POST['results'][$r_idx]['correct'];\n\t\t\t$response_str = maybe_serialize( $result['data'] );\n\n\t\t\tif ( !wp_verify_nonce( $result['a_nonce'], 'ld_quiz_anonce'. $user_id .'_'. $id .'_'. $quiz_post_id .'_'. $r_idx .'_'. $response_str ) ) {\n\t\t\t\t$_POST['results'][$r_idx]['data'] = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$quiz = new WpProQuiz_Controller_Quiz();\n\t\t$quiz->completedQuiz();\n\t}", "function guide_search() {\n $suggestions = $this->guide->get_search_suggestions_guide($this->input->post('term'), 100);\n echo json_encode($suggestions);\n }", "public function innerSurveyFunction($data, $ratingSign, $start_date, $end_date) {\n $user = Zend_Auth::getInstance()->getIdentity();\n // Grab all the clients who have the client_id of the logged in user as parent\n $clients = Repo_Client::getInstance()->getRows(\"parent_id=\" . $user->client_id)->toArray();\n\n $allClients = array();\n foreach ($clients as $cli) {\n $allClients[] = $cli['id'];\n }\n // Now we should add the client id of the logged in user as well - to that client list.\n $allClients[] = $user->client_id;\n\n $result = Repo_Watson_Collection_test::getInstance()->findDocument(\n array(\"evidencelist.title\" => new MongoRegex(\"/\" . $data . \"/gi\"),\n \"survey\" => array('$exists' => true, '$elemMatch' => array(\"rating\" => $ratingSign, \"client_id\" => $user->client_id)),\n \"query_date\" => array('$gte' => new MongoDate((int) $start_date, 0), '$lte' => new MongoDate((int) $end_date, 0))));\n $allQuestions = array();\n\n foreach ($result as $res) {\n foreach ($res['survey'] as $surv) {\n if ($surv['rating'] == $ratingSign) {\n foreach ($surv['survey_question'] as $ques) {\n foreach ($ques as $q) {\n $allQuestions[] = $q;\n }\n }\n }\n }\n }\n $data = array();\n $sql = \"\";\n if (!empty($allQuestions)) {\n $dbTable = new Db_Table_Abstract();\n $adapter = $dbTable->getDefaultAdapter();\n $sql = \"select question.id as question_id,\"\n . \"survey.id as survey_id,\"\n . \"survey.name as survey_name,\"\n . \"question,\"\n . \"`option`,\"\n . \"question_option.type_id,\"\n . \"data,\"\n . \"client.id,count(data) as sum_of_all from question \"\n . \"left join question_option on question.id = question_option.question_id \"\n . \"left join user_survey_question on question.id = user_survey_question.question_id \"\n . \"left join survey on survey.id = question.survey_id \"\n . \"left join client on client.id = survey.client_id \"\n . \"where survey.type_id in (select id from survey_type where description = 'watson_survey') \"\n . \"and user_survey_question.id in (\" . implode(\",\", array_unique($allQuestions)) . \")\"\n . \"and client.id in (\" . implode(\",\", array_unique($allClients)) . \") \"\n . \"and completed_datetime between '\" . strftime(\"%Y-%m-%d %H:%M:%S\", $start_date) . \"' and '\" . strftime(\"%Y-%m-%d %H:%M:%S\", $end_date) . \"' \"\n . \"and user_survey_question.useranswer = question_option.id \"\n . \"group by data,question order by survey_name;\";\n\n $data[] = $adapter->fetchAll($sql);\n }\n return array_pop($data);\n }", "public function mostviewedQuestionsSearch(){\n if($this->request->is('post')){\n\t\t\t$this->visitorlogs('Questions','mostviewedQuestionsSearch','More Most Viewed Question Listing',NULL,NULL,NULL,NULL);\t//Log details insertion\n\t\t\t$QuestionsTable = TableRegistry::get('Questions');\n\t\t\tif($this->request->query('search') != NULL){\n\t\t\t\t$UsersTable = TableRegistry::get('Users');\n\t\t\t\t$get_match_users = $UsersTable->find('list',['conditions'=>['OR'=>['Users.name LIKE' => '%'.trim($this->request->query('search')).'%','Users.full_name LIKE' => '%'.trim($this->request->query('search')).'%']]])->toArray();\n\t\t\t\tif(!empty($get_match_users)){\n\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.user_id IN' => $get_match_users\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];\n\t\t\t\t}else{\t\t\t\n\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%'\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];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options['contain'] \t= ['QuestionCategories','Users'=>['fields'=>['id','name','full_name']],'QuestionTags'=>['fields'=>['id','question_id','tag_id']],'QuestionTags.Tags'=>['fields'=>['id','title','slug']],'AnswerUpvote'=>['conditions'=>['AnswerUpvote.status'=>1],'fields'=>['id','question_id']],'QuestionAnswer'=>['conditions'=>['QuestionAnswer.status'=>'A'],'fields'=>['id','question_id']]];\n\t\t\t$options['conditions'][]= ['Questions.status'=>'A'];\n\t\t\t$options['fields'] \t\t= ['id','name','user_id','short_description','view','created','QuestionCategories.id','QuestionCategories.name','QuestionCategories.slug'];\n\t\t\t$options['order'] \t\t= ['view DESC'];\n\t\t\t$options['limit'] \t\t= $this->limitMostViewedQuestions;\t\t\n\t\t\t$most_viewed_questions = $this->paginate($QuestionsTable, $options)->toArray();\n\t\t\t$this->set(compact('most_viewed_questions'));\n }\n }", "function search_results($query){\n //gestion de characteres invalides\n $query = str_replace(\"&\", \"%26\", $query);\n $query = str_replace(\"+\", \"%2B\", $query);\n $query = str_replace(\" \", \"+\", $query);\n $query = str_replace(\"%\", \"%25\", $query);\n $query = str_replace(\"#\", \"%23\", $query);\n $movie = getJSON(\"https://api.themoviedb.org/3/search/movie?api_key=\" . KEY . \"&query=\" . $query)[\"results\"];\n $tv = getJSON(\"https://api.themoviedb.org/3/search/tv?api_key=\" . KEY . \"&query=\" . $query)[\"results\"];\n $out = \"\";\n if(empty($tv) && empty($movie)){\n $out .= \"<p>Aucun résultat</p>\";\n }\n else if(empty($tv) || (isset($_POST[\"type\"]) && $_POST[\"type\"] == \"movie\")){\n $out .= search($movie, $query, \"movie\", true);\n }\n else if(empty($movie) || (isset($_POST[\"type\"]) && $_POST[\"type\"] == \"tv\")){\n $out .= search($tv, $query, \"tv\", true);\n }\n else{\n $out .= search($movie, $query, \"movie\");\n $out .= search($tv, $query, \"tv\");\n }\n return $out;\n}", "public function autocomplete()\n {\n $term = Request::get('term');\n $queries = DB::table('lyrics')\n ->where('title', 'LIKE', \"%$term%\")\n ->orWhere('artist', 'LIKE', \"%$term%\")\n ->take(5)->get();\n foreach ($queries as $query) {\n $results[] = [\n 'id' => $query->id,\n 'value' => $query->title.' '.$query->artist,\n ];\n }\n\n return Response::json($results);\n }", "public function actionDocSearch()\n\t{\n\t\t\n\t\t$speciality = \"\";\n\t\t$location = \"\";\n\t\t\n\t\tif(isset($_POST['searchBySpeciality'])){ \n\t\t\t$speciality = $_POST['searchBySpeciality'];\n\t\t}\n\t\t\n\t\tif(isset($_POST['searchByLocDoc'])){\n\t\t\t$location = $_POST['searchByLocDoc'];\n\t\t}\n\t\t\n\t\t//print_r (\" speciality:[\".$speciality.\"] Locality:[\".$location.\"]\");\n\t\t//print_r (\" speciality:[\".empty(trim($speciality)).\"] Locality:[\".empty(trim($location)).\"]\");\n\t\t\n\t\t//$speciality=\"Cardiology\";\n\t\t//$location=\"Delhi\";\n\t\t\n\t\t$doctorsList = DoctorSearch::getDoctors($speciality,$location);\n\t\tif(empty($doctorsList)){\n\t\t\t$this->render('docSearch');\n\t\t}\n\t\telse{\n\t\t\t//print_r(json_encode($resultSet));\n\t\t\t//header('Content-Type: application/json');\n\t\t\t$docIds = array();\n\t\t\tforeach($doctorsList as $doctor){\n\t\t\t\t$docIds[] = $doctor['ID_DOCTOR']; //array_column($doctorsList, 'ID_DOCTOR');\n\t\t\t}\n\t\t\t\n\t\t\t//print_r(json_encode($doctorsList));\n\t\t\t$doctorsQualifications = DoctorSearch::getDoctorQualifications($docIds);\n\t\t\t//print_r(json_encode($doctorsQualifications));\n\t\t\t$this->render('docSearch', array('searchResults' => json_encode($doctorsList),\n\t\t\t\t\t\t\t\t\t\t\t 'docQualifications' => json_encode($doctorsQualifications)));\n\t\t}\n\t}", "public function latestquestionsSearch(){\n if($this->request->is('post')){\n\t\t\t$this->visitorlogs('Questions','latestquestionsSearch','More Latest Question Listing',NULL,NULL,NULL,NULL);\t//Log details insertion\n\t\t\t$QuestionsTable = TableRegistry::get('Questions');\n\t\t\tif($this->request->query('search') != NULL){\n\t\t\t\t$UsersTable = TableRegistry::get('Users');\n\t\t\t\t$get_match_users = $UsersTable->find('list',['conditions'=>['OR'=>['Users.name LIKE' => '%'.trim($this->request->query('search')).'%','Users.full_name LIKE' => '%'.trim($this->request->query('search')).'%']]])->toArray();\n\t\t\t\tif(!empty($get_match_users)){\n\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.user_id IN' => $get_match_users\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];\n\t\t\t\t}else{\t\t\t\n\t\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%'\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];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options['contain'] \t= ['QuestionCategories','Users'=>['fields'=>['id','name','full_name']],'QuestionTags'=>['fields'=>['id','question_id','tag_id']],'QuestionTags.Tags'=>['fields'=>['id','title','slug']],'AnswerUpvote'=>['conditions'=>['AnswerUpvote.status'=>1],'fields'=>['id','question_id']],'QuestionAnswer'=>['conditions'=>['QuestionAnswer.status'=>'A'],'fields'=>['id','question_id']]];\n\t\t\t$options['conditions'][]= ['Questions.status'=>'A'];\n\t\t\t$options['fields'] \t\t= ['id','name','user_id','short_description','view','created','QuestionCategories.id','QuestionCategories.name','QuestionCategories.slug'];\n\t\t\t$options['order'] \t\t= ['Questions.created DESC'];\n\t\t\t$options['limit'] \t\t= $this->limitLatestQuestions;\n\t\t\t$latest_questions = $this->paginate($QuestionsTable, $options)->toArray();\n\t\t\t$this->set(compact('latest_questions'));\n }\n }", "function item_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Item->get_item_search_suggestions($this->input->get('term'),100);\n\t\t$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->get('term'),100));\n\t\techo json_encode($suggestions);\n\t}", "public function ajax_search() {\n\n\t\t$type = (isset($_GET['type'])) ? sanitize_text_field( $_GET['type'] ) : false;\n\n\t\tif($type) {\n\t\t\t$result = $this->get_search_results($type);\n\t\t\techo json_encode($result);\n\t\t}\n\n\t\tdie();\n\t}", "private function search()\r\n {\r\n $this->resp->result = 0;\r\n $AuthUser = $this->getVariable(\"AuthUser\");\r\n $Account = $this->getVariable(\"Account\");\r\n\r\n $query = \\Input::request(\"q\");\r\n if (!$query) {\r\n $this->resp->msg = __(\"Missing some of required data.\");\r\n $this->jsonecho();\r\n }\r\n\r\n $type = \\Input::request(\"type\");\r\n if (!in_array($type, [\"hashtag\", \"location\", \"people\"])) {\r\n $this->resp->msg = __(\"Invalid parameter\");\r\n $this->jsonecho(); \r\n }\r\n\r\n // Login\r\n try {\r\n $Instagram = \\InstagramController::login($Account);\r\n } catch (\\Exception $e) {\r\n $this->resp->msg = $e->getMessage();\r\n $this->jsonecho(); \r\n }\r\n\r\n\r\n\r\n $this->resp->items = [];\r\n\r\n // Get data\r\n try {\r\n if ($type == \"hashtag\") {\r\n $search_result = $Instagram->hashtag->search($query);\r\n if ($search_result->isOk()) {\r\n foreach ($search_result->getResults() as $r) {\r\n $this->resp->items[] = [\r\n \"value\" => $r->getName(),\r\n \"data\" => [\r\n \"sub\" => n__(\"%s public post\", \"%s public posts\", $r->getMediaCount(), $r->getMediaCount()),\r\n \"id\" => str_replace(\"#\", \"\", $r->getName())\r\n ]\r\n ];\r\n }\r\n }\r\n } else if ($type == \"location\") {\r\n $search_result = $Instagram->location->findPlaces($query);\r\n if ($search_result->isOk()) {\r\n foreach ($search_result->getItems() as $r) {\r\n $this->resp->items[] = [\r\n \"value\" => $r->getLocation()->getName(),\r\n \"data\" => [\r\n \"sub\" => false,\r\n \"id\" => $r->getLocation()->getFacebookPlacesId()\r\n ]\r\n ];\r\n }\r\n }\r\n } else if ($type == \"people\") {\r\n $search_result = $Instagram->people->search($query);\r\n if ($search_result->isOk()) {\r\n foreach ($search_result->getUsers() as $r) {\r\n $this->resp->items[] = [\r\n \"value\" => $r->getUsername(),\r\n \"data\" => [\r\n \"sub\" => $r->getFullName(),\r\n \"id\" => $r->getPk()\r\n ]\r\n ];\r\n }\r\n }\r\n }\r\n } catch (\\Exception $e) {\r\n $this->resp->msg = $e->getMessage();\r\n $this->jsonecho(); \r\n }\r\n\r\n\r\n $this->resp->result = 1;\r\n $this->jsonecho();\r\n }", "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Order->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "public function search()\n\t{\n\t\t$params = self::_getRequestVars();\t// Read query params wheter post or get\n\t\tif(!empty($params['term']) && !empty($params['submit'])){\t\t// If at least a term is given perform search\n\t\t\t$data = array();\n\t\t\t// Make the call for content\n\t\t\t$results = $this->search_model->getContent($params);\n\t\t\t// Verify we got results and parse\n\t\t\tif(!empty($results['items']) && count($results['items']) > 0){\n\t\t\t\t// Store results for access in single view. Bomb if can't store.\n\t\t\t\tif($this->result_model->setResultList($results['items']) === false) {\n\t\t\t\t\t$data = self::_requestFail('Error storing search results for display.');\n\t\t\t\t} elseif($this->sources_model->setSourceList($results['sources']) === false) {\n\t\t\t\t\t$data = self::_requestFail('Error storing search results for display.');\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// Search results are saved in the session.\n\t\t\t\t\t// Now redirect back to home page without search flag\n\t\t\t\t\t// and let it display stored session results\n\t\t\t\t\t$refreshParams = str_replace('&search=search', '', $_SERVER['QUERY_STRING']);\n\t\t\t\t\tredirect(\"search?{$refreshParams}\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No results returned\n\t\t\t\t// @todo Should always get results\n\t\t\t\t$data = self::_requestFail('No results found.');\n\t\t\t}\n\n\t\t} elseif(!empty($params['term']) && $this->session->userdata('resultList')) {\n\t\t\t// If here just display results stored in the session var.\n\t\t\t// @todo Will kill once cache solution is in place\n\t\t\t\n\t\t\t$data['status'] = 'ok';\n\t\t\t$data['items'] = $this->result_model->getResultList();\n\t\t\t\n\t\t} else {\n\t\t\t// If here no search term given.\n\t\t\t// @todo Same as above should always get results\n\t\t\t$data = self::_requestFail('Please enter a search term.');\n\t\t}\t\t\n\t\t// Load views and pass data\n\t\t$this->template->javascript->add(array('scripts/jquery-1.7.2.min.js', 'scripts/masonry.min.js', 'scripts/bootstrap.js', 'scripts/notifier-index.js' , 'scripts/orangebox.min.js'));\n // load view\n $this->template->title->set('Base Page');\n \t$this->template->content->view('new_index_view', $data);\n\t\t// publish the template\n $this->template->set_template('template_search');\n $this->template->publish();\n\t}", "public static function searchAjax(array &$form, FormStateInterface $form_state) {\n return $form['results'];\n }", "function search($entity_name,$column,$search_phrase=''){\n if(isset($_GET['clean-url'][\"{$entity_name}-search-phrase\"])){\n $search_phrase = sanitize($_GET['clean-url'][\"{$entity_name}-name\"]);\n }\n if(isset($_GET['clean-url'][\"{$entity_name}_id\"])){\n $location_id = sanitize($_GET['clean-url'][\"{$entity_name}-id\"]);\n }\n\n if(isset($_POST[\"{$entity_name}-search-phrase\"])){\n $search_phrase = sanitize($_POST[\"{$entity_name}-search-phrase\"]);\n }\n \n \n \n echo '\n <div id=\"search-'.$entity_name.'\" class=\"row d-flex flex-row-reverse m3 px-5 pt-3 bg-primary\">\n <form method=\"post\" class=\"flex-item\" action=\"'.BASE_PATH.'index.php/'.$entity_name.'/action/search/'.$entity_name.'/'.$column.'\">\n <div class=\"input-group \">\n <input type=\"text\" name=\"'.$entity_name.'-search-phrase\" class=\"form-control\" placeholder=\"Find '.$entity_name.'\">\n <span class=\"input-group-append\">\n <input type=\"submit\" name=\"search-'.$entity_name.'\" value=\"Search\" class=\"btn btn-info\" id=\"\" />\n </span>\n </div>\n </form>\n </div>';\n \n if(!empty($search_phrase)){\n $_SESSION[\"{$entity_name}s-list-info\"] = get_entities($entity_name,$column,$search_phrase);\n if(!is_json_request()){\n echo '<div class=\"row\">\n <div class=\"col-md-8 col-xs-12\"> \n <ul class=\"list-group\">';\n foreach($view_info['result'] as $result){\n $link_text = parse_text_for_output($result['description']);\n $endpoint = str_ireplace(' ','+',$result['id']);\n echo '<li class=\"list-group-item\">\n <a href=\"'.BASE_PATH.'index.php/room/action/show/room/'.$endpoint.'\">'.$link_text.'</a> ';\n show_timeago($result['timestamp']);\n echo '</li>';\n \n }\n echo '</ul>\n \n </div>';\n }\n }\n \n}", "public function search(Request $request)\n {\n $search = $request->question_paper;\n $paginate = $request->paginate * 10;\n if(empty($search)){\n $questions = NQP::with(['courses','departments','faculty'])\n ->skip($paginate)\n ->take(10)\n ->orderBy('id','DESC')\n ->get(); \n }\n else{\n $questions = NQP::with(['courses','departments','faculty'])\n ->where('unique_id','LIKE',\"%{$search}%\")\n ->orWhere('question_type','LIKE',\"%{$search}%\")\n ->orWhere('academic_session','LIKE',\"%{$search}%\")\n ->orWhere('department_level','LIKE',\"%{$search}%\")\n ->skip($paginate)\n ->take(10)\n ->orderBy('id','DESC')\n ->get();\n }\n return response()->json($questions);\n }", "function getRatings() {\n $postdata = array();\n $this->html();\n foreach (htmlqp($this->html, '#csr-rating') as $item) {\n $score = $this->_score($item->attr(\"data-csr-rating\"));\n $matches = array();\n if (preg_match_all(\"/entry(\\\\d+)/is\", $item->closest('.post_block')->children('a')->attr('id'), $matches)) {\n $c1 = $matches[1][0];\n }\n $postdata[] = array($c1, $this->tid, $score);\n $this->l('Found review: ' . $c1 . ' with rating ' . $score);\n }\n $sth = $this->db->prepare('INSERT INTO post (pid, tid, rating) VALUES (?, ?, ?)');\n $this->db->extended->executeMultiple($sth, $postdata);\n }", "public function search()\n {\n $search = $_POST['search'];\n $data = $this->tarea->like('name', $search)->findAll();\n echo json_encode($data);\n }", "function search_readers()\n\t{\n\t\t$term = $this->input->post('term');\n\t\t$search_field = $this->input->post('search_field');\n\n\t\t$this->load->model('user_model');\n\n\t\t$names = $this->user_model->search_by($term, $search_field);\n\n\t\t// Return data\n\t\techo json_encode($names);\n\t}", "function searchResults(){\n\t\t//return search results into #rmList\n\t\t\n\t\t//functional alternative: use JavaScript or jquery,\n\t\t//without need for postback, instead of php\n\t\t}", "public function allQuestions(){\n\t\t$this->visitorlogs('Questions','allQuestions','Latest Question Listing',NULL,NULL,NULL,NULL);\t//Log details insertion\n\t\t$QuestionsTable = TableRegistry::get('Questions');\n\t\t//$featured_question_rightpanel = $this->getFeaturedQuestions();\t//mention in AppController\n\t\t$featured_question_rightpanel = '';\n\t\t$latest_news_rightpanel = $this->getLatestNews();\t\t\t\t//mention in AppController\n\t\t$question_categories = $this->getTreeQuestionCategoriesSorted();//mention in AppController\n\t\t\n\t\tif($this->request->query('search') != NULL){\n\t\t\t$UsersTable = TableRegistry::get('Users');\n\t\t\t$get_match_users = $UsersTable->find('list',['conditions'=>['OR'=>['Users.name LIKE' => '%'.trim($this->request->query('search')).'%','Users.full_name LIKE' => '%'.trim($this->request->query('search')).'%']]])->toArray();\n\t\t\tif(!empty($get_match_users)){\n\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.user_id IN' => $get_match_users\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}else{\t\t\t\n\t\t\t\t$options['conditions'][] = ['OR'=>[\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.name LIKE' => '%'.$this->request->query('search').'%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Questions.short_description LIKE' => '%'.$this->request->query('search').'%'\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}\n\t\t}\n\t\t$options['contain'] \t= ['QuestionCategories','Users'=>['fields'=>['id','name','full_name']],'QuestionTags'=>['fields'=>['id','question_id','tag_id']],'QuestionTags.Tags'=>['fields'=>['id','title','slug']],'AnswerUpvote'=>['conditions'=>['AnswerUpvote.status'=>1],'fields'=>['id','question_id']],'QuestionAnswer'=>['conditions'=>['QuestionAnswer.status'=>'A'],'fields'=>['id','question_id']]];\n\t\t$options['conditions'][]= ['Questions.status'=>'A'];\n\t\t$options['fields'] \t\t= ['id','name','user_id','short_description','view','created','QuestionCategories.id','QuestionCategories.name','QuestionCategories.slug'];\n\t\t$options['order'] \t\t= ['Questions.created DESC'];\n\t\t$options['limit'] \t\t= $this->limitLatestQuestions;\n\t\t$latest_questions = $this->paginate($QuestionsTable, $options)->toArray();\n\t\t$total_count=0;\n\t\tif($this->request->query('search') != NULL){\n\t\t\tunset($options['limit']);\n\t\t\t$total_count = $QuestionsTable->find('all', $options)->count();\n\t\t}\n\t\t$AdvertisementsTable = TableRegistry::get('Advertisement');\n\t\t$advertise = $AdvertisementsTable->find('all',['conditions'=>['page_name'=>'allQuestions','status'=>'A'],'fields'=>['id','link','image'],'order'=>['id desc']])->first();\n\t\t$this->set(compact('featured_question_rightpanel','latest_news_rightpanel','question_categories','latest_questions','total_count','advertise'));\n }", "protected function ajax_getMatches() {\n\t\t$query = $this->input->get->query;\n\n\t\tif($query) {\n\t\t\t$matches = $this->pages->find($this->buildSearchSelector($query));\n\n\t\t\t$this->ajax['suggestions'] = [];\n\t\t\tif($matches->count()) {\n\t\t\tforeach($matches as $match) {\n\t\t\t\t$label = $this->createLabel($match);\n\n\t\t\t\t\t$suggestion = ['value' => $label, 'data' => ['id' => \"$match->id\"]];\n\t\t\t\t\tif($this->groupBy) {\n\t\t\t\t\t\t$suggestion['data']['category'] = $match->get(\"{$this->groupBy}\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->ajax['suggestions'][] = $suggestion;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function review_filter(){\n\t\t\t\t$a='<form class=\"horizontal-form search-patient-reviews\" method=\"GET\" action=\"'.$_SERVER['REQUEST_URI'].'\">\n\t\t\t\t\t<h5>SEARCH PATIENT REVIEWS</h5>';\n\t\t\t\t$a.='\n\t\t\t\t<div class=\"input-group field-1 large\">\n\t\t\t\t\t<input class=\"form-control\" type=\"text\" autocomplete=\"off\" name=\"physcian_name\" id= \"physcian_name\"\n\t\t\t\t\tplaceholder=\"Physician Name\" value=\"'.$_POST['physcian_name'].'\">\n\t\t\t\t</div>\n\t\t\t\t';\n\t\t\t\t//$testimonials_reviews = get_field_object(\"field_59e72b66fa497\");\n\t\t\t\t$a.='\n\t\t\t\t<div class=\"input-group select-box field-2 large\">\n\t\t\t\t\t<i class=\"fa fa-angle-down\"></i>\n\t\t\t\t\t<select name=\"testimonials_reviews\" class=\"form-control\" id=\"testimonials_reviews\">';\n\t\t\t\t\t\t$a.='<option value=\" \">All</option>';\n\t\t\t\t\t\t$a.='<option value=\"Testimonial\"';\n\t\t\t\t\t\tif($_POST['testimonials_reviews'] == \"Testimonial\" ){$a.='selected';}\n\t\t\t\t\t\t$a.='>Testimonial</option>';\n\t\t\t\t\t\t$a.='<option value=\"Review\"';\n\t\t\t\t\t\tif($_POST['testimonials_reviews'] == \"Review\" ){$a.='selected';}\n\t\t\t\t\t\t$a.='>Review</option>';\n\t\t\t\t$a.='</select></div>';\n\t\t\t\t$terms = get_terms( array(\n\t\t\t\t\t'taxonomy' => 'doctors_treatments',\n\t\t\t\t\t'hide_empty' => false,'orderby' => 'name',\n\t\t\t\t\t'order' => 'ASC','parent' => 0\n\t\t\t\t) );\n\t\t\t\t$a.='\n\t\t\t\t<div class=\"input-group select-box field-3 medium\">\n <i class=\"fa fa-angle-down\"></i>\n\t\t\t\t\t<select name=\"specialityTags\" id=\"specialityTags\" class=\"form-control\">';\n\t\t\t\t\t$a.='<option value=\" \">Speciality</option>';\n\t\t\t\t\tforeach( $terms as $value )\n\t\t\t\t {\n\t\t\t\t $a.='<option value=\"' . $value->term_id . '\"';\n\t\t\t\t\t\t\t\t\t\tif($_POST['specialityTags'] == $value->term_id ){$a.='selected';}\n\t\t\t\t\t\t\t\t\t\t $a.='>'.$value->name . '</option>';\n\t\t\t\t }\n\t\t\t\t\t$a.='</select>\n\t\t\t\t</div>\n\t\t\t\t';\n\t\t\t\t\n\t\t\t\t$a.='\n\t\t\t\t<div class=\"input-group submit\">\n\t\t\t\t\t<i class=\"fa fa-search\"></i>\n\t\t\t\t\t<input type=\"submit\" id=\"searchsubmit\" name=\"searchsubmit\" class=\"submit-btn\" value=\"GO\"></input>\n\t\t\t\t</div>\n\t\t\t\t</form>';\n\t\t\t\treturn $a;\n\t\t}", "public function searchAction() {\n\t \n\t if($this->getRequest()->isXmlHttpRequest()){\n\t \n \t $term = $this->getParam('term');\n \t $id = $this->getParam('id');\n \t \n \t if(!empty($term)){\n \t $term = \"%$term%\";\n \t $records = Customers::findbyCustomfield(\"(firstname LIKE ?) OR (lastname LIKE ?) OR company LIKE ?\", array($term,$term,$term));\n \t die(json_encode($records));\n \t }\n \t \n \t if(!empty($id)){\n \t $records = Customers::get_by_customerid($id);\n \t die(json_encode($records));\n \t }\n \t \n \t $records = Customers::getAll();\n \t\tdie(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}", "function customer_search()\n {\n $suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('term'),100);\n echo json_encode($suggestions);\n }", "public function ajaxTagSearch(){\n\t\t$json = [];\n\t\tif(!empty($_SESSION['loggedInUser']) && $_SESSION['loggedInUser']->role == 3){\t\t\t\n\t\t\t$this->load->database();\n\t\t\tif(!empty($this->input->get(\"q\"))){\n\t\t\t\t$this->db->like('name', $this->input->get(\"q\"));\n\t\t\t\t$query = $this->db->select('id,name as text')\n\t\t\t\t\t\t\t->get(\"tags\");\n\t\t\t\t$json = $query->result();\n\t\t\t}\n\t\t}else{\n\t\t\t$dynamicdb = $this->load->database('dynamicdb', TRUE);\t\t\t\t\n\t\t\t$this->load->database();\n\t\t\tif(!empty($this->input->get(\"q\"))){\n\t\t\t\t$dynamicdb->like('name', $this->input->get(\"q\"));\n\t\t\t\t$query = $dynamicdb->select('id,name as text')\n\t\t\t\t\t\t\t->get(\"tags\");\n\t\t\t\t$json = $query->result();\n\t\t\t}\n\t\t}\n\t\techo json_encode($json);\n\t}", "public function search(){ \n\t\t$this->layout = false;\t\t\n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\t\t\t\n\t\t\t$this->Home->unBindModel(array('belongsTo' => array('User','Contact','ReqStatus')));\n\t\t\t$data = $this->Home->Client->find('all', array('fields' => array('Client.client_name'),\n\t\t\t'group' => array('Client.client_name'), 'conditions' => \tarray(\"OR\" => array ('Client.client_name like' => '%'.$q.'%'), \n\t\t\t'AND' => array('Client.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "function blog_post_rating_request_handler(){\r\n\r\n global $wpdb;\r\n\r\n \r\n\r\n //var_dump($_POST);\r\n\r\n $PostID = $_POST['PostID'];\r\n\r\n /*\r\n delete_post_meta($PostID,'voices');\r\n delete_post_meta($PostID,'rating');\r\n */\r\n\r\n $voices = get_post_meta($PostID, \"voices\");\r\n $voices = (int) $voices[0];\r\n $voices = $voices+1;\r\n\r\n $NewRating = $_POST['NewRating'];\r\n $old_rating = get_post_meta($PostID, \"rating\");\r\n $old_rating = /*(float)*/ (int) $old_rating[0]; \r\n $NewRating = $NewRating + $old_rating;\r\n //$final_rating = $NewRating / $voices; \r\n //$final_rating = round($final_rating,1);\r\n\r\n update_post_meta( $PostID, 'voices', $voices );\r\n update_post_meta( $PostID, 'rating', $NewRating );\r\n\r\n\r\n\r\n $r_voices = get_post_meta($PostID, \"voices\");\r\n $r_voices = ( !empty($r_voices[0]) ) ? $r_voices[0] : 0;\r\n $r_rating = get_post_meta($PostID, \"rating\");\r\n $r_rating = ( !empty($r_rating[0]) ) ? $r_rating[0] : 0;\r\n //$result = ' '.$r_rating.' ('.$r_voices.' voices)';\r\n //echo $result;\r\n\r\n\r\n $final_ajax_response = array('code' => 1, 'voices' => $r_voices, 'rating' => $r_rating);\r\n echo json_encode($final_ajax_response);\r\n\r\n\r\n\r\n// https://gist.github.com/danielpataki/4b40f2c4d42973a22ba6#file-search-action-php\r\n\r\n// https://premium.wpmudev.org/blog/how-to-use-ajax-in-wordpress-to-load-search-results/\r\n \r\ndie();\r\n \r\n}", "public function getRecommendedTags()\n\t{\n\t\t$question = strtolower($_POST['question']);\n\t\t$this->load->model(\"Comms_model\");\n\t\t$recomtags=array();\n\t\t$tags=$this->Comms_model->getTags();\n\n\t\tforeach($tags->result() as $tag)\t\t\t//This foreach loop checks for all tags that are present in the databse as it \t\t\t\t\t\t\t\t\t\t\t\t is.\n\t\t{\n\t\t\t$pos=strpos($question,strtolower($tag->tags));\n\t\t\tif($pos!==false)\n\t\t\t{\n\t\t\t\tarray_push($recomtags, $tag->tags);\n\t\t\t}\n\t\t}\n\n\t\t$synonyms=$this->Comms_model->getAllSynonyms();\t//Gets all synonyms for the tags.\n\t\tforeach($synonyms->result() as $key)\n\t\t{\n\t\t\t$pos=strpos($question,strtolower($key->synonym));\t//Checks for synonyms of the tags present\n\t\t\tif($pos!==false)\n\t\t\t{\n\t\t\t\tarray_push($recomtags, $key->tag);\n\t\t\t}\n\t\t}\n\t\t$recomtags = array_map('strtolower', $recomtags);\n\t\t$recomtags=array_unique($recomtags);\n\t\techo json_encode($recomtags);\n\t}", "function location_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Location->get_locations_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "public function search()\n {\n $quizzes = null;\n $total = null;\n $tags = [];\n\n if(!empty($_GET['tags'])){\n\n foreach($_GET['tags'] as $tag){\n $tag = explode('|', $tag);\n $tags[] = $tag[0];\n }\n\n $page = 1;\n\n if(!empty($_GET['page'])){\n \n $pageInt = (int) $_GET['page'];\n\n if($pageInt > 1){\n $page = $pageInt;\n }\n }\n\n $slugify = new Slugify();\n\n $total = $this->manager->totalByTags($tags);\n $quizzes = $this->manager->findByTags($tags, $page);\n\n if($quizzes){\n foreach($quizzes as $key => $value){\n $slug = $slugify->slugify($value['title']);\n $quizzes[$key]['title'] = [$slug, $value['title']];\n }\n }\n \n }\n\n $this->show('default/home', ['quizzes' => $quizzes, 'total' => $total['COUNT(q.id)']]);\n }", "function suggest()\n\t{\n\t\t$suggestions = $this->Employee->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "public function user_search_ajax_handler() {\n\t\t$term = $_REQUEST['term'];\n\n\t\t$args = apply_filters( 'bpbcm_user_query_args', array(\n\t\t\t'blog_id' => null,\n\t\t\t'search' => $term,\n\t\t\t'fields' => 'all',\n\t\t) );\n\t\t$user_query = new BPBCM_User_Query( $args );\n\n\t\t$retval = array();\n\t\tforeach ( $user_query->results as $u ) {\n\t\t\t$retval[] = array(\n\t\t\t\t'label' => $u->display_name . ' (' . $u->user_login . ')',\n\t\t\t\t'value' => $u->user_login,\n\t\t\t);\n\t\t}\n\n\t\tdie( json_encode( $retval ) );\n\t}", "function ReceiveSearchResults()\r\n{\r\n $aData = null; \r\n \r\n $aData[\"id\"] = null;\r\n if (isset($_POST[\"id\"]) && !empty($_POST[\"id\"]))\r\n {\r\n $aData[\"id\"] = $_POST[\"id\"];\r\n } \r\n \r\n $aData[\"xbmcid\"] = null;\r\n if (isset($_POST[\"xbmcid\"]) && !empty($_POST[\"xbmcid\"]))\r\n {\r\n $aData[\"xbmcid\"] = $_POST[\"xbmcid\"];\r\n } \r\n \r\n $aData[\"error\"] = null;\r\n if (isset($_POST[\"error\"]) && !empty($_POST[\"error\"]))\r\n {\r\n $aData[\"error\"] = $_POST[\"error\"];\r\n } \r\n \r\n $aData[\"result\"] = null;\r\n if (isset($_POST[\"result\"]) && !empty($_POST[\"result\"]))\r\n {\r\n $aData[\"result\"] = $_POST[\"result\"];\r\n }\r\n \r\n return $aData;\r\n}", "public function ajax_search(){\n\t\t$BeginStationID = I('begin');\n\t\t$EndStationID = I('end');\n\t\t$NoOfRunsdate = I('time');\n\t\t$time = I('');\n\t\t//$time = $_POST['time'];\n\t\t//$this->ajaxReturn($time);\n\t\t$type = I('type');\n\t\t$page = I(\"page\");\n\t\t$page_size = I(\"page_size\");\n\t\tif (empty($page)) {\n\t\t\t$page = 1;\n\t\t}\n\t\tif (empty($page_size)) {\n\t\t\t$page_size = 10;\n\t\t}\n\n\t\t$list = D('Ticketmodel')->search($BeginStationID, $EndStationID, $NoOfRunsdate,$type, $page, $page_size);\n\n\t\t$data = array();\n\t\tforeach ($list as $k => $v) {\n\t\t\t$arr = array(\n\t\t\t\t\t'runsid' => $v['tml_noofrunsid'],\n\t\t\t\t\t'runsdate' => $v['tml_noofrunsdate'],\n\t\t\t\t\t'time' => $v['tml_noofrunstime'],\n\t\t\t\t\t'begin' => $v['tml_beginstation'],\n\t\t\t\t\t'end' => $v['tml_endstation'],\n\t\t\t\t\t'busmodel' => $v['tml_busmodel'],\n\t\t\t\t\t'leave_seats' => $v['tml_leaveseats'],\n\t\t\t\t\t'price' => $v['pd_fullprice'],\n\t\t\t);\n\t\t\t$data[] = $arr;\n\t\t}\n\t\t$list = array();\n\t\t$list['type'] = $type;\n\t\t$list['data'] = $data;\n\t\t//var_dump($data);\n\t\t$this->ajaxReturn($list);\n\t}", "function searchlangknowledgeajax() {\n $keyword = $this->input->post('keyword');\n $txtCalFromDate = $this->input->post('campfrom');\n $txtCalToDate = $this->input->post('campto');\n\n if (!empty($txtCalFromDate) && !empty($txtCalToDate)) {\n $txtCalFromDate = explode('/', $txtCalFromDate);\n $txtCalToDate = explode('/', $txtCalToDate);\n\n if (array_key_exists(2, $txtCalFromDate))\n ;\n $txtCalFromDate = $txtCalFromDate[2] . '-' . $txtCalFromDate[1] . '-' . $txtCalFromDate[0];\n\n if (array_key_exists(2, $txtCalToDate))\n ;\n $txtCalToDate = $txtCalToDate[2] . '-' . $txtCalToDate[1] . '-' . $txtCalToDate[0];\n }\n\n $campusId = $this->session->userdata('sess_campus_id'); // GET THE CAMPUS ID IF AVAILABLE.\n $studentsList = $this->tuitionsmodel->getAllStudents($campusId, $keyword, $txtCalFromDate, $txtCalToDate);\n if ($studentsList) {\n if (APP_THEME == 'OLD') {\n ?><table class=\"dynamic styled\" data-filter-bar='always' data-max-items-per-page='10' data-table-tools='{\"display\":false}' data-data-table='{\"bFilter\":false,\"aoColumns\":[{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": true,\"bSortable\": true},{\"bSearchable\": false,\"bSortable\": false}]}'> <!-- OPTIONAL: with-prev-next -->\n <thead>\n <tr>\n <th>Name</th>\n <th>Age</th>\t\t\t\t\t\t\t\t\n <th>Nationality</th>\t\t\t\t\t\t\t\t\n <th>Booking Id</th>\n <th>Campus arrival</th>\n <th>Campus departure</th>\n <th id=\"sortLK\" style=\"border-right:none;\">Language knowledge</th>\n <th style=\"display: none;\"></th>\n </tr>\n </thead>\n <tbody>\n <?php\n foreach ($studentsList as $student) {\n ?>\n <tr>\n <td class=\"center\">\n <?php\n if (empty($student[\"nome\"]) && empty($student[\"cognome\"]))\n echo '-';\n else\n echo html_entity_decode($student[\"nome\"] . ' ' . $student[\"cognome\"]);\n ?>\n </td>\n <td class=\"center\"><?php echo date_diff(date_create($student[\"pax_dob\"]), date_create('today'))->y; ?></td>\n <td class=\"center\"><?php echo (empty($student[\"nazionalita\"]) ? '-' : $student[\"nazionalita\"]); ?></td>\n <td class=\"center\"><?php echo $student[\"id_book\"] . '_' . $student[\"id_year\"]; ?></td>\n <td class=\"center\"><?php echo date('d/m/Y', strtotime($student[\"data_arrivo_campus\"])); ?></td>\n <td class=\"center\"><?php echo date('d/m/Y', strtotime($student[\"data_partenza_campus\"])); ?></td>\n\n <td class=\"center\" id=\"td_<?php echo $student[\"uuid\"]; ?>\" style=\"text-align:right;border-right:none;display: none;\"><?php echo (!empty($student[\"lk_lang_knowledge\"]) ? $student[\"lk_lang_knowledge\"] : 0); ?></td>\n <td class=\"center operation\" >\n <input style=\"width:40px;text-align: center;\" type=\"text\" class=\"updatelang form-control\" data-type=\"lang_knowledge\" data-uuid=\"<?php echo $student[\"uuid\"]; ?>\" id=\"txt_lang_knowledge<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"3\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_lang_knowledge\"]) ? $student[\"lk_lang_knowledge\"] : 0); ?>\" />\n </td>\n </tr>\n <?php\n }\n ?>\n </tbody>\n </table>\n <?php\n }\n else {\n ?>\n <table class=\"datatable table table-bordered table-striped vertical-middle\" style=\"width:99.98%;\" >\n <thead>\n <tr>\n <th >Name</th>\n <th>Age</th>\t\t\t\t\t\t\t\t\n <th>Nationality</th>\t\t\t\t\t\t\t\t\n <th>Booking Id</th>\n <th>Campus arrival</th>\n <th>Campus departure</th>\n <th class=\"col-text-numeric\">Listening &<br/> comprehension</th>\n <th class=\"col-text-numeric\">Oral test</th>\n <th class=\"col-text-numeric\">Student <br />test score</th>\n <th class=\"col-text-numeric\">Language knowledge</th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($studentsList)\n foreach ($studentsList as $student) {\n ?>\n <tr>\n <td >\n <?php\n if (empty($student[\"nome\"]) && empty($student[\"cognome\"]))\n echo '-';\n else\n echo html_entity_decode($student[\"nome\"] . ' ' . $student[\"cognome\"]);\n ?>\n </td>\n <td ><?php echo date_diff(date_create($student[\"pax_dob\"]), date_create('today'))->y; ?></td>\n <td ><?php echo (empty($student[\"nazionalita\"]) ? '-' : $student[\"nazionalita\"]); ?></td>\n <td ><?php echo $student[\"id_book\"] . '_' . $student[\"id_year\"]; ?></td>\n <td ><?php echo date('d/m/Y', strtotime($student[\"data_arrivo_campus\"])); ?></td>\n <td ><?php echo date('d/m/Y', strtotime($student[\"data_partenza_campus\"])); ?></td>\n <td class=\"text-center\">\n <input style=\"width:40px;text-align: center;\" type=\"text\" class=\"updatelang form-control\" data-type=\"listening_comprehension\" data-uuid=\"<?php echo $student[\"uuid\"]; ?>\" id=\"txt_listening_comprehension<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"3\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_listening_comprehension\"]) ? $student[\"lk_listening_comprehension\"] : 0); ?>\" />\n </td>\n <td class=\"text-center\">\n <input style=\"width:40px;text-align: center;\" type=\"text\" class=\"updatelang form-control\" data-type=\"oral_test\" data-uuid=\"<?php echo $student[\"uuid\"]; ?>\" id=\"txt_oral_test<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"3\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_oral_test\"]) ? $student[\"lk_oral_test\"] : 0); ?>\" />\n </td>\n <td class=\"text-center\">\n <?php if (isset($student['ts_id']) && !empty($student['ts_id'])) { ?>\n <input style=\"width:40px;text-align: center;\" disabled=\"disabled\" type=\"text\" class=\"form-control\" id=\"txt_english_test_score<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"3\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_english_test_score\"]) ? $student[\"lk_english_test_score\"] : 0); ?>\" />\n <?php } else { ?>\n <input style=\"width:40px;text-align: center;\" type=\"text\" class=\"form-control updateTestMarks\" id=\"txt_english_test_score<?php echo $student[\"uuid\"]; ?>\" data-id=\"<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"2\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_english_test_score\"]) ? $student[\"lk_english_test_score\"] : 0); ?>\" />\n <?php } ?>\n </td>\n <td class=\"text-center\">\n <input style=\"width:50px;text-align: center;\" disabled=\"disabled\" type=\"text\" class=\"form-control\" id=\"txt_lang_knowledge<?php echo $student[\"uuid\"]; ?>\" autocomplete=\"off\" maxlength=\"3\" onkeypress=\"return keyRestrict(event, '1234567890');\" value=\"<?php echo (!empty($student[\"lk_lang_knowledge\"]) ? $student[\"lk_lang_knowledge\"] : 0); ?>\" />\n </td>\n </tr>\n <?php\n }\n ?>\n </tbody>\n </table>\n <?php\n }\n } else {\n if (APP_THEME == 'OLD') {\n ?><p style=\"padding-left:8px;\">No record(s) found.</p><?php\n } else {\n ?><p >No record(s) found.</p><?php\n }\n }\n }", "public function mathsSelect(Request $request) {\n $user = Auth::user();\n\n $term = $request->term;\n\n $results = array();\n $maths = Math::where('creator_user_id', $user->id)->where('question', 'like', '%'.$term.'%' )->get();\n foreach($maths as $math) {\n $text=$math->question.\"###\".$math->answer;\n $text .= $math->answer_alt1 == null?\"\":\"###\".$math->answer_alt1;\n $text .= $math->answer_alt2 == null?\"\":\"###\".$math->answer_alt2;\n $text .= $math->answer_alt3 == null?\"\":\"###\".$math->answer_alt3;\n $text .= $math->answer_alt4 == null?\"\":\"###\".$math->answer_alt4;\n $results[\"results\"][] = array(\n \"id\" => $math->id,\n \"text\" => $text\n );\n }\n\n return response()->json($results);\n }", "public function search() {\n\t\t$date = $this->input->post('date');\n\n\t\t$result = $this->agenda_model->search($date);\n\n\t\techo json_encode($result);\n\t}", "protected function _readSearchForm()\n {\n $perms = $GLOBALS['injector']->getInstance('Horde_Perms');\n $vars = $this->vars;\n\n $criteria = array();\n if ($GLOBALS['registry']->isAdmin(array('permission' => 'hermes:review'))) {\n if (!empty($vars->employees[0])) {\n $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();\n if (!$auth->hasCapability('list')) {\n $criteria['employee'] = explode(',', $vars->employees[0]);\n if (empty($criteria['employee'])) {\n unset($criteria['employee']);\n }\n } else {\n $criteria['employee'] = $vars->employees;\n }\n }\n } else {\n $criteria['employee'] = $GLOBALS['registry']->getAuth();\n }\n if (!empty($vars->client)) {\n $criteria['client'] = $vars->client;\n }\n if (!empty($vars->type)) {\n $criteria['jobtype'] = $vars->type;\n }\n if (!empty($vars->costobject)) {\n $criteria['costobject'] = $vars->costobject;\n }\n if (!empty($vars->after_date)) {\n $dt = new Horde_Date($vars->after_date);\n $criteria['start'] = $dt->timestamp();\n }\n if (!empty($vars->before_date)) {\n $dt = new Horde_Date($vars->before_date);\n $criteria['end'] = $dt->add(86400)->timestamp();\n }\n\n if ($vars->billable !== '') {\n $criteria['billable'] = $vars->billable;\n }\n if ($vars->submitted !== '') {\n $criteria['submitted'] = $vars->submitted;\n }\n if ($vars->exported !== '') {\n $criteria['exported'] = $vars->exported;\n }\n\n return $criteria;\n }", "public function getAnswers();", "public function searchFaq($name,$ajax){\n $faq = new Model\\Faq();\n $data = $faq->search($name);\n //si es una request ajax retorna un json con los datos\n if($ajax) {\n echo json_encode($data);\n }else{\n //si no es ajax, retorna un objeto\n return $data;\n }\n }", "public function ajaxSearchMethod(): Response\n {\n $this->initialize();\n $this->renderer->setTemplate(null);\n $jsonData = [];\n\n $search = $_GET['term'];\n $table = $_GET['table'];\n\n $tableModel = new TableModel();\n if ($tableModel->getBy('tablename', $table)) {\n $className = $tableModel->namespace;\n $this->model = new $className();\n }\n $data = $this->model->getAllKeyValue($search);\n\n $result = [];\n foreach ($data as $key => $value) {\n $result[] = ['id' => $key, 'text' => $value];\n }\n\n $jsonData['results'] = $result;\n $jsonData['pagination'] = [\"more\" => false];\n\n $print = constant('DEBUG') === true ? constant('JSON_PRETTY_PRINT') : 0;\n return $this->sendResponse(json_encode($jsonData, $print));\n }", "public function search(){\r\n $this->benchmark->mark('search_start');\r\n\t\t$q = $this->input->get('q');\r\n\t\t$q = trim($q); //remove spaces\r\n\r\n\t\tif($q=='') $q=\"*:*\";\r\n\r\n $page = $this->input->get('p');\r\n if($page=='') $page=1;\r\n $groupFilter = urldecode($this->input->get('group'));\r\n if($groupFilter=='') $groupFilter='All';\r\n $classFilter = $this->input->get('class');\r\n if($classFilter=='') $classFilter='All';\r\n\t\t$typeFilter = urldecode($this->input->get('type'));\r\n\t\tif($typeFilter=='') $typeFilter='All';\r\n\t\t$subjectFilter = urldecode($this->input->get('subject'));\r\n if($subjectFilter=='') $subjectFilter='All';\r\n \r\n $fortwoFilter = urldecode($this->input->get('fortwoFilter'));\r\n if($fortwoFilter=='') $fortwoFilter='All';\r\n $forfourFilter = urldecode($this->input->get('forfourFilter'));\r\n if($forfourFilter=='') $forfourFilter='All';\r\n $forsixFilter = urldecode($this->input->get('forsixFilter'));\r\n if($forsixFilter=='') $forsixFilter='All';\r\n\t\t/*\r\n\t\t$spatial_included_ids = $this->input->post('spatial_included_ids');\r\n\t\t$temporal = $this->input->post('temporal');\r\n $alltab = $this->input->post('alltab');\r\n */\r\n\r\n\t\t$query = $q;\r\n\t\t$extended_query = '';\r\n\r\n\t\t//echo '+spatial:('.$spatial_included_ids.')';\r\n /*\r\n\t\tif($spatial_included_ids!='') {\r\n\t\t\t$extended_query .= $spatial_included_ids;\r\n\t\t}\r\n\t\tif($temporal!='All'){\r\n\t\t\t$temporal_array = explode('-', $temporal);\r\n\t\t\t$extended_query .='+dateFrom:['.$temporal_array[0].' TO *]+dateTo:[* TO '.$temporal_array[1].']';\r\n\t\t}\r\n */\r\n\t\t//echo $query;\r\n\r\n\t\t/*Search Part*/\r\n\r\n\t\t$this->load->model('solr');\r\n\t\t$data['json'] = $this->solr->search($query, $extended_query, 'json', $page, $classFilter, $groupFilter, $typeFilter, $subjectFilter, $fortwoFilter, $forfourFilter,$forsixFilter,'PUBLISHED');\r\n \r\n \r\n\t\t//print_r($data['json']);\r\n\r\n\t\t/**getting the tabbing right**/\r\n\t\t$data['json_tab'] = $data['json'];\r\n //$this->solr->search($query, $extended_query, 'json', $page, 'All', $groupFilter, $typeFilter, $subjectFilter,'PUBLISHED');//just for the tabbing mechanism (getting the numbers right)\r\n\t\t/*just that! and json_tab is used in tab view*/\r\n\r\n\t\t/**getting the facet right**/\r\n\t\t//$query_tab = $q;\r\n\t\t//$data['json_facet']=$this->solr->search($query, $page, $classFilter);//just for the tabbing mechanism (getting the numbers right)\r\n\r\n\t\t/*Passing Variables down to the view*/\r\n\t\tif($q=='*:*') $q = 'All Records';\r\n\t\t$data['query']=$q;\r\n\t\t$data['classFilter']=$classFilter;\r\n\t\t$data['typeFilter']=$typeFilter;\r\n\t\t$data['groupFilter']=$groupFilter;\r\n\t\t$data['subjectFilter']=$subjectFilter;\r\n\t\t$data['page']=$page;/*\r\n $data['alltab'] = $alltab;\r\n\t\t$data['spatial_included_ids']=$spatial_included_ids;\r\n\t\t$data['temporal']=$temporal;\r\n*/\r\n\r\n\r\n\t\t$this->benchmark->mark('search_end');\r\n\t\t//echo $this->benchmark->elapsed_time('search_start', 'search_end');\r\n\r\n\t\t$this->load->view('mobile/search_result', $data);//load the view\r\n\t}", "function get_article_suggestion() {\r\n $search = $this->input->post(\"search\");\r\n if ($search) {\r\n $result = $this->Help_articles_model->get_suggestions(\"help\", $search);\r\n\r\n echo json_encode($result);\r\n }\r\n }", "function getSuggestions($username, $db){\n $hostel = substr($username, -1);\n \n $query_request = \"select sg.suggestion, fb.rating, cr.date, hk.name, s.room from\n suggestions sg Inner Join feedback fb on sg.feedback_id = fb.feedback_id\n Inner Join cleanrequest cr on fb.request_id = cr.request_id\n Inner Join housekeeper hk on cr.worker_id = hk.worker_id\n Inner Join student s on sg.rollnumber = s.rollnumber\n where s.hostel = '$hostel'\n Order by cr.date desc\";\n $result_request = mysqli_query($db, $query_request);\n return $result_request;\n }", "function cp_ajax_search( $request ) {\n\t$posts = [];\n\t$results = [];\n\t// check for a search term\n\tif ( isset( $request['query'] ) ) {\n\t\t// get posts\n\t\t$posts = get_posts( [\n\t\t\t'posts_per_page' => 20,\n\t\t\t'post_type' => ['page', 'post'],\n\t\t\t's' => $request['query'],\n\t\t] );\n\t\t// set up the data to return\n\t\tforeach( $posts as $post ) {\n\t\t\t$results[] = [\n\t\t\t\t'title' => $post->post_title,\n\t\t\t\t'link' => get_permalink( $post->ID )\n\t\t\t];\n\t\t}\n\t}\n\tif ( empty( $results ) ) {\n\t\treturn new WP_Error( 'front_end_ajax_search', 'No results' );\n\t}\n\treturn rest_ensure_response( $results );\n}", "function my_action_javascript() { ?>\n\t<script type=\"text/javascript\" >\n\tjQuery(document).ready(function($) {\n\t\tjQuery('#searchform').submit(function(e){\n\t\t\te.preventDefault();\n\t\t\tjQuery('#searchstatus').html('Searching...');\n\t\t\tvar q = jQuery('#userquery').val();\n\t\t\tif (q.length > 1) {\n\t\t\t\tvar data = {\n\t\t\t\t\t'action': 'my_action',\n\t\t\t\t\t'whatever': q\n\t\t\t\t};\n\n\t\t\t\tjQuery.post(ajaxurl, data, function(response) {\n\t\t\t\t\tvar output = '';\n\t\t\t\t\tvar searchstatus = '';\n\t\t\t\t\tvar obj = jQuery.parseJSON(response);\n\t\t\t\t\tjQuery.each(obj, function(i,x) {\n\t\t\t\t\t\toutput += '<tr data-user-id='+x.ID+'><td><i>'+x.ID+'</i></td><td><b>'+ x.last + ', '+ x.first + '</b></td><td>' + x.email + '</td></tr>'\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\tif (output == '') { searchstatus = 'Nothing Found'; }\n\t\t\t\t\tjQuery('#searchstatus').html(searchstatus);\n\t\t\t\t\tjQuery('#tableusers').html(output);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tjQuery('#searchstatus').html('Search for 2 or more letters.');\n\t\t\t\tjQuery('#tableusers').html('');\n\t\t\t\tjQuery('#tabletransactions').html('');\n\n\t\t\t}\n\t\t\tjQuery('#tableusers').on(\"click\", \"tr\", function() {\n\t\t\t\tjQuery(this).siblings().removeClass('selected');\n\t\t\t\tjQuery(this).addClass('selected');\n\t\t\t\tvar user_id = jQuery(this).data('user-id');\n\t\t\t\tvar data2 = {\n\t\t\t\t\t'action': 'other_action',\n\t\t\t\t\t'whatever': user_id\n\t\t\t\t};\n\n\t\t\t\tjQuery.post(ajaxurl, data2, function(responze) {\n\t\t\t\t\tvar label = {\n\t\t\t\t\t\tdownload:\"Download Free Report\",\n\t\t\t\t\t\tsubscribe:\"Subscribe to Newsletter\",\n\t\t\t\t\t\tunsubscribe:\"Unsubscribe from Newsletter\",\n\t\t\t\t\t\torder:\"Shop Order\",\n\t\t\t\t\t\tcancelorder:\"Cancel Shop Order\",\n\t\t\t\t\t\trequest:\"Request Information\",\n\t\t\t\t\t\ttopicsubscribe:\"Subscribe to a Topic\",\n\t\t\t\t\t\ttopicunsubscribe:\"Unsubscribe from a Topic\",\n\t\t\t\t\t\tpub:\"Subscribe to a Publication\",\n\t\t\t\t\t\tview:\"View Report\"\n\t\t\t\t\t};\n\t\t\t\t\tvar output = '';\n\t\t\t\t\tvar previous_date = '';\n\t\t\t\t\tvar obj = jQuery.parseJSON(responze);\n\t\t\t\t\tif (jQuery.isEmptyObject(obj)) {\n\t\t\t\t\t\toutput += '<tr><td>No transactions found for user '+ user_id +'.</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery.each(obj, function(i,x) {\n\t\t\t\t\t\t\tif (x.date != previous_date) {\n\t\t\t\t\t\t\t\toutput += '<tr><td colspan=3 class=\"date-cell\">'+ x.date + '</td></tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\toutput += '<tr title=\"' + label[x.type.replace(/-/g, \"\")] + '\">';\n\t\t\t\t\t\t\toutput += '<td><span class=\"type-icon type-' + x.type + '\"><span></td>';\n\t\t\t\t\t\t\toutput += '<td>' + x.item + '</td>';\n\t\t\t\t\t\t\toutput += '<td><i>' + label[x.type.replace(/-/g, \"\")] + '</i></td>';\n\t\t\t\t\t\t\toutput += '</tr>';\n\t\t\t\t\t\t\tprevious_date = x.date;\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tjQuery('#tabletransactions').html(output);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\t</script> <?php\n}", "public function AjaxCustomSearch($posted_data, $action, $idx)\n {\n\n $RESULT = '';\n\n // ---- get name ----\n $search_name = ArrayValue($posted_data, 'CUSTOM_SEARCH_NAME'.$idx);\n //$search_name = str_replace(\"'\", '_', $search_name);\n\n // ---- check if name exists\n $id_name = $this->Custom_Search_Table . '_id';\n\n $admin_id = $this->GetUserId();\n\n if (!$admin_id) {\n return;\n }\n\n $q_search_name = $this->SQL->QuoteValue($search_name);\n $search_id = $this->SQL->GetValue(array(\n 'table' => $this->Custom_Search_Table,\n 'key' => $id_name,\n 'where' => \"search_name=$q_search_name AND class_name='$this->Class_Name' AND `{$this->Admin_Id_Name}`=$admin_id\"\n ));\n\n if ($action == 'delete') {\n if ($search_id) {\n if (!$this->SQL->UpdateRecord($this->Custom_Search_Table, 'active=0', \"`$id_name`=$search_id\")) {\n echo \"ERROR: Could Not Delete Custom Search [$search_name]\";\n }\n } else {\n echo \"ERROR: Custom Search Not Found [$search_name]\";\n }\n return;\n }\n\n // ---- get order ----\n\n $order = '';\n $order_fields = array();\n $order_field = ArrayValue($posted_data, 'TABLE_ORDER'.$idx);\n list($base, $suffix) = explode(' ', $order_field . ' ');\n if ($order_field) {\n $order_fields[$base] = $suffix;\n }\n $order_field = ArrayValue($posted_data, 'TABLE_2ORDER'.$idx);\n list($base, $suffix) = explode(' ', $order_field . ' ');\n if ($order_field and !array_key_exists($base, $order_fields)) {\n $order_fields[$base] = $suffix;\n }\n $order_field = ArrayValue($posted_data, 'TABLE_3ORDER'.$idx);\n list($base, $suffix) = explode(' ', $order_field . ' ');\n if ($order_field and !array_key_exists($base, $order_fields)) {\n $order_fields[$base] = $suffix;\n }\n\n if (count($order_fields) >0) {\n foreach($order_fields as $base => $suffix) {\n if (!empty($suffix)) {\n $suffix = \" $suffix\";\n }\n $comma = (!empty($order))? ',' : '';\n $order .= $comma . $base . $suffix;\n }\n }\n\n\n $name = $this->GetIdName($search_name);\n $QUERY = \"{name:'$name', order:'$order', selections:[\\n\";\n\n //-------- display fields --------\n $DisplayFields = '';\n\n $field_list = array();\n foreach ($posted_data as $key=>$value) {\n if (strpos($key, 'TABLE_SEARCH_OPERATOR') !== false) {\n $field_list[] = strFrom($key, \"TABLE_SEARCH_OPERATOR{$idx}_\");\n }\n }\n\n $have_field = false;\n foreach ($field_list as $field) {\n $selector = ArrayValue($posted_data, \"TABLE_SEARCH_OPERATOR{$idx}_$field\");\n $filter = ArrayValue($posted_data, \"TABLE_SEARCH_VALUE{$idx}_$field\");\n $view = ArrayValue($posted_data, \"TABLE_SEARCH_DISPLAY{$idx}_$field\");\n\n if ((($selector != 'All') and ($selector != 1)) or ($view)) {\n $view = ($view)? 1 : 0;\n $filter = addslashes($filter);\n $QUERY .= \"{field: '$field', selector: '$selector', filter : '$filter', view : $view},\\n\";\n $have_field = true;\n }\n }\n\n if ($have_field) {\n $QUERY = substr($QUERY, 0, -2);\n }\n $QUERY .= \"\\n]}\";\n\n\n if ($search_id) {\n $db_result = $this->SQL->UpdateRecord(\n $this->Custom_Search_Table,\n \"`search_data`=\". $this->SQL->QuoteValue($QUERY),\n \"`$id_name`=$search_id\"\n );\n } else {\n $keys = \"`{$this->Admin_Id_Name}`,`class_name`,`search_name`,`search_data`,`active`,`created`\";\n\n $values_array = array(\n $admin_id,\n $this->Class_Name,\n $search_name,\n $QUERY,\n 1,\n 'NOW()'\n );\n $values = $this->SQL->Values($values_array);\n $db_result = $this->SQL->AddRecord($this->Custom_Search_Table, $keys, $values);\n }\n\n if (!$db_result) {\n $RESULT = 'ERROR: Database Failed to Update!';\n } else {\n $id_name = $this->GetIdName($search_name);\n $RESULT = qqn(\"<a href=`#` id=`CUSTOM_SEARCH{$idx}_$id_name`\n onclick=`tableCustomSearchSelect($idx, $QUERY); return false;`>$search_name</a>\");\n }\n\n echo $RESULT;\n }", "public function getQuestions();", "function GetSearchTerms( $success ) \n{ \n if (is_null( $success )) \n { \necho \"<h4 align='center'>Review successfully submitted.</h4>\";} \necho \"<h4 align='center'>Enter search terms to find products.</h4>\"; \necho \"<table align='center'> \n<form action='adventureworks_demo_pdo.php' \n enctype='multipart/form-data' method='POST'> \n<input type='hidden' name='action' value='getproducts'/> \n<tr> \n <td><input type='text' name='query' size='40'/></td> \n</tr> \n<tr align='center'> \n <td><input type='submit' name='submit' value='Search'/></td> \n</tr> \n</form> \n </table>\"; \n}", "public function handle_ajax() {\n\t\tcheck_ajax_referer( 'mentionable_nonce', 'mentionable_nonce' );\n\n\t\tif ( ! isset( $_REQUEST['mentionable_word'] ) ) {\n\t\t\twp_send_json_error( 'Mention Word is not specified.' );\n\t\t}\n\n\t\t// This helps us search by post title\n\t\tadd_filter( 'posts_where', array( $this, 'posts_where_like_title' ), 10, 2 );\n\n\t\t$query_args = array(\n\t\t\t'post_type' => Mentionable_Settings::$options['autocomplete_post_types'],\n\t\t\t'post_title_like' => $_REQUEST['mentionable_word'],\n\t\t\t'fields' => 'ids',\n\t\t\t'posts_per_page' => 5,\n\t\t);\n\n\t\t$query = new WP_Query( apply_filters( 'mentionable/autocomplete/args', $query_args ) );\n\n\t\t$results = array();\n\t\tforeach ( $query->posts as $id ) {\n\t\t\t$results[ get_the_title( $id ) ] = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'url' => get_permalink( $id ),\n\t\t\t\t'lac_url' => get_post_meta($id, 'lac_url', true),\n\t\t\t\t'type' => get_post_type( $id ),\n\t\t\t);\n\t\t}\n\n\t\tif ( empty( $results ) ) {\n\t\t\twp_send_json_error( 'No Results' );\n\t\t} else {\n\t\t\twp_send_json_success( $results );\n\t\t}\n\n\t}", "function GetResults() {\n\n\tglobal $connection;\n\n\tif ( isset( $_GET['user_query'] ) ) {\n\t\t$search_term = $_GET['user_query'];\n\t}\n\n\t$get_posts = \"SELECT * from posts where post_title like '%$search_term%' ORDER by 1 DESC\";\n\t$run_posts = mysqli_query( $connection, $get_posts );\n\n\t$count_result = mysqli_num_rows( $run_posts );\n\n\tif ( $count_result == 0 ) {\n\t\techo \"<div class='alert alert-danger' role='alert'>Sorry, we do not have results for this keyword!</div>\";\n\t\texit();\n\t}\n\n\twhile ( $row_posts = mysqli_fetch_array( $run_posts ) ) {\n\t\t\n\t\t$post_id = $row_posts['post_id'];\n\t\t$user_id = $row_posts['user_id'];\n\t\t$post_title = $row_posts['post_title'];\n\t\t$content = $row_posts['post_content'];\n\t\t$post_date = $row_posts['post_date'];\n\n\t\t// getting the user who has posted the thread\n\t\t$user = \"SELECT * from users where user_id='$user_id' AND posts='yes'\";\n\n\t\t$run_user = mysqli_query( $connection, $user );\n\t\t$row_user = mysqli_fetch_array( $run_user );\n\t\t$user_name = $row_user['user_name'];\n\t\t$user_image = $row_user['user_image'];\n\n\t\t// now displaying all at once\n\t\t$output = \"<div class='panel panel-default'>\";\n\t\t$output .= \"<div class='panel-body'>\";\n\t\t$output .= \"<div class='col-sm-2'>\";\n\t\t$output .= \"<img src='user/user_images/$user_image' class='img-responsive'>\";\n\t\t$output .= \"</div>\";\n\t\t$output .= \"<div class='col-sm-10'>\";\n\t\t$output .= \"<ol class='breadcrumb'>\";\n\t\t$output .= \"<li><a href='user_profile.php?user_id=$user_id'>$user_name</a></li>\";\n\t\t$output .= \"<li>$post_date</li>\";\n\t\t$output .= \"</ol>\";\n\t\t$output .= \"<h3>$post_title</h3>\";\n\t\t$output .= \"<p>$content</p>\";\n\t\t$output .= \"<a href='single.php?post_id=$post_id' class='btn btn-success'>See Replies or Reply to This</a>\";\n\t\t$output .= \"</div>\";\n\t\t$output .= \"</div>\";\n\t\t$output .= \"</div>\";\n\n\t\techo $output;\n\n\t}\n\n}", "function ajaxSuggestions($mcid,$type=0,$registeredBy=0) {\n $content=\"\";\n if(!isset($_POST['userid'])||$_POST['userid']==\"\") {\n $content=\"UserId Can't be Null\";\n return $content;\n }\n if((!isset($_POST['hostelname']))||($_POST['hostelname']==\"\")) {\n $content.= \"Please Select the hostel name for Pragyan Id:\".$_POST['userid'];\n return $content;\n }\n if(!isset($_POST['roomNo'])||($_POST['roomNo']==\"\")) {\n $content.=\"Please Select the Room for Pragyan Id:\".$_POST['userid'];\n return $content;\n }\n if(!isset($_POST['stay'])) {\n return \"No of days of stay should be defined\";\n }\n $roomNo = escape($_POST['roomNo']);\n $hostelName = escape($_POST['hostelname']);\n $uid = escape($_POST['userid']);\n $stay = escape($_POST['stay']);\n if(!is_numeric($uid)) {\n $content=\"Not a valid Pragyan Id:\".$uid;\n return $content;\n }\n if(!is_numeric($stay)) {\n return \"No of days of stay should be a number\";\n }\n if($stay<=0) return \"No of days should be atleast 1\";\n if(!isRoomAvailable($roomNo,$mcid)) {\n $content=\"Room Not Available for Pragyan Id : \".$uid.\".Please try again \";\n return $content;\n }\n \n if($type==0) return addUserToRoomAjax($uid,$roomNo,$mcid,escape($_POST['user_reg_value']),$stay,$registeredBy);\n else return updateUserToRoomAjax($uid,$roomNo,$mcid,escape($_POST['user_reg_value']),$stay);\n /**code doesn't continue from this part\"; */\n\n\n\n $name = getUserName($uid);\n $email = getUserEmail($uid);\n $room = getRoomNoFromRoomId($roomNo,$mcid);\n \n $tableForDisclaimer.=<<<TROW\n <tr>\n <td>$uid</td>\n <td>$name</td>\n <td>$email</td>\n <td>$hostelName</td>\n <td>$room</td>\n <td>\n <form method=\"POST\" target=\"_blank\" action=\"./+view\">\n <input type=\"submit\" name=\"printthis\" value=\"PRINT\"/>\n <input type=\"hidden\" name=\"printHiddenId\" value=\"printHostelAllotmentBill{$uid}\" />\n </form>\n </td>\n </tr>\nTROW;\n}", "public static function getApiSearchResults()\n {\n // Get the config and init the result array\n $config = LbwpCore::getInstance()->getConfig();\n $results = array();\n $terms = array_map('trim', explode(' ', $_POST['search']));\n\n // Prepare the url to be called\n $url = self::JSON_ENDPOINT;\n $url = str_replace('{searchEngineId}', $config['Various:GoogleEngineId'], $url);\n $url = str_replace('{searchTerm}', urlencode($_POST['search']), $url);\n $url = str_replace('{apiKey}', self::$apiConf['apiKey'], $url);\n // Set the language, defaulting to wordpress locale\n $language = substr(get_locale(), 0, 2);\n if (Multilang::isActive()) {\n $language = Multilang::getCurrentLang();\n }\n $url = str_replace('{language}', $language, $url);\n\n // Add start / num parameters\n $page = (intval($_POST['page']) > 0) ? intval($_POST['page']) : 1;\n $start = ($page > 1) ? (($page - 1) * self::RESULTS_PER_PAGE)+1 : 1;\n $url .= '&start=' . $start . '&num=' . self::RESULTS_PER_PAGE . '';\n\n // Make a simple call and convert the xml doc to an array\n $key = md5($url);\n $cachedResult = wp_cache_get($key, 'SearchApi');\n\n // If not in cache, make the request and cache the ajax resonse\n if (!is_array($cachedResult)) {\n $data = json_decode(file_get_contents($url), true);\n $nativeResultCount = count($data['items']);\n // Filter the results as of config\n $results = self::prepareAndFilterResults($data, $terms, $language);\n\n // Show the results or print the error message\n if (count($results) > 0) {\n $itemHtml = '';\n foreach ($results as $result) {\n // Replace all the variables for the item\n $itemHtml .= Templating::getBlock(self::$apiConf['itemTemplate'], array(\n '{url}' => $result['url'],\n '{classes}' => $result['classes'],\n '{imageTemplate}' => (self::$apiConf['displayImages']) ? $result['imageHtml'] : '',\n '{title}' => $result['title'],\n '{target}' => $result['target'],\n '{metaTemplate}' => self::getMetaTemplate($result),\n '{description}' => $result['description']\n ));\n }\n\n $cachedResult = array(\n 'resultCount' => count($results),\n 'nativeCount' => $nativeResultCount,\n 'html' => $itemHtml,\n 'call' => $url,\n 'cached' => false\n );\n } else {\n $cachedResult = array(\n 'resultCount' => 0,\n 'nativeCount' => $nativeResultCount,\n 'html' => '<p>' . self::$apiConf['errorMessage'] . '</p>',\n 'call' => $url,\n 'cached' => false\n );\n }\n\n // Set the result to cache\n wp_cache_set($key, $cachedResult, 'SearchApi', 86400);\n } else {\n $cachedResult['cached'] = true;\n }\n\n WordPress::sendJsonResponse($cachedResult);\n }", "function generateSearchQuery($userType, $person_id, $keywords, $ordering, $time_ref, $start_date, $end_date) {\n\n // Keywords used\n if ($keywords != '') {\n $sql = \"SELECT rr.record_id, rs.patient_name, \"\n . \"pd.first_name || ' ' || pd.last_name AS doc_name, \"\n . \"pr.first_name || ' ' || pr.last_name AS rad_name, \"\n . \"rr.test_type, rr.prescribing_date, rr.test_date, rr.diagnosis, rr.description, rs.rank \"\n . \"FROM radiology_record rr, persons pd, persons pr, \"\n . \"(SELECT record_id, 6*SCORE(1) + 3*SCORE(2) + SCORE(3) AS rank, patient_name \"\n . \"FROM radiology_search \"\n . \"WHERE CONTAINS(patient_name, '\" . $keywords . \"', 1)>0 \"\n . \"OR CONTAINS(diagnosis, '\" . $keywords . \"', 2)>0 \"\n . \"OR CONTAINS(description, '\" . $keywords . \"', 3)>0 \"\n . \") rs \"\n . \"WHERE rr.record_id = rs.record_id \"\n . \"AND rr.doctor_id = pd.person_id \"\n . \"AND rr.radiologist_id = pr.person_id \";\n // Keywords and time period\n if ($start_date != '' and $time_ref == 't_date') {\n $sql .= \"AND rr.test_date >= TO_DATE('\" . $start_date . \"','yyyy-mm-dd') \"\n . \"AND rr.test_date <= TO_DATE('\" . $end_date . \"','yyyy-mm-dd') \";\n } else if ($start_date != '' and $time_ref == 'p_date') {\n $sql .= \"AND rr.prescribing_date >= TO_DATE('\" . $start_date . \"','yyyy-mm-dd') \"\n . \"AND rr.prescribing_date <= TO_DATE('\" . $end_date . \"','yyyy-mm-dd') \";\n }\n } \n // Time period only\n else {\n $sql = \"SELECT rr.record_id, \"\n . \"pp.first_name || ' ' || pp.last_name AS patient_name, \"\n . \"pd.first_name || ' ' || pd.last_name AS doc_name, \"\n . \"pr.first_name || ' ' || pr.last_name AS rad_name, \"\n . \"rr.test_type, rr.prescribing_date, rr.test_date, rr.diagnosis, rr.description \"\n . \"FROM radiology_record rr, persons pd, persons pr, persons pp \"\n . \"WHERE rr.doctor_id = pd.person_id \"\n . \"AND rr.radiologist_id = pr.person_id \"\n . \"AND rr.patient_id = pp.person_id \";\n if ($start_date != '' and $time_ref == 't_date') {\n $sql .= \"AND rr.test_date >= TO_DATE('\" . $start_date . \"','yyyy-mm-dd') \"\n . \"AND rr.test_date <= TO_DATE('\" . $end_date . \"','yyyy-mm-dd') \";\n } else if ($start_date != '' and $time_ref == 'p_date') {\n $sql .= \"AND rr.prescribing_date >= TO_DATE('\" . $start_date . \"','yyyy-mm-dd') \"\n . \"AND rr.prescribing_date <= TO_DATE('\" . $end_date . \"','yyyy-mm-dd') \";\n }\n }\n \n // Security check\n if ($userType == 'p') {\n $sql .= \"AND rr.patient_id = \".$person_id;\n } else if ($userType == 'r') {\n $sql .= \"AND rr.radiologist_id = \".$person_id;\n } else if ($userType == 'd') {\n $sql .= \"AND rr.patient_id IN (SELECT patient_id \"\n . \"FROM family_doctor \"\n . \"WHERE doctor_id = \".$person_id.\")\";\n }\n \n // Ordering\n if ($ordering == 'rank') {\n $sql .= \" ORDER BY rs.rank\";\n } else if ($ordering == 'time_new' and $time_ref == 't_date') {\n $sql .= \" ORDER BY rr.test_date DESC\";\n } else if ($ordering == 'time_new' and $time_ref == 'p_date') {\n $sql .= \" ORDER BY rr.prescribing_date DESC\";\n } else if ($ordering == 'time_old' and $time_ref == 't_date') {\n $sql .= \" ORDER BY rr.test_date\";\n } else if ($ordering == 'time_old' and $time_ref == 'p_date') {\n $sql .= \" ORDER BY rr.prescribing_date\";\n }\n //echo $sql;\n return $sql;\n}", "function select_a_quiz_ajax() {\n\t\t\t$data = array();\n\t\t\t$data['opt'] = array();\n\t\t\t\n\t\t\tif ( ( isset( $_POST['ld_selector_nonce'] ) ) && ( ! empty( $_POST['ld_selector_nonce'] ) ) && ( wp_verify_nonce( $_POST['ld_selector_nonce'], 'sfwd-quiz' ) ) ) { \n\t\t\t\t$post_array = $this->select_a_quiz( @$_REQUEST['course_id'], @$_REQUEST['lesson_id'] );\n\t\t\t\tif ( !empty( $post_array ) ) {\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $post_array as $key => $value ) {\n\t\t\t\t\t\t$opt[ $i ]['key'] = $key;\n\t\t\t\t\t\t$opt[ $i ]['value'] = $value;\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t$data['opt'] = $opt;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo json_encode( $data );\n\t\t\texit;\n\t\t}", "public function actionGetTerms() {\n\t\t$sql = 'SELECT id, name as value FROM x2_accounts WHERE name LIKE :qterm ORDER BY name ASC';\n\t\t$command = Yii::app()->db->createCommand($sql);\n\t\t$qterm = $_GET['term'] . '%';\n\t\t$command->bindParam(\":qterm\", $qterm, PDO::PARAM_STR);\n\t\t$result = $command->queryAll();\n\t\techo CJSON::encode($result);\n\t\texit;\n\t}", "public function search() {\n\n $term = !empty($this->request->query['term']) ? $this->request->query['term'] : '';\n\n if (!empty($term)) {\n $this->search_results($term, false);\n }\n\n $this->loadShoutbox();\n }", "public function ajaxGetResults()\n {\n $validationRules = [\n 'page' => 'required|integer',\n 'query' => 'required|max:80|string'\n ];\n\n $condition[\"query\"] = !empty(Input::get('query')) ? Input::get('query') : null;\n $condition[\"country\"] = !empty(Input::get('country')) ? Input::get('country') : null;\n $condition[\"city\"] = !empty(Input::get('city')) ? Input::get('city') : null;\n $page = !empty(Input::get('page')) ? Input::get('page') : 1;\n\n/* $validation = Validator::make(['page' => $condition[\"page\"], 'query' => $condition[\"query\"]], $validationRules);\n\n if ($validation->fails()){\n return Response::json([\n 'success' => false,\n 'errors' => $validation->getMessageBag()->toArray(),\n 'feedback' => 'Something went wrong while processing your request. Please try again.',\n ], 200);\n }\n*/\n $limit = 4;\n $noMore = true;\n $data = [];\n $content = '';\n $keyword = $condition[\"query\"];\n\n $result = $this->search($condition, $limit, $limit * $page);\n\n if ($result['hits']['total'] > $limit * ($page + 1)) $noMore = false;\n\n\n\n $content .= View::make('partials.job_search_results')->with(['results' => $result['hits']['hits'], 'hasResults' => true, 'searchQuery' => $keyword]);\n\n\n $data['content'] = $content;\n $data['noMore'] = $noMore;\n $data['page'] = $page+1;\n\n\n return json_encode($data);\n }", "public function search_quiz_questions()\r\n\t{\r\n\t\t$data['title'] = \"Education\";\r\n\t\t$data['exams'] = $this->registermodel->get_search_courses();\r\n\t\t//echo \"<pre>\";print_r($data['exams']);exit();\r\n\t\t$this->load->view('admin/includes/header', $data);\r\n\t\t$this->load->view('admin/search_quiz_questions', $data);\r\n\t\t$this->load->view('admin/includes/footer', $data);\r\n\t}", "function fetch_searchable_question_title($qid = 0, $cattype = '')\r\n{\r\n global $ilance, $myapi;\r\n \r\n $html = '';\r\n \r\n $table = ($cattype == 'service') ? \"project_questions\" : \"product_questions\";\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT question_\" . $_SESSION['ilancedata']['user']['slng'] . \" AS question\r\n FROM \" . DB_PREFIX . $table . \"\r\n WHERE questionid = '\" . intval($qid) . \"'\r\n LIMIT 1\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($sql) > 0)\r\n {\r\n $res = $ilance->db->fetch_array($sql);\r\n $html = stripslashes($res['question']);\r\n }\r\n \r\n return $html;\r\n}", "private function getAdvanceSearchData(){\n // get involved models\n $storageModel = $GLOBALS[\"storageModel\"];\n $userModel = $GLOBALS[\"userModel\"];\n $productModel = $GLOBALS[\"productModel\"];\n $groupModel = $GLOBALS[\"groupModel\"];\n \n $userInfo = $userModel->getAllUserInfo(); // get userinformation from model\n $storageInfo = $storageModel->getAll(); // get storageinformation from model\n $givenSearchWord = \"%%\";\n $productInfo = $productModel->getSearchResult($givenSearchWord); // get product information\n $groupInfo = $groupModel->getSearchResult($givenSearchWord); // get group information\n \n // echo result as an nested array to view\n $data = json_encode(array(\n \"userInfo\" => $userInfo, \n \"storageInfo\" => $storageInfo, \n \"productInfo\" => $productInfo, \n \"groupInfo\" => $groupInfo));\n echo $data;\n \n }", "function culturefeed_agenda_page_ajax_actor_suggest() {\n\n $parameters = array();\n\n $user_location = culturefeed_search_ui_get_user_location_cookie();\n if (isset($user_location->latitude) && isset($user_location->longitude)) {\n $point = new \\CultuurNet\\Search\\Parameter\\Spatial\\Point($user_location->latitude, $user_location->longitude);\n $field = new \\CultuurNet\\Search\\Parameter\\Spatial\\SpatialField('contactinfo_physical_gis');\n $distance = new \\CultuurNet\\Search\\Parameter\\Spatial\\Distance(10);\n $parameters[] = new \\CultuurNet\\Search\\Parameter\\Spatial\\GeoFilterQuery($point, $distance, $field);\n //$parameters[] = new \\CultuurNet\\Search\\Parameter\\Sort('geodist()', \\CultuurNet\\Search\\Parameter\\Sort::DIRECTION_ASC);\n }\n\n $parameters[] = new \\CultuurNet\\Search\\Parameter\\Rows(20);\n $parameters[] = new \\CultuurNet\\Search\\Parameter\\Query('*:*');\n\n $all_categories = culturefeed_search_get_actortype_categories();\n $allowed_categories = variable_get('agenda_actor_autocomplete_categories', array());\n if (count($allowed_categories) != count($all_categories)) {\n if (!empty($allowed_categories)) {\n array_walk($allowed_categories, function(&$item) {\n $item = '\"' . $item . '\"';\n });\n $parameters[] = new \\CultuurNet\\Search\\Parameter\\FilterQuery('category_actortype_id:(' . implode(' OR ', $allowed_categories) . ')');\n }\n }\n\n $parameters[] = new \\CultuurNet\\Search\\Parameter\\FilterQuery('type:actor');\n\n $output = new stdClass();\n $output->success = TRUE;\n $output->data = '';\n\n try {\n\n $result = culturefeed_get_search_service()->search($parameters);\n\n if ($result->getTotalCount() > 0) {\n $items = $result->getItems();\n $output->data = theme('culturefeed_agenda_actors_nearby', array('items' => $items));\n }\n\n }\n catch (Exception $e) {\n $output->success = FALSE;\n watchdog_exception('culturefeed_agenda', $e);\n }\n\n drupal_json_output($output);\n exit();\n\n}", "public function suggestAction()\n {\n \t$this->_helper->getHelper('viewRenderer')->setNoRender();\n \t$this->_helper->getHelper('layout')->disableLayout();\n \n \t$request = $this->getRequest();\n \t$q \t\t = $request->getParam('term');\n \t$profile = $request->getParam('profile');\n \t$category = $request->getParam('category');\n \t$limit \t = $request->getParam('limit', 10);\n \t\n \tif ($profile)\n \t\t$q .= ' status:99 profile:' . $profile;\n \telse\n \t\t$q .= ' status:99 profile:'.$category.' -profile:kutu_contact -profile:kutu_doc -profile:comment -profile:partner -profile:author -profile:about_us -profile:kategoriklinik -profile:kutu_email -profile:kutu_kotik -profile:kutu_mitra';\n \n \tif ($category==\"(kutu_peraturan_kolonial OR kutu_rancangan_peraturan OR kutu_peraturan)\")\n \t\t$orderBy = \"fixedDate desc\";\n \telse\n \t\t$orderBy = \"publishedDate desc\";\n \t\n \t$indexing = Pandamp_Search::manager();\n \t\n \t$hits = $indexing->find($q, 0, $limit,$orderBy);\n \t$solrNumFound = count($hits->response->docs);\n \n \tif($solrNumFound>$limit)\n \t\t$numRowset = $limit ;\n \telse\n \t\t$numRowset = $solrNumFound;\n \n \t//$return = '';\n \t$a = array();\n \tfor ($i=0;$i<$numRowset;$i++) {\n \t\t$row = $hits->response->docs[$i];\n \t\t//$return .= $row->title . '|' . $row->id . \"\\n\";\n \t\t\t\n \t\t$profileSolr = str_replace(\"kutu_\", \"\", $row->profile);\n \t\t$profileSolr = str_replace(\"kategoriklinik\",\"Kategori Klinik\",$profileSolr);\n \t\t$profileSolr = str_replace(\"peraturan_kolonial\",\"Peraturan Kolonial\",$profileSolr);\n \t\t$profileSolr = str_replace(\"rancangan_peraturan\",\"Rancangan Peraturan\",$profileSolr);\n \t\t$profileSolr = str_replace(\"financial_services\",\"Financial Services\",$profileSolr);\n \t\t$profileSolr = str_replace(\"general_corporate\",\"General Corporate\",$profileSolr);\n \t\t$profileSolr = str_replace(\"oil_and_gas\",\"Oil and Gas\",$profileSolr);\n \t\t$profileSolr = str_replace(\"executive_alert\",\"Executive Alert\",$profileSolr);\n \t\t$profileSolr = str_replace(\"manufacturing_&_industry\",\"Manufacturing & Industry\",$profileSolr);\n \t\t$profileSolr = str_replace(\"consumer_goods\",\"Consumer Goods\",$profileSolr);\n \t\t$profileSolr = str_replace(\"telecommunications_and_media\",\"Telecommunications and Media\",$profileSolr);\n \t\t$profileSolr = str_replace(\"executive_summary\",\"Executive Summary\",$profileSolr);\n \t\t$profileSolr = str_replace(\"hot_news\",\"Hot News\",$profileSolr);\n \t\t$profileSolr = str_replace(\"hot_issue_ile\",\"Hot Issue ILE\",$profileSolr);\n \t\t$profileSolr = str_replace(\"hot_issue_ild\",\"Hot Issue ILD\",$profileSolr);\n \t\t$profileSolr = str_replace(\"hot_issue_ilb\",\"Hot Issue ILB\",$profileSolr);\n \t\t\t\n \t\t//$a[$i]['label']= strip_tags($row->title) . '|' . $profileSolr;\n \t\t$a[$i]['label']= strip_tags($row->title);\n \t\t$a[$i]['value']= $row->id;\n \t}\n \t//$this->getResponse()->setBody($return);\n \t$this->getResponse()->setBody(Zend_Json::encode($a));\n }", "function suggest()\n\t{\n\t\t$suggestions = $this->Customer->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "function surveyList()\n{\n\t$surveys = new Survey();\n\t\n\t$form_data .= \"<h3>\".LOC_SURVEYS.\"</h3>\\n\";\n\t$form_data .= \"<HR>\\n\";\n\t$form_data .= \"<P>\\n\";\n\tif( $surveys->list != null )\n\t{\n\t\t$form_data .= \"<table cellpadding='5' cellspacing='5'>\\n\";\n\t\t$form_data .= \"<tr>\\n\";\n\t\t$form_data .= \"<td><B>\".LOC_TITLE.\"</B></td>\\n\";\n\t\t$form_data .= \"<td>&nbsp;</td>\\n\";\n\t\t$form_data .= \"</tr>\\n\";\n\t\tforeach( $surveys->list as $survey ) \n\t\t{\n\t\t\t$form_data .= \"<tr>\\n\";\n\t\t\t$form_data .= \"<td>$survey->title</td>\\n\";\n\t\t\t$form_data .= \"<td><a href='#' onClick=\\\"xajax_viewControl('survey',$survey->id);\\\">\".LOC_DETAILS.\"</a>\\n\";\n\t\t\t$form_data .= \"<td><a href='$PHP_SELF?action=statistics&id=$survey->id'>\".LOC_RESULTS.\"</a>\\n\";\n\t\t\t$form_data .= \"</tr>\\n\";\n\t\t}\n\t\t$form_data .= \"</table>\\n\";\n\t}\n\telse\n\t{\n\t\t$form_data .= \"No survey found.<BR>\";\n\t}\n\t\n\t$form_data .= \"</P>\\n\";\n\t$form_data .= \"<HR>\\n\";\n\t$form_data .= \"<P>\\n\";\n\t$form_data .= \"<a href='#' onClick=\\\"xajax_addControl('survey');\\\">\".LOC_ADDSURVEY.\"</a>\";\n\t$form_data .= \"</P>\\n\";\n\treturn( $form_data );\n}", "function ajax_query(){\n \n // validate\n if (!acf_verify_ajax()){\n die();\n }\n \n $options = acf_parse_args($_POST, array(\n 'post_id' => 0,\n 's' => '',\n 'field_key' => '',\n 'paged' => 1\n ));\n \n $response = $this->ajax_results($options);\n \n acf_send_ajax_results($response);\n \n }", "public function actionSearch()\n\t{\n\t\tAudit::add('diary','search');\n\n\t\t$list = $this->renderPartial('_list', array(\n\t\t\t'diary' => $this->getDiaryTheatres($_POST),\n\t\t\t'assetPath'=> $this->assetPath,\n\t\t\t'ward_id' => @$_POST['ward-id'],\n\t\t), true, true);\n\n\t\techo json_encode(array('status'=>'success','data'=>$list));\n\t}", "public function search_items_ajax($data)\n {\n $this->db->select('tblinvoiceitemslist.id as itemid,rate,taxrate,tbltaxes.id as taxid,tbltaxes.name as taxname,description');\n $this->db->from(INVOICE_ITEMS_LIST_TABLE);\n $this->db->like('description', $data['q']);\n $this->db->join('tbltaxes', 'tbltaxes.id = tblinvoiceitemslist.tax', 'left');\n return $this->db->get()->result_array();\n }", "function getQuestion($studyid,$questionid)\n{\n //and type \n\n GLOBAL $dbObject;\n GLOBAL $toJsonString; \n\n $answerT = \"\";\n\n $dbObject->querySelect(\"select type_id from question where id='$questionid'\");\n\n $typeid = $dbObject->getSQLResults();\n\n if($typeid)\n {\n\n switch($typeid[0]['type_id'])\n {\n case '9':\n $answerT = \"anwsers_checkbox\";\n break;\n case '10':\n $answerT = \"anwsers_fill_in_blank\";\n break;\n case '11':\n $answerT = \"anwsers_multi_choices\";\n break;\n }\n\n $dbObject->querySelect(\"\n select study.id as studyid, \n question.id as questionid,\n question.question, question.question_order as qorder,\n question.order_Anwsers as isanwsers_order, question.type_id as qtype,\n anwser.id as anwserid, anwser.qorder as aorder, anwser.anwser\n from question\n join study_to_question on study_to_question.question_id = question.id\n join study on study_to_question.study_id = study.id\n join $answerT anwser on anwser.question_id = question.id \n where study.id='$studyid' and question.id='$questionid'\");\n\n if($dbObject->isDberror())\n {\n return $dbObject->getDberror();\n }\n else\n {\n if(count($dbObject->getSQLResults()) > 0)\n {\n //user exisit\n $toJsonString->jsonEncode($dbObject->getSQLResults());\n \n return '{\"status\":\"good\",\"results\":\"true\",'. $toJsonString->getdbrowString() . '}';\n }\n else\n {\n //user does not exisist\n return '{\"status\":\"good\",\"results\":\"false\"}';\n }\n } \n }\n else\n {\n //user does not exisist\n return '{\"status\":\"error\",\"results\":\"No type id\",\"error\":'.$dbObject->isDberror().'}';\n } \n}", "public function doSearch() {\n\n\n\t\t// POST data was found, check for\n\t\t// a user account\n\t\tif (!$this->checkForOneightyAccount()) {\n\t\t\t// Set the system error\n\t\t\t$this->setError(Whv_Config::Get('errorMessages', 'noOneightyAccount'));\n\n\t\t\treturn $this;\n\t\t}\n\n\t\t// POST data was found, make the\n\t\t// JSON-RPC service call\n\t\t$aPostNameSpace = $this->getPostData()->{$this->getNameSpace()};\n\t\t//if the user just clicks the search page, we have no form post\n\t\t// so no 'whv' in the oPostData, we want to show\n\t\t// a few latest articles to them.\n\t\t\n\t\tif (empty($aPostNameSpace)) {\n\t\t\t$aPostNameSpace['limit'] = 10;\n\t\t}\n\t\t$_params = array(\n\t\t\t'_method' => 'search',\n\t\t\t'_key' => $this->getAccount()->account_key,\n\t\t\t'criteria' => $this->doSanitize($aPostNameSpace['txtCriteria'])\n\t\t);\n\n\t\tif (isset($aPostNameSpace['limit'])) {\n\t\t\t$_params['limit'] = $aPostNameSpace['limit'];\n\t\t}\n\n\t\t$this->feedJson($_params);\n\n\t\t// Check for a JSON-RPC error\n\t\tif (is_object($this->getRpcResponse()) && property_exists($this->getRpcResponse(), 'error')) {\n\n\t\t\t// Set the system error to the\n\t\t\t// JSON-RPC service error\n\t\t\t$this->setError($this->getRpcResponse()->error);\n\t\t\treturn $this;\n\t\t}\n\n\t\t// No error was found, now\n\t\t// Check for actual results\n\t\tif (count($this->getRpcResponse())) {\n\n\t\t\t// Grab the current articles\n\t\t\t// in the local WordPress DB\n\t\t\t$sArticlesQuery = str_replace(array(\n\t\t\t\t'{wpdbPrefix}', '{nameSpace}'\n\t\t\t), array(\n\t\t\t\t$this->getDatabase()->prefix, $this->getNamespace()\n\t\t\t), Whv_Config::Get('sqlMiscQueries', 'retrieveOneightyArticles'));\n\n\t\t\t// Try to execute the SQL\n\t\t\ttry {\n\n\t\t\t\t// Execute the SQL\n\t\t\t\t$aArticles = $this->getDatabase()->get_results($sArticlesQuery);\n\n\t\t\t\t// Check for results\n\t\t\t\tif (!count($aArticles)) {\n\t\t\t\t\t// Nothing has been syndicated yet\n\t\t\t\t\t$this->setSearchResults($this->getRpcResponse());\n\t\t\t\t\treturn $this;\n\t\t\t\t}\n\n\t\t\t\t// We have results, create\n\t\t\t\t// the exclusion array\n\t\t\t\t$aExclude = array();\n\n\t\t\t\t// Loop through the local IDs\n\t\t\t\t// and append them\n\t\t\t\tforeach ($aArticles as $oArticle) {\n\t\t\t\t\t$aExclude[] = $oArticle->sOneightyId;\n\t\t\t\t}\n\n\t\t\t\t// Now loop through the search\n\t\t\t\t// results and check id the ID\n\t\t\t\t// is in the exclusion array\n\t\t\t\t$aSearchResults = $this->getRpcResponse();\n\n\t\t\t\tforeach ($aSearchResults as $iIndex => $oArticle) {\n\n\t\t\t\t\t// Check for ID\n\t\t\t\t\tif (in_array($oArticle->article_id, $aExclude)) {\n\n\t\t\t\t\t\t// If it is in the exclude array\n\t\t\t\t\t\t// unset the array index\n\t\t\t\t\t//\tunset($aSearchResults[$iIndex]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Set the system search results\n\t\t\t\t$this->setSearchResults($aSearchResults);\n\n\t\t\t\treturn $this;\n\n\t\t\t\t// Catch all exceptions\n\t\t\t} catch (Exception $oException) {\n\n\t\t\t\t// Set the system error to the\n\t\t\t\t// exception message\n\t\t\t\t$this->setError($oException->getMessage());\n\n\t\t\t\treturn $this;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// No articles were found,\n\t\t\t// set the system error\n\t\t\t$this->setError(Whv_Config::Get('errorMessages', 'noSearchResults'));\n\n\t\t\treturn $this;\n\t\t}\n\n\t\treturn $this;\n\t}" ]
[ "0.6158669", "0.58787596", "0.5840209", "0.582931", "0.5786454", "0.5783403", "0.57822955", "0.57767683", "0.5764717", "0.57512164", "0.57440186", "0.5742759", "0.5740957", "0.5711106", "0.57093006", "0.56789213", "0.5662155", "0.56008524", "0.5595618", "0.559297", "0.55902183", "0.55732054", "0.5544649", "0.5526197", "0.5525865", "0.55216867", "0.54970795", "0.5488483", "0.5479017", "0.5457254", "0.54279155", "0.5423011", "0.5421476", "0.54162604", "0.5415889", "0.54153734", "0.54140586", "0.5403304", "0.54018384", "0.5401761", "0.54015386", "0.5396724", "0.5379276", "0.537652", "0.5372537", "0.53689605", "0.53625685", "0.5346757", "0.5321348", "0.5320439", "0.53199226", "0.53187287", "0.530984", "0.53097814", "0.5309045", "0.53089994", "0.5308965", "0.53064966", "0.5301647", "0.5299575", "0.52977884", "0.5296716", "0.52859694", "0.5283582", "0.52826494", "0.5281343", "0.5273114", "0.5263078", "0.52620304", "0.52588105", "0.52569723", "0.5251848", "0.5249261", "0.52459455", "0.5245926", "0.5245559", "0.5243987", "0.5235548", "0.5226456", "0.5225505", "0.522148", "0.52214104", "0.5215762", "0.5213621", "0.52135783", "0.52074957", "0.52039886", "0.52026427", "0.52019864", "0.5197856", "0.5196919", "0.51951706", "0.51940244", "0.517748", "0.5175975", "0.51687515", "0.5159511", "0.5157484", "0.51523894", "0.51513857" ]
0.7478094
0
Get default image size labels.
Получить метки размера изображения по умолчанию.
function mai_get_image_size_labels() { return array( 'banner' => __( 'Banner', 'mai-theme-engine' ), 'section' => __( 'Section', 'mai-theme-engine' ), 'full-width' => __( 'Full Width', 'mai-theme-engine' ), 'featured' => __( 'Featured', 'mai-theme-engine' ), 'one-half' => __( 'One Half', 'mai-theme-engine' ), 'one-third' => __( 'One Third', 'mai-theme-engine' ), 'one-fourth' => __( 'One Fourth', 'mai-theme-engine' ), 'tiny' => __( 'Tiny', 'mai-theme-engine' ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function getLabelDefaultSize()\n\t{\n\t\treturn self::$lsize_default;\n\t}", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "static public function default_icon_size()\n\t{\n\t\treturn DEFAULT_FLAG_ICON_SIZE;\n\t}", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "function mai_get_image_sizes() {\n\n\t// Get labels.\n\t$labels = mai_get_image_size_labels();\n\n\t/**\n\t * Create the initial image sizes.\n\t * @link http://andrew.hedges.name/experiments/aspect_ratio/\n\t */\n\t$image_sizes = array(\n\t\t'banner' => array(\n\t\t\t'label' => $labels[ 'banner' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 533,\n\t\t\t'crop' => true, // 3x1\n\t\t),\n\t\t'section' => array(\n\t\t\t'label' => $labels[ 'section' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 900,\n\t\t\t'crop' => true, // 16x9\n\t\t),\n\t\t'full-width' => array(\n\t\t\t'label' => $labels[ 'full-width' ],\n\t\t\t'width' => 1248,\n\t\t\t'height' => 832,\n\t\t\t'crop' => true, // 3x2\n\t\t),\n\t\t'featured' => array(\n\t\t\t'label' => $labels[ 'featured' ],\n\t\t\t'width' => 800,\n\t\t\t'height' => 600,\n\t\t\t'crop' => true, // 4x3 (works better for no sidebar)\n\t\t),\n\t\t'one-half' => array(\n\t\t\t'label' => $labels[ 'one-half' ],\n\t\t\t'width' => 550,\n\t\t\t'height' => 413,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-third' => array(\n\t\t\t'label' => $labels[ 'one-third' ],\n\t\t\t'width' => 350,\n\t\t\t'height' => 263,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-fourth' => array(\n\t\t\t'label' => $labels[ 'one-fourth' ],\n\t\t\t'width' => 260,\n\t\t\t'height' => 195,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'tiny' => array(\n\t\t\t'label' => $labels[ 'tiny' ],\n\t\t\t'width' => 80,\n\t\t\t'height' => 80,\n\t\t\t'crop' => true, // square\n\t\t),\n\t);\n\n\t/**\n\t * Filter the image sizes to allow the theme to override.\n\t *\n\t * // Change the default Mai image sizes\n\t * add_filter( 'mai_image_sizes', 'prefix_custom_image_sizes' );\n\t * function prefix_custom_image_sizes( $image_sizes ) {\n\t *\n\t * // Change one-third image size\n\t * $image_sizes['one-third'] = array(\n\t * 'width' => 350,\n\t * 'height' => 350,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * // Change one-fourth image size\n\t * $image_sizes['one-fourth'] = array(\n\t * 'width' => 260,\n\t * 'height' => 260,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * return $image_sizes;\n\t *\n\t * }\n\t *\n\t */\n\t$image_sizes = apply_filters( 'mai_image_sizes', $image_sizes );\n\n\t/**\n\t * Make sure labels are added.\n\t * 'mai_image_sizes' didn't have 'label' in the array prior to 1.8.0.\n\t * This insures existing filters don't break.\n\t */\n\tforeach( $image_sizes as $name => $values ) {\n\t\tif ( ! isset( $values['label'] ) || empty( $values['label'] ) ) {\n\t\t\t$image_sizes[ $name ]['label'] = $labels[ $name ];\n\t\t}\n\t}\n\n\treturn $image_sizes;\n}", "public function getIsDefaultSize()\n {\n return (string) $this->helper('breadcheckout/Catalog')->getDefaultButtonSizeProductDetailHtml();\n }", "public function getIsDefaultSize()\n {\n return (string) $this->helper('breadcheckout/Catalog')->getDefaultButtonSizeCartHtml();\n }", "public function getDefaultSize()\n {\n\n return 16.0;\n }", "public function set_defaults() {\n\n\t\t$this->sizes = parent::set_defaults();\n\n\t\t$default = Default_Picture::get_instance();\n\t\tforeach ( $this->sizes as $size => $img ) {\n\t\t\tif ( empty( $img ) && ! empty( $default->sizes->$size ) ) {\n\t\t\t\t$this->sizes->$size = $default->sizes->$size;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->sizes;\n\t}", "protected function defaultSizesAttribute()\n {\n switch ($this->layout) {\n case self::LAYOUT_CONSTRAINED:\n return '(min-width:' .\n $this->width .\n 'px) ' .\n $this->width .\n 'px, 100vw';\n case self::LAYOUT_FIXED:\n return $this->width . 'px';\n case self::LAYOUT_FULL_WIDTH:\n return '100vw';\n default:\n return null;\n }\n }", "public function get_size_options() {\n return array(\n '416x290' => '416px by 290px',\n '516x346' => '516px by 346px',\n '616x402' => '616px by 402px',\n '816x515' => '816px by 515px',\n 'responsive' => 'responsive (full-width of container)',\n 'custom' => 'custom',\n );\n }", "function get_image_sizes() {\n\tstatic $sizes;\n\tif ( empty( $sizes ) ) {\n\t\t$manifest = get_manifest();\n\t\tif ( $manifest->get_path( 'custom_image_sizes.enabled' ) ) {\n\t\t\t$sizes = $manifest->get_path( 'custom_image_sizes.config' );\n\n\t\t\treturn $sizes;\n\t\t}\n\t}\n\n\treturn array();\n}", "function flotheme_get_images_sizes() {\n\treturn array();\n}", "function vcex_image_sizes() {\n\t$sizes = array(\n\t\t__( 'Custom Size', 'total' ) => 'wpex_custom',\n\t);\n\t$get_sizes = get_intermediate_image_sizes();\n\tarray_unshift( $get_sizes, 'full' );\n\t$get_sizes = array_combine( $get_sizes, $get_sizes );\n\t$sizes = array_merge( $sizes, $get_sizes );\n\treturn $sizes;\n}", "public function get_default_button_labels()\n {\n }", "public function getDefaultLabel()\n {\n $this->_display = Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_display' . $this->_labeltype);\n $this->setPosition(Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_position' . $this->_labeltype));\n $this->getImage(Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_image' . $this->_labeltype));\n }", "function jet_engine_get_image_sizes() {\n\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = get_intermediate_image_sizes();\n\t$result = array();\n\n\tforeach ( $sizes as $size ) {\n\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t} else {\n\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t);\n\t\t}\n\t}\n\n\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-engine' ), ), $result );\n}", "public function create_image_sizes()\n {\n\n return array();\n }", "function august19_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "public function getNumLabels()\n {\n return $this->binStyle->getNumLabels();\n }", "public static function get_image_sizes()\n {\n return array(\n 'thumbnail' => array( 150, 150, true ),\n 'es-image-size-archive' => array( 875, 604, true ),\n 'es-agent-size' => array( 190, 250, true ),\n );\n }", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-woo-builder' ), ), $result );\n\n\t\t}", "function getName() \t\t { return 'NP_ImageLimitSize'; }", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-cw' ), ), $result );\n\n\t\t}", "public function getDefaults()\n\t{\n\t\t$defaults = parent::getDefaults();\n\n\t\treturn array_merge($defaults, $this->imageDefaults);\n\t}", "public function getAllowedSizes()\n {\n return $this->config->get('thumbnails.sizes');\n }", "function acf_get_image_sizes() {}", "function amapnews_getIconSize($size = 'master') {\n $photo_sizes = elgg_get_config('amapnews_photo_sizes');\n $sizenames = array();\n foreach ($photo_sizes as $name => $photo_info) {\n array_push($sizenames, $name);\n }\n if (!in_array($size, $sizenames)) {\n $size = 'medium';\n }\n\n return $size;\n}", "function _opensanmateo_resp_images_get_picture_defaults() {\n $formatters = picture_field_formatter_info();\n return $formatters['picture']['settings'];\n}", "public function getDefaults()\n {\n $defaults = parent::getDefaults();\n\n return array_merge($defaults, $this->imageDefaults);\n }", "public function getImageSize();", "public function imageMaxSizeDescription(): string\n {\n return\n Yii::t('app', 'Max. size of image') . ': ' . \n ArrayHelper::getValue($this->imageSize, 'maxWidth') . 'x' . \n ArrayHelper::getValue($this->imageSize, 'maxHeight') . 'px';\n }", "function sizes()\n {\n $sizes = array('sm' => 300);\n return $sizes;\n }", "function custom_image_size_names($sizes) {\n return array_merge($sizes, array(\n 'thumbnail' => ('Thumbnail - Small'),\n 'thumbnail-medium' => ('Thumbnail - Medium'),\n 'thumbnail-large' => ('Thumbnail - Large'),\n 'jumbo' => ('Jumbo')\n ));\n }", "function get_icon_sizes($entity) {\n\n\t$config = elgg_get_config('icon_sizes');\n\t$config = elgg_trigger_plugin_hook('entity:icon:sizes', 'object', array(\n\t\t'entity' => $entity,\n\t\t\t), $config);\n\n\treturn $config;\n}", "function get_intermediate_image_sizes()\n{\n}", "public function getDefaultFontSize()\n {\n return $this->_defaultFontSize;\n }", "public function lvGetListImageMaxWidth() {\n $oConfig = $this->getConfig();\n \n $sSize = $oConfig->getConfigParam( 'sThumbnailsize' );\n $aSize = explode( '*', $sSize );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sWidth = $aSize[0];\n }\n else {\n // dummy standard default\n $sWidth = '185';\n }\n \n return $sWidth;\n }", "function _dt_gallery_get_image_sizes() {\n return [2, 3, 4, 5, 6, 7, 8, 12];\n}", "function contract_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "public function getLabelImage()\n {\n return $this->LabelImage;\n }", "static public function getFieldDefaultSize()\n\t{\n\t\treturn self::$fsize_default;\n\t}", "function get_img_sizes() {\n\t\n\tglobal $_wp_additional_image_sizes;\n\t$sizes = array();\n\n\t// If not one of default sizes, add custom sizes\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t);\n\t\t}\n\t\t// Add size name\n\t\t$sizes[$_size]['size'] = $_size;\n\t}\t\n\t\n\t// Sort images by width\n\tusort($sizes, function($img1, $img2){\n\t return $img1['width'] < $img2['width'] ? -1 : 1;\n });\n\t\n\treturn $sizes;\n}", "private static function get_defaults() {\r\n\r\n\t\t$defaults = array(\r\n\t\t\t'title' => '',\r\n\t\t\t'description' => '',\r\n\t\t\t'link' => '',\r\n\t\t\t'linktarget' => '',\r\n\t\t\t'width' => 0,\r\n\t\t\t'height' => 0,\r\n\t\t\t'maxwidth' => '100%',\r\n\t\t\t'maxheight' => '',\r\n\t\t\t'image' => 0, // reverse compatible - now attachement_id\r\n\t\t\t'imageurl' => '', // reverse compatible.\r\n\t\t\t'align' => 'none',\r\n\t\t\t'alt' => '',\r\n\t\t);\r\n\r\n\t\tif ( !defined( 'IMAGE_WIDGET_COMPATIBILITY_TEST' ) ) {\r\n\t\t\t$defaults['size'] = self::CUSTOM_IMAGE_SIZE_SLUG;\r\n\t\t\t$defaults['attachment_id'] = 0;\r\n\t\t}\r\n\r\n\t\treturn $defaults;\r\n\t}", "public function getDefaultFontSize() {\n\t\treturn $this->_defaultFontSize;\n\t}", "public function getThumbnailImageSize() {\n\t\t\treturn $this->getImageSizeWithLabelOfImageWithKey('thumbnail','image1');\n\t\t}", "public function imageMinSizeDescription(): string\n {\n return\n Yii::t('app', 'Min. size of image') . ': ' . \n ArrayHelper::getValue($this->imageSize, 'minWidth') . 'x' . \n ArrayHelper::getValue($this->imageSize, 'minHeight') . 'px';\n }", "public function getLargeImageSize() {\n\t\t\treturn $this->getImageSizeWithLabelOfImageWithKey('large','image1');\n\t\t}", "function get_biggest_label($labels)\n\t{\n\t\t$label_lengths = [];\n\t\tforeach ($labels as $key => $label)\n\t\t{\n\t\t\t$text = $key;\n\t\t\tif ($this->chart_info['grouped'] == 0)\n\t\t\t{\n\t\t\t\tif (is_array($label))\n\t\t\t\t{\n\t\t\t\t\t$text = $label['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->chart_options['filetype'] == 'svg')\n\t\t\t{\n\t\t\t\t$get_label_length = $this->text_size($text, $this->chart_options['label_font_size'], 0.6, 'UTF-8');\n\t\t\t}\n\t\t\telse if ($this->chart_options['filetype'] == 'png' || $this->chart_options['filetype'] == 'jpg')\n\t\t\t{\n\t\t\t\t$get_label_length = [imagefontwidth(3) * strlen($text)];\n\t\t\t}\n\t\t\t$label_lengths[] = $get_label_length;\n\t\t}\n\t\trsort($label_lengths);\n\n\t\t$this->biggest_label = array_slice($label_lengths[0], 0, 1)[0];\n\t}", "function mai_get_available_image_sizes() {\n\t// Cache.\n\tstatic $image_sizes = array();\n\tif ( ! empty( $image_sizes ) ) {\n\t\treturn $image_sizes;\n\t}\n\t// Get image sizes.\n\tglobal $_wp_additional_image_sizes;\n\t$default_image_sizes = array( 'thumbnail', 'medium', 'large' );\n\tforeach ( $default_image_sizes as $size ) {\n\t\t$image_sizes[ $size ] = array(\n\t\t\t'height' => intval( get_option( \"{$size}_size_h\" ) ),\n\t\t\t'width' => intval( get_option( \"{$size}_size_w\" ) ),\n\t\t\t'crop' => get_option( \"{$size}_crop\" ) ? get_option( \"{$size}_crop\" ) : false,\n\t\t);\n\t}\n\tif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) {\n\t\t$image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\n\t}\n\treturn $image_sizes;\n}", "function woodmart_get_all_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$default_image_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' );\n\t\t$image_sizes = array();\n\n\t\tforeach ( $default_image_sizes as $size ) {\n\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t'width' => (int) get_option( $size . '_size_w' ),\n\t\t\t\t'height' => (int) get_option( $size . '_size_h' ),\n\t\t\t\t'crop' => (bool) get_option( $size . '_crop' ),\n\t\t\t);\n\t\t}\n\n\t\tif ( $_wp_additional_image_sizes ) {\n\t\t\t$image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\n\t\t}\n\n\t\t$image_sizes['full'] = array();\n\n\t\treturn $image_sizes;\n\t}", "public function getImageDimensions() {\n\t\tIf ($this->isBuilderObject) {\n\t\t\tlist($width, $height) = $this->gifBuilder->getImageDimensions($this->imageFile);\n\t\t} else {\n\t\t\tlist($width, $height) = getimagesize($this->getImageFile(TRUE));\n\t\t}\n\t\treturn array('width'=>$width, 'height'=>$height, 'builderObject'=>$this->isBuilderObject);\n\t}", "function woodmart_get_all_image_sizes_names( $style = 'default' ) {\n\t\t$available_sizes = woodmart_get_all_image_sizes();\n\t\t$image_sizes = array();\n\n\t\tforeach ( $available_sizes as $size => $size_attributes ) {\n\t\t\t$name = ucwords( str_replace( '_', ' ', $size ) );\n\t\t\tif ( is_array( $size_attributes ) && ( isset( $size_attributes['width'] ) || isset( $size_attributes['height'] ) ) ) {\n\t\t\t\t$name .= ' - ' . $size_attributes['width'] . ' x ' . $size_attributes['height'];\n\t\t\t}\n\n\t\t\tif ( 'elementor' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = $name;\n\t\t\t} elseif ( 'header_builder' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t\t'label' => $name,\n\t\t\t\t\t'value' => $size,\n\t\t\t\t);\n\t\t\t} elseif ( 'default' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t\t'name' => $name,\n\t\t\t\t\t'value' => $size,\n\t\t\t\t);\n\t\t\t} elseif ( 'widget' === $style ) {\n\t\t\t\t$image_sizes[ $name ] = $size;\n\t\t\t}\n\t\t}\n\n\t\tif ( 'elementor' === $style ) {\n\t\t\t$image_sizes['custom'] = esc_html__( 'Custom', 'woodmart' );\n\t\t} elseif ( 'header_builder' === $style ) {\n\t\t\t$image_sizes['custom'] = array(\n\t\t\t\t'label' => esc_html__( 'Custom', 'woodmart' ),\n\t\t\t\t'value' => 'custom',\n\t\t\t);\n\t\t} elseif ( 'default' === $style ) {\n\t\t\t$image_sizes['custom'] = array(\n\t\t\t\t'name' => esc_html__( 'Custom', 'woodmart' ),\n\t\t\t\t'value' => 'custom',\n\t\t\t);\n\t\t} elseif ( 'widget' === $style ) {\n\t\t\t$image_sizes[ esc_html__( 'Custom', 'woodmart' ) ] = 'custom';\n\t\t}\n\n\t\treturn $image_sizes;\n\t}", "function kc_get_image_sizes( $type = 'all' ) {\n\t$sizes = array();\n\n\t# Default sizes\n\tif ( $type !== 'custom' ) {\n\t\tforeach ( array('thumbnail', 'medium', 'large') as $size ) {\n\t\t\t$sizes[$size] = array(\n\t\t\t\t'width' => get_option( \"{$size}_size_w\" ),\n\t\t\t\t'height' => get_option( \"{$size}_size_h\" ),\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( $type !== 'default' ) {\n\t\tglobal $_wp_additional_image_sizes;\n\t\tif ( is_array( $_wp_additional_image_sizes ) )\n\t\t\t$sizes = array_merge( $sizes, $_wp_additional_image_sizes );\n\t}\n\n\tksort( $sizes );\n\treturn $sizes;\n}", "public function getGetSizePixelValues()\n {\n return [\n 'No unit' => ['1234.5', 1235],\n 'px' => ['1234.5px', 1235],\n 'em' => ['1em', 16],\n 'ex' => ['2ex', 16],\n 'pt' => ['12pt', 16],\n 'pc' => ['1pc', 16],\n 'in' => [(1 / 6).'in', 16],\n 'cm' => [(2.54 / 6).'cm', 16],\n 'mm' => [(25.4 / 6).'mm', 16],\n 'No unit with spacing' => [\" \\r \\n \\t 1234.5 \\r \\n \\t \", 1235],\n 'em with spacing' => [\" \\r \\n \\t 1234.5em \\r \\n \\t \", 19752],\n 'unknown' => ['100vw', 0],\n 'unknown mmm' => ['1mmm', 0],\n 'invalid' => ['abc', 0],\n 'invalid number' => ['12.34.5', 0],\n ];\n }", "function elit_get_image_sizes() {\n \tglobal $_wp_additional_image_sizes;\n \n \t$sizes = array();\n \n \tforeach ( get_intermediate_image_sizes() as $_size ) {\n \t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n \t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n \t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n \t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n \t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n \t\t\t$sizes[ $_size ] = array(\n \t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n \t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n \t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $sizes;\n }", "function codeless_get_additional_image_sizes(){\n $add = codeless_wp_get_additional_image_sizes();\n $array = array('theme_default' => 'default', 'full' => 'full');\n\n foreach($add as $size => $val){\n $array[$size] = $size . ' - ' . $val['width'] . 'x' . $val['height'];\n }\n\n return $array;\n}", "function image_size() {\n }", "public static function get_default_labels() {\n\t\t$defaults = array(\n\t\t\t'print_button' => __( 'Print', 'wp-recipe-maker' ),\n\t\t\t'course_tags' => __( 'Course', 'wp-recipe-maker' ),\n\t\t\t'cuisine_tags' => __( 'Cuisine', 'wp-recipe-maker' ),\n\t\t\t'keyword_tags' => __( 'Keyword', 'wp-recipe-maker' ),\n\t\t\t'prep_time' => __( 'Prep Time', 'wp-recipe-maker' ),\n\t\t\t'cook_time' => __( 'Cook Time', 'wp-recipe-maker' ),\n\t\t\t'total_time' => __( 'Total Time', 'wp-recipe-maker' ),\n\t\t\t'servings' => __( 'Servings', 'wp-recipe-maker' ),\n\t\t\t'calories' => __( 'Calories', 'wp-recipe-maker' ),\n\t\t\t'author' => __( 'Author', 'wp-recipe-maker' ),\n\t\t\t'ingredients' => __( 'Ingredients', 'wp-recipe-maker' ),\n\t\t\t'instructions' => __( 'Instructions', 'wp-recipe-maker' ),\n\t\t\t'video' => __( 'Recipe Video', 'wp-recipe-maker' ),\n\t\t\t'notes' => __( 'Recipe Notes', 'wp-recipe-maker' ),\n\t\t\t'comment_rating' => __( 'Recipe Rating', 'wp-recipe-maker' ),\n\t\t);\n\n\t\treturn apply_filters( 'wprm_label_defaults', $defaults );\n\t}", "function get_image_size($name) {\n\t\t$file['site_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['email_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['site_favicon'] = array('width' => '50', 'height' => '50');\n\t\t$file['store_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['footer_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['app_logo'] = array('width' => '140', 'height' => '140');\n\t\t$file['driver_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['driver_white_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['home_slider'] = array('width' => '1300', 'height' => '500');\n\t\t$file['dietary_icon_size'] = array('width' => '256', 'height' => '256');\n\t\t$file['item_image_sizes'] = [\n\t\t\tarray('width' => '120', 'height' => '120'),\n\t\t\tarray('width' => '600', 'height' => '350'),\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t];\n\t\t$file['category_image_size'] = array('width' => '250', 'height' => '140');\n\t\t$file['store_image_sizes'] = [\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t\tarray('width' => '520', 'height' => '280'),\n\t\t\tarray('width' => '480', 'height' => '320'),\n\t\t\tarray('width' => '100', 'height' => '100'),\n\t\t];\n\n\t\treturn $file[$name];\n\t}", "public function getImageDimensions()\n\t{\n\t\treturn [65, 65];\n\t}", "function zuhaus_mikado_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\t\n\t$sizes = array();\n\t\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array( 'medium', 'large' ) ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\t\n\treturn $sizes;\n}", "function publisher_get_prop_thumbnail_size( $default = 'thumbnail' ) {\n\n\t\tglobal $publisher_theme_core_props_cache;\n\n\t\tif ( isset( $publisher_theme_core_props_cache['thumbnail-size'] ) ) {\n\t\t\treturn $publisher_theme_core_props_cache['thumbnail-size'];\n\t\t} else {\n\t\t\treturn $default;\n\t\t}\n\t}", "public function lvGetListImageMaxHeight() {\n $oConfig = $this->getConfig();\n \n $sSize = $oConfig->getConfigParam( 'sThumbnailsize' );\n $aSize = explode( '*', $sSize );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sHeight = $aSize[1];\n }\n else {\n // dummy standard default\n $sHeight = '150';\n }\n \n return $sHeight;\n }", "public function getNumberWidthAndNameOfAvatars()\n {\n return $this->numberWidthAndNameOfAvatars;\n }", "protected function imageDefaults(): array\n {\n $defaults = [];\n\n if ($icon = $this->model->blueprint()->icon()) {\n $defaults['icon'] = $icon;\n }\n\n return array_merge(parent::imageDefaults(), $defaults);\n }", "protected function extractSvgImageSizes() {}", "function eino_custom_name_image_sizes( $sizes ) {\n\n $sizes['eino-thumbnail-download'] = __( 'Eino Download Thumbnail', 'eino' );\n\t$sizes['eino-bigger-image'] = __( 'Eino Bigger Image', 'eino' );\n\t\n return $sizes;\n}", "function sc_get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$sizes = array();\n\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $sizes;\n\t}", "protected function getDefaultTerminalDimensions()\n {\n return new Rectangle(80, 20);\n }", "protected function getDefaultDimension(MavikThumbInfo $info, $width, $height)\n {\n return 'wh';\n }", "public function get_labels(): array {\n\t\treturn $this->get_default_labels( self::LABEL );\n\t}", "function bfg_image_size_names_choose( $sizes ) {\n\n\t$sizes['desktop-size'] = 'Desktop';\n\treturn $sizes;\n\n}", "public function getImageSizes(): array\n {\n /** @var BackendUser $user */\n $user = $this->tokenStorage->getToken()->getUser();\n\n return $this->imageSizes->getOptionsForUser($user);\n }", "public function getImageSizeWithLabelOfImageWithKey($sizeLabel, $imageKey) {\n\t\t\t$sizes = $this->getImageSizesOfImageWithKey($imageKey);\n\t\t\treturn $sizes[$sizeLabel];\n\t\t}", "function wp_get_additional_image_sizes()\n{\n}", "public function setDefaultSizes(): void\n {\n if (!empty($this->default)) {\n foreach ($this->default as $name => $data) {\n $width = (int) get_option(\"{$name}_size_w\");\n $height = (int) get_option(\"{$name}_size_h\");\n\n if (!empty($width) && $width !== $data['width']) {\n update_option(\"{$name}_size_w\", $data['width']);\n }\n\n if (!empty($height) && $height !== $data['height']) {\n update_option(\"{$name}_size_h\", $data['height']);\n }\n }\n }\n }", "function get_size()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_SIZE);\r\n }", "public function lvGetDetailsImageMaxWidth() {\n $oConfig = $this->getConfig();\n $aSizes = $oConfig->getConfigParam( 'aDetailImageSizes' );\n $aSize = explode( '*', $aSizes['oxpic1'] );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sWidth = $aSize[0];\n }\n else {\n // dummy standard default\n $sWidth = '340';\n }\n \n return $sWidth;\n }", "private static function get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\t\n\t\t$sizes = array();\n\t\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\n\t\treturn $sizes;\n\t}", "public function getSize()\n {\n return 6;\n }", "public function getThumbnailsSizes(): array\n {\n return [\n [\n [\n 'width' => 1024,\n 'height' => 768,\n ],\n true\n ],\n [\n [\n 'width' => 20,\n 'height' => 20,\n ],\n false\n ]\n ];\n }", "function elit_get_largest_image_name() {\n\n $image_sizes = elit_get_image_sizes();\n $keys = array_keys($image_sizes);\n $widest = 0;\n $widest_name = null;\n\n for ($i = 0; $i < count($keys); $i++) {\n//echo '<pre>'; var_dump($keys[$i], ($image_sizes[$keys[$i]]['width']), $widest_name, $widest, $image_sizes[$keys[$i]]['width'] > $widest ); echo '</pre>'; \n if ($image_sizes[$keys[$i]]['width'] > $widest) {\n \n $widest = $image_sizes[$keys[$i]]['width'];\n $widest_name = $keys[$i];\n }\n }\n\n return $widest_name;\n }", "function resurrect_customize_logo_text_size_choices() {\n\n\t$choices = \tarray(\n\t\t'extra-small'\t=> _x( 'Extra Small', 'customizer', 'resurrect' ),\n\t\t'small'\t\t\t=> _x( 'Small', 'customizer', 'resurrect' ),\n\t\t'medium'\t\t=> _x( 'Medium', 'customizer', 'resurrect' ),\n\t\t'large'\t\t\t=> _x( 'Large', 'customizer', 'resurrect' ),\n\t\t'extra-large'\t=> _x( 'Extra Large', 'customizer', 'resurrect' ),\n\t);\n\n\treturn apply_filters( 'resurrect_customize_logo_text_size_choices', $choices );\n\n}", "public function getTitleSize()\n {\n return $this->titleSize;\n }", "public function getImageSize()\n {\n return $this->image_size;\n }", "function ootheme_get_images_sizes() {\n\t\treturn array(\n\t\t\t'post' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 110,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 400,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 516,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cat-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-carousel-crop',\n\t\t\t\t\t'width'\t\t=> 394,\n\t\t\t\t\t'height'\t=> 525,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'venue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 200,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'event-preview',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'issue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'issue-preview',\n\t\t\t\t\t'width'\t\t=> 600,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "function wp_listings_get_additional_image_sizes() {\n\n\tglobal $_wp_additional_image_sizes;\n\n\tif ( $_wp_additional_image_sizes )\n\t\treturn $_wp_additional_image_sizes;\n\n\treturn array();\n\n}", "function custom_image_sizes( $size_names ) {\n $new_sizes = array(\n 'profileThumb' => 'Фото для профиля',\n );\n return array_merge( $size_names, $new_sizes );\n }", "function joe_total_image_sizes( $sizes ) {\n\n\t// Remove Total image sizes\n\t//unset( $sizes['blog_post_full'] );\n\n\t// Add new image sizes\n\t$sizes['title_background'] = array(\n\t\t'label' => __( 'Title Background', 'total-sidekick' ), // Label\n\t\t'width' => 'title_background_width', // id for theme_mod width\n\t\t'height' => 'title_background_height', // id for theme_mod height\n\t\t'crop' => 'title_background_crop', // id for theme_mod crop\n\t);\n\treturn $sizes;\n\n}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "function getDefaultTbImageStyle()\r\n {\r\n return $this->default_tb_image_style;\r\n }", "static public function size_class_prefix()\n\t{\n\t\treturn FLAG_ICON_SIZE_CLASS_PREFIX;\n\t}", "function siteorigin_widgets_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = array();\n\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $sizes;\n}", "public function getImageResolution () {}", "public function getSizes()\n\t{\n\t\treturn $this->sizes;\n\t}", "public function getFormatSize() {}", "function vodi_redux_get_all_register_image_size_options() {\n\n $options = array();\n\n if( function_exists( 'vodi_get_register_image_sizes' ) ) {\n $image_size_args = vodi_get_register_image_sizes();\n $all_keys = array_keys( $image_size_args );\n $options = array_combine( $all_keys, $all_keys );\n }\n\n return $options;\n}", "private function get_image_size( $instance ) {\r\n\t\tif ( !empty( $instance['size'] ) && $instance['size'] != self::CUSTOM_IMAGE_SIZE_SLUG ) {\r\n\t\t\t$size = $instance['size'];\r\n\t\t} elseif ( isset( $instance['width'] ) && is_numeric($instance['width']) && isset( $instance['height'] ) && is_numeric($instance['height']) ) {\r\n\t\t\t//$size = array(abs($instance['width']),abs($instance['height']));\r\n\t\t\t$size = array($instance['width'],$instance['height']);\r\n\t\t} else {\r\n\t\t\t$size = 'full';\r\n\t\t}\r\n\t\treturn $size;\r\n\t}" ]
[ "0.78558487", "0.6952518", "0.68511486", "0.68213946", "0.68063104", "0.6634839", "0.66105884", "0.6550924", "0.64686716", "0.64578885", "0.63611424", "0.62464774", "0.61962944", "0.6185257", "0.61579746", "0.6129411", "0.610702", "0.6088839", "0.60782945", "0.6071912", "0.60610855", "0.6056296", "0.60521126", "0.6040695", "0.60396755", "0.60211873", "0.60118085", "0.59905624", "0.5986886", "0.59790707", "0.59708893", "0.5965416", "0.59462", "0.5929511", "0.59172237", "0.5909121", "0.5908486", "0.5905955", "0.5899923", "0.58940583", "0.588197", "0.5871455", "0.58611804", "0.5853715", "0.58509624", "0.5848422", "0.5840245", "0.583292", "0.5831027", "0.58107203", "0.5792842", "0.57740027", "0.5772795", "0.5770684", "0.5759073", "0.57576823", "0.5757218", "0.5756605", "0.57488245", "0.5748713", "0.57390606", "0.57318145", "0.572335", "0.5715929", "0.57008326", "0.56922644", "0.5689855", "0.5689677", "0.5670911", "0.5661897", "0.5647824", "0.5645992", "0.56339705", "0.5631207", "0.56267244", "0.5625099", "0.5619504", "0.56113905", "0.5603726", "0.5603122", "0.55999094", "0.5599722", "0.5579329", "0.55715877", "0.5571368", "0.5568947", "0.55662334", "0.55641466", "0.55561674", "0.55533236", "0.5536092", "0.55097514", "0.55020326", "0.5501586", "0.5500985", "0.549794", "0.5495021", "0.54946506", "0.54832846", "0.54686385" ]
0.77725565
1
Utility method to get a combined list of default and custom registered image sizes. Originally taken from CMB2. Static variable added here.
Полезный метод для получения объединенного списка размеров изображений по умолчанию и пользовательских зарегистрированных. Оригинально взят из CMB2. Здесь добавлена статическая переменная.
function mai_get_available_image_sizes() { // Cache. static $image_sizes = array(); if ( ! empty( $image_sizes ) ) { return $image_sizes; } // Get image sizes. global $_wp_additional_image_sizes; $default_image_sizes = array( 'thumbnail', 'medium', 'large' ); foreach ( $default_image_sizes as $size ) { $image_sizes[ $size ] = array( 'height' => intval( get_option( "{$size}_size_h" ) ), 'width' => intval( get_option( "{$size}_size_w" ) ), 'crop' => get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false, ); } if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) { $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes ); } return $image_sizes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_image_sizes() {\n\tstatic $sizes;\n\tif ( empty( $sizes ) ) {\n\t\t$manifest = get_manifest();\n\t\tif ( $manifest->get_path( 'custom_image_sizes.enabled' ) ) {\n\t\t\t$sizes = $manifest->get_path( 'custom_image_sizes.config' );\n\n\t\t\treturn $sizes;\n\t\t}\n\t}\n\n\treturn array();\n}", "function vcex_image_sizes() {\n\t$sizes = array(\n\t\t__( 'Custom Size', 'total' ) => 'wpex_custom',\n\t);\n\t$get_sizes = get_intermediate_image_sizes();\n\tarray_unshift( $get_sizes, 'full' );\n\t$get_sizes = array_combine( $get_sizes, $get_sizes );\n\t$sizes = array_merge( $sizes, $get_sizes );\n\treturn $sizes;\n}", "function elit_get_image_sizes() {\n \tglobal $_wp_additional_image_sizes;\n \n \t$sizes = array();\n \n \tforeach ( get_intermediate_image_sizes() as $_size ) {\n \t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n \t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n \t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n \t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n \t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n \t\t\t$sizes[ $_size ] = array(\n \t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n \t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n \t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $sizes;\n }", "function woodmart_get_all_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$default_image_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' );\n\t\t$image_sizes = array();\n\n\t\tforeach ( $default_image_sizes as $size ) {\n\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t'width' => (int) get_option( $size . '_size_w' ),\n\t\t\t\t'height' => (int) get_option( $size . '_size_h' ),\n\t\t\t\t'crop' => (bool) get_option( $size . '_crop' ),\n\t\t\t);\n\t\t}\n\n\t\tif ( $_wp_additional_image_sizes ) {\n\t\t\t$image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\n\t\t}\n\n\t\t$image_sizes['full'] = array();\n\n\t\treturn $image_sizes;\n\t}", "function sc_get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$sizes = array();\n\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $sizes;\n\t}", "function get_img_sizes() {\n\t\n\tglobal $_wp_additional_image_sizes;\n\t$sizes = array();\n\n\t// If not one of default sizes, add custom sizes\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t);\n\t\t}\n\t\t// Add size name\n\t\t$sizes[$_size]['size'] = $_size;\n\t}\t\n\t\n\t// Sort images by width\n\tusort($sizes, function($img1, $img2){\n\t return $img1['width'] < $img2['width'] ? -1 : 1;\n });\n\t\n\treturn $sizes;\n}", "function wp_listings_get_additional_image_sizes() {\n\n\tglobal $_wp_additional_image_sizes;\n\n\tif ( $_wp_additional_image_sizes )\n\t\treturn $_wp_additional_image_sizes;\n\n\treturn array();\n\n}", "function codeless_get_additional_image_sizes(){\n $add = codeless_wp_get_additional_image_sizes();\n $array = array('theme_default' => 'default', 'full' => 'full');\n\n foreach($add as $size => $val){\n $array[$size] = $size . ' - ' . $val['width'] . 'x' . $val['height'];\n }\n\n return $array;\n}", "private static function get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\t\n\t\t$sizes = array();\n\t\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\n\t\treturn $sizes;\n\t}", "function siteorigin_widgets_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = array();\n\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $sizes;\n}", "function jet_engine_get_image_sizes() {\n\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = get_intermediate_image_sizes();\n\t$result = array();\n\n\tforeach ( $sizes as $size ) {\n\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t} else {\n\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t);\n\t\t}\n\t}\n\n\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-engine' ), ), $result );\n}", "function zuhaus_mikado_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\t\n\t$sizes = array();\n\t\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array( 'medium', 'large' ) ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\t\n\treturn $sizes;\n}", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-woo-builder' ), ), $result );\n\n\t\t}", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-cw' ), ), $result );\n\n\t\t}", "function kc_get_image_sizes( $type = 'all' ) {\n\t$sizes = array();\n\n\t# Default sizes\n\tif ( $type !== 'custom' ) {\n\t\tforeach ( array('thumbnail', 'medium', 'large') as $size ) {\n\t\t\t$sizes[$size] = array(\n\t\t\t\t'width' => get_option( \"{$size}_size_w\" ),\n\t\t\t\t'height' => get_option( \"{$size}_size_h\" ),\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( $type !== 'default' ) {\n\t\tglobal $_wp_additional_image_sizes;\n\t\tif ( is_array( $_wp_additional_image_sizes ) )\n\t\t\t$sizes = array_merge( $sizes, $_wp_additional_image_sizes );\n\t}\n\n\tksort( $sizes );\n\treturn $sizes;\n}", "function codeless_wp_get_additional_image_sizes(){\n if( function_exists( 'wp_get_additional_image_sizes' ) )\n return wp_get_additional_image_sizes();\n \n return array();\n}", "function get_image_sizes() {\n global $_wp_additional_image_sizes;\n\n $sizes = array();\n\n foreach ( get_intermediate_image_sizes() as $_size ) {\n if ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n $sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n $sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n $sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n $sizes[ $_size ] = array(\n 'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n 'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n );\n }\n }\n\n return $sizes;\n}", "public function create_image_sizes()\n {\n\n return array();\n }", "function mai_get_image_sizes() {\n\n\t// Get labels.\n\t$labels = mai_get_image_size_labels();\n\n\t/**\n\t * Create the initial image sizes.\n\t * @link http://andrew.hedges.name/experiments/aspect_ratio/\n\t */\n\t$image_sizes = array(\n\t\t'banner' => array(\n\t\t\t'label' => $labels[ 'banner' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 533,\n\t\t\t'crop' => true, // 3x1\n\t\t),\n\t\t'section' => array(\n\t\t\t'label' => $labels[ 'section' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 900,\n\t\t\t'crop' => true, // 16x9\n\t\t),\n\t\t'full-width' => array(\n\t\t\t'label' => $labels[ 'full-width' ],\n\t\t\t'width' => 1248,\n\t\t\t'height' => 832,\n\t\t\t'crop' => true, // 3x2\n\t\t),\n\t\t'featured' => array(\n\t\t\t'label' => $labels[ 'featured' ],\n\t\t\t'width' => 800,\n\t\t\t'height' => 600,\n\t\t\t'crop' => true, // 4x3 (works better for no sidebar)\n\t\t),\n\t\t'one-half' => array(\n\t\t\t'label' => $labels[ 'one-half' ],\n\t\t\t'width' => 550,\n\t\t\t'height' => 413,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-third' => array(\n\t\t\t'label' => $labels[ 'one-third' ],\n\t\t\t'width' => 350,\n\t\t\t'height' => 263,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-fourth' => array(\n\t\t\t'label' => $labels[ 'one-fourth' ],\n\t\t\t'width' => 260,\n\t\t\t'height' => 195,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'tiny' => array(\n\t\t\t'label' => $labels[ 'tiny' ],\n\t\t\t'width' => 80,\n\t\t\t'height' => 80,\n\t\t\t'crop' => true, // square\n\t\t),\n\t);\n\n\t/**\n\t * Filter the image sizes to allow the theme to override.\n\t *\n\t * // Change the default Mai image sizes\n\t * add_filter( 'mai_image_sizes', 'prefix_custom_image_sizes' );\n\t * function prefix_custom_image_sizes( $image_sizes ) {\n\t *\n\t * // Change one-third image size\n\t * $image_sizes['one-third'] = array(\n\t * 'width' => 350,\n\t * 'height' => 350,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * // Change one-fourth image size\n\t * $image_sizes['one-fourth'] = array(\n\t * 'width' => 260,\n\t * 'height' => 260,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * return $image_sizes;\n\t *\n\t * }\n\t *\n\t */\n\t$image_sizes = apply_filters( 'mai_image_sizes', $image_sizes );\n\n\t/**\n\t * Make sure labels are added.\n\t * 'mai_image_sizes' didn't have 'label' in the array prior to 1.8.0.\n\t * This insures existing filters don't break.\n\t */\n\tforeach( $image_sizes as $name => $values ) {\n\t\tif ( ! isset( $values['label'] ) || empty( $values['label'] ) ) {\n\t\t\t$image_sizes[ $name ]['label'] = $labels[ $name ];\n\t\t}\n\t}\n\n\treturn $image_sizes;\n}", "function get_all_image_sizes() {\n global $_wp_additional_image_sizes;\n\n $default_image_sizes = get_intermediate_image_sizes();\n\n foreach ( $default_image_sizes as $size ) {\n $image_sizes[ $size ][ 'width' ] = intval( get_option( \"{$size}_size_w\" ) );\n $image_sizes[ $size ][ 'height' ] = intval( get_option( \"{$size}_size_h\" ) );\n $image_sizes[ $size ][ 'crop' ] = get_option( \"{$size}_crop\" ) ? get_option( \"{$size}_crop\" ) : false;\n }\n\n if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) {\n $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\n }\n \n $thumbnail_sizes = [];\n foreach($image_sizes as $key => $thumb_size){\n $thumbnail_sizes[$key] = $key;\n }\n\n return $thumbnail_sizes;\n}", "function _dt_gallery_get_image_sizes() {\n return [2, 3, 4, 5, 6, 7, 8, 12];\n}", "function acf_get_image_sizes() {}", "function get_intermediate_image_sizes()\n{\n}", "function wp_get_additional_image_sizes()\n{\n}", "function cp_v2_get_all_image_sizes( $id = '' ) {\r\n\r\n\t$default_image_sizes = array( 'thumbnail', 'medium', 'large' );\r\n\r\n\tif ( is_numeric( $id ) ) {\r\n\t\t$img_meta = wp_get_attachment_metadata( $id );\r\n\t\t$sizes = $img_meta['sizes'];\r\n\t\tif ( isset( $sizes['edit-screen-thumbnail'] ) ) {\r\n\t\t\tunset( $sizes['edit-screen-thumbnail'] );\r\n\t\t}\r\n\r\n\t\t$default_image_sizes = array_keys( $sizes );\r\n\t}\r\n\r\n\tglobal $_wp_additional_image_sizes;\r\n\t$image_sizes['full'] = array();\r\n\tforeach ( $default_image_sizes as $size ) {\r\n\t\tif ( isset( $sizes ) ) {\r\n\t\t\t$image_sizes[ $size ]['width'] = $sizes[ $size ]['width'];\r\n\t\t\t$image_sizes[ $size ]['height'] = $sizes[ $size ]['height'];\r\n\t\t} else {\r\n\t\t\t$image_sizes[ $size ]['width'] = intval( get_option( \"{$size}_size_w\" ) );\r\n\t\t\t$image_sizes[ $size ]['height'] = intval( get_option( \"{$size}_size_h\" ) );\r\n\t\t}\r\n\t\t$image_sizes[ $size ]['crop'] = get_option( \"{$size}_crop\" ) ? get_option( \"{$size}_crop\" ) : false;\r\n\t}\r\n\r\n\tif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) {\r\n\t\t$image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\r\n\t}\r\n\r\n\treturn $image_sizes;\r\n}", "function flotheme_get_images_sizes() {\n\treturn array();\n}", "function vodi_redux_get_all_register_image_size_options() {\n\n $options = array();\n\n if( function_exists( 'vodi_get_register_image_sizes' ) ) {\n $image_size_args = vodi_get_register_image_sizes();\n $all_keys = array_keys( $image_size_args );\n $options = array_combine( $all_keys, $all_keys );\n }\n\n return $options;\n}", "public static function get_image_sizes()\n {\n return array(\n 'thumbnail' => array( 150, 150, true ),\n 'es-image-size-archive' => array( 875, 604, true ),\n 'es-agent-size' => array( 190, 250, true ),\n );\n }", "static function get_registered_image_sizes($exclude = array(), $enforce_both = false)\n {\n global $_wp_additional_image_sizes;\n\n // Standard sizes\n $image_sizes = array( 'no scaling'=> array(\"width\"=>\"Original Width \", \"height\"=>\" Original Height\"),\n 'thumbnail' => array(\"width\"=>get_option('thumbnail_size_w'), \"height\"=>get_option('thumbnail_size_h')),\n 'medium' \t=> array(\"width\"=>get_option('medium_size_w'), \"height\"=>get_option('medium_size_h')),\n 'large' \t=> array(\"width\"=>get_option('large_size_w'), \"height\"=>get_option('large_size_h')));\n\n if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) )\n $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );\n\n $result = array();\n foreach($image_sizes as $key => $image)\n {\n if( (is_array($exclude) && !in_array($key, $exclude)) || (is_numeric($exclude) && ($image['width'] > $exclude || $image['height'] > $exclude)) || !is_numeric($image['height']))\n {\n if($enforce_both == true && is_numeric($image['height']))\n {\n if($image['width'] < $exclude || $image['height'] < $exclude) continue;\n }\n\n\n $title = str_replace(\"_\",' ', $key) .\" (\".$image['width'].\"x\".$image['height'].\")\";\n\n $result[ucwords( $title )] = $key;\n }\n }\n\n return $result;\n }", "function themify_get_image_sizes_list( $nested = true ) {\n static $result = array();\n $key = $nested?1:0;\n if(!isset($result[$key])){\n $size_names = apply_filters( 'image_size_names_choose',\n array(\n 'thumbnail' => __( 'Thumbnail', 'themify' ),\n 'medium' \t=> __( 'Medium', 'themify' ),\n 'large' \t=> __( 'Large', 'themify' ),\n 'full' \t=> __( 'Original Image', 'themify' )\n )\n );\n $out = array(\n array( 'value' => 'blank', 'name' => '' ),\n );\n foreach( $size_names as $size => $label ) {\n $out[] = array( 'value' => $size, 'name' => $label );\n }\n $result[$key] = apply_filters( 'themify_get_image_sizes_list', $nested ? $out : $size_names, $nested );\n }\n\t\treturn $result[$key];\n\t}", "function sizes()\n {\n $sizes = array('sm' => 300);\n return $sizes;\n }", "function basethemechild_get_theme_image_sizes() {\n $image_sizes = array();\n\n /** Example\n $image_sizes[ 'banner' ] = array(\n 'width' => 1600,\n 'height' => 500,\n /**\n * Whether to crop the image to the exact dimensions specified.\n * true = hard crop, will lose some of the image.\n * false = soft crop, the whole image will be visible but may not \n * be the exact width and height specified above.\n * The image will be scaled to the largest of the 2 dimensions.\n * /\n 'hard_crop' => true,\n );\n //*/\n\n /**\n * Filter the image sizes.\n * @param array $image_sizes The custom sizes currently defined.\n * @return array\n */\n return apply_filters( 'basethemechild_custom_image_sizes', $image_sizes );\n}", "public function set_defaults() {\n\n\t\t$this->sizes = parent::set_defaults();\n\n\t\t$default = Default_Picture::get_instance();\n\t\tforeach ( $this->sizes as $size => $img ) {\n\t\t\tif ( empty( $img ) && ! empty( $default->sizes->$size ) ) {\n\t\t\t\t$this->sizes->$size = $default->sizes->$size;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->sizes;\n\t}", "function woodmart_get_all_image_sizes_names( $style = 'default' ) {\n\t\t$available_sizes = woodmart_get_all_image_sizes();\n\t\t$image_sizes = array();\n\n\t\tforeach ( $available_sizes as $size => $size_attributes ) {\n\t\t\t$name = ucwords( str_replace( '_', ' ', $size ) );\n\t\t\tif ( is_array( $size_attributes ) && ( isset( $size_attributes['width'] ) || isset( $size_attributes['height'] ) ) ) {\n\t\t\t\t$name .= ' - ' . $size_attributes['width'] . ' x ' . $size_attributes['height'];\n\t\t\t}\n\n\t\t\tif ( 'elementor' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = $name;\n\t\t\t} elseif ( 'header_builder' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t\t'label' => $name,\n\t\t\t\t\t'value' => $size,\n\t\t\t\t);\n\t\t\t} elseif ( 'default' === $style ) {\n\t\t\t\t$image_sizes[ $size ] = array(\n\t\t\t\t\t'name' => $name,\n\t\t\t\t\t'value' => $size,\n\t\t\t\t);\n\t\t\t} elseif ( 'widget' === $style ) {\n\t\t\t\t$image_sizes[ $name ] = $size;\n\t\t\t}\n\t\t}\n\n\t\tif ( 'elementor' === $style ) {\n\t\t\t$image_sizes['custom'] = esc_html__( 'Custom', 'woodmart' );\n\t\t} elseif ( 'header_builder' === $style ) {\n\t\t\t$image_sizes['custom'] = array(\n\t\t\t\t'label' => esc_html__( 'Custom', 'woodmart' ),\n\t\t\t\t'value' => 'custom',\n\t\t\t);\n\t\t} elseif ( 'default' === $style ) {\n\t\t\t$image_sizes['custom'] = array(\n\t\t\t\t'name' => esc_html__( 'Custom', 'woodmart' ),\n\t\t\t\t'value' => 'custom',\n\t\t\t);\n\t\t} elseif ( 'widget' === $style ) {\n\t\t\t$image_sizes[ esc_html__( 'Custom', 'woodmart' ) ] = 'custom';\n\t\t}\n\n\t\treturn $image_sizes;\n\t}", "function ootheme_get_images_sizes() {\n\t\treturn array(\n\t\t\t'post' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 110,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 400,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 516,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cat-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-carousel-crop',\n\t\t\t\t\t'width'\t\t=> 394,\n\t\t\t\t\t'height'\t=> 525,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'venue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 200,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'event-preview',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'issue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'issue-preview',\n\t\t\t\t\t'width'\t\t=> 600,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "function fluid_edge_get_image_sizes() {\n global $_wp_additional_image_sizes;\n\n $sizes = array();\n\n foreach ( get_intermediate_image_sizes() as $_size ) {\n if ( in_array( $_size, array('medium', 'large') ) ) {\n $sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n $sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n $sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n $sizes[ $_size ] = array(\n 'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n 'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n );\n }\n }\n\n return $sizes;\n}", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "function bfg_get_image_sizes( $size = '' ) {\n\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = array();\n\t$get_intermediate_image_sizes = get_intermediate_image_sizes();\n\n\t// Create the full array with sizes and crop info\n\tforeach( $get_intermediate_image_sizes as $_size ) {\n\t\tif( in_array( $_size, array( 'thumbnail', 'medium', 'large' ) ) ) {\n\t\t\t$sizes[$_size]['width'] = get_option( $_size . '_size_w' );\n\t\t\t$sizes[$_size]['height'] = get_option( $_size . '_size_h' );\n\t\t\t$sizes[$_size]['crop'] = (bool) get_option( $_size . '_crop' );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[$_size] ) ) {\n\t\t\t$sizes[$_size] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[$_size]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[$_size]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[$_size]['crop']\n\t\t\t);\n\t\t}\n\t}\n\n\t// Get only 1 size if found\n\tif( $size )\n\t\treturn isset($sizes[$size]) ? $sizes[$size] : false;\n\n\treturn $sizes;\n\n}", "function bt_intermediate_image_sizes_advanced( $sizes ) {\n\treturn array();\n}", "function add_custom_media_sizes( $imageSizes ) {\n $my_sizes = array(\n 'half' => 'Half-Column',\n 'third' => 'Third-Column'\n );\n return array_merge( $imageSizes, $my_sizes );\n}", "function dl_image_sizes( $sizes ) {\n\n\t$add_sizes = array(\n\t\t'slideshow'\t\t=> __( 'Tamaño del slideshow' ),\n\t\t'custom_logo'\t=> __( 'Tamaño personalizado del logo' ),\n\t\t'entradas_s'\t=> __( 'Tamaño personalizado imagenes small entradas' ),\n\t\t'entradas_m'\t=> __( 'Tamaño personalizado imagenes medium entradas' ),\n\t\t'custom_equipo'\t=> __( 'Tamaño personalizado imagenes equipo' ),\n\t\t'empresas_logo'\t=> __( 'Tamaño personalizado logos empresas' )\n\t\t\n\t);\n\n\treturn array_merge( $sizes, $add_sizes );\n\n}", "function get_image_size($name) {\n\t\t$file['site_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['email_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['site_favicon'] = array('width' => '50', 'height' => '50');\n\t\t$file['store_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['footer_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['app_logo'] = array('width' => '140', 'height' => '140');\n\t\t$file['driver_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['driver_white_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['home_slider'] = array('width' => '1300', 'height' => '500');\n\t\t$file['dietary_icon_size'] = array('width' => '256', 'height' => '256');\n\t\t$file['item_image_sizes'] = [\n\t\t\tarray('width' => '120', 'height' => '120'),\n\t\t\tarray('width' => '600', 'height' => '350'),\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t];\n\t\t$file['category_image_size'] = array('width' => '250', 'height' => '140');\n\t\t$file['store_image_sizes'] = [\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t\tarray('width' => '520', 'height' => '280'),\n\t\t\tarray('width' => '480', 'height' => '320'),\n\t\t\tarray('width' => '100', 'height' => '100'),\n\t\t];\n\n\t\treturn $file[$name];\n\t}", "public function getImageSizes(): array\n {\n /** @var BackendUser $user */\n $user = $this->tokenStorage->getToken()->getUser();\n\n return $this->imageSizes->getOptionsForUser($user);\n }", "function voo_get_image_sizes($size = '')\n{\n\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = array();\n\t$get_intermediate_image_sizes = get_intermediate_image_sizes();\n\n\t// Create the full array with sizes and crop info\n\tforeach ($get_intermediate_image_sizes as $_size) {\n\n\t\tif (in_array($_size, array('thumbnail', 'medium', 'large'))) {\n\n\t\t\t$sizes[$_size]['width'] = get_option($_size . '_size_w');\n\t\t\t$sizes[$_size]['height'] = get_option($_size . '_size_h');\n\t\t\t$sizes[$_size]['crop'] = (bool)get_option($_size . '_crop');\n\n\t\t} elseif (isset($_wp_additional_image_sizes[$_size])) {\n\n\t\t\t$sizes[$_size] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[$_size]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[$_size]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[$_size]['crop']\n\t\t\t);\n\n\t\t}\n\n\t}\n\n\t// Get only 1 size if found\n\tif ($size) {\n\n\t\t//varD($sizes[ $size ]);\n\n\t\tif (isset($sizes[$size])) {\n\t\t\treturn $sizes[$size];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}\n\n\treturn $sizes;\n}", "public function get_image_sizes() {\n\t\tif ( null !== $this->image_sizes ) {\n\t\t\treturn $this->image_sizes;\n\t\t}\n\n\t\t$image_sizes = array_merge( [ 'full' ], get_intermediate_image_sizes() );\n\n\t\t/**\n\t\t * Filters the image sizes the `Tribe\\Utils\\Post_Thumbnail` class will manage and fetch data for.\n\t\t *\n\t\t * @since 4.9.14\n\t\t *\n\t\t * @param array $image_sizes All the available image sizes; this includes the default and the intermediate ones.\n\t\t */\n\t\t$this->image_sizes = apply_filters( 'tribe_post_thumbnail_image_sizes', $image_sizes );\n\n\t\treturn $this->image_sizes;\n\t}", "function dl_image_sizes( $sizes ) {\n\n\t$add_sizes = array(\n\t\t'carousel-images'\t\t=> __( 'Tamaño del slideshow' ),\n\t\t'menu-items'\t=> __( 'Tamaño personalizado del logo' ),\n\t\t'blog-square'\t=> __( 'Tamaño del blog' ),\n\t\t'detail'\t=> __( 'Tamaño del detalle' ),\n\t);\n\n\treturn array_merge( $sizes, $add_sizes );\n\n}", "function add_custom_image_sizes() {\n\n}", "public function get_size_options() {\n return array(\n '416x290' => '416px by 290px',\n '516x346' => '516px by 346px',\n '616x402' => '616px by 402px',\n '816x515' => '816px by 515px',\n 'responsive' => 'responsive (full-width of container)',\n 'custom' => 'custom',\n );\n }", "function august19_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "function sfp_image_sizes_advanced( $sizes ) {\n\tglobal $dynimg_image_sizes;\n\n\t// save the sizes to a global, because the next function needs them to lie to WP about what sizes were generated\n\t$dynimg_image_sizes = $sizes;\n\n\t// force WP to not make sizes by telling it there's no sizes to make\n\treturn array();\n}", "function custom_image_sizes( $size_names ) {\n $new_sizes = array(\n 'profileThumb' => 'Фото для профиля',\n );\n return array_merge( $size_names, $new_sizes );\n }", "function env_image_sizes($sizes){\n\t$custom_sizes = array(\n\t\t'page-fullwidth-image' => 'Page Full-Width Image',\n\t\t'page-cwidth-image' => 'Page Content-Width Image'\n\t);\n\treturn array_merge( $sizes, $custom_sizes );\n}", "function get_image_sizes( $size = '' ) {\n\tglobal $_wp_additional_image_sizes;\n\t$sizes = [];\n\t$get_intermediate_image_sizes = get_intermediate_image_sizes();\n\n\t// Create the full array with sizes and crop info\n\tforeach ( $get_intermediate_image_sizes as $_size ) {\n\t\tif ( in_array( $_size, [ 'thumbnail', 'medium', 'large' ] ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( $_size . '_size_w' );\n\t\t\t$sizes[ $_size ]['height'] = get_option( $_size . '_size_h' );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = [\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop']\n\t\t\t];\n\t\t}\n\t}\n\n\t// Get only 1 size if found\n\tif ( $size ) {\n\t\tif ( isset( $sizes[ $size ] ) ) {\n\t\t\treturn $sizes[ $size ];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn $sizes;\n}", "public function getThumbnailsSizes(): array\n {\n return [\n [\n [\n 'width' => 1024,\n 'height' => 768,\n ],\n true\n ],\n [\n [\n 'width' => 20,\n 'height' => 20,\n ],\n false\n ]\n ];\n }", "function contract_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "function get_icon_sizes($entity) {\n\n\t$config = elgg_get_config('icon_sizes');\n\t$config = elgg_trigger_plugin_hook('entity:icon:sizes', 'object', array(\n\t\t'entity' => $entity,\n\t\t\t), $config);\n\n\treturn $config;\n}", "function mai_get_picture_sizes( $image_size ) {\n\tswitch ( $image_size ) {\n\t\tcase 'banner':\n\t\tcase 'section':\n\t\tcase 'full-width':\n\t\t\t$picture_sizes = array( 'featured', 'one-half', 'one-third', 'one-fourth' );\n\t\t\tbreak;\n\t\tcase 'featured':\n\t\t\t$picture_sizes = array( 'one-half', 'one-third', 'one-fourth' );\n\t\t\tbreak;\n\t\tcase 'one-half':\n\t\t\t$picture_sizes = array( 'one-third', 'one-fourth' );\n\t\t\tbreak;\n\t\tcase 'one-third':\n\t\t\t$picture_sizes = array( 'one-fourth' );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$picture_sizes = array();\n\t}\n\treturn apply_filters( 'mai_picture_sizes', $picture_sizes, $image_size );\n}", "function rest_get_avatar_sizes()\n{\n}", "function add_custom_sizes() {\n\tadd_image_size( 'productlist-thumb', 400, 300, true );\n\tadd_image_size( 'homelist-thumb', 400, 300, true );\n\tadd_image_size( 'sidebar-thumb', 120, 100, true );\n}", "public function getAllowedSizes()\n {\n return $this->config->get('thumbnails.sizes');\n }", "function wktheme_custom_site_icon_size($sizes){\n\t$sizes = '';\n\t$sizes[] = 512;\n\t$sizes[] = 384;\n\t$sizes[] = 256;\n\t$sizes[] = 194;\n\t$sizes[] = 192;\n\t$sizes[] = 180;\n\t$sizes[] = 152;\n\t$sizes[] = 144;\n\t$sizes[] = 120;\n\t$sizes[] = 114;\n\t$sizes[] = 96;\n\t$sizes[] = 76;\n\t$sizes[] = 72;\n\t$sizes[] = 60;\n\t$sizes[] = 57;\n\t$sizes[] = 48;\n\t$sizes[] = 36;\n\t$sizes[] = 32;\n\t$sizes[] = 16;\n\t\n\treturn $sizes;\n}", "public function get_all_image_sizes($imgIds){\r\n\t \t\t$images = array();\r\n\t\t \tif(!empty($imgIds)){\r\n\t\t\t \tforeach($imgIds as $imgId):\r\n\t\t\t \t\tif($imgId == 'placeholder'){\r\n\t\t\t \t\t\t$images[] = array(\r\n\t\t\t \t\t\t\t'large' => array( wc_placeholder_img_src('large') ),\r\n\t\t\t \t\t\t\t'single' => array( wc_placeholder_img_src('shop_single') ),\r\n\t\t\t \t\t\t\t'thumb' => array( wc_placeholder_img_src('thumbnail') ),\r\n\t\t\t \t\t\t\t'alt' => '',\r\n\t\t\t \t\t\t\t'title' => ''\r\n\t\t\t \t\t\t);\r\n\t\t\t \t\t} else {\r\n\t\t\t\t \t\tif(!array_key_exists($imgId, $images)){\r\n if(!empty($imgId)):\r\n $attachment = $this->wp_get_attachment($imgId);\r\n $images[] = array(\r\n 'large' => wp_get_attachment_image_src($imgId, 'large'),\r\n 'single' => wp_get_attachment_image_src($imgId, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' )),\r\n 'thumb' => wp_get_attachment_image_src($imgId, 'thumbnail'),\r\n 'alt' => $attachment['alt'],\r\n 'title' => $attachment['title']\r\n );\r\n endif;\r\n\t\t\t\t \t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \tendforeach;\r\n\t\t \t}\r\n\t\t \treturn $images;\r\n\t \t}", "function bakes_and_cakes_get_image_sizes( $size = '' ) {\n\n global $_wp_additional_image_sizes;\n\n $sizes = array();\n $get_intermediate_image_sizes = get_intermediate_image_sizes();\n\n // Create the full array with sizes and crop info\n foreach( $get_intermediate_image_sizes as $_size ) {\n if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n $sizes[ $_size ]['width'] = get_option( $_size . '_size_w' );\n $sizes[ $_size ]['height'] = get_option( $_size . '_size_h' );\n $sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );\n } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n $sizes[ $_size ] = array(\n 'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n 'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n 'crop' => $_wp_additional_image_sizes[ $_size ]['crop']\n );\n }\n }\n // Get only 1 size if found\n if ( $size ) {\n if( isset( $sizes[ $size ] ) ) {\n return $sizes[ $size ];\n } else {\n return false;\n }\n }\n return $sizes;\n }", "function custom_image_size_names($sizes) {\n return array_merge($sizes, array(\n 'thumbnail' => ('Thumbnail - Small'),\n 'thumbnail-medium' => ('Thumbnail - Medium'),\n 'thumbnail-large' => ('Thumbnail - Large'),\n 'jumbo' => ('Jumbo')\n ));\n }", "function alisart_custom_sizes($sizes)\n{\n\treturn array_merge($sizes, array(\n\t\t'xsmall' => __('XS'),\n\t\t'small' => __('S'),\n\t\t'xlarge' => __('XL'),\n\t\t'xxlarge' => __('XXL'),\n\t\t'xxxlarge' => __('XXXL'),\n\t));\n}", "function woocommerce_image_dimensions()\n{\n $mini = array(400, 400);\n return $mini;\n}", "function joe_total_image_sizes( $sizes ) {\n\n\t// Remove Total image sizes\n\t//unset( $sizes['blog_post_full'] );\n\n\t// Add new image sizes\n\t$sizes['title_background'] = array(\n\t\t'label' => __( 'Title Background', 'total-sidekick' ), // Label\n\t\t'width' => 'title_background_width', // id for theme_mod width\n\t\t'height' => 'title_background_height', // id for theme_mod height\n\t\t'crop' => 'title_background_crop', // id for theme_mod crop\n\t);\n\treturn $sizes;\n\n}", "public function add_image_sizes()\n {\n }", "function ehc_add_new_image_sizes() {\n\t$config = array(\n\t\t'featured-image' => array(\n\t\t\t'width' => 720,\n\t\t\t'height' => 400,\n\t\t\t'crop' => true,\n\t\t),\n\t\t'home-widget' => array(\n\t\t\t'width' => 480,\n\t\t\t'height' => 480,\n\t\t\t'crop' => true,\n\t\t),\n\t\t'slideshow' => array(\n\t\t\t'width' => 1144,\n\t\t\t'height' => 763,\n\t\t\t'crop' => true,\n\t\t),\n\t\t'gallery' => array(\n\t\t\t'width' => 500,\n\t\t\t'height' => 750,\n\t\t\t'crop' => true,\n\t\t),\n\t);\n\tforeach ( $config as $name => $args ) {\n\t\t$crop = array_key_exists( 'crop', $args ) ? $args['crop'] : false;\n\n\t\tadd_image_size( $name, $args['width'], $args['height'], $crop );\n\t}\n}", "public function getImageSizeAllowableValues()\n {\n return [\n self::IMAGE_SIZE_FIXED_WIDTH_50PX,\n self::IMAGE_SIZE_FIXED_WIDTH_250PX,\n self::IMAGE_SIZE_FIXED_WIDTH_675PX,\n self::IMAGE_SIZE_ZOOM_50_PERCENT,\n self::IMAGE_SIZE_ZOOM_75_PERCENT,\n self::IMAGE_SIZE_ZOOM_100_PERCENT,\n self::IMAGE_SIZE_ZOOM_125_PERCENT,\n self::IMAGE_SIZE_ZOOM_150_PERCENT,\n self::IMAGE_SIZE_ZOOM_200_PERCENT,\n ];\n }", "public function getImageDimensions() {\n\t\tIf ($this->isBuilderObject) {\n\t\t\tlist($width, $height) = $this->gifBuilder->getImageDimensions($this->imageFile);\n\t\t} else {\n\t\t\tlist($width, $height) = getimagesize($this->getImageFile(TRUE));\n\t\t}\n\t\treturn array('width'=>$width, 'height'=>$height, 'builderObject'=>$this->isBuilderObject);\n\t}", "public function getGetSizePixelValues()\n {\n return [\n 'No unit' => ['1234.5', 1235],\n 'px' => ['1234.5px', 1235],\n 'em' => ['1em', 16],\n 'ex' => ['2ex', 16],\n 'pt' => ['12pt', 16],\n 'pc' => ['1pc', 16],\n 'in' => [(1 / 6).'in', 16],\n 'cm' => [(2.54 / 6).'cm', 16],\n 'mm' => [(25.4 / 6).'mm', 16],\n 'No unit with spacing' => [\" \\r \\n \\t 1234.5 \\r \\n \\t \", 1235],\n 'em with spacing' => [\" \\r \\n \\t 1234.5em \\r \\n \\t \", 19752],\n 'unknown' => ['100vw', 0],\n 'unknown mmm' => ['1mmm', 0],\n 'invalid' => ['abc', 0],\n 'invalid number' => ['12.34.5', 0],\n ];\n }", "public function intermediate_image_sizes($sizes = array())\n {\n }", "function mai_get_image_size_labels() {\n\treturn array(\n\t\t'banner' => __( 'Banner', 'mai-theme-engine' ),\n\t\t'section' => __( 'Section', 'mai-theme-engine' ),\n\t\t'full-width' => __( 'Full Width', 'mai-theme-engine' ),\n\t\t'featured' => __( 'Featured', 'mai-theme-engine' ),\n\t\t'one-half' => __( 'One Half', 'mai-theme-engine' ),\n\t\t'one-third' => __( 'One Third', 'mai-theme-engine' ),\n\t\t'one-fourth' => __( 'One Fourth', 'mai-theme-engine' ),\n\t\t'tiny' => __( 'Tiny', 'mai-theme-engine' ),\n\t);\n}", "public function action_image_sizes() {\n\t\tif ( is_array( $this->image_sizes ) && count( $this->image_sizes ) > 0 ) {\n\t\t\tforeach ( $this->image_sizes as $image_size ) {\n\t\t\t\tadd_image_size( $image_size[0], $image_size[1], $image_size[2], ( isset( $image_size[3] ) ) ? $image_size[3] : false );\n\t\t\t}\n\t\t}\n\t}", "function cp_build_srcset_sizes($small,$medium,$large) {\n\n $sizes = '';\n\n if ( isset( $small ) ) {\n // $sizes['640px'] = $small;\n $sizes .= '(max-width: 640px) '.$small.', ';\n }\n\n if ( isset( $medium ) ) {\n // $sizes['1024px'] = $medium;\n $sizes .= '(max-width: 1024px) '.$medium.', ';\n }\n\n if ( isset( $large ) ) {\n // $sizes['1200px'] = $large;\n $sizes .= $large;\n }\n\n return $sizes;\n\n}", "public function action_add_custom_image_sizes(){\n\t\tadd_theme_support(\"post-thumbnails\");\n\n\t\t// add custom sizes\n\t\tforeach ($this->custom_sizes as $name => $opts){\n\t\t\tadd_image_size($name, $opts[\"width\"], $opts[\"height\"], $opts[\"crop\"]);\n\t\t}\n\t}", "function eino_custom_name_image_sizes( $sizes ) {\n\n $sizes['eino-thumbnail-download'] = __( 'Eino Download Thumbnail', 'eino' );\n\t$sizes['eino-bigger-image'] = __( 'Eino Bigger Image', 'eino' );\n\t\n return $sizes;\n}", "function wpa_custom_image_choose( $sizes ) {\n global $_wp_additional_image_sizes;\n $custom = array();\n if(isset($_wp_additional_image_sizes)) {\n foreach( $_wp_additional_image_sizes as $key => $value ) {\n $custom[ $key ] = ucwords( str_replace( array('-', '_'), ' ', $key ) );\n }\n }\n return array_merge( $sizes, $custom );\n}", "protected function extractSvgImageSizes() {}", "public function add_image_sizes() {\n\t\t$opt = Lucid_Slider_Utility::get_settings();\n\n\t\t// Make sure post thumbnails are supported\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t// Add sizes from settings\n\t\tif ( ! empty( $opt['image_sizes'] ) ) :\n\n\t\t\t// Saved as '600x200<newline>'\n\t\t\t$sizes = explode( \"\\n\", trim( $opt['image_sizes'] ) );\n\n\t\t\tforeach ( $sizes as $size ) :\n\t\t\t\t$dimensions = Lucid_Slider_Utility::get_dimensions( $size );\n\t\t\t\t$size_name = Lucid_Slider_Utility::get_image_size( $size );\n\n\t\t\t\tif ( ! $dimensions || ! $size_name )\n\t\t\t\t\tcontinue;\n\n\t\t\t\tadd_image_size( $size_name, $dimensions[0], $dimensions[1], true );\n\t\t\tendforeach;\n\t\tendif;\n\t}", "function wp_get_attachment_image_sizes($attachment_id, $size = 'medium', $image_meta = \\null)\n{\n}", "private function _get_total_size()\n {\n $arr = array( 'width' => 0, 'height' => 0 );\n\n foreach( $this->_images as $image )\n {\n if( $arr[ 'width' ] < $image[ 'width' ] )\n {\n $arr[ 'width' ] = $image[ 'width' ];\n }\n\n $arr[ 'height' ] += ( $image[ 'height' ] + $this->_options->image_padding );\n }\n\n return $arr;\n }", "public function additional_sizes($sizes = array())\n {\n }", "public static function get_thumb_sizes() {\n\t\treturn array(\n\t\t\t'thumb-400-800' => array( 'w' => 400, 'h' => 800, 'crop' => false ),\n\t\t\t'thumb-200-200' => array( 'w' => 200, 'h' => 200, 'crop' => true ),\n\t\t\t'thumb-350-260' => array( 'w' => 350, 'h' => 260, 'crop' => true ),\n\t\t\t'thumb-750-350' => array( 'w' => 750, 'h' => 350, 'crop' => true ),\n\t\t\t'thumb-1200-300' => array( 'w' => 1200, 'h' => 300, 'crop' => true ),\n\t\t);\n\t}", "public function getThemeResponsiveImageMap()\n {\n $map = array();\n /*\n $map = array(\n 'large' => '900px',\n 'medium' => '768px',\n 'small' => '0',\n );\n */\n return $map;\n }", "public function sizes()\n {\n return (object) array('width' => $this->image->media_width, 'height' => $this->image->media_height);\n }", "function hwcoe_ufl_show_custom_sizes( $sizes ) {\n\t return array_merge( $sizes, array(\n\t\t'medium-cropped' => __( 'Medium (cropped)', 'hwcoe-ufl' ),\n\t\t'page_header' => __( 'Subpage Header', 'hwcoe-ufl' ),\n\t ) );\n}", "function bfg_image_size_names_choose( $sizes ) {\n\n\t$sizes['desktop-size'] = 'Desktop';\n\treturn $sizes;\n\n}", "public function getDefaults()\n\t{\n\t\t$defaults = parent::getDefaults();\n\n\t\treturn array_merge($defaults, $this->imageDefaults);\n\t}", "static function field_thumbnail_sizes( $_size_name = '' ) {\n\t\t\t// All available thumbnail sizes\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$result\t\t\t\t = $sizes_to_sort\t\t = $dimensions_to_sort\t = array();\n\n\t\t\tforeach ( get_intermediate_image_sizes() as $size_name ) {\n\t\t\t\tif ( in_array( $size_name, array( 'thumbnail', 'medium', 'large' ) ) ) {\n\t\t\t\t\t$this_size\t = array();\n\t\t\t\t\t$this_size[] = get_option( $size_name . '_size_w' );\n\t\t\t\t\t$this_size[] = get_option( $size_name . '_size_h' );\n\n\t\t\t\t\t// Add official sizes to result\n\t\t\t\t\t$result[ $size_name ] = ucfirst( $size_name ) . ' (' . implode( ' &times; ', $this_size ) . ')';\n\t\t\t\t} else {\n\t\t\t\t\tif ( isset( $_wp_additional_image_sizes ) && isset( $_wp_additional_image_sizes[ $size_name ] ) ) {\n\n\t\t\t\t\t\t$this_size\t\t\t\t = array();\n\t\t\t\t\t\t$this_size[ 'width' ]\t = $_wp_additional_image_sizes[ $size_name ][ 'width' ];\n\t\t\t\t\t\t$this_size[ 'height' ]\t = $_wp_additional_image_sizes[ $size_name ][ 'height' ];\n\n\t\t\t\t\t\t// Calculate sizes value for sorting\n\t\t\t\t\t\t$sizes_value = intval( $this_size[ 'width' ] ) * intval( $this_size[ 'height' ] ) + rand( 1, 10 );\n\n\t\t\t\t\t\t$dimensions_to_sort[ $sizes_value ] = $size_name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this_size = array( 0, 0 );\n\t\t\t\t\t}\n\n\t\t\t\t\t$sizes_to_sort[ $size_name ] = ucfirst( preg_replace( '/[\\-_]/', ' ', $size_name ) ) . ' (' . implode( ' &times; ', $this_size ) . ')';\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $_size_name ) && $_size_name == $size_name ) {\n\t\t\t\t\treturn $this_size;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add full sizes\n\t\t\t$result[ 'full' ] = __( 'Full Size' );\n\n\t\t\t// Sort custom sizes by index (width * height)\n\t\t\tkrsort( $dimensions_to_sort );\n\n\t\t\t// Get array element in ASC sorted order\n\t\t\tforeach ( array_reverse( $dimensions_to_sort ) as $size_name ) {\n\t\t\t\t$result[ $size_name ] = $sizes_to_sort[ $size_name ];\n\t\t\t}\n\n\t\t\t$result = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_sizes', $result );\n\n\t\t\treturn $result;\n\t\t}", "private function get_image_sizes( $size = '' ) {\n\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$sizes = array();\n\t\t$get_intermediate_image_sizes = get_intermediate_image_sizes();\n\n\t\t// Create the full array with sizes and crop info\n\t\tforeach( $get_intermediate_image_sizes as $_size ) {\n\n\t\t\tif ( in_array( $_size, array( 'thumbnail', 'medium', 'large' ) ) ) {\n\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( $_size . '_size_w' );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( $_size . '_size_h' );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );\n\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop']\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Get only 1 size if found\n\t\tif ( $size ) {\n\t\t\tif( isset( $sizes[ $size ] ) ) {\n\t\t\t\treturn $sizes[ $size ];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn $sizes;\n\n\t}", "function add_ai_image_size_names( $sizes ) {\n\n\t\t\t// adding relevant media-sizes to the select-input for inserting into the editor\n\n\t\t\t//if ( isset( $_REQUEST['post'] ) ) {\n\n\t\t\t\t$posttype = get_post_type( @$_REQUEST['post'] );\n\n\t\t\t\tforeach ( $GLOBALS['toolset']['inits']['tool_adaptive_images']['editor_imagesizes'] as $size => $item ) {\n\n\t\t\t\t\t$check = true;\n\n\t\t\t\t\tif ( is_admin() && $item['posttypes'] && !in_array( $posttype, $item['posttypes'] ) ) {\n\t\t\t\t\t\t$check = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $check ) $sizes[$size] = $item['label'];\n\t\t\t\t}\n\t\t\t//}\n\n\t\t\treturn $sizes;\n\t\t}", "function codeless_images_sizes(){\n // Empty\n}", "function wp_calculate_image_sizes($size, $image_src = \\null, $image_meta = \\null, $attachment_id = 0)\n{\n}", "function coaching_pro_show_custom_image_sizes( $sizes ) {\n\n\treturn array_merge(\n\t\t$sizes,\n\t\tarray(\n\t\t\t'featured-image' => __( 'Featured Image', 'coaching-pro' ),\n\t\t)\n\t);\n}", "function add_container_image_sizes() {\n\n\t$max_content_width = \\GPS\\get_max_content_width();\n\n\tadd_image_size( 'bg-width-2x', MAX_IMAGE_WIDTH * 2 );\n\tadd_image_size( 'bg-width', MAX_IMAGE_WIDTH );\n\tadd_image_size( 'full-width-2x', $max_content_width * 2 );\n\tadd_image_size( 'full-width', $max_content_width );\n\tadd_image_size( 'half-2x', $max_content_width );\n\tadd_image_size( 'half', $max_content_width / 2 );\n\tadd_image_size( 'third-2x', $max_content_width * 2 / 3 );\n\tadd_image_size( 'third', $max_content_width / 3 );\n\tadd_image_size( 'quarter-2x', $max_content_width / 2 );\n\tadd_image_size( 'quarter', $max_content_width / 4 );\n\n}", "public function getSizes()\n\t{\n\t\treturn $this->sizes;\n\t}", "function vgmPictSizes($sizes)\n{\n $addsizes = array(\n \"medium_large\" => \"Medium Large\"\n );\n $newsizes = array_merge($sizes, $addsizes);\n return $newsizes;\n}", "public function add_image_sizes() {\n $large = apply_filters( 'wp_instagram_large', array( 1024, 1024, false ) );\n $thumbnail = apply_filters( 'wp_instagram_thumbnail', array( 256, 256, true ) );\n\n add_image_size( 'wp_instagram_large', $large[0], $large[1], $large[2] );\n add_image_size( 'wp_instagram_thumbnail', $thumbnail[0], $thumbnail[1], $thumbnail[2] );\n }" ]
[ "0.8075198", "0.8001889", "0.78569573", "0.78544277", "0.78320116", "0.7783915", "0.77804196", "0.7778983", "0.7761917", "0.77380353", "0.77264065", "0.77224874", "0.76010793", "0.7584208", "0.7556867", "0.7531068", "0.75034124", "0.7492093", "0.7491678", "0.7485869", "0.74803936", "0.7467861", "0.7388662", "0.735694", "0.73474413", "0.7346499", "0.73225605", "0.72698057", "0.72272885", "0.72018504", "0.7174536", "0.7172307", "0.71415085", "0.7139094", "0.7133258", "0.7082757", "0.7078379", "0.70712435", "0.70238435", "0.70025337", "0.6972285", "0.6958827", "0.69437623", "0.69091934", "0.6902755", "0.6893104", "0.6878537", "0.68703526", "0.6850184", "0.6849209", "0.6828469", "0.6801612", "0.6766326", "0.6737835", "0.67366266", "0.67276585", "0.6726804", "0.6692523", "0.66915774", "0.66901004", "0.66612643", "0.66515464", "0.6623307", "0.661211", "0.6603283", "0.66029006", "0.6599543", "0.6559752", "0.655419", "0.6542768", "0.65384346", "0.6516602", "0.6489411", "0.64724195", "0.6465805", "0.6461253", "0.64589316", "0.64533174", "0.6451772", "0.64427954", "0.64286935", "0.63856554", "0.6384564", "0.63764626", "0.6376209", "0.63469905", "0.63461155", "0.6346108", "0.6331959", "0.633156", "0.63294274", "0.632447", "0.6321515", "0.6314538", "0.6313287", "0.63006383", "0.62817365", "0.6274895", "0.6273304", "0.6258456" ]
0.80057317
1
Check if viewing a content archive page. This is any archive page that may inherit (custom) archive settings.
Проверьте, отображается ли страница архива содержимого. Это любая страница архива, которая может наследовать (пользовательские) настройки архива.
function mai_is_content_archive() { global $wp_query; if ( ! $wp_query->is_main_query() ) { return false; } $is_archive = false; // Blog. if ( is_home() ) { $is_archive = true; } // Term archive. elseif ( is_category() || is_tag() || is_tax() ) { $is_archive = true; } // CPT archive - this may be called too early to use get_post_type(). elseif ( is_post_type_archive() ) { $is_archive = true; } // Author archive. elseif ( is_author() ) { $is_archive = true; } // Search results. elseif ( is_search() ) { $is_archive = true; } // Date archives. elseif( is_date() ) { $is_archive = true; } return $is_archive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function this_is_a_blog_page(){\n if (is_home() || is_singular( 'post' ) || is_post_type_archive('post') || is_tag() || is_category() || is_date() || is_search()) {\n if(!is_post_type_archive('product')){\n return true;\n }\n }\n return false;\n}", "public function is_archive() {\n\n\t\treturn wp_mail_smtp()->get_admin()->is_admin_page( 'logs' ) && ! isset( $_GET['mode'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t}", "public function isArchive()\n {\n\n if (is_post_type_archive(\"job-listing\")) {\n return true;\n }\n\n return false;\n }", "public function content() {\n\n\t\t// Set a variable for archive IDs.\n\t\t$id = get_queried_object_id();\n\n\t\t// Use the site URL for the front page and error page.\n\t\tif ( is_front_page() || is_404() ) {\n\t\t\t$url = esc_url( get_site_url() );\n\n\t\t// If in the blog index and not on the first page.\n } elseif ( is_home() && is_paged() ) {\n\t\t\t$url = esc_url( get_permalink( get_option( 'page_for_posts' ) ) . $this->page() );\n\n\t\t// If in the blog index and on the first page.\n\t\t} elseif ( is_home() ) {\n\t\t\t$url = esc_url( get_permalink( get_option( 'page_for_posts' ) ) );\n\n\t\t// If in a category archive and not on the first page.\n\t\t} elseif ( is_category() && is_paged() ) {\n\t\t\t$url = esc_url( get_category_link( $id ) . $this->page() );\n\n\t\t// If in a category archive and on the first page.\n\t\t} elseif ( is_category() ) {\n\t\t\t$url = esc_url( get_category_link( $id ) );\n\n\t\t// If in a tag archive and not on the first page.\n\t\t} elseif ( is_tag() && is_paged() ) {\n\t\t\t$url = esc_url( get_tag_link( $id ) . $this->page() );\n\n\t\t// If in a tag archive and on the first page.\n\t\t} elseif ( is_tag() ) {\n\t\t\t$url = esc_url( get_tag_link( $id ) );\n\n\t\t// If in a taxonomy archive and not on the first page.\n\t\t} elseif ( is_tax() && is_paged() ) {\n\t\t\t$url = esc_url( get_term_link( $id ) . $this->page() );\n\n\t\t// If in a taxonomy archive and on the first page.\n\t\t} elseif ( is_tax() ) {\n\t\t\t$url = esc_url( get_term_link( $id ) );\n\n\t\t// If in an author archive and not on the first page.\n\t\t} elseif ( is_author() && is_paged() ) {\n\t\t\t$url = esc_url( get_author_posts_url( $id ) . $this->page() );\n\n\t\t// If in an author archive and on the first page.\n\t\t} elseif ( is_author() ) {\n\t\t\t$url = esc_url( get_author_posts_url( $id ) );\n\n\t\t// If in a day archive and not on the first page.\n\t\t} elseif ( is_day() && is_paged() ) {\n\t\t\t$url = esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) . $this->page() );\n\n\t\t// If in a day archive and on the first page.\n\t\t} elseif ( is_day() ) {\n\t\t\t$url = esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) );\n\n\t\t// If in a month archive and not on the first page.\n\t\t} elseif ( is_month() && is_paged() ) {\n\t\t\t$url = esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . $this->page() );\n\n\t\t// If in a month archive and on the first page.\n\t\t} elseif ( is_month() ) {\n\t\t\t$url = esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) );\n\n\t\t// If in a year archive and not on the first page.\n\t\t} elseif ( is_year() && is_paged() ) {\n\t\t\t$url = esc_url( get_day_link( get_the_time( 'Y' ) ) . $this->page() );\n\n\t\t// If in a year archive and on the first page.\n\t\t} elseif ( is_year() ) {\n\t\t\t$url = esc_url( get_year_link( get_the_time( 'Y' ) ) );\n\n\t\t// For search pages, get the permalink for current terms of the query.\n\t\t} elseif ( is_search() ) {\n\t\t\t$url = esc_url( get_search_link() );\n\n\t\t// For everything else (singular) get the permalink.\n\t\t} else {\n\t\t\t$url = esc_url( get_the_permalink() );\n\t\t}\n\n\t\t// Echo the appropriate URL in the content of the tag.\n\t\techo $url;\n\n\t}", "public function is_own_page();", "public function is_archive()\n {\n }", "private function checkPostsPage() {\r\r\n return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');\r\r\n }", "public function canShowCmsPage()\n {\n if ($this->isEnabled() && $this->haveGuest())\n {\n return !(bool)Mage::getStoreConfig('privatesales/access/content');\n }\n \n return true;\n }", "public function canArchive();", "public function is_allowed_to_view_content_object();", "function is_blog_page(){\n if ( is_front_page() && is_home() ) {\n // Default homepage\n return true;\n\n } elseif ( is_front_page() ) {\n // static homepage\n return false;\n\n } elseif ( is_home() ) {\n // blog page\n return true;\n\n } else {\n if( is_product() )\n return false;\n\n if( is_post_type_archive( 'product' ) )\n return false;\n\n if( is_archive() )\n return true;\n\n if( is_post_type_archive( 'userproject' ) )\n return true;\n\n //everything else\n if( is_single() )\n return true;\n\n return false;\n\n }\n}", "public static function is_posts_page() {\n\t\treturn ( \\is_home() && 'page' === get_option( 'show_on_front' ) );\n\t}", "function is_archive() {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_archive();\n}", "public function isPage()\n {\n return self::TYPE_PAGE == $this->item->nav_item_type;\n }", "function biagiotti_mikado_dashboard_page() {\n\t\treturn is_page_template('user-dashboard.php');\n\t}", "public function isApplicableOnCurrentPage();", "function is_addedit_page($post_type)\n\t{\n\t\tif (!is_array($post_type)) {\n\t\t\t$post_type = array($post_type);\n\t\t}\n\n\t\tif (isset($GLOBALS['typenow'])) {\n\t\t\t$typenow = $GLOBALS['typenow'];\n\t\t} elseif (isset($_GET['post_type'])) {\n\t\t\t$typenow = $_GET['post_type'];\n\t\t} else {\n\t\t\t$typenow = 'post';\n\t\t}\n\t\treturn (is_admin() && in_array($typenow, $post_type) && in_array($GLOBALS['pagenow'], array('post-new.php', 'post.php', 'edit.php')));\n\t}", "public static function getIsArchive(){\n return self::getProperty('is_archive');\n }", "public function is_needed() {\n\t\treturn is_post_type_archive( PostType::get_instance()->get_post_type() );\n\t}", "public static function IsArchive();", "function isMyPage($pageobj=NULL, $action) {\n\tdeprecated_function_notify(gettext('Use instead the Zenpage category class method isMyItem().'), E_USER_NOTICE);\n\tglobal $_zp_current_zenpage_page;\n\tif (is_null($pageobj)) $pageobj = $_zp_current_zenpage_page;\n\treturn $pageobj->isMyItem($action);\n}", "private function is_in_page() {\n\t\t$screen = get_current_screen();\n\t\tif ( is_object( $screen ) && in_array( $screen->id, array(\n\t\t\t\t'defender_page_wdf-backup',\n\t\t\t\t'defender_page_wdf-backup-network'\n\t\t\t) )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isBlogPagesEnabled()\n {\n return $this->scopeConfig->isSetFlag(\n self::XML_PATH_ADD_BLOG_PAGES,\n ScopeInterface::SCOPE_STORE,\n $this->storeId\n );\n }", "public function hasArchive()\n\t{\n\t\treturn Archive::get()->Filter(['OriginalRecordClass' => $this->owner->getClassName(),'BigID' => $this->owner->BigID])->First();\n\t}", "function archive(){\n \n /*\n * set base variables\n */\n \n $this->View->add(\"wxp_content_template\", WXP::get_path(\"#loop\")->dir());\n \n /*\n * if posts exceed the amount of that allotted per page,\n * tell view to include the pager nav \n */\n \n global $wp_query;\n \n if($wp_query->max_num_pages > 1){\n $this->View->add(\"paged_archive\", true);\n }\n \n /*\n * include the error no posts template if the archive has no posts\n */\n \n if(!have_posts()){\n $this->View->add(\"wxp_content_template\", \n WXP::get_path(\"#error\")->name(\"no-posts\")->dir());\n } \n \n \n }", "private function isPluginSettingsPage() {\n $uri = Uri::getInstance();\n $layout = $uri->getVar('layout');\n $ext_id = $uri->getVar('extension_id');\n if ( isset($layout, $ext_id) && $layout === 'edit' && $ext_id == $this->_id ) {\n return true;\n }\n return false;\n }", "public function isArchived()\n {\n return count( $this->getSections()) === count( $this->getSections( TRUE )) ?\n TRUE :\n FALSE ;\n }", "public function isPage();", "function aton_qodef_is_masonry_template(){\n\n\t\t$page_id = aton_qodef_get_page_id();\n\t\t$page_template = get_page_template_slug($page_id);\n\t\t$page_options_template = aton_qodef_options()->getOptionValue('blog_list_type');\n\n\t\tif(!is_archive()){\n\t\t\tif($page_template == 'blog-masonry.php' || $page_template =='blog-masonry-full-width.php'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}elseif(is_archive() || is_home()){\n\t\t\tif($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "protected static function is_tax_archive() {\n\t\tif ( ! is_search() && ( is_tax() || is_category() || is_tag() ) ) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function is_allowed_page(){\n\n\n $allowed_screens = array(\n 'toolset_page_views-editor',\n 'toolset_page_ct-editor',\n 'toolset_page_view-archives-editor',\n 'toolset_page_dd_layouts_edit',\n 'page',\n 'post',\n );\n\n $allowed_pages = array(\n 'dd_layouts_edit',\n 'views-editor',\n 'ct-editor',\n 'view-archives-editor',\n\t\t\t\t'cred_association_form'\n );\n\n\n\n $bootstrap_available = false;\n $bootstrap_version = Toolset_Settings::get_instance();\n\n if(isset($bootstrap_version->toolset_bootstrap_version) && $bootstrap_version->toolset_bootstrap_version != \"-1\"){\n $bootstrap_available = true;\n }\n \n if(defined('LAYOUTS_PLUGIN_NAME')){\n $bootstrap_available = true;\n }\n\n if(is_admin()){\n\n $screen_id = '';\n $screen_base = '';\n $screen = get_current_screen();\n\n if(isset($screen)){\n $screen_id = $screen->id;\n $screen_base = (isset($screen->base)) ? $screen->base : false;\n }\n\n if(in_array($screen_id, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(in_array($screen_base, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(isset($_GET['page']) && in_array($_GET['page'], $allowed_pages) && $bootstrap_available === true){\n return true;\n }\n\n\n } else {\n if ( isset( $_GET['toolset_editor'] ) === true ) {\n return true;\n }\n }\n\n return false;\n\n }", "function mixtape_qodef_is_masonry_template(){\n\n\t\t\t$page_id = mixtape_qodef_get_page_id();\n\t\t\t$page_template = get_page_template_slug($page_id);\n\t\t\t$page_options_template = mixtape_qodef_options()->getOptionValue('blog_list_type');\n\n\t\t\tif(!is_archive()){\n\t\t\t\tif($page_template == 'blog-masonry.php' || $page_template =='blog-masonry-full-width.php'){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}elseif(is_archive() || is_home()){\n\t\t\t\tif($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width'){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function isShowAtContent()\r\n {\r\n return $this->isShowAt('content');\r\n }", "function dynamic_content_is_current_page( $slug ) {\n\n\t$page = dynamic_content_get_page( $slug );\n\n\treturn null != $page && $page->ID == get_queried_object_id();\n\n}", "function sydney_wc_archive_check() {\n if ( is_shop() || is_product_category() || is_product_tag() ) {\n return true;\n } else {\n return false;\n }\n}", "function inAjaxLoadedPage()\r\n\t{\r\n\t\t//are we in fabrik or a content view, if not return false (things like com_config need to load in mootools)\r\n\t\t$option = JRequest::getCmd('option');\r\n\t\tif ($option !== 'com_fabrik' && $option !== 'com_content') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (class_exists('JSite')) {\r\n\t\t\t$menus\t= &JSite::getMenu();\r\n\t\t\t$menu\t= $menus->getActive();\r\n\t\t\t//popup menu item so not in ajax loaded page even if tmpl=component\r\n\t\t\t// $$$ hugh - nope, browserNav of '1' is not a popup, just a new tab, see ...\r\n\t\t\t// http://fabrikar.com/forums/showthread.php?p=111771#post111771\r\n\t\t\t// if (is_object($menu) && ($menu->browserNav == 2 || $menu->browserNav == 1)) {\r\n\t\t\tif (is_object($menu) && ($menu->browserNav == 2)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn JRequest::getVar('format') == 'raw' || (JRequest::getVar('tmpl') == 'component' && JRequest::getInt('iframe') != 1);\r\n\t}", "private function is_static_posts_page() {\n\t\tif ( is_home() && 0 !== (int) get_option( 'page_for_posts' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function getIsOnPage() {\n $parts = explode('.', $this->path);\n return ($parts[sizeof($parts) - 4] == \"PageTypes\");\n }", "public function in_view()\n { \n return $GLOBALS['pagenow'] === 'admin.php' && isset($_GET['page']) && $_GET['page'] === $this->args['id'];\n }", "public function has_published_pages()\n {\n }", "public function is_settings_page(){\n\t\t\tif(isset($_GET['page']) && isset($_GET['tab']) && $_GET['tab'] == $this->tab_name){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if(isset($_GET['page']) && $_GET['page'] == 'woocommerce_shipworks_export'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function ul_is_location_content() {\n\tif ( ! is_singular( array( 'post', 'location_page' ) ) ) {\n\t\treturn false;\n\t}\n\tif ( is_singular( 'post') ) {\n\t\t// If the post author is not a 'location'\n\t\t$author_id = get_post_field( 'post_author', get_the_ID() );\n\t\tif ( ! ul_user_is_location( $author_id ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function is_edit_page() {\n\t\tglobal $pagenow;\n\t\tif (in_array($pagenow, array('post.php', 'post-new.php'))) return true;\n\t\treturn false;\n\t}", "public function is_page_active()\n\t{\n\t\treturn (bool) $this->content();\n\t}", "function em_is_categories_page(){\r\n\treturn em_get_page_type() == 'categories';\r\n}", "static function currentIsPage(): bool\n {\n return $GLOBALS['_index']->type === WebState::PAGE;\n }", "static function currentIsArticle(): bool\n {\n return\n $GLOBALS['_index']->type === WebState::PAGE\n && $GLOBALS['_page']['type'] == Page::CATEGORY\n && $GLOBALS['_index']->segment !== null;\n }", "public function canViewPage($sitepage) {\n $can_view = true;\n if (empty($sitepage->draft) || (empty($sitepage->aprrove_date)) || (empty($sitepage->approved) && empty($sitepage->pending) ) || !empty($sitepage->declined) || ($this->hasPackageEnable() && $sitepage->expiration_date !== \"2250-01-01 00:00:00\" && strtotime($sitepage->expiration_date) < time())) {\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n if (empty($isManageAdmin)) {\n $can_view = false;\n }\n }\n return $can_view;\n }", "function is_subpage() {\n global $post;\n if ( is_page() && $post->post_parent ) {\n return $post->post_parent;\n } else {\n return false;\n }\n}", "function em_is_category_page(){\r\n\treturn em_get_page_type() == 'category';\r\n}", "public function is_post_type_archive($post_types = '')\n {\n }", "public static function is_admin_or_embed_page()\n {\n }", "public static function is_admin_or_embed_page()\n {\n }", "protected function isEnabled()\n {\n return Settings::get('cms_pages_enabled', false);\n }", "public function isArchive(): bool\n {\n return in_array($this->name, [\n 'application/zip',\n 'application/x-rar-compressed',\n 'application/x-tar',\n 'application/gzip',\n ]);\n }", "public function hasContent();", "public function hasContent();", "public function is_index_page() {\n\n\t\tif ( isset( $_GET['post'] ) && absint( $_GET['post'] ) == wolf_discography_get_page_id() ) {\n\t\t\t$message = esc_html__( 'You are currently editing the page that shows the discography.', 'wolf-discography' );\n\n\t\t\t$output = '<div class=\"notice notice-warning inline\"><p>';\n\n\t\t\t$output .= $message;\n\n\t\t\t$output .= '</p></div>';\n\n\t\t\techo $output;\n\t\t}\n\t}", "function em_is_location_page(){\r\n\treturn em_get_page_type() == 'location';\r\n}", "function em_is_locations_page(){\r\n\treturn em_get_page_type() == 'locations';\r\n}", "function is_view_order_page()\n {\n }", "function et_is_job_menu(){\n\treturn is_post_type_archive('job') || get_post_type() == 'job' || is_home();\n}", "function em_is_my_bookings_page(){\r\n\treturn em_get_page_type() == 'my_bookings';\r\n}", "public static function enabled()\n {\n return api_get_setting('use_custom_pages') == 'true';\n }", "static function isArchived()\n {\n return !(self::$url == parse_url(self::$newest_url, PHP_URL_PATH));\n }", "protected function isArchived()\n\t{\n\t\t$bindSQL = array(\t$this->idsite,\n\t\t\t\t\t\t\t\t$this->strDateStart,\n\t\t\t\t\t\t\t\t$this->strDateEnd,\n\t\t\t\t\t\t\t\t$this->periodId,\n\t\t\t\t\t\t\t\t);\n\t\t$timeStampWhere = '';\n\t\tif( $this->maxTimestampArchive != 0)\n\t\t{\n\t\t\t$timeStampWhere = \" AND UNIX_TIMESTAMP(ts_archived) >= ? \";\n\t\t\t$bindSQL[] = $this->maxTimestampArchive;\n\t\t}\n\n\t\t$idarchive = Zend_Registry::get('db')->fetchOne(\"\n\t\t\t\t\t\tSELECT idarchive\n\t\t\t\t\t\tFROM \".$this->tableArchiveNumeric.\"\n\t\t\t\t\t\tWHERE idsite = ?\n\t\t\t\t\t\t\tAND date1 = ?\n\t\t\t\t\t\t\tAND date2 = ?\n\t\t\t\t\t\t\tAND period = ?\n\t\t\t\t\t\t\tAND name = 'done'\n\t\t\t\t\t\t\tAND value = \".Piwik_ArchiveProcessing::DONE_OK.\"\n\t\t\t\t\t\t\t$timeStampWhere\n\t\t\t\t\t\tORDER BY ts_archived DESC\",\n\t\t\t\t\t\t$bindSQL\n\t\t\t\t\t);\n\t\tif(!empty($idarchive))\n\t\t{\n\t\t\treturn $idarchive;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public static function ubc_press_is_special_pages() {\n\n\t\t$dashboard_page \t = \\UBC\\Press\\Utils::ubc_press_is_user_dashboard_page();\n\t\t$get_coursecontent = \\UBC\\Press\\Utils::ubc_press_is_section_component_page();\n\n\t\tif ( true !== $dashboard_page && true !== $get_coursecontent ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\treturn true;\n\n\t}", "function is_post_type_archive( $post_types = '' ) {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_post_type_archive( $post_types );\n}", "public function isPage()\n {\n if ($this->name) {\n return true;\n }\n return false;\n }", "function yz_is_account_page() {\n\n if ( bp_is_current_component( 'profile' ) || bp_is_current_component( 'settings' ) || bp_is_current_component( 'widgets' ) ) {\n return true;\n }\n\n return false;\n}", "private static function __isPageFront() {\n\t\t$params = Router::getParams();\n\n\t\treturn (\n\t\t\t!empty($params['controller']) && 'pages' == $params['controller']\n\t\t\t&& !empty($params['action']) && 'display' == $params['action']\n\t\t\t&& !empty($params['pass']) && in_array('home', (array) $params['pass'])\n\t\t);\n\t}", "function libero_mikado_load_blog_assets() {\n\t\treturn libero_mikado_is_blog_template() || is_home() || is_single() || libero_mikado_has_blog_shortcode() || is_archive() || is_search() || libero_mikado_has_blog_widget();\n\t}", "function is_subpage() {\n\tglobal $post;\n\tif ( is_page() && $post->post_parent ) {\n\t\t$parentID = $post->post_parent;\n\t\treturn $parentID;\n\t} else {\n\t\treturn false;\n\t};\n}", "function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) {\n\n\t$now = time();\n\n\telgg_push_breadcrumb(elgg_echo('blog:archives'));\n\t//$content = elgg_view('page_elements/content_header_member', array('type' => 'blog'));\n\n\tif ($lower) {\n\t\t$lower = (int)$lower;\n\t}\n\n\tif ($upper) {\n\t\t$upper = (int)$upper;\n\t}\n\n\t$options = array(\n\t\t'type' => 'object',\n\t\t'subtype' => 'blog',\n\t\t'full_view' => FALSE,\n\t\t'order_by_metadata' => array('name'=>'publish_date', 'direction'=>'DESC', 'as'=>'int'),\n\t);\n\n\tif ($owner_guid) {\n\t\t$options['owner_guid'] = $owner_guid;\n\t}\n\n\t// admin / owners can see any posts\n\t// everyone else can only see published posts\n\tif (!(isadminloggedin() || (isloggedin() && $owner_guid == get_loggedin_userid()))) {\n\t\tif ($upper > $now) {\n\t\t\t$upper = $now;\n\t\t}\n\n\t\t$options['metadata_name_value_pairs'] = array(\n\t\t\tarray('name' => 'status', 'value' => 'published')\n\t\t);\n\t}\n\n\tif ($lower) {\n\t\t$options['metadata_name_value_pairs'][] = array(\n\t\t\t'name' => 'publish_date',\n\t\t\t'operand' => '>',\n\t\t\t'value' => $lower\n\t\t);\n\t}\n\n\tif ($upper) {\n\t\t$options['metadata_name_value_pairs'][] = array(\n\t\t\t'name' => 'publish_date',\n\t\t\t'operand' => '<',\n\t\t\t'value' => $upper\n\t\t);\n\t}\n\n\t$list = elgg_list_entities_from_metadata($options);\n\tif (!$list) {\n\t\t$content .= elgg_echo('blog:none');\n\t} else {\n\t\t$content .= $list;\n\t}\n\n\t$title = elgg_echo('date:month:' . date('n', $lower), array(date('Y', $lower)));\n\n\treturn array(\n\t\t'content' => $content,\n\t\t'title' => $title,\n\t\t'buttons' => '',\n\t\t'filter' => '',\n\t);\n}", "static function isPageSet() {\n if (!isset($_GET['page'])) {\n return false;\n } else {\n return true;\n }\n }", "function affinity_mikado_load_blog_assets() {\n\t\treturn affinity_mikado_is_ajax_enabled() || affinity_mikado_is_blog_template() || is_home() || is_single() || affinity_mikado_has_blog_shortcode() || is_archive() || is_search() || affinity_mikado_has_blog_widget();\n\t}", "function ul_is_location_child_page() {\n\tif ( ! is_singular( 'location_page' ) ) {\n\t\treturn false;\n\t}\n\t// If viewing a top level location page\n\tglobal $post;\n\tif ( $post->post_parent > 0 ) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function is_cookie_policy_page() {\n\t\t$see_more = $this->options['general']['see_more_opt'];\n\n\t\tif ( $see_more['link_type'] !== 'page' )\n\t\t\treturn false;\n\n\t\t$cp_id = $see_more['id'];\n\t\t$cp_slug = get_post_field( 'post_name', $cp_id );\n\n\t\t$current_page = sanitize_post( $GLOBALS['wp_the_query']->get_queried_object() );\n\n\t\treturn $current_page->post_name === $cp_slug;\n\t}", "public function hasPages() {}", "public function isCategoryPage()\n {\n return array_search(array(\n 'catalog_category_default',\n 'catalog_category_layered'), $this->_getLayoutHandles()) !== false;\n }", "function userCanArchive( $sessionID ){\r\n\t\treturn $this->getAccessLevel() == ADMINISTRATOR;\r\n\t}", "public static function is_admin_page()\n {\n }", "public static function is_admin_page()\n {\n }", "function page_exists($id){\r\n\t\t$page_data = get_page($id);\r\n\t\tif (isset($page_data->post_status)){\r\n\t\tif($page_data->post_status == 'publish'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function check_page_template( $display, $meta_box ) {\n\n\t\tif ( ! isset( $meta_box['show_on']['key'] ) || 'page-template' !== $meta_box['show_on']['key'] )\n\t\t\treturn $display;\n\n\t\t$post_id = false;\n\t\t// If we're showing it based on ID, get the current ID\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_id = $_GET['post'];\n\t\telseif ( isset( $_POST['post_ID'] ) )\n\t\t\t$post_id = $_POST['post_ID'];\n\n\t\tif ( ! $post_id || is_page() )\n\t\t\treturn false;\n\n\n\t\t// Get current template\n\t\t$current_template = get_post_meta( $post_id, '_wp_page_template', true );\n\n\t\t// See if there's a match\n\t\tif ( in_array( $current_template, (array) $meta_box['show_on']['value'] ) )\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public static function isPageEditable($page, $isPageContent = false)\n {\n if (!$isPageContent) {\n $page = file_get_contents($page);\n }\n\n $firstPHPBlock = self::getFirstPHPBlock($page, true);\n if (strpos($firstPHPBlock, '$templatePreferences') !== false && preg_match('`TemplateBuilder\\\\\\Builder(?:\\h*as\\h*([^;]+))?`sx', $firstPHPBlock, $matches)) {\n // we also need to verify that builder::init is called.\n if (isset($matches[1])) {\n // template builder is included as an alias\n $builderAlias = $matches[1];\n } else {\n $builderAlias = 'Builder';\n }\n if (strpos($page, sprintf('%s::init()', $builderAlias)) !== false) {\n return true;\n }\n }\n return false;\n }", "public function is_page($name = '') {\r\n global $pagenow;\r\n $page = array();\r\n //make sure we are on the backend\r\n if (is_admin() && $name <> '') {\r\n if ($name == 'edit') {\r\n $page = array('post.php', 'post-new.php');\r\n } else {\r\n array_push($page, $name . '.php');\r\n }\r\n\r\n return in_array($pagenow, $page);\r\n }\r\n\r\n return false;\r\n }", "public function is_page_preview()\n\t{\n\t\tif ( ! isset ( $_GET['post_id'] ) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t$id = 0;\n\t\tisset ( $_GET['preview_id'] ) and $id = (int) $_GET['preview_id'];\n\n\t\tif ( $id == 0 )\n\t\t{\n\t\t\t$id = (int) $_GET['post_id'];\n\t\t}\n\n\t\t$preview = $_GET['preview'];\n\n\t\tif ( $id > 0 && $preview == 'true' )\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\t$type = $wpdb->get_results(\n\t\t\t\t\"SELECT post_type FROM $wpdb->posts WHERE ID=$id\"\n\t\t\t);\n\n\t\t\tif ( count( $type )\n\t\t\t\t&& ( $type[0]->post_type == 'page' )\n\t\t\t\t&& current_user_can( 'edit_page' )\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "private function isHomePage() {\r\r\n global $wp_query;\r\r\n\r\r\n if (isset($wp_query->queried_object_id)) {\r\r\n $this->post = get_post($wp_query->queried_object_id);\r\r\n\r\r\n }\r\r\n\r\r\n //Check if blog posts page\r\r\n if (is_home() && $wp_query->is_posts_page) {\r\r\n return false;\r\r\n }\r\r\n\r\r\n return (is_home() || (isset($wp_query->query) && empty($wp_query->query) && !is_preview()));\r\r\n }", "public function isCmsPageEnabled()\n {\n return (int) $this->getScopeConfigValue(self::ENABLED_CMS_PAGE);\n }", "protected function currentPageHasSubPages() {}", "public static function isSvcPage(){\n return isset($_REQUEST['page']) && $_REQUEST['page'] === 'svc-index' && is_admin();\n }", "function goya_is_blog () {\n\treturn ( is_archive() || is_author() || is_category() || is_home() || is_single() || is_tag()) && 'post' == get_post_type();\n}", "function show_posts_nav() {\n \tglobal $wp_query;\n \treturn ($wp_query->max_num_pages > 1);\n }", "function show_posts_nav() \n\t{\n\t global $wp_query;\n\t return ($wp_query->max_num_pages > 1);\n\t}", "function isArchived($post_id){\n if(get_post_meta($post_id, '_lkc_film_archived', true) == 1){\n return true;\n }\n return false;\n }", "function is_account_page()\n {\n }", "protected function checkExtraContentArchive()\n {\n if (!file_exists($this->temporaryPath.'import/extracontent.zip')) {\n return false;\n }\n\n return true;\n }", "function aton_qodef_load_blog_assets() {\n\t\treturn aton_qodef_is_blog_template() || is_home() || is_single() || aton_qodef_has_blog_shortcode() || is_archive() || is_search() || aton_qodef_has_blog_widget();\n\t}", "public function canShowCatalogPage()\n {\n if ($this->isEnabled() && $this->haveGuest())\n {\n return !(bool)Mage::getStoreConfig('privatesales/access/catalog');\n }\n \n return true;\n }" ]
[ "0.690848", "0.66528183", "0.6432294", "0.63794196", "0.6362669", "0.6313892", "0.63002074", "0.6289387", "0.61776644", "0.61709076", "0.61417687", "0.6119925", "0.60839844", "0.6073033", "0.60628486", "0.6052502", "0.6052396", "0.60507494", "0.6021615", "0.6020601", "0.6020118", "0.5994325", "0.5988846", "0.5982958", "0.5944197", "0.5942531", "0.59328485", "0.59228253", "0.5922484", "0.5919936", "0.5909853", "0.5906041", "0.5900527", "0.5899722", "0.5884655", "0.5883056", "0.58814305", "0.5877946", "0.5877849", "0.58776915", "0.58748496", "0.5869139", "0.58669657", "0.58634907", "0.58550686", "0.58456546", "0.58299285", "0.5786197", "0.57796824", "0.57765603", "0.577262", "0.57678556", "0.57678556", "0.5752129", "0.5735647", "0.5726288", "0.5726288", "0.57111496", "0.57004136", "0.57004106", "0.56885666", "0.5680418", "0.568017", "0.56756616", "0.5673445", "0.5654356", "0.56542224", "0.5644156", "0.5630293", "0.56289905", "0.5625524", "0.56183577", "0.56155574", "0.56056774", "0.5597987", "0.559268", "0.5591516", "0.55914074", "0.5588012", "0.55736965", "0.55638045", "0.55585366", "0.55568665", "0.5551167", "0.5546261", "0.55436176", "0.552575", "0.55250126", "0.5524317", "0.55148613", "0.551314", "0.550465", "0.550299", "0.5502248", "0.5490245", "0.5485516", "0.5481079", "0.5476051", "0.5472947", "0.54695404" ]
0.7423643
0
Check if banner area is enabled. Force this in a template via: add_filter( 'theme_mod_enable_banner_area', '__return_true' ); First check global settings, then archive setting (if applicable), then immediate setting.
Проверьте, включен ли баннерный блок. Силой включите это в шаблоне с помощью: add_filter( 'theme_mod_enable_banner_area', '__return_true' ); Сначала проверьте глобальные настройки, затем настройки архива (если применимо), затем непосредственную настройку.
function mai_is_banner_area_enabled() { $enabled = true; // If not enabled at all. if ( ! mai_is_banner_area_enabled_globally() ) { $enabled = false; } else { /** * If disabled per post_type or taxonomy. */ // Singular page/post. if ( is_singular( array( 'page', 'post' ) ) ) { // Get 'disabled' post types, typecasted as array because it may return empty string if none $disable_post_types = (array) genesis_get_option( 'banner_disable_post_types' ); if ( in_array( get_post_type(), $disable_post_types ) ) { $enabled = false; } } // Singular CPT. elseif ( is_singular() ) { $disable_post_type = (bool) genesis_get_option( sprintf( 'banner_disable_%s', get_post_type() ) ); if ( $disable_post_type ) { $enabled = false; } } // Post taxonomy archive. elseif ( is_category() || is_tag() ) { // Get 'disabled' taxonomies, typecasted as array because it may return empty string if none $disable_taxonomies = (array) genesis_get_option( 'banner_disable_taxonomies' ); if ( $disable_taxonomies && in_array( get_queried_object()->taxonomy, $disable_taxonomies ) ) { $enabled = false; } } // Custom taxonomy archive. elseif ( is_tax() ) { $disable_taxonomies = (array) genesis_get_option( sprintf( 'banner_disable_taxonomies_%s', get_post_type() ) ); if ( $disable_taxonomies && in_array( get_queried_object()->taxonomy, $disable_taxonomies ) ) { $enabled = false; } } /** * If still enabled, * check on the single object level. * * These conditionals were mostly adopted from mai_get_archive_setting() function. */ if ( $enabled ) { $hidden = false; // If single post/page/cpt. if ( is_singular() ) { $hidden = get_post_meta( get_the_ID(), 'hide_banner', true ); } // If content archive (the only other place we'd have this setting). elseif ( mai_is_content_archive() ) { // Get the setting directly, without fallbacks. $hidden = mai_get_the_archive_setting( 'hide_banner' ); } // If hidden, disable banner. if ( $hidden ) { $enabled = false; } } } return $enabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFrontendBannerEnabled()\n {\n return ($this->scopeConfig->getValue('environmentbanner/frontend/enabled', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE) == true);\n }", "function themify_theme_show_area( $area = '' ) {\n\t\tif ( 'header' == $area ) {\n\t\t\treturn 'none' == themify_area_design( 'header' ) ? false : true;\n\t\t} else {\n\t\t\tif ( is_singular() && ! is_attachment() ) {\n\t\t\t\t$exclude = themify_get( 'exclude_' . $area );\n\t\t\t\tif ( 'yes' == $exclude ) {\n\t\t\t\t\treturn false;\n\t\t\t\t} elseif ( 'no' == $exclude ) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn themify_check( 'setting-exclude_' . $area ) ? false : true;\n\t\t\t\t}\n\t\t\t} elseif ( themify_check( 'setting-exclude_' . $area ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function isDisplayAdminBanner()\n {\n // Check that output is enabled, else return false\n if (!$this->isChangeAdminColour()) {\n return false;\n }\n\n // Check that the given environment is recognised, else false\n $environments = $this->getEnvironments();\n if (!isset($environments[$this->getEnvironment()])) {\n return false;\n }\n\n // Never display if no background colour set (can be used to indicate skipping)\n if ($this->getEnvColours()->getBeColor() === null) {\n return false;\n }\n\n // We're enabled, in a recognised environment, so... display!\n return true;\n }", "public function isDisplayFrontendBanner()\n {\n //Check that output is enabled, else return false\n if (!$this->isFrontendBannerEnabled()) {\n return false;\n }\n\n // Check that the given environment is recognised, else false\n $environments = $this->getEnvironments();\n if (!isset($environments[$this->getEnvironment()])) {\n return false;\n }\n\n // Never display on production or if no background colour set (can be used to indicate production)\n if ($this->getEnvironment() == 'production' || $this->getEnvColours()->getFeBgcolor() === null) {\n return false;\n }\n\n // We're enabled, in a recognised environment that is not production, so... display!\n return true;\n }", "function enabled_status_banner( $status )\n\t{\n\t\tif( $status != 'published' )\n\t\t{\t// Display status banner everytime when status is not 'published'\n\t\t\treturn true;\n\t\t}\n\n\t\tif( is_logged_in() && $this->get_setting( 'banner_public' ) )\n\t\t{\t// Also display status banner if status is 'published'\n\t\t\t// AND current user is logged in\n\t\t\t// AND this feature is enabled in skin settings\n\t\t\treturn true;\n\t\t}\n\n\t\t// Don't display status banner\n\t\treturn false;\n\t}", "function display_banner_panel_fields()\n{\n add_settings_section('section', 'Banner settings', null, 'banner-settings');\n add_settings_field('enable_banner', 'Enable banner site wide', 'enable_banner_element', 'banner-settings', 'section');\n add_settings_field('banner_title', 'Banner title', 'banner_title_element', 'banner-settings', 'section');\n add_settings_field('banner_text', 'Banner text', 'banner_text_element', 'banner-settings', 'section');\n register_setting('section', 'enable_banner');\n register_setting('section', 'banner_title');\n register_setting('section', 'banner_text');\n}", "function getBannerEnable($domain_id)\r\n\t\t{\r\n\t\t\tglobal $CFG;\r\n\t\t\tglobal $objSmarty;\r\n\t\t $banner_config = $this->getValue(\"background_enable\",$CFG['table']['temp_domaindetails'],\"domain_id='\".$this->filterInput($domain_id).\"'\");\r\n\t\t\tif($banner_config == 'On')\r\n\t\t\t\t$banner_config = 1;\r\n\t\t\telse\t\r\n\t\t\t $banner_config = 0;\r\n\t\t\t$objSmarty->assign('banner_config',$banner_config);\r\n\t\t}", "public function hasBanner(): bool\n {\n return $this->hasMedia($this->media_id);\n }", "public function isEnabled()\n {\n return Mage::getStoreConfigFlag('homesliders/general/enable');\n }", "function the_automobile_trigger_custom_css_action()\n {\n $the_automobile_enable_banner_overlay = the_automobile_get_option('enable_overlay_option');\n ?>\n <style type=\"text/css\">\n <?php\n /* Banner Image */\n if ( $the_automobile_enable_banner_overlay == 1 ){\n ?>\n body .hero-slider.overlay .slide-item .bg-image:before,\n body .inner-header-overlay{\n filter: alpha(opacity=85);\n opacity: .85;\n }\n <?php\n } ?>\n </style>\n\n <?php }", "function acf_is_plugin_active() {}", "public function astra_above_header_merged_enabled() {\n\t\t\treturn apply_filters( 'astra_above_header_merged_responsive', true );\n\t\t}", "function env_add_banner_styles() {\n\tglobal $post;\n\tif(function_exists('get_field')) {\n\t\t$header_type = get_field('header_type', $post->ID);\n\t\t$default_header = get_field('default_global_header', 'option');\n\t\tif (get_field('header_image', $post->ID) && $header_type === \"custom\") {\n\t\t\t$banner_imgurl = get_field('header_image', $post->ID); \n\t\t} else if($default_header === \"yes\") {\n\t\t\t$banner_imgurl = get_field('page_header_default_image', 'option');\n\t\t}\n\t\tif (get_field('space_from_top', $post->ID) !== \"\" && $header_type === \"custom\") {\n\t\t\t$banner_fromtop = get_field('space_from_top', $post->ID);\n\t\t} else if($default_header === \"yes\") {\n\t\t\t$banner_fromtop = get_field('page_header_text_space_from_top', 'option');\n\t\t}\n\t\tif (get_field('space_from_left', $post->ID) !== \"\" && $header_type === \"custom\") {\n\t\t\t$banner_fromleft = get_field('space_from_left', $post->ID);\n\t\t} else if($default_header === \"yes\") {\n\t\t\t$banner_fromleft = get_field('page_header_text_space_from_left', 'option');\n\t\t}\n\t\t//if (get_field('space_from_bottom', $post->ID)) { $banner_frombtm = get_field('space_from_bottom', $post->ID); } else { $banner_frombtm = get_field('page_header_text_space_from_bottom', 'option'); }\n\t\tif (get_field('header_text_width', $post->ID) && $header_type === \"custom\") {\n\t\t\t$banner_text_width = get_field('header_text_width', $post->ID);\n\t\t} else if($default_header === \"yes\") {\n\t\t\t$banner_text_width = get_field('page_header_text_width', 'option');\n\t\t}\n\t\t$banner_text_color = get_field('page_header_text_color', 'option');\n\t\t$center_banner_text = get_field('center_banner_text', $post->ID);\n\t\tif ($center_banner_text === 'yes' && $header_type === \"custom\") {\n\t\t\t$banner_text_center = $center_banner_text;\n\t\t\t$center_override = \"yes\";\n\t\t} else if($default_header === \"yes\" && $header_type === 'default') {\n\t\t\t$banner_text_center = get_field('page_header_center_text', 'option');\n\t\t\tif ($banner_text_center === \"yes\") { $center_override = \"yes\"; } else { $center_override = \"no\"; }\n\t\t}\n\t\tif ($center_banner_text === 'no' && $header_type === \"custom\") { $center_override = \"no\"; }\n\t\tif (get_field('space_from_top', $post->ID) != \"\" || get_field('space_from_left', $post->ID) != \"\" || get_field('space_from_bottom', $post->ID) != \"\") {\n\t\t\t$local_override = \"yes\";\n\t\t} else {\n\t\t\t$local_override = \"no\";\n\t\t}\n\t\tif (get_field('header_height', $post->ID) && $header_type === \"custom\") { $banner_height = get_field('header_height', $post->ID); } else { $banner_height = get_field('page_header_height', 'option'); }\n\t\t\n\t\t$footer_type = get_field('page_footer_type', $post->ID);\n\t\t$default_footer = get_field('default_global_footer', 'option');\n\t\tif (get_field('footer_image', $post->ID) && $footer_type === \"custom\") {\n\t\t\t$footer_banner_imgurl = get_field('footer_image', $post->ID); \n\t\t} else if($default_footer === \"yes\") {\n\t\t\t$footer_banner_imgurl = get_field('page_footer_default_image', 'option');\n\t\t}\n\t\tif (get_field('footer_space_from_top', $post->ID) !== \"\" && $footer_type === \"custom\") {\n\t\t\t$footer_banner_fromtop = get_field('footer_space_from_top', $post->ID);\n\t\t} else if($default_footer === \"yes\") {\n\t\t\t$footer_banner_fromtop = get_field('page_footer_text_space_from_top', 'option');\n\t\t}\n\t\tif (get_field('footer_space_from_left', $post->ID) !== \"\" && $footer_type === \"custom\") {\n\t\t\t$footer_banner_fromleft = get_field('footer_space_from_left', $post->ID);\n\t\t} else if($default_footer === \"yes\") {\n\t\t\t$footer_banner_fromleft = get_field('page_footer_text_space_from_left', 'option');\n\t\t}\n\t\t//if (get_field('space_from_bottom', $post->ID)) { $banner_frombtm = get_field('space_from_bottom', $post->ID); } else { $banner_frombtm = get_field('page_footer_text_space_from_bottom', 'option'); }\n\t\tif (get_field('footer_text_width', $post->ID) && $footer_type === \"custom\") {\n\t\t\t$footer_banner_text_width = get_field('footer_text_width', $post->ID);\n\t\t} else if($default_footer === \"yes\") {\n\t\t\t$footer_banner_text_width = get_field('page_footer_text_width', 'option');\n\t\t}\n\t\t$footer_banner_text_color = get_field('page_footer_text_color', 'option');\n\t\t$footer_center_banner_text = get_field('footer_center_banner_text', $post->ID);\n\t\tif ($footer_center_banner_text === 'yes' && $footer_type === \"custom\") {\n\t\t\t$footer_banner_text_center = $footer_center_banner_text;\n\t\t\t$footer_center_override = \"yes\";\n\t\t} else if($default_footer === \"yes\" && $footer_type === 'default') {\n\t\t\t$footer_banner_text_center = get_field('page_footer_center_text', 'option');\n\t\t\tif ($footer_banner_text_center === \"yes\") { $footer_center_override = \"yes\"; } else { $footer_center_override = \"no\"; }\n\t\t}\n\t\tif ($footer_center_banner_text === 'no' && $footer_type === \"custom\") { $footer_center_override = \"no\"; }\n\t\tif (get_field('footer_space_from_top', $post->ID) != \"\" || get_field('footer_space_from_left', $post->ID) != \"\" || get_field('footer_space_from_bottom', $post->ID) != \"\") {\n\t\t\t$footer_local_override = \"yes\";\n\t\t} else {\n\t\t\t$footer_local_override = \"no\";\n\t\t}\n\t\tif (get_field('footer_height', $post->ID) && $footer_type === \"custom\") { $footer_banner_height = get_field('footer_height', $post->ID); } else { $footer_banner_height = get_field('page_footer_height', 'option'); }\n\t\t?>\n<style>\n\t#page_header #header_text {\n\t\t<?php if ($banner_text_width) { echo 'width: ' . $banner_text_width . '; '; }\n\t\tif ($center_override != \"yes\") {\n\t\t\tif ($banner_fromtop !== \"\" && $banner_imgurl) { echo 'top: ' . $banner_fromtop . '; '; }\n\t\t\t//if ($banner_frombtm && $banner_imgurl) { echo 'bottom: ' . $banner_frombtm . '; '; }\n\t\t\tif ($banner_fromtop !== \"\" && !$banner_imgurl) { echo 'margin-top: ' . $banner_fromtop . '; '; }\n\t\t\t//if ($banner_frombtm && !$banner_imgurl && $local_override == \"yes\") { echo 'margin-bottom: ' . $banner_frombtm . '; '; }\n\t\t\tif ($banner_fromleft !== \"\" && $banner_text_width !== \"100%\") { echo 'left: ' . $banner_fromleft . '; '; }\n\t\t\t\telse if ($banner_fromleft !== \"\") { echo 'padding-left: ' . $banner_fromleft . ';'; }\n\t\t}\n\t\tif (($center_override == 'yes') || ( $banner_text_center == \"yes\" && $local_override == \"no\")) {\n\t\t\techo 'text-align: center;';\n\t\t}\n\t\tif ($banner_text_color) { echo 'color: ' . $banner_text_color . '; '; } ?>\n\t}\n\t<?php if (($center_override == 'yes') || ( $banner_text_center == \"yes\" && $local_override == \"no\")) { ?>\n\t\t@media screen and (min-width: 640px) {\n\t\t\t#page_header.with_bg #header_text {\n\t\t\t\ttop: 50%; transform: translateY(-50%); position: absolute;\n\t\t\t}\n\t\t}\n\t<?php } ?>\n\t<?php if($banner_height) { ?>\n\t\t#page_header .row, #page_header.with_bg .row { min-height: <?php echo $banner_height*0.7; ?>px; } @media screen and (min-width: 640px) { #page_header .row, #page_header.with_bg .row { min-height: <?php echo $banner_height; ?>px; } }\n\t<?php }\n\tif (($center_override == 'yes') || ( $banner_text_center == \"yes\" && $local_override == \"no\")) { ?>\n\t\t#header_text h1, #header_text h2, #header_text h3, #header_text h4, #header_text h5, #header_text h6, #header_text p, #header_text div { text-align: center!important; <?php echo $banner_text_color ?> }\n\t<?php } else if($banner_text_color) { ?>\n\t\t#header_text h1, #header_text h2, #header_text h3, #header_text h4, #header_text h5, #header_text h6, #header_text p, #header_text div { <?php echo $banner_text_color ?> }\n\t<?php } ?>\n\t\t#header_text a { <?php echo $banner_text_color ?> text-decoration: underline; }\n\t\n\t#page_footer #footer_text {\n\t\t<?php if ($banner_text_width) { echo 'width: ' . $banner_text_width . '; '; }\n\t\tif ($center_override != \"yes\") {\n\t\t\tif ($footer_banner_fromtop !== \"\" && $footer_banner_imgurl) { echo 'top: ' . $footer_banner_fromtop . '; '; }\n\t\t\t//if ($banner_frombtm && $banner_imgurl) { echo 'bottom: ' . $banner_frombtm . '; '; }\n\t\t\tif ($footer_banner_fromtop !== \"\" && !$footer_banner_imgurl) { echo 'margin-top: ' . $footer_banner_fromtop . '; '; }\n\t\t\t//if ($banner_frombtm && !$banner_imgurl && $local_override == \"yes\") { echo 'margin-bottom: ' . $banner_frombtm . '; '; }\n\t\t\tif ($footer_banner_fromleft !== \"\" && $footer_banner_text_width !== \"100%\") { echo 'left: ' . $footer_banner_fromleft . '; '; }\n\t\t\t\telse if ($footer_banner_fromleft !== \"\") { echo 'padding-left: ' . $footer_banner_fromleft . ';'; }\n\t\t}\n\t\tif (($footer_center_override == 'yes') || ( $footer_banner_text_center == \"yes\" && $footer_local_override == \"no\")) {\n\t\t\techo 'text-align: center;';\n\t\t}\n\t\tif ($footer_banner_text_color) { echo 'color: ' . $footer_banner_text_color . '; '; } ?>\n\t}\n\t<?php if (($footer_center_override == 'yes') || ( $footer_banner_text_center == \"yes\" && $footer_local_override == \"no\")) { ?>\n\t\t@media screen and (min-width: 640px) {\n\t\t\t#page_footer.with_bg #footer_text {\n\t\t\t\ttop: 50%; transform: translateY(-50%); position: absolute;\n\t\t\t}\n\t\t}\n\t<?php } ?>\n\t<?php if($footer_banner_height) { ?>\n\t\t#page_footer .row, #page_footer.with_bg .row { min-height: <?php echo $footer_banner_height*0.7; ?>px; } @media screen and (min-width: 640px) { #page_footer .row, #page_footer.with_bg .row { min-height: <?php echo $footer_banner_height; ?>px; } }\n\t<?php }\n\tif (($footer_center_override == 'yes') || ( $footer_banner_text_center == \"yes\" && $footer_local_override == \"no\")) { ?>\n\t\t#footer_text h1, #footer_text h2, #footer_text h3, #footer_text h4, #footer_text h5, #footer_text h6, #footer_text p, #footer_text div { text-align: center!important; <?php echo $footer_banner_text_color ?> }\n\t<?php } else if($footer_banner_text_color) { ?>\n\t\t#footer_text h1, #footer_text h2, #footer_text h3, #footer_text h4, #footer_text h5, #footer_text h6, #footer_text p, #footer_text div { <?php echo $footer_banner_text_color ?> }\n\t<?php } ?>\n\t\t#footer_text a { <?php echo $footer_banner_text_color ?> text-decoration: underline; }\n</style>\n\t\t<?php \n\t}\n}", "function avia_is_overview()\n\t{\n\t\tglobal $avia_config;\n\t\t$result = true;\n\n\t\tif (is_singular())\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\n\t\tif(is_front_page() && avia_get_option('frontpage') == avia_get_the_ID())\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\n\t\tif (isset($avia_config['avia_is_overview']))\n\t\t{\n\t\t\t$result = $avia_config['avia_is_overview'];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function astra_below_header_merged_enabled() {\n\t\t\treturn apply_filters( 'astra_below_header_merged_responsive', true );\n\t\t}", "function aton_qodef_load_blog_assets() {\n\t\treturn aton_qodef_is_blog_template() || is_home() || is_single() || aton_qodef_has_blog_shortcode() || is_archive() || is_search() || aton_qodef_has_blog_widget();\n\t}", "public function is_plugin_settings() {\n\t\treturn $this->is_payment_gateway_configuration_page( self::GATEWAY_CLASS_NAME );\n\t}", "private function has_top_bar() {\n\n\t\t// Return true by default\n\t\t$return = true;\n\n\t\t// Return false if disabled via Customizer\n\t\tif ( ! get_theme_mod( 'top_bar', true ) ) {\n\t\t\t$return = false;\n\t\t}\n\n\t\t// Return false if disabled via post meta\n\t\tif ( 'on' == get_post_meta( $this->post_id, 'pluton_disable_top_bar', true ) ) {\n\t\t\t$return = false;\n\t\t}\n\n\t\t// Return false if disabled via post meta\n\t\tif ( 'enable' == get_post_meta( $this->post_id, 'pluton_disable_top_bar', true ) ) {\n\t\t\t$return = true;\n\t\t}\n\n\t\t// Apply filers and return\n\t\treturn apply_filters( 'pluton_is_top_bar_enabled', $return );\n\n\t}", "function pagesBanner($args = null)\n{\n //php logic will live here\n if(!$args['photo']){\n if(get_field('page_banner_background_image')){\n $args['photo'] = get_field('page_banner_background_image');\n\n } else{\n $args['photo'] = get_theme_file_uri('/assests/img/raw/adobephotos/bag-banner2DT.jpg');\n }\n }\n\n ?>\n <!--HTML Code lives here-->\n <!--Site Banner-->\n <div class=\"banner-wrapper\">\n <img class=\"banner_img\"\n src=\"<?php echo $args['photo']?>\"\n srcset=\"<?php echo $args['photo']?> 1050w, \n <?php echo $args['photo']?> 3000w\" \n sizes=\"(min-width: 1024px) 1050w, 3000w\" \n alt=\"Banner Image\"\n > \n </div>\n <?php\n }", "function affinity_mikado_load_blog_assets() {\n\t\treturn affinity_mikado_is_ajax_enabled() || affinity_mikado_is_blog_template() || is_home() || is_single() || affinity_mikado_has_blog_shortcode() || is_archive() || is_search() || affinity_mikado_has_blog_widget();\n\t}", "function themify_theme_do_not_exclude_all( $area = 'header' ) {\n\t\tif ( 'mobile-menu' == $area ) {\n\t\t\treturn themify_theme_show_area( 'search_form' ) || themify_theme_show_area( 'social_widget' ) || themify_theme_show_area( 'rss' ) || themify_theme_show_area( 'menu_navigation' );\n\t\t} elseif ( 'header' == $area ) {\n\t\t\treturn themify_theme_show_area( 'site_logo' ) || themify_theme_show_area( 'site_tagline' ) || themify_theme_show_area( 'search_form' ) || themify_theme_show_area( 'social_widget' ) || themify_theme_show_area( 'rss' ) || themify_theme_show_area( 'menu_navigation' );\n\t\t}\n\t\treturn false;\n\t}", "static function wcfm_wc_accommodation_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-accommodation-bookings/woocommerce-accommodation-bookings.php', self::$active_plugins ) || array_key_exists( 'woocommerce-accommodation-bookings/woocommerce-accommodation-bookings.php', self::$active_plugins );\n\t\treturn false;\n\t}", "function ba_ads_init() {\n\n register_setting('ba_theme_ads', 'ba_ad_top'); // Options group, option name\n register_setting('ba_theme_ads', 'ba_ad_middle');\n register_setting('ba_theme_ads', 'ba_ad_bottom');\n\n\n add_settings_section(\n 'ba_ads_section', // Section ID\n __('Ads'), // Section title\n 'ba_ads_cb', // Section callback function\n 'ba_theme_ads' // Options group\n );\n}", "public function setInBanner(): void\n {\n $this->banner = true;\n }", "private function gateway_enabled()\n {\n return (($this->get_option('enabled') == 'yes') &&\n !empty($this->cin) &&\n !empty($this->user) &&\n !empty($this->entity) &&\n !empty($this->country) &&\n !empty($this->language) &&\n ($this->use_multibanco || $this->use_credit_card || $this->use_boleto) &&\n $this->is_valid_for_use()) ? 'yes' : 'no';\n }", "public function plugin_activate()\n {\n// if (!get_option('car-ads')) {\n// update_option('car-ads', [\n// 'single_slug' => 'bil',\n// 'archive_slug' => 'brugte-biler'\n// ]);\n// }\n// if (!get_option('car-ads-single-car')) {\n// update_option('car-ads-single-car', [\n// 'show_back_to_archive' => 'no',\n// ]);\n// }\n// if (!get_option('car-ads-archive')) {\n// update_option('car-ads-archive', [\n// 'includeDisabled' => 'yes',\n// 'includeDisabledSince' => '7',\n// 'showLocation' => 'yes',\n// ]);\n// }\n// if (!get_option('car-ads-cpt')) {\n// update_option('car-ads-cpt', [\n// 'cpt_medarbejdere' => 'inactive',\n// 'cpt_tilbud' => 'inactive',\n// ]);\n// }\n\n }", "public function is_plugin_settings() {\n\n\t\treturn SV_WC_Plugin_Compatibility::is_payment_gateway_configuration_page( $this->gateway_class_name );\n\t}", "public function displayAd() {\n $domain_settings = $this->getDomainSettingsObject();\n \n if ($domain_settings && array_key_exists(\"enable_ads\", $domain_settings) && $domain_settings[\"enable_ads\"]) {\n return true;\n }\n \n return false;\n }", "function talemy_output_content_banner() {\n get_template_part( 'templates/content-banner' );\n }", "function wpabstracts_disable_adminbar() {\n if(get_option('wpabstracts_show_adminbar') == 'Yes'){\n\treturn true;\n }\n return false;\n}", "function pluton_cac_has_background_image() {\n\treturn get_theme_mod( 'background_image' );\n}", "function thb_is_lightbox_enabled() {\n\t\t$enabled = thb_get_option( 'enable_lightbox' ) == '1';\n\n\t\treturn apply_filters( 'thb_is_lightbox_enabled', $enabled );\n\t}", "function area2()\n\t{\n\t\tglobal $siteRoot;\n\t\t$this->title = \"Support WebDKP and Disable Advertisements!\";\n\t\t$this->border = 1;\n\n\t\treturn $this->fetch(\"ads.tmpl.php\");\n\t}", "function bjorn_header_promo_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "function getBannerEnableForSubdomain($domain_id)\r\n\t\t{\r\n\t\t\tglobal $CFG;\r\n\t\t\tglobal $objSmarty;\r\n\t\t $banner_config = $this->getValue(\"background_enable\",$CFG['table']['domaindetails'],\"domain_id='\".$this->filterInput($domain_id).\"'\");\r\n\t\t\tif($banner_config == 'On')\r\n\t\t\t\t$banner_config = 1;\r\n\t\t\telse\t\r\n\t\t\t $banner_config = 0;\r\n\t\t\t$objSmarty->assign('sub_banner_config',$banner_config);\r\n\t\t}", "function mad_display_sidebar() {\n if (\n is_404() ||\n is_front_page() && 'page' == get_option('show_on_front') ||\n is_product() ||\n is_checkout()\n ) {\n return false;\n } else {\n return true;\n }\n}", "public static function is_ga_only() {\n\t\t$ga_options = get_option( 'gravityformsaddon_GFGAET_UA_settings', false );\n\t\tif ( ! isset( $ga_options[ 'mode' ] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( 'ga' == $ga_options[ 'mode' ] ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function bjorn_header_promo2_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner2_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'cache-enabler/cache-enabler.php' );\n\t}", "function reblogs_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Reblogs are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param bool $option Are Reblogs enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_reblogging_enabled_sitewide', ! get_option( 'disabled_reblogs' ) );\n\t}", "public function is_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Likes are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $option Are Likes enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_enabled_sitewide', ! Jetpack_Options::get_option_and_ensure_autoload( 'disabled_likes', 0 ) );\n\t}", "public static function enabled()\n {\n return api_get_setting('use_custom_pages') == 'true';\n }", "function give_stripe_show_connect_banner() {\n\n\t$status = true;\n\t$stripe_payment_methods = array( 'stripe', 'stripe_ach', 'stripe_google_pay', 'stripe_apple_pay', 'stripe_ideal' );\n\t$is_any_stripe_gateway_active = array_map( 'give_is_gateway_active', $stripe_payment_methods );\n\n\t// Don't show banner, if all the stripe gateways are disabled.\n\tif ( ! in_array( true, $is_any_stripe_gateway_active, true ) ) {\n\t\t$status = false;\n\t}\n\n\t// Don't show if already connected.\n\tif ( give_stripe_is_connected() ) {\n\t\t$status = false;\n\t}\n\n\t$hide_on_pages = array( 'give-about', 'give-getting-started', 'give-credits', 'give-addons' );\n\n\t// Don't show if on the about page.\n\tif ( in_array( give_get_current_setting_page(), $hide_on_pages, true ) ) {\n\t\t$status = false;\n\t}\n\n\t$hide_on_sections = array( 'stripe-settings', 'gateways-settings', 'stripe-ach-settings' );\n\t$current_section = give_get_current_setting_section();\n\n\t// Don't show if on the payment settings section.\n\tif (\n\t\t'gateways' === give_get_current_setting_tab() &&\n\t\t(\n\t\t\tempty( $current_section ) ||\n\t\t\tin_array( $current_section, $hide_on_sections, true )\n\t\t)\n\t) {\n\t\t$status = false;\n\t}\n\n\t// Don't show for non-admins.\n\tif ( ! current_user_can( 'update_plugins' ) ) {\n\t\t$status = false;\n\t}\n\n\t/**\n\t * This filter hook is used to decide whether the connect button banner need to be displayed or not.\n\t *\n\t * @since 2.5.0\n\t */\n\t$status = apply_filters( 'give_stripe_connect_banner_status', $status );\n\n\t// Bailout, if status is false.\n\tif ( false === $status ) {\n\t\treturn $status;\n\t}\n\n\t$connect_link = give_stripe_connect_button();\n\n\t// Default message.\n\t$main_text = __( 'The Stripe gateway is enabled but you\\'re not connected. Connect to Stripe to start accepting credit card donations directly on your website.', 'give' );\n\n\t/**\n\t * This filter hook is used to change the text of the connect banner.\n\t *\n\t * @param string $main_text Text to be displayed on the connect banner.\n\t *\n\t * @since 2.5.0\n\t */\n\t$main_text = apply_filters( 'give_stripe_change_connect_banner_text', $main_text );\n\n\t$message = sprintf(\n\t\t/* translators: 1. Main Text, 2. Connect Link */\n __( '<p><strong>Stripe Connect:</strong> %1$s </p>%2$s', 'give' ),\n\t\t$main_text,\n\t\t$connect_link\n\t);\n\n\t// Register Notice.\n\tGive()->notices->register_notice( array(\n\t\t'id' => 'give-stripe-connect-banner',\n\t\t'description' => $message,\n\t\t'type' => 'warning',\n\t\t'dismissible_type' => 'user',\n\t\t'dismiss_interval' => 'shortly',\n\t) );\n}", "public function enable_module() {\n\t\trequire_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );\n\t\treturn is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) || is_plugin_active('bb-plugin/fl-builder.php');\n\t}", "public function isDisplayBillingOnPaymentPageAvailable(): bool\n {\n return (bool)$this->scopeConfig->getValue(\n //Configuration value of whether to display billing address on payment method or payment page\n 'checkout/options/display_billing_address_on',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "function sydney_wc_archive_check() {\n if ( is_shop() || is_product_category() || is_product_tag() ) {\n return true;\n } else {\n return false;\n }\n}", "public function checkIfPluginToBeUsed()\n {\n $boxalinoGlobalPluginStatus = Mage::helper('core')->isModuleOutputEnabled('Boxalino_Intelligence');\n if($boxalinoGlobalPluginStatus)\n {\n if(Mage::helper('boxalino_intelligence')->isPluginEnabled())\n {\n\n return true;\n }\n }\n\n return false;\n }", "public function _banner() {\n $this->options['banner']['enabled'] = true;\n return $this;\n }", "public function gatewayEnabled()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['2co_id']) && !empty($modSettings['2co_password']);\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Baniwal_OwlCarouselSlider::owlcarouselslider_custom_banners');\n }", "function _enabledTracking()\n\t{\n\t\tglobal $ilias;\n\n\t\t$status = $ilias->getSetting(\"enable_tracking\");\n\n\t\treturn ($status == UT_ACTIVE_UT) || ($status == UT_ACTIVE_BOTH);\n\t}", "function gnj_can_be_displayed()\n{\n $return = false;\n\n if (\n (is_active_widget(false, false, 'gnj-woo-ajax-navigation', true) ||\n is_active_widget(false, false, 'gnj-woo-ajax-navigation-sort-by', true) ||\n is_active_widget(false, false, 'gnj-woo-ajax-navigation-stock-on-sale', true) ||\n is_active_widget(false, false, 'gnj-woo-ajax-navigation-list-price-filter', true)) &&\n (is_shop() || defined('SHOP_IS_ON_FRONT') || is_product_taxonomy() || is_product_category())\n ) {\n $return = true;\n }\n\n return $return;\n}", "function is_available() {\n\t\tglobal $woocommerce;\n\t\t\n\t\tif ( !$this->enabled )\n\t\t\treturn false;\n\t\t\t\n\t\tif($this->debug)\n\t\t\t$woocommerce->add_message('Aramex is enabled<br />');\n\n\t\tif (isset($woocommerce->cart->cart_contents_total) && isset($this->min_amount) && $this->min_amount && $this->min_amount > $woocommerce->cart->cart_contents_total)\n\t\t\treturn false;\n\n\t\tif (!$this->origin_postalcode):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$ship_to_countries = '';\n\n\t\tif ($this->availability == 'specific') :\n\t\t\t$ship_to_countries = $this->countries;\n\t\telse :\n\t\t\tif (get_option('woocommerce_allowed_countries') == 'specific') :\n\t\t\t\t$ship_to_countries = get_option('woocommerce_specific_allowed_countries');\n\t\t\tendif;\n\t\tendif;\n\n\t\tif (is_array($ship_to_countries)) :\n\t\t\tif (!in_array($woocommerce->customer->get_shipping_country(), $ship_to_countries))\n\t\t\t\treturn false;\n\t\tendif;\n\n\t\treturn true;\n\t}", "public function isBackendArea()\n {\n try {\n $isBackend = false;\n $areaCode = $this->state->getAreaCode();\n if ($areaCode == FrontNameResolver::AREA_CODE) {\n $isBackend = true;\n }\n } catch (\\Exception $e) {\n $isBackend = false;\n }\n return $isBackend;\n }", "public function isEnabled(){\n return (sfConfig::get(\"app_pinba_enabled\") && extension_loaded('pinba'));\n }", "public static function isEnabled()\n\t{\n\t\treturn defined('ICL_SITEPRESS_VERSION');\n\t}", "public function check_blog_enable()\n {\n global $CFG;\n\n if ($CFG->enableblogs == 1) {\n return true;\n }\n }", "public static function is_active(){\n\t\t$active = false;\n\t\tif(self::jb_exists()){\n\t\t\t$opt = get_option('tp_eg_use_lightbox', 'false');\n\t\t\tif($opt === 'jackbox') $active = true;\n\t\t}\n\t\t\n\t\treturn apply_filters('essgrid_is_active', $active);\n\t}", "function wcbm_validate_admin_init()\n{\n \n if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) && (!function_exists( 'is_plugin_active_for_network' ) || !is_plugin_active_for_network( 'woocommerce/woocommerce.php' )) ) {\n add_action( 'admin_notices', 'wcbm_plugin_admin_notice' );\n } else {\n run_category_banner_management_for_woocommerce();\n }\n\n}", "function idealEnabled() {\n\t\t$db = & JFactory::getDBO();\n\t\t$sql = 'SELECT COUNT(id) FROM #__eb_payment_plugins WHERE name=\"os_ideal\" AND published=1';\n\t\t$db->setQuery($sql) ;\n\t\t$total = $db->loadResult() ;\n\t\tif ($total) {\n\t\t\trequire_once JPATH_COMPONENT.DS.'payments'.DS.'ideal'.DS.'ideal.class.php';\n\t\t\treturn true ;\n\t\t} else {\n\t\t\treturn false ;\t\n\t\t}\t\t\t\n\t}", "function libero_mikado_load_blog_assets() {\n\t\treturn libero_mikado_is_blog_template() || is_home() || is_single() || libero_mikado_has_blog_shortcode() || is_archive() || is_search() || libero_mikado_has_blog_widget();\n\t}", "public function moduleEnabled(){\n\t\treturn Mage::getStoreConfig('vendors/config/active');\n\t}", "public function checkAdminBar() {\n if (AAM_Core_API::capabilityExists('show_admin_bar')) {\n if (!current_user_can('show_admin_bar')) {\n add_filter('show_admin_bar', '__return_false', PHP_INT_MAX );\n }\n }\n }", "function carolina_cart_banner(){ \n global $post;\n $image_url = get_field('cart_banner');\n if($image_url): ?>\n <div class=\"cart-banner\">\n <img src=\"<?php echo $image_url ?>\" alt=\"coupon\">\n </div>\n<?php endif;\n}", "function isMyArea(){\r\n\t\t\t\treturn $this -> _is_my_area;\r\n\t\t\t}", "public function isConfigured()\n {\n // being flagged.\n return false;\n }", "protected function isInstalledAndEnabled()\n {\n return $this->isPluginAvailable($this->identifier)\n && Settings::get('rainlab_blog_enabled', true);\n }", "function snax_slog_gdpr_enabled() {\n\t$enabled = 'standard' === get_option( 'snax_slog_gdpr_enabled', 'none' );\n\t$can_use = snax_can_use_plugin( 'wp-gdpr-compliance/wp-gdpr-compliance.php' );\n\n\treturn apply_filters( 'snax_slog_gdpr_enabled', $enabled && $can_use );\n}", "public static function enabled()\r\n\t{\r\n\t\tif(!function_exists('imagettfbbox'))\r\n\t \t{\r\n\t \t\treturn false;\r\n\t \t}\r\n\t \treturn true;\r\n\t}", "function maybe_disable_blog_options()\n\t{\n\t\treturn (get_option('show_on_front') !== 'page' || get_option('page_for_posts') < 1);\n\t}", "public function isConfigured ()\n\t{\n\t\treturn $this->isEnabled();\n\t}", "public static function isWellConfigured()\n {\n $shopGroupId = Stripe_official::getShopGroupIdContext();\n $shopId = Stripe_official::getShopIdContext();\n $mode = Configuration::get(self::MODE, null, $shopGroupId, $shopId);\n if ($mode == '1' && !empty(Configuration::get(self::TEST_PUBLISHABLE, null, $shopGroupId, $shopId))) {\n return true;\n } elseif ($mode == '0' && !empty(Configuration::get(self::PUBLISHABLE, null, $shopGroupId, $shopId))) {\n return true;\n }\n\n return false;\n }", "function firstone_banner_background()\r\n{\r\n\t?>\r\n\tstyle=\"<?php if (get_background_image()) : opacity:0.2; endif;?>\"\r\n\t<?php\r\n}", "private static function is_jetpack_staging_site()\n {\n }", "private function checkEnabled() {\n\t\t$this->enabled = @function_exists('wp_using_ext_object_cache')? (bool) @wp_using_ext_object_cache() : false;\n\t}", "public function canDisplay()\n {\n return $this->_qdnHelper->isToolbarAccessAllowed() && $this->_qdnHelper->isToolbarAreaAllowed($this->getArea());\n }", "public function needs_lightbox() {\n\t\t\treturn ! empty( $this->config['has_lightbox'] );\n\t\t}", "public function useRegion()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_USE_REGION);\n }", "public function canShowPhotoLightBox() {\n global $sitepagealbum_isLightboxActive;\n if (empty($sitepagealbum_isLightboxActive)) {\n return;\n } else {\n return SEA_SITEPAGEALBUM_LIGHTBOX;\n }\n }", "public function getInActiveBusinessAreaAttribute()\n {\n return config('system_settings.worldwide_business_area') ? TRUE : $this->active;\n }", "function ap_wpinc_adminwarndebug(){\r\n\tglobal $ap_wpincC;\r\n\t\r\n\t$options=$ap_wpincC->ap_get_option('array');\r\n\tif ( $options['debug'] == true ){\r\n\t\techo '<div class=\"error\" id=\"ap_wpinc_warn\"> \r\n<p><strong>WARNING:</strong> WP Include File <i>DEBUG mode</i> is enabled. Make sure to deactivate it before going live!</p></div>';\r\n\t}\r\n}", "public function maybe_add_is_in_visible_test_mode_option() {\n $current_version = get_option( 'laterpay_plugin_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n if ( get_option( 'laterpay_is_in_visible_test_mode' ) === false ) {\n add_option( 'laterpay_is_in_visible_test_mode', 0 );\n }\n }", "public function getShowRollbar()\n {\n if (Director::isLive() && Rollbar::config()->show_on_live && Rollbar::config()->show) {\n return true;\n }\n\n if (Director::isDev() && Rollbar::config()->show_on_dev && Rollbar::config()->show) {\n return true;\n }\n\n if (Director::isTest() && Rollbar::config()->show_on_test && Rollbar::config()->show) {\n return true;\n }\n\n return false;\n }", "public function isEnabled()\n {\n if ((bool) Mage::getStoreConfig('advanced/modules_disable_output/Yireo_GoogleTagManager')) {\n return false;\n }\n\n return (bool)$this->getConfigValue('active', false);\n }", "function plugin_backups_check_config(){\n return true;\n}", "function bjorn_header_center_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n // Show header banner\n if((isset($bjorn_theme_options['header_banner_editor'])) && ($bjorn_theme_options['header_banner_editor'] <> '') && (isset($bjorn_theme_options['header_banner_position'])) && ($bjorn_theme_options['header_banner_position'] == 'center')){\n bjorn_header_promo_show();\n }\n\n // Show header banner\n if((isset($bjorn_theme_options['header_banner2_editor'])) && ($bjorn_theme_options['header_banner2_editor'] <> '') && (isset($bjorn_theme_options['header_banner2_position'])) && ($bjorn_theme_options['header_banner2_position'] == 'center')){\n bjorn_header_promo2_show();\n }\n\n // Show header logo\n if((isset($bjorn_theme_options['header_logo_position'])) && ($bjorn_theme_options['header_logo_position'] == 'center')) {\n /* bjorn_logo_show(); #custom remove normal position of logo */\n }\n\n}", "public function isLandingEnabled($store = null) \n {\n return intval(Mage::getStoreConfig(static::XML_PATH_LANDING_ENABLED, $store));\n }", "private function isEnabled()\n {\n if (is_file(JPATH_SITE.'/components/com_magebridge/models/config.php')) {\n return true;\n }\n return false;\n }", "private static function has_enabled_additional_gateways()\n {\n }", "function cv_update_banner_settings( $post_id ) {\n\n global $canvys;\n\n // If the post is being autosaved, no need to update values\n if ( defined('DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return $post_id;\n }\n\n // Verify the nonce before proceeding.\n if ( ! isset( $_POST['cv_banner_settings_meta_box_nonce'] ) || ! wp_verify_nonce( $_POST['cv_banner_settings_meta_box_nonce'], 'cv_banner_settings_meta_box_update_action' ) ) {\n return $post_id;\n }\n\n $input = $_POST['_cv_banner_settings'];\n $clean = get_post_meta( $post_id, '_cv_banner_settings', true );\n if ( ! is_array( $clean ) ) $clean = array();\n\n /* Update Banner Display Settings\n ========================================= */\n\n if ( isset( $input['display'] ) ) {\n\n // Allowed banner settingss\n $allowed_display_settings = array( 'default', 'hide', 'custom' );\n\n // Validate Input\n $clean['display'] = cv_filter( $input['display'], $allowed_display_settings );\n\n }\n\n /* Update Show Crumbs\n ========================================= */\n\n // Validate Input\n $clean['show_crumbs'] = isset( $input['show_crumbs'] ) && $input['show_crumbs'] ? true : false;\n\n /* Update Typography Settings\n ========================================= */\n\n if ( isset( $input['text_style'] ) ) {\n\n // Allowed banner settingss\n $allowed_text_style_settings = array( 'inline', 'center', 'left', 'right', 'hidden' );\n\n // Validate Input\n $clean['text_style'] = cv_filter( $input['text_style'], $allowed_text_style_settings );\n\n }\n\n /* Update Style Scheme Setting\n ========================================= */\n\n if ( isset( $input['scheme_source'] ) ) {\n\n // Allowed banner settingss\n $allowed_scheme_source_settings = array( 'default', 'custom' );\n\n // Validate Input\n $clean['scheme_source'] = cv_filter( $input['scheme_source'], $allowed_scheme_source_settings );\n\n }\n\n /* Update Background Source\n ========================================= */\n\n if ( isset( $input['bg_image_source'] ) ) {\n\n // Allowed banner settingss\n $allowed_bg_image_source_settings = array( 'none', 'custom', 'preset' );\n\n // Validate Input\n $clean['bg_image_source'] = cv_filter( $input['bg_image_source'], $allowed_bg_image_source_settings );\n\n }\n\n /* Update Custom Background\n ========================================= */\n\n if ( isset( $input['bg_custom'] ) ) {\n\n // Validate Input\n $clean['bg_custom'] = cv_filter( $input['bg_custom'], 'integer' );\n\n }\n\n /* Update Overlay Opacity\n ========================================= */\n\n if ( isset( $input['overlay_opacity'] ) ) {\n\n // Allowed background image settings\n $allowed_overlay_opacity_settings = array( 'none' );\n\n for ( $i=10; $i<=90; $i+=10 ) {\n $allowed_overlay_opacity_settings[] = $i;\n }\n\n // Validate Input\n $clean['overlay_opacity'] = cv_filter( $input['overlay_opacity'], $allowed_overlay_opacity_settings );\n\n }\n\n /* Update Overlay Color\n ========================================= */\n\n if ( isset( $input['overlay_color'] ) ) {\n\n // Validate Input\n $clean['overlay_color'] = cv_filter( $input['overlay_color'], 'hex' );\n\n }\n\n /* Update Background Style\n ========================================= */\n\n if ( isset( $input['bg_style'] ) ) {\n\n // Allowed banner settingss\n $allowed_bg_style_settings = array( 'cover', 'tiled' );\n\n // Validate Input\n $clean['bg_style'] = cv_filter( $input['bg_style'], $allowed_bg_style_settings );\n\n }\n\n /* Update Background Preset\n ========================================= */\n\n if ( isset( $input['bg_preset'] ) ) {\n\n // Validate Input\n $clean['bg_preset'] = cv_filter( $input['bg_preset'], array_keys( $canvys['bg_patterns'] ) );\n\n }\n\n /* Update Background Attachment\n ========================================= */\n\n if ( isset( $input['bg_attachment'] ) ) {\n\n // Allowed banner settingss\n $allowed_bg_attachment_settings = array( 'fixed', 'scroll' );\n\n // Validate Input\n $clean['bg_attachment'] = cv_filter( $input['bg_attachment'], $allowed_bg_attachment_settings );\n\n }\n\n /* Update Background Color\n ========================================= */\n\n if ( isset( $input['bg_color'] ) ) {\n\n // Validate Input\n $clean['bg_color'] = cv_filter( $input['bg_color'], 'hex' );\n\n }\n\n /* Update typography Color\n ========================================= */\n\n if ( isset( $input['text_color'] ) ) {\n\n // Validate Input\n $clean['text_color'] = cv_filter( $input['text_color'], 'hex' );\n\n }\n\n /* Update custom height\n ========================================= */\n\n if ( isset( $input['custom_height'] ) ) {\n\n // Validate Input\n $clean['custom_height'] = cv_filter( $input['custom_height'], 'integer' );\n\n }\n\n /* Update Display Title\n ========================================= */\n\n if ( isset( $input['display_title'] ) ) {\n\n // Sanitize the value\n $display_title = strip_tags( $input['display_title'], '<b><u><i><strong>' );\n $display_title = stripslashes( $display_title );\n\n $clean['display_title'] = $display_title;\n\n }\n\n /* Update Description\n ========================================= */\n\n if ( isset( $input['display_description'] ) ) {\n\n // Sanitize the value\n $display_description = strip_tags( $input['display_description'], '<b><u><i><strong>' );\n $display_description = stripslashes( $display_description );\n\n $clean['display_description'] = $display_description;\n\n }\n\n // Finally, update the setting\n update_post_meta( $post_id, '_cv_banner_settings', $clean );\n\n}", "function st_blog_widget_blcok()\n\t{\n\t\tglobal $st_blog_customizer_all_values;\n\n\t\tif ( is_active_sidebar('full-width-widget') ) { ?>\n\t\t\t<!-- instagram -->\n\t\t\t<section class=\"st-blog-full-width-widget clearfix\" id=\"st-full-width\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<?php dynamic_sidebar('full-width-widget'); ?>\n\t\t\t\t</div>\t\t\t\n\t\t\t</section>\n\t\t<?php }\n\t}", "function ecommerce_test_mode()\n{\n\treturn get_option('ecommerce_test_mode')=='1';\n}", "function pageBanner($args = NULL) {\n if (!$args['title']){\n $args['title'] = get_the_title();\n }\n\n if (!$args['sub-title']){\n $args['sub-title'] = get_field('page_banner_subtitle');\n }\n\n\n// Here we want to check one if there is a photo in $args and to if anythings has been uploaded\n\n // So we are checkening if (!$args['photo']) there is a photo hardcoded in $args see page.php and 2\n // Secondly we want to see if there is a custom field page banner background image\n\n if (!$args['photo']) {\n if(get_field('page_banner_background_image')) {\n $args['photo'] = get_field('page_banner_background_image')['sizes']['pageBanner'];\n } else {\n $args['photo'] = get_theme_file_uri('/images/ocean.jpg');\n }\n\n }\n\n?>\n\n <div class=\"page-banner\">\n <div class=\"page-banner__bg-image\" style=\"background-image: url(<?php \n \n echo $args['photo'];\n\n // $pageBannerImage = get_field('page_banner_background_image');\n // echo $pageBannerImage['sizes']['pageBanner'];\n\n ?>);\"> \n </div>\n \n <div class=\"page-banner__content container container--narrow\">\n <h1 class=\"page-banner__title\"><?php echo $args['title'] ?></h1>\n <div class=\"page-banner__intro\">\n <p><?php echo $args['sub-title'] ?></p>\n </div>\n </div> \n </div>\n \n\n<?php }", "static function wcfm_wc_box_office_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-box-office/woocommerce-box-office.php', self::$active_plugins ) || array_key_exists( 'woocommerce-box-office/woocommerce-box-office.php', self::$active_plugins );\n\t\treturn false;\n\t}", "public function has_settings()\n {\n }", "public function payment_gateways_banner()\n {\n }", "public static function isBaseConfigured(): bool\n {\n return (bool) Config::get('backend.brand.enabled', false);\n }", "public function below_header_disable() {\n\t\t\tif ( Astra_Ext_Extension::is_active( 'advanced-headers' ) ) {\n\t\t\t\t// Below Header meta from the Advanced Headers.\n\t\t\t\t$below_header = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_layout_option( 'below-header-enabled' );\n\t\t\t\t// Below Header layout from the customizer.\n\t\t\t\t$below_header_layout = astra_get_option( 'below-header-layout' );\n\n\t\t\t\tif ( 'disabled' != $below_header_layout && ( Astra_Ext_Advanced_Headers_Markup::advanced_header_enabled() && ( is_front_page() && 'posts' == get_option( 'show_on_front' ) ) ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t} elseif ( 'enabled' != $below_header && 'disabled' != $below_header_layout && Astra_Ext_Advanced_Headers_Markup::advanced_header_enabled() ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "function is_plugin_section($args) {\n return $args['section'] == 'general';\n }", "function gregr_home_widget_test() {\n\n\tif ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) {\n\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_featured' );\t\t\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_middle' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_bottom' );\n\t}\n}" ]
[ "0.66828555", "0.64199406", "0.6316575", "0.62665373", "0.62583196", "0.5956985", "0.588412", "0.5842796", "0.5704131", "0.5655449", "0.5646243", "0.5605022", "0.56014496", "0.5570305", "0.5567539", "0.556516", "0.5562694", "0.55447996", "0.5529619", "0.55198205", "0.55164933", "0.5505655", "0.55053127", "0.54934114", "0.54871017", "0.54867685", "0.547948", "0.54773563", "0.54770637", "0.54694515", "0.54649585", "0.54508847", "0.54496753", "0.54471326", "0.5431774", "0.5418924", "0.54123694", "0.54070854", "0.5405739", "0.53975916", "0.5385503", "0.53785485", "0.5372677", "0.5355472", "0.53357047", "0.53343964", "0.53334945", "0.53092897", "0.53032583", "0.5296323", "0.5293287", "0.5283007", "0.5279515", "0.527852", "0.52756673", "0.52752286", "0.5272404", "0.52702534", "0.5269878", "0.5264517", "0.5264377", "0.52638745", "0.5261783", "0.52585745", "0.5255266", "0.5249382", "0.52392507", "0.52325755", "0.52302134", "0.52282715", "0.522235", "0.5221844", "0.52137864", "0.52132815", "0.519866", "0.5195696", "0.51951444", "0.5193857", "0.5193841", "0.5193339", "0.5190838", "0.518619", "0.51849085", "0.5179313", "0.5177632", "0.5176743", "0.5174314", "0.51733327", "0.51710737", "0.516756", "0.5167333", "0.51487994", "0.5148738", "0.5145231", "0.5144979", "0.5143339", "0.5143246", "0.514204", "0.51387", "0.5136137" ]
0.8371379
0
Get the banner image ID. First check immediate setting, then archive setting (if applicable), then fallback to default image.
Получите идентификатор баннерного изображения. Сначала проверьте непосредственное настройка, затем архивную настройку (если применимо), а затем используйте дефолтное изображение.
function mai_get_banner_id() { // Start of without an image $image_id = false; // Static front page if ( is_front_page() && $front_page_id = get_option( 'page_on_front' ) ) { $image_id = get_post_meta( $front_page_id, 'banner_id', true ); // If no image and featured images as banner is enabled if ( ! $image_id && mai_is_banner_featured_image_enabled() ) { $image_id = get_post_thumbnail_id( $front_page_id ); } } // Static blog page elseif ( is_home() && $posts_page_id = get_option( 'page_for_posts' ) ) { $image_id = get_post_meta( $posts_page_id, 'banner_id', true ); // If no image and featured images as banner is enabled if ( ! $image_id && mai_is_banner_featured_image_enabled( $posts_page_id ) ) { $image_id = get_post_thumbnail_id( $posts_page_id ); } } // Single page/post/cpt, but not static front page or static home page elseif ( is_singular() ) { $image_id = get_post_meta( get_the_ID(), 'banner_id', true ); // If no image and featured images as banner is enabled if ( ! $image_id && mai_is_banner_featured_image_enabled( get_the_ID() ) ) { $image_id = get_post_thumbnail_id( get_the_ID() ); } // Fallback if ( ! $image_id ) { // Get the post's post_type $post_type = get_post_type(); // Posts if ( 'post' === $post_type && ( $posts_page_id = get_option( 'page_for_posts' ) ) ) { $image_id = get_post_meta( $posts_page_id, 'banner_id', true ); } // CPTs elseif ( post_type_supports( $post_type, 'mai-cpt-settings' ) ) { // if ( mai_is_banner_featured_image_enabled( get_the_ID() ) ) { // $image_id = get_post_thumbnail_id( $posts_page_id ); // } // $image_id = $image_id ? $image_id : genesis_get_cpt_option( 'banner_id', $post_type ); $image_id = genesis_get_cpt_option( 'banner_id', $post_type ); } } } // Term archive elseif ( is_category() || is_tag() || is_tax() ) { // If WooCommerce product category if ( class_exists( 'WooCommerce' ) && is_tax( array( 'product_cat', 'product_tag' ) ) && ( $image_id = get_term_meta( get_queried_object()->term_id, 'thumbnail_id', true ) ) ) { // Woo uses it's own image field/key $image_id = $image_id; } else { // $image_id = get_term_meta( get_queried_object()->term_id, 'banner_id', true ); $image_id = mai_get_archive_setting( 'banner_id', false, false ); } } // CPT archive elseif ( is_post_type_archive() && post_type_supports( get_post_type(), 'mai-cpt-settings' ) ) { $image_id = genesis_get_cpt_option( 'banner_id' ); } // Author archive elseif ( is_author() ) { $image_id = get_the_author_meta( 'banner_id', get_query_var( 'author' ) ); } /** * If no banner, but we have a default, * use the default banner image. */ if ( ! $image_id ) { if ( $default_id = genesis_get_option( 'banner_id' ) ) { $image_id = absint( $default_id ); } } // Filter so devs can force a specific image ID $image_id = apply_filters( 'mai_banner_image_id', $image_id ); return $image_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_banner_images_id(){\n\treturn get_page_by_title( 'Banner Images', OBJECT, 'banner_images' )->ID;\n}", "public function getArchiveImageID()\n {\n return $this->getMeta('archive_image');\n }", "public function getBannerImage()\n {\n return $this->banner_image;\n }", "public function get_image_url() {\n\t\t$settings = $GLOBALS['WCCSP_Settings']->get_settings();\n\t\t$image_meta = wp_get_attachment_metadata( $settings['image_id'] );\n\t\t$size = isset( $image_meta['sizes']['wccsp_image_medium_rectangle'] ) ? 'wccsp_image_medium_rectangle' : 'full'; \n\t\t$image = wp_get_attachment_image_src( $settings['image_id'], $size );\n\t\t\n\t\treturn $image ? $image[0] : false;\n\t}", "public function get_current_image_option(){\n\t\treturn (int) $this->v_current_image_option;\n\t}", "private function discoverImageID() {\n\t\tif (is_null($this->image_id)) {\n\t\t\t$regx = 'var pictureSpecA = \"[^\"]*.fpx';\n\t\t\tif ($this->getItem($regx) == self::ITEM_OK) {\n\t\t\t\t$res = $this->getFetchedItem();\n\t\t\t\t$this->image_id = substr(strstr($res[0], '\"'), 1);\n\t\t\t}\n\t\t}\n\t}", "function getBannerAd() {\n return \"img/banner/\" . getBannerFromBackend();\n }", "function wd_get_image_id($locksmith_image_url) {\n global $wpdb;\n $locksmith_image_url = esc_sql( $locksmith_image_url );\n $locksmith_attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $locksmith_image_url ));\n if (isset($locksmith_attachment[0])) {\n \treturn $locksmith_attachment[0];\n }\n}", "public function image_id() {\n\t\t$image_id = get_post_thumbnail_id( $this->id() );\n\t\tif ( ! $image_id ) {\n\t\t\t$image_id = 0;\n\n\t\t\tif ( WPRM_Settings::get( 'recipe_image_use_featured' ) ) {\n\t\t\t\t$parent_image_id = get_post_thumbnail_id( $this->parent_post_id() );\n\n\t\t\t\tif ( $parent_image_id ) {\n\t\t\t\t\t$image_id = $parent_image_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $image_id;\n\t}", "public function getBreweryImageId(): ?int {\n\t\treturn($this->breweryImageId);\n\t}", "private static function wyz_get_img_id( $image_url ) {\n\t\tglobal $wpdb;\n\t\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t\treturn isset( $attachment[0] ) ? $attachment[0] : '';\n\t}", "public function getImageIdentifier()\n {\n return $this->route ? $this->route->get('imageIdentifier') : null;\n }", "function get_events_archive_image()\n{\n global $ffw_events_settings;\n\n $archive_image = isset( $ffw_events_settings['archive_image_url'] ) ? $ffw_events_settings['archive_image_url'] : '';\n \n return $archive_image;\n}", "public function getImageId() {\n\t\treturn ($this->imageId);\n\t}", "public function image_id( $format = '' )\r\n\t{\r\n\t\treturn $this->getVar( 'image_id', $format );\r\n\t}", "function cbv_get_image_src( $id, $size = 'full' ){\n if( isset( $id ) ){\n $afbeelding = wp_get_attachment_image_src($id, $size, false );\n if( is_array( $afbeelding ) && isset( $afbeelding[0] ) ){\n return $afbeelding[0];\n }\n }\n return false;\n}", "function cbv_get_image_src( $id, $size = 'full' ){\n if( isset( $id ) ){\n $afbeelding = wp_get_attachment_image_src($id, $size, false );\n if( is_array( $afbeelding ) && isset( $afbeelding[0] ) ){\n return $afbeelding[0];\n }\n }\n return false;\n}", "public function getImageId() {\n\t\treturn($this->imageId);\n\t}", "public function getImageId()\n {\n $id = $this->getRequest()->getParams();\n $galleryId = $id['id']; // get id of gallery;\n $galleryCollection=$this->getLoadGalleryCollection();\n $gallery = $galleryCollection->load($galleryId);\n $str = $gallery->getImageId();\n $imageIdAll = explode(',', $str);\n $imageId=[];\n\n foreach ($imageIdAll as $image) {\n if ($this->getLoadImageCollection()->load($image)->getStatus()==0) { //just show what images are enable\n array_push($imageId, $image);\n }\n }\n\n return $imageId;\n }", "function gardenia_get_image_id($image_url) {\n\tglobal $wpdb;\n\t$gardenia_attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url )); \n return $gardenia_attachment[0]; \n}", "function image($id) {\n\t\t\t$image = $id;\n\t\t\tif ( -1 == $image ) {\n\t\t\t\t$image = get_template_directory_uri(). '/img/promo-placeholder.jpg';\n\t\t\t} else {\n\t\t\t\t$image = wp_get_attachment_url($id);\n\t\t\t}\n\t\t\techo($image);\n\t}", "function getImageId() {\n\t\treturn (string)$this->instance->instancesSet->item->imageId;\n\t}", "public function getDefaultImage()\n\t{\n\t\treturn $this->_default_image;\n\t}", "function glocal_get_site_image($site_id) {\n\t//store the current blog_id being viewed\n\tglobal $blog_id;\n\t$current_blog_id = $blog_id;\n\n\t//switch to the main blog designated in $site_id\n\tswitch_to_blog($site_id);\n\n\t$site_image = get_custom_header();\n\n\t//switch back to the current blog being viewed\n\tswitch_to_blog($current_blog_id);\n\n\treturn $site_image->thumbnail_url;\n}", "public function mainImage()\n {\n if ($this->images->isEmpty()) {\n return 'images/default-image.jpg';\n }\n\n return $this->images->where('ad_id', $this->id)->first()->path;\n }", "private function assign_list_row_advert_img() {\n\t\tglobal $adv_info_tbl;\n\t\t\t\t\n\t\t// loads advertiser image\n\t\tif(!empty($adv_info_tbl->image)) {\n\t\t\t$location_image = 'customers/'.$adv_info_tbl->image;\n\t\t} elseif(!empty($cats_tbl->image)) {\n\t\t\t$location_image = 'category/'.$cats_tbl->image;\n\t\t} else {\n\t\t\t$location_image = '';\n\t\t}\n\n\treturn $location_image;\n\t}", "public function image()\n {\n if ($image = $this->articleImage()) {\n return $image;\n }\n if ($image = $this->introImage()) {\n return $image;\n }\n\n return config('article.image');\n }", "public function getDefaultEquipmentImage($id) {\r\n try {\r\n $sql = 'SELECT * FROM equipment_image WHERE equipment_id = :id AND is_default = :default';\r\n $params = array(\r\n ':id' => $id,\r\n ':default' => true\r\n );\r\n $results = $this->conn->query($sql, $params);\r\n if (\\count($results) == 0) {\r\n return false;\r\n }\r\n\r\n return self::ExtractEquipmentImageFromRow($results[0]);\r\n } catch (\\Exception $e) {\r\n $this->logger->error(\"Failed to fetch image metadata with id '$id': \" . $e->getMessage());\r\n return false;\r\n }\r\n }", "function fb_image($id, $is_single) {\n // return first image\n if ($is_single) {\n $post = get_post($id);\n preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $images);\n if (!empty($images[1][0])) {\n return $images[1][0];\n }\n }\n\n // default to logo\n return bloginfo('template_url') . \"/images/logo.png\";\n}", "function zGetAttachmentIdByUrl($image_src) {\n global $wpdb;\n $query = $wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid = %s\", $image_src);\n $id = $wpdb->get_var($query);\n return (!empty($id)) ? $id : NULL;\n }", "function ssp_get_image_id_from_url( $image_url ) {\n\t\t$relative_image_url = str_replace( get_site_url(), '', $image_url );\n\t\tglobal $wpdb;\n\t\t// double escaped placeholder to allow for LIKE wildcard search\n\t\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid LIKE '%%%s%%' LIMIT 1;\", $relative_image_url ) );\n\n\t\treturn isset( $attachment[0] ) ? $attachment[0] : false;\n\t}", "function wcifd_get_id_by_img( $img_name ) {\n\tglobal $wpdb;\n\t$query = \"\n\t\tSELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'danea_img_name' AND meta_value = '$img_name'\n\t\";\n\t$results = $wpdb->get_results( $query, ARRAY_A );\n\n\treturn $results[0]['post_id'];\n}", "function get_image_id( $image_url ) {\n\tglobal $wpdb;\n\t$testString = wp_get_canonical_url() . $image_url;\n\t$imagesize = getimagesize( $testString );\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $testString ) );\n\n\treturn $attachment[0];\n}", "public function getBannerAssetId(): Snowflake\n {\n return $this->banner_asset_id;\n }", "private function assign_list_row_advert_img() {\n\t\tglobal $adv_info_tbl;\n\t\t\t\t\n\t\t// loads advertiser image\n\t\tif(!empty($adv_info_tbl->image)) {\n\t\t\t$location_image = 'customers/'.$adv_info_tbl->image;\n\t\t} else {\n\t\t\t$location_image = '';\n\t\t}\n\n\treturn $location_image;\n\t}", "public function get_image_id()\n {\n return $this->image_id;\n }", "public function getImageId ();", "public function getDefaultImage()\n {\n return $this->defaultImage;\n }", "public function getDefaultImage()\n {\n return $this->defaultImage;\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "public function banner()\n {\n if (!$asset = $this->asset('banner')) {\n return app(Image::class)->make('anomaly.module.addons::img/banner.jpg');\n }\n\n $extension = pathinfo($asset, PATHINFO_EXTENSION);\n\n return app(Image::class)->make(\n 'https://assets.pyrocms.com/marketplace/'\n . str_replace(['/', '_'], '-', $this->getName())\n . '-banner.' . $extension\n );\n }", "public function getIdImage()\n {\n return $this->idImage;\n }", "public function getIdImage()\n {\n return $this->idImage;\n }", "public function getBannerImageMobile()\n {\n return $this->banner_image_mobile;\n }", "public static function get() {\n\t\t$url = get_theme_mod( 'default-page-header-image' );\n\n\t\tif ( is_singular() ) {\n\t\t\t$_url = self::_get_singlular_page_header_image_url();\n\t\t} elseif ( is_home() || ( is_archive() && ! is_post_type_archive() ) ) {\n\t\t\tif ( is_category() ) {\n\t\t\t\t$_url = self::_get_category_page_header_image_url();\n\t\t\t}\n\n\t\t\tif ( empty( $_url ) ) {\n\t\t\t\t$_url = self::_get_blog_page_header_image_url();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $_url ) ) {\n\t\t\t$url = $_url;\n\t\t}\n\n\t\treturn $url;\n\t}", "public function getIdImage()\n {\n return $this->id_image;\n }", "function get_banner_background( $id )\n{\n\tif ( is_int( $id ) )\n\t{\n\t\t$html = '';\n\t\t$image = get_field('page_banner_background', $id);\n\n\t\tif($image != false)\n\t\t{\n\t\t\t$html .= 'style=\"background-image: url('.$image['url'].')\"';\n\t\t}\n\t}\n\techo $html;\n}", "function thb_get_post_format_image_id() {\n\t\treturn thb_get_featured_image_id();\n\t}", "function catch_that_image() {\n\tglobal $post, $posts;\n\t$first_img = '';\n\tob_start();\n\tob_end_clean();\n\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t$first_img = $matches [1] [0];\n\n\tif(empty($first_img)){ //Defines a default image\n\t\t$first_img = \"/images/default.jpg\";\n\t}\n\treturn $first_img;\n}", "public function getImageId()\n {\n return $this->imageId;\n }", "function get_attachment_id_from_src ($image_src) {\n\terror_log('in here 1 get_attachment_id_from_src');\n\tglobal $wpdb;\n\t$query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\n\t$id = $wpdb->get_var($query);\n\treturn $id;\n}", "function ImageSRC()\n\t{\treturn $this->imagelocation . (int)$this->id . \".jpg\";\n\t}", "function gp_get_image_id($image_url) {\n\tglobal $wpdb;\n\t$attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ));\n return $attachment[0];\n}", "function start_get_post_thumbnail_id( $post = null ) {\n\n\t// First, check for a real thumbnail, just in case.\n\tif ( $real_thumbnail_id = get_post_thumbnail_id( $post ) ) {\n\t\treturn $real_thumbnail_id;\n\t}\n\n\t// Get the post, or bail if we can't.\n\t$post = get_post( $post );\n\tif ( ! $post ) {\n\t\treturn '';\n\t}\n\n\t// First, check for a post-type-specific default thumbnail.\n\t$default_thumbnail_id = get_field( \"default_{$post->post_type}_thumbnail_id\", 'option' );\n\t// If no post-type-specific thumbnail option was found or set, then fall back\n\t// on the default thumbnail for Posts.\n\tif ( ! $default_thumbnail_id ) {\n\t\t$default_thumbnail_id = get_field( 'default_post_thumbnail_id', 'option' );\n\t}\n\n\treturn $default_thumbnail_id;\n}", "public function get_product_image_option(){\n\t\treturn (int) $this->v_product_image_option;\n\t}", "public function imageCacheIndependenOfStoreId()\n {\n return $this->lsr->getStoreConfig(\n LSR::IMAGE_CACHE_INDEPENDENT_OF_STORE_ID,\n $this->lsr->getCurrentStoreId()\n );\n }", "function wyz_get_image_id( $image_url ) {\n\tglobal $wpdb;\n\t$image_url = preg_replace(\"/^http:/i\", \"https:\", $image_url);\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\tif ( ! empty($attachment ) && ! empty($attachment[0] ) )\n\t return $attachment[0];\n\t$image_url = preg_replace(\"/^https:/i\", \"http:\", $image_url);\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\tif ( ! empty($attachment ) )\n\t return $attachment[0];\n\treturn array();\n}", "public function getImageId()\n {\n return $this->image_id;\n }", "public static function get_default_image() {\n\n\t\t// You can put here any url\n\t\treturn CLASSY_THEME_DIR . '/assets/noimage.png';\n\n\t}", "public function getImage()\n {\n return Mage::getBaseUrl('media') . $this->current_banner->getImage();\n }", "function get_attachment_id_by_url( $image_src ) {\r\n global $wpdb;\r\n $id \t= $wpdb->get_var( $wpdb->prepare(\r\n\t\t\t\t\t\"\r\n\t\t\t\t\t\tSELECT ID\r\n\t\t\t\t\t\tFROM $wpdb->posts\r\n\t\t\t\t\t\tWHERE guid = %s\r\n\t\t\t\t\t\",\r\n\t\t\t\t\t$image_src\r\n\t\t\t\t) );\r\n return ( !empty( $id ) ) ? $id : NULL;\r\n}", "public function getImageID()\n\t{\n\t\treturn $this->image_id;\n\t}", "public function getBannerImageUrl() \n {\n return $this->_bannerImageUrl; \n }", "function pearl_header_banner_image() {\n\n\n $background_repeat = 'no-repeat';\n $background_size = 'cover';\n $background_position = 'center-center';\n\n if (is_singular('post')) {\n $post_id = get_the_ID();\n $banner_image_id = get_post_meta($post_id, 'pearl_post_banner_image', true);\n if (!empty($banner_image_id)) {\n $background_url = wp_get_attachment_image_url($banner_image_id, 'full', false);\n } else {\n $background_url = get_option('pearl_banner_image', get_template_directory_uri() . '/img/sub-header-bg.jpg');\n }\n } else if (is_singular('portfolio')) {\n\n $background_url = get_option('pearl_portfolio_banner_image');\n\n if (empty($background_url)) {\n $background_url = get_option('pearl_banner_image', get_template_directory_uri() . '/img/sub-header-bg.jpg');\n }\n } else {\n\n if (is_home()) {\n $post_id = get_option('page_for_posts');\n } else {\n $post_id = get_the_ID();\n }\n\n $banner_image_id = get_post_meta($post_id, 'pearl_banner_image', true);\n\n if (!empty($banner_image_id)) {\n $background_url = wp_get_attachment_image_url($banner_image_id, 'full', false);\n } else {\n $background_url = get_option('pearl_banner_image', get_template_directory_uri() . '/img/sub-header-bg.jpg');\n }\n }\n\n\n echo 'background: url(' . esc_url($background_url) . '); ';\n echo 'background-repeat: ' . esc_html($background_repeat) . '; ';\n echo 'background-size: ' . esc_html($background_size) . '; ';\n echo 'background-position: ' . str_replace('-', ' ', esc_html($background_position)) . '; ';\n }", "function get_attachment_id ($image_src) {\r\n global $wpdb;\r\n $query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\r\n $id = $wpdb->get_var($query);\r\n return $id;\r\n }", "public function getForceDefaultImage()\n {\n return $this->forceDefaultImage;\n }", "function foundation_q_get_image_id($image_url) {\n global $wpdb;\n $attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ));\n return $attachment[0];\n}", "function add_featured_image_as_page_banner() {\n\n\n\tif(get_queried_object_id() == 0){\n\t\t$pagebanner = get_post_thumbnail_id( get_option( 'woocommerce_shop_page_id' ) );\n\n\t}else{\n\t\t$pagebanner = get_post_thumbnail_id( get_queried_object_id() );\n\n\t}\n\n\t$pagebanner_url = wp_get_attachment_image_src($pagebanner, full);\n\n\tif(!empty($pagebanner_url)){\n\t\techo $pagebanner_url[0];\n\t}\n\n}", "function getImg() {\n return $this->getConf('redissue.img') ?: 'lib/plugins/redissue/images/redmine.png' ;\n }", "function zTaxonomyImageID($term_id = NULL) {\n if (!$term_id) {\n if (is_category())\n $term_id = get_query_var('cat');\n elseif (is_tag())\n $term_id = get_query_var('tag_id');\n elseif (is_tax()) {\n $current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));\n $term_id = $current_term->term_id;\n }\n }\n \n $taxonomy_image_id = get_option('z_taxonomy_image_id'.$term_id);\n return $taxonomy_image_id;\n }", "function get_image_id_from_url ( $image_url )\n{\n\tglobal $wpdb;\n\n if ( !empty($image_url) )\n {\n $attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ));\n return $attachment[0];\n }\n}", "function get_ad_thumbnail_photo($ad_id)\n{\n $ci =& get_instance();\n $ci->db->select('img_1');\n $ci->db->where('id',$ad_id);\n $photo = $ci->db->get('ci_ads')->row_array()['img_1'];\n if($photo)\n return $photo;\n else\n return 'assets/img/user.jpg';\n}", "function graphene_get_header_image($post_id = NULL){\n global $graphene_settings;\n\n if ( is_singular() && has_post_thumbnail( $post_id ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'post-thumbnail' ) ) && $image[1] >= HEADER_IMAGE_WIDTH && !$graphene_settings['featured_img_header']) {\n $header_img = get_the_post_thumbnail( $post_id, 'post-thumbnail' );\n $header_img = explode('\" class=\"', $header_img);\n $header_img = $header_img[0];\n $header_img = explode('src=\"', $header_img);\n $header_img = $header_img[1]; // only the url\n }\n else if ($graphene_settings['use_random_header_img']){\n $default_header_images = graphene_nbcr_get_default_headers();\n $randomkey = array_rand($default_header_images);\n $header_img = str_replace('%s', get_stylesheet_directory_uri(), $default_header_images[$randomkey]['url']);\n } else {\n $header_img = get_header_image();\n }\nreturn $header_img;\n}", "function get_first_image() {\n\n\tglobal $post, $posts;\n\n\t$first_img = '';\n\tob_start();\n\tob_end_clean();\n\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t$first_img = $matches[1][0];\n\tif(empty($first_img)) { //Defines a default image\n\t\t$first_img = \"\";\n\t}\n\treturn $first_img;\n}", "protected function get_header_image_source() {\n\t\treturn get_post_meta( 'header_image', $this->container->post_id, true );\n\t}", "public function getBannerImageType() \n {\n return $this->_bannerImageType; \n }", "public function getImageId(): int {\n\t\treturn ($this->imageId);\n\t}", "protected function getImageId(): string\n {\n // We can safely use `getcwd()` even in a subdirectory.\n $git = new Repository(getcwd());\n $tag = $this->input->getOption('docker-tag');\n if (!$tag) {\n $tag = $git->getMainBranch()->getName();\n $this->output->writeln(\"<info>Docker tag not specified. Using current branch name: {$tag}</info>\");\n\n // We should be using the tag 'latest' if the current branch is 'master'.\n if ($tag == 'master') {\n $tag = 'latest';\n $this->output->writeln(\n \"<info>Using Docker tag 'latest' for branch 'master'.</info>\",\n OutputInterface::VERBOSITY_VERBOSE\n );\n }\n }\n\n // Throws an exception if the remote not found, so we don't have to.\n $remote = $git->getRemote($this->input->getOption('git-remote'), false);\n\n // Determine the image name (path) from the git remote URL.\n return $this->getImagePathFromRepoUrl($remote->getFetchURL(), $tag);\n }", "function elit_downloadable_is_image( $atts ) {\n $first_id = elit_downloadable_get_first_id( $atts['ids'] );\n\n return empty( $atts['display_id'] ) || $atts['display_id'] == $first_id;\n }", "function getBannerDefault()\n{\n\t$bannerdefaultarr=array(\"Y\",\"N\");\n\treturn $bannerdefaultarr;\n}", "function wpgrade_get_first_gallery_image_src($post_ID,$image_size) {\n\t$post_type = get_post_type($post_ID);\n\n\tswitch ($post_type) {\n\t\tcase wpgrade::shortname().'_portfolio':\n\t\t\t$gallery_ids = get_post_meta( $post_ID, wpgrade::prefix() . 'project_gallery', true );\n\t\t\tbreak;\n\t\tcase wpgrade::shortname().'_gallery':\n\t\t\t$gallery_ids = get_post_meta( $post_ID, wpgrade::prefix() . 'main_gallery', true );\n\t\t\tbreak;\n\t}\n\n\tif (!empty($gallery_ids)) {\n\t\t$gallery_ids = explode(',',$gallery_ids);\n\t} else {\n\t\t$gallery_ids = array();\n\t}\n\n\tif ( !empty($gallery_ids[0]) ) {\n\t\treturn wp_get_attachment_image_src($gallery_ids[0], $image_size);\n\t} else {\n\t\treturn null;\n\t}\n}", "public static function setting_default($setting_id)\n {\n switch ($setting_id)\n {\n case 1: return \"/img/reticle/crosshair-circle-red.png\";\n case 2: return \"FF0000FF\";\n case 3: return 2;\n }\n }", "protected function getCoverImageAlt() {\n $image_id = $this->variables['alt_image_campaign_cover_nid'];\n\n if ($image_id) {\n return $this->getCoverImage($image_id);\n }\n else {\n return NULL;\n }\n }", "public function getFallbackImage();", "function get_placeholder_image($id)\n{\n $src = wp_get_attachment_image_src($id, \"loader\")[0];\n return $src;\n}", "public function getProfileImageId() {\n $imageOrNull = $this->getProfileImage();\n if (false === is_null($imageOrNull)) {\n return $imageOrNull->getId();\n }\n\n return 0;\n }", "public function getRestaurantBannerAttribute()\n {\n $url = Config::get('app.url');\n $hungerpark = Str::contains($url, ['hungerpark']);\n $eatstation = Str::contains($url, ['eatstation']);\n if($eatstation)\n $url = 'https://eatstation.app/uploads/storeimage/';\n else if($eatstation)\n $url = 'https://hungerpark.com/uploads/storeimage/';\n else $url = 'https://spoongate.com/uploads/storeimage/';\n \n return $this->banner ? $url.$this->banner : $url.'image_default.png';\n }", "function getFirstImageID($p_intGalleryID) {\n\t \t$SQL = \"SELECT id FROM \". TABLEPREFIX .\"img \"\n\t \t\t\t.\" WHERE galleryID = \". $p_intGalleryID .\" ORDER BY id ASC LIMIT 0,1\";\n\t \t$FirstImageID = mysql_fetch_object(mysql_query($SQL));\n\t \treturn $FirstImageID->id;\n\t }", "public function get_leading_image($post_id) {\n\n\t\t$post_thumbnail = false;\n\t\tif (function_exists(\"get_the_post_thumbnail\")) {\n\t \t\t$post_thumbnail = get_the_post_thumbnail($post_id);\n\t\t}\n\t\tif ($post_thumbnail) {\n\t\t\t$images = strip_images($post_thumbnail);\n\t\t\tif (count($images) > 0) {\n\t\t\t\t$image = $images[0];\n\t\t\t\t$image['id'] = \"\";\n\t\t\t\treturn $image;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}", "protected function getDefaultInGallery()\n {\n return $this->defaultInGallery;\n }", "public function default_image($value = null)\n\t{\n\t\treturn $this->getter_setter('default_image', $value);\n\t}", "public function getDefaultImage()\n {\n return null;\n }", "public function bannerURL()\n\t{\n\t\tif( strlen($this->bannerURL) > 3 )\n\t\t{\n\t\t\treturn $this->bannerURL;\n\t\t}\n\t\treturn Config::defaultUserBanner;\n\t}", "function callFirstImg() {\r\n global $post, $posts;\r\n $first_img = '';\r\n ob_start();\r\n ob_end_clean();\r\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\r\n $first_img = $matches [1] [0];\r\n\r\n if(empty($first_img)){ //Defines a default image\r\n $first_img = \"/images/default.jpg\";\r\n }\r\n return $first_img;\r\n }", "function wp_get_image($key, $post_id = false)\n{\n $post_id = $post_id ? $post_id : get_the_ID();\n\n if ($post_id == 'options') {\n $image_id = get_option('options_'. $key);\n\n return json_decode(get_option('options_image_'. $image_id, true));\n }\n\n $image_id = get_post_meta($post_id, $key, true);\n\n return json_decode(get_post_meta($post_id, 'image_'. $image_id, true));\n}", "function catch_that_image() {\n global $post, $posts;\n $first_img = '';\n ob_start();\n ob_end_clean();\n $output = preg_match_all('/<img.+src=['\"]([^'\"]+)['\"].*>/i', $post->post_content, $matches);\n $first_img = $matches [1] [0];\n \n if(empty($first_img)){ //Defines a default image\n $first_img = \"/images/default.jpg\";\n }\n return $first_img;\n}", "function voa_get_blog_header_image($image, $blog_id) {\r\n global $wpdb;\r\n\r\n // sigh: no header specified\r\n if( is_null($image) ) return( VOA_DEFAULT_LOGO_URL );\r\n \r\n // okay: only one header uploaded\r\n if( $image !== \"random-uploaded-image\" ) return( $image );\r\n\r\n // otherwise: sigh, rotate through a random header\r\n $images = array();\r\n \r\n // get post IDs of possible headers\r\n $headers = $wpdb->get_results(sprintf(\r\n \"select * from wp_%s_postmeta where `meta_key`='_wp_attachment_is_custom_header'\",\r\n $blog_id\r\n ));\r\n \r\n // resolve them to URLs (post_content or guid)\r\n foreach( $headers as $header ) {\r\n $images[] = $wpdb->get_row(sprintf(\r\n \"select * from wp_%s_posts where ID=%s limit 1\",\r\n $blog_id,\r\n $header->post_id\r\n ));\r\n }\r\n \r\n // pick a random one, return URL\r\n $random = rand(0,count($images) - 1);\r\n return( $images[$random]->guid );\r\n}", "function ministry_featured_image( $id = null ) {\n if(has_post_thumbnail($id)) {\n return get_the_post_thumbnail_url($id);\n } elseif(get_field('ministry_featured_image', 'options') && get_field('ministry_featured_image', 'options')['url']) {\n return get_field('ministry_featured_image', 'options')['url'];\n } else {\n return get_field('default_featured_image', 'options')['url'];\n }\n }", "public function getImagePlaceholder()\n {\n return config('medialibrary.image_placeholder');\n }", "function pippin_get_image_id($image_url)\n{\n global $wpdb;\n $attachment = $wpdb->get_col($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url));\n return $attachment[0];\n}" ]
[ "0.6450492", "0.6387885", "0.60053325", "0.5939566", "0.5891544", "0.5864952", "0.5861757", "0.58474606", "0.5842442", "0.5817217", "0.5806644", "0.5797073", "0.57910264", "0.5786749", "0.57691866", "0.57554054", "0.57554054", "0.5750361", "0.574316", "0.574047", "0.5731793", "0.5714613", "0.5712006", "0.57050973", "0.5700446", "0.5697304", "0.5690412", "0.5671714", "0.5670345", "0.56628877", "0.56448257", "0.5636843", "0.56306994", "0.56290597", "0.5620662", "0.5610646", "0.5606491", "0.5601715", "0.5601715", "0.5599562", "0.5592833", "0.5591183", "0.5591183", "0.55888665", "0.55846083", "0.55651945", "0.5551826", "0.5548597", "0.5541522", "0.55365425", "0.5532958", "0.5531757", "0.5531441", "0.5529562", "0.5529382", "0.5527693", "0.5520904", "0.5520793", "0.55182534", "0.5507801", "0.55041146", "0.5498498", "0.54962826", "0.54880714", "0.5484499", "0.54806805", "0.5473881", "0.5466443", "0.546279", "0.5461559", "0.544451", "0.542661", "0.5421221", "0.54211456", "0.5419193", "0.5418363", "0.5412369", "0.5403032", "0.539379", "0.5390228", "0.538923", "0.53844965", "0.53824306", "0.5380111", "0.53799385", "0.5375279", "0.53743994", "0.53734106", "0.5370348", "0.53601015", "0.5350577", "0.5350188", "0.5348771", "0.53468215", "0.5346754", "0.5346553", "0.53375566", "0.5326051", "0.53257024", "0.53217053" ]
0.7392732
0
Get gutter size name from gutter value.
Получить имя размера поля из значения поля.
function mai_get_gutter_size( $gutter ) { switch ( (string) $gutter ) { case '0': case 'none': $size = '0'; break; case '5': case 'xxxs': $size = 'xxxs'; break; case '10': case 'xxs': $size = 'xxs'; break; case 'xs': $size = 'xs'; break; case '20': case 'sm': $size = 'sm'; break; case '30': case 'md': $size = 'md'; break; case '40': case 'lg': $size = 'lg'; break; case '50': case 'xl': $size = 'xl'; break; case '50': case 'xl': $size = 'xl'; break; case '60': case 'xxl': $size = 'xxl'; break; $size = '0'; } return $size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedSize(): string\n {\n $identifiers = [\n 'b',\n 'kb',\n 'mb',\n 'gb',\n 'tb'\n ];\n $cycle = 0;\n $unit = $this->size;\n\n while ($unit > 1024) {\n $unit = (double) $unit / 1024;\n $cycle++;\n }\n $unit = number_format($unit, 3);\n\n return \"{$unit} {$identifiers[$cycle]}\";\n }", "public function getNameSize()\n {\n return $this->nameSize;\n }", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function sizeAsString()\n\t\t{\n\t\t\tglobal $ibforums;\n\n\t\t\tif ($this->from_post_row)\n\t\t\t{\n\t\t\t\treturn sprintf($ibforums->lang['attachment_size_kb'], $this->size);\n\t\t\t}\n\t\t\t$sizes_strings = array(\n\t\t\t\t'attachment_size_b',\n\t\t\t\t'attachment_size_kb',\n\t\t\t\t'attachment_size_mb',\n\t\t\t\t'attachment_size_gb',\n\t\t\t);\n\n\t\t\t$out_size = $this->size;\n\t\t\t$i = 0;\n\t\t\twhile (($i < 4) && ($out_size >= 1024))\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$out_size /= 1024.0;\n\t\t\t}\n\n\t\t\treturn (sprintf($ibforums->lang[$sizes_strings[$i]], round($out_size, 2)));\n\n\t\t}", "public static function escapeSize($value)\n\t\t{\n\t\t\t$value = stripslashes($value);\n\n\t\t\tif (!is_numeric($value))\n\t\t\t\treturn \"Unknown\";\n\t\t\t\n\t\t\tif ($value >= 0 && $value <= 999999)\n\t\t\t{\n\t\t\t\tif ($value / 1024 >= 100)\n\t\t\t\t\treturn number_format($value/1024,0,\".\",\"\") .\".00 kb\";\n\t\t\t\telse\n\t\t\t\t\treturn number_format($value/1024,2,\".\",\"\") .\" kb\";\n\t\t\t}\n\t\t\telse if ($value >= 1000000 && $value <= 999999999)\n\t\t\t{\n\t\t\t\tif ($value / (1024 * 1000) >= 100)\n\t\t\t\t\treturn number_format($value/(1024*1000),0,\".\",\"\") .\".00 mb\";\n\t\t\t\telse\n\t\t\t\t\treturn number_format($value/(1024*1000),2,\".\",\"\") .\" mb\";\n\t\t\t}\n\t\t\telse if ($value >= 1000000000)\n\t\t\t\treturn number_format($value/(1024*1000000),2,\".\",\"\") .\" gb\";\n\n return \"Unknown\";\n\t\t}", "function format_size(): string {\n return JKNFormatting::filesize($this->size(), 1);\n }", "function getByteSize($value)\n {\n // Copied from craft\\helpers\\App::phpConfigValueInBytes()\n if (!preg_match('/(\\d+)(K|M|G)/i', $value, $matches)) {\n return (int)$value;\n }\n\n $value = (int)$matches[1];\n\n // Multiply!\n switch (strtolower($matches[2])) {\n case 'g':\n $value *= 1024;\n // no break\n case 'm':\n $value *= 1024;\n // no break\n case 'k':\n $value *= 1024;\n // no break\n }\n\n return $value;\n }", "public function getSize(): string\n {\n return $this->size;\n }", "public function size($value = null)\n\t{\n\t\tif ($value !== null)\n\t\t{\n\t\t\tif ($value < 1 OR $value > 512)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"The Gravatar icon size must be between 1 and 512 pixels\");\n\t\t\t}\n\t\t}\n\n\t\treturn $this->getter_setter('size', $value);\n\t}", "public function getSizeGb()\n {\n return $this->size_gb;\n }", "function get_syncare_size($feed_product) {\n\t\t$size = simpleXMLChildValue($feed_product, 'g:size');\n\t\tif ($size != 'kus' && $size != '1 kus') {\n\t\t\treturn ' ' . $size;\n\t\t}\n\t\treturn '';\n\t}", "public function getDiskGb()\n {\n return $this->disk_gb;\n }", "public static function size( $value, $unit = '' ) {\n\n\t\t// Trim the value.\n\t\t$value = trim( $value );\n\n\t\tif ( in_array( $value, array( 'auto', 'inherit', 'initial' ) ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// Return empty if there are no numbers in the value.\n\t\t// Prevents some CSS errors.\n\t\tif ( ! preg_match( '#[0-9]#', $value ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn self::number( $value ) . self::get_unit( $value, $unit );\n\t}", "public static function size($size)\n {\n $sizes = array(\"B\", \"KB\", \"MB\", \"GB\");\n $length = $size;\n $i = 0;\n\n while ($length >= 1024 && ($i + 1) < count($sizes)) {\n $i++;\n $length /= 1024;\n }\n\n return number_format($length, 2, \",\", \".\") . ' ' . $sizes[$i];\n }", "function phorum_phpcfgsize2bytes($val) {\n $val = trim($val);\n $last = strtolower($val{strlen($val)-1});\n switch($last) {\n // The 'G' modifier is available since PHP 5.1.0\n case 'g':\n $val *= 1024;\n case 'm':\n $val *= 1024;\n case 'k':\n $val *= 1024;\n }\n return $val;\n}", "function phorum_phpcfgsize2bytes($val) {\n $val = trim($val);\n $last = strtolower($val{strlen($val)-1});\n switch($last) {\n // The 'G' modifier is available since PHP 5.1.0\n case 'g':\n $val *= 1024;\n case 'm':\n $val *= 1024;\n case 'k':\n $val *= 1024;\n }\n return $val;\n}", "public static function size( $value, $fallback_unit = false ) {\n\n\t\t// Trim the value.\n\t\t$value = trim( $value );\n\n\t\tif ( in_array( $value, [ 'auto', 'inherit', 'initial' ], true ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// Return empty if there are no numbers in the value.\n\t\t// Prevents some CSS errors.\n\t\tif ( ! preg_match( '#[0-9]#', $value ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( false !== strpos( $value, 'calc' ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$unit = self::get_unit( $value );\n\t\tif ( $fallback_unit && '' === $unit ) {\n\t\t\t$unit = ( true === $fallback_unit ) ? 'px' : $fallback_unit;\n\t\t}\n\t\treturn self::number( $value ) . $unit;\n\n\t}", "public function formattedCapacity () {\n\t\t$unit = \"GB\";\n\t\t$value = $this->strg_capacity_gb;\n\t\t\n\t\tif ($value >= 1000) {\n\t\t\t$value = $value/1000;\n\t\t\t$unit = \"TB\";\n\t\t}\n\t\t\n\t\treturn $value.$unit;\n }", "public function getHumanSizeAttribute()\n {\n $size = (int) $this->size;\n\n if ($size >= 1 << 30) {\n return number_format($size / (1 << 30), 2).'GB';\n }\n\n if ($size >= 1 << 20) {\n return number_format($size / (1 << 20), 2).'MB';\n }\n\n if ($size >= 1 << 10) {\n return number_format($size / (1 << 10), 2).'KB';\n }\n\n return number_format($size).' bytes';\n }", "public function getTitleSize()\n {\n return $this->titleSize;\n }", "function format_size($size) {\n $label = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');\n for ($i = 0; $size >= 1024 && $i < ( count($label) - 1 ); $size /= 1024, $i++)\n ;\n return( round($size, 2) . \" \" . $label[$i] );\n }", "function GetStringSize($size) {\n\t$size=round($size/1024,2);\n\tif ($size>1024) {\n\t\t$size=round($size/1024,2).' MB';\n\t} else {\n\t\t$size=$size.' KB';\n\t}\n\treturn $size;\n}", "public function getDimension(): string\n {\n return $this->dimension;\n }", "public static function get_ini_size($value)\r\n\t{\r\n\t\tif (!is_numeric($value))\r\n\t\t{\r\n\t\t\tif (strpos($value, 'M') !== false)\r\n\t\t\t{\r\n\t\t\t\t$value = intval($value) * 1024 * 1024;\r\n\t\t\t}\r\n\t\t\telseif (strpos($value, 'K') !== false)\r\n\t\t\t{\r\n\t\t\t\t$value = intval($value) * 1024;\r\n\t\t\t}\r\n\t\t\telseif (strpos($value, 'G') !== false)\r\n\t\t\t{\r\n\t\t\t\t$value = intval($value) * 1024 * 1024 * 1024;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $value;\r\n\t}", "function soo_plugin_size($atts)\n{\n extract(lAtts(array(\n 'format' => soo_plugin_display_prefs('size_format'),\n ), $atts));\n $size = _soo_plugin_field('size');\n return str_replace('{size}', $size, $format);\n}", "public function get_size_formatted() {\n\t\tif(!isset($this->_results['size_formatted'])) {\n\t\t\t$this->_results['size_formatted'] = $this->get_size().' B';\n\t\t\tif($this->get_size()>=1024 && $this->get_size()<(1024*1024)) {\n\t\t\t\t$this->_results['size_formatted'] = round($this->get_size()/1024, 2).' KB';\n\t\t\t}\n\t\t\telseif($this->get_size()>=(1024*1024) && $this->get_size()<$gigabyte) {\n\t\t\t\t$this->_results['size_formatted'] = round($this->get_size()/(1024*1024), 2).' MB';\n\t\t\t}\n\t\t}\n\t\treturn $this->_results['size_formatted'];\n\t}", "public function getFormatSize() {}", "public function sizeForHumans() {\n $bytes = $this->size;\n\n $units = ['b', 'kb', 'gb', 'tb'];\n\n for ($i = 0; $bytes > 1024; $i++) {\n $bytes /= 1024;\n }\n\n return round($bytes, 2) . $units[$i];\n }", "function getSize($size) {\n\t$round = 2;\n\tif ($size<=1024) $size = $size.\" Byte\";\n\telse if ($size<=1024000) $size = round($size/1024,$round).\" KB\";\n\telse if ($size<=1048576000) $size = round($size/1048576,$round).\" MB\";\n\telse if ($size<=1073741824000) $size = round($size/1073741824,$round).\" GB\";\n\t$size = explode(\" \", $size);\n\t$size = number_format($size[0], $round, '.', '').\" \".$size[1];\n\treturn $size;\n}", "protected function get_size_string(&$cart_item) {\n\t\t$cart_item_width_fraction = '';\n\tif ($cart_item[self::WPTI_KEY]['width_fraction'] === '1'){\n\t\t$cart_item_width_fraction = '1/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '2'){\n\t\t$cart_item_width_fraction = '1/4';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '3'){\n\t\t$cart_item_width_fraction = '3/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '4'){\n\t\t$cart_item_width_fraction = '1/2';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '5'){\n\t\t$cart_item_width_fraction = '5/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '6'){\n\t\t$cart_item_width_fraction = '3/4';\n\t} elseif ($cart_item[self::WPTI_KEY]['width_fraction'] === '7'){\n\t\t$cart_item_width_fraction = '7/8';\n\t}\n\t\n\t$cart_item_height_fraction = '';\n\tif ($cart_item[self::WPTI_KEY]['height_fraction'] === '1'){\n\t\t$cart_item_height_fraction = '1/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '2'){\n\t\t$cart_item_height_fraction = '1/4';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '3'){\n\t\t$cart_item_height_fraction = '3/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '4'){\n\t\t$cart_item_height_fraction = '1/2';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '5'){\n\t\t$cart_item_height_fraction = '5/8';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '6'){\n\t\t$cart_item_height_fraction = '3/4';\n\t} elseif ($cart_item[self::WPTI_KEY]['height_fraction'] === '7'){\n\t\t$cart_item_height_fraction = '7/8';\n\t}\n\t\t\n\t\t\n $x_value = $cart_item[self::WPTI_KEY][self::X].' '.$cart_item_width_fraction;\n $y_value = $cart_item[self::WPTI_KEY][self::Y].' '.$cart_item_height_fraction;\n $x_metric = get_option(self::X_METRIC_KEY, self::DEFAULT_X_METRIC);\n $y_metric = get_option(self::Y_METRIC_KEY, self::DEFAULT_Y_METRIC);\n $string = \"{$x_value} {$x_metric}\";\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $string .= \" x {$y_value} {$y_metric}\";\n }\n return $string;\n }", "public function size()\n {\n return (float) $this->data->textElement->font['size'] ? (float) $this->data->textElement->font['size'] : 10;\n }", "public function getDimension(): string\n {\n return $this->dimension->getDimension();\n }", "protected function calculate_size($value)\n\t{\n\t\tif (! $this->percent)\n\t\t{\n\t\t\t$this->percent = $this->config['font_height']/$this->config['font_png_height'];\n\t\t}\n\t\treturn $value * $this->percent;\n\t}", "function parse_size($size) {\n $suffixes = array(\n '' => 1,\n 'k' => 1024,\n 'm' => 1048576, // 1024 * 1024\n 'g' => 1073741824, // 1024 * 1024 * 1024\n );\n if (preg_match('/([0-9]+)\\s*(k|m|g)?(b?(ytes?)?)/i', $size, $match)) {\n return $match[1] * $suffixes[drupal_strtolower($match[2])];\n }\n}", "public function niceSize() {\n return f::niceSize($this->size());\n }", "public function getPopupSize($sName)\n {\n return isset($this->hPopupSize[$sName]) ? $this->hPopupSize[$sName] : $this->hPopupSize['default'];\n }", "private function human_size($size){\n $size=sprintf(\"%f\",$size);\n return ($size>>30) ? round($size/(1<<30),1).' Gb'\n : (($size>>20) ? round($size/(1<<20),1).' Mb'\n : (($size>>10) ? round($size/(1<<10),1).' Kb'\n :((int)$size)));\n }", "function contract_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "protected function image_size_field( $size ) {\n\n\t\t\treturn ( isset( $size ) ? $size[0] . 'x' . $size[1] : '' );\n\t\t}", "public function getFontSize()\n {\n return $this->get('font.size');\n }", "public function getFontSize () {}", "function format_size($size) {\n if ($size < 1024) {\n return format_plural($size, '1 byte', '@count bytes');\n }\n else {\n $size = round($size / 1024, 2);\n $suffix = t('KB');\n if ($size >= 1024) {\n $size = round($size / 1024, 2);\n $suffix = t('MB');\n }\n return t('@size @suffix', array('@size' => $size, '@suffix' => $suffix));\n }\n}", "protected function generateCropSize(): string\n {\n $this->updateTargetDimensions();\n $command = [];\n $command[] = $this->getResizeOperator();\n $command[] = $this->getDimensions() . '^';\n $command[] = '-gravity ' . $this->options->getOption('gravity');\n $command[] = '-extent ' . $this->getDimensions();\n\n return implode(' ', $command);\n }", "public function getIconSizeAttribute() {\n $size = 'small';\n\n // Negative points (reward redemption)\n if ($this->points < 0) $size = 'large';\n\n switch ($this->event) {\n case 'Sign up bonus': $size = 'large'; break;\n }\n return $size;\n }", "function formatSize($num) {\n\treturn round($num / 1024);\n}", "protected function generateSimpleSize(): string\n {\n $command = [];\n $command[] = $this->getResizeOperator();\n $command[] = $this->getDimensions() .\n ($this->options->getOption('preserve-natural-size') ? escapeshellarg('>') : '');\n\n return implode(' ', $command);\n }", "public function getThumpnailWidth() {\n $page_map = $this->search_result_item->getPagemap();\n return isset($page_map['cse_thumbnail'][0]['width']) ? $page_map['cse_thumbnail'][0]['width'] : '';\n }", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "function formatShirtSize($value) {\n switch ($value) {\n case 'extraSmall':\n return 'Extra Small';\n case 'extraLarge':\n return 'Extra Large';\n default:\n return ucwords($value);\n }\n}", "public function getIconWidth()\n {\n return $this->getIconForType($this->getCardType())['width'];\n }", "public function getPreviewSize($view_size)\n {\n switch ($view_size) {\n case 'mid':\n case 'tb':\n $view_size = $view_size . '_';\n break;\n \n default:\n $view_size = 'mid_';\n break;\n }\n return $view_size;\n }", "protected function getConfigBytes($val) {\n $val = trim($val);\n $last = strtolower($val[strlen($val)-1]);\n\n switch($last) {\n case 'g':\n $val *= 1024;\n case 'm':\n $val *= 1024;\n case 'k':\n $val *= 1024;\n }\n\n return $this->fixIntegerOverflow($val);\n }", "public function get_size() {\n\t\tif(!isset($this->_results['size'])) {\n\t\t\t$this->_results['size'] = strlen($this->_css_string);\n\t\t}\n\t\treturn $this->_results['size'];\n\t}", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "public function getNom_size()\n {\n return $this->nom_size;\n }", "public function getTitleFontSize()\n\t{\n\t\treturn $this->title_fontsize;\n\t}", "public function getSize()\n {\n return $this->parameters->get('size');\n }", "protected function getSize()\n {\n return $this->config->get('image.avatar_width');\n }", "public function getFormattedFilesizeAttribute()\n {\n $bytes = log($this->getAttribute('filesize'), 1024);\n\n $suffix = [\n 'B', 'KB', 'MB', 'GB', 'TB', 'PB'\n ][floor($bytes)];\n\n return round(pow(1024, $bytes - floor($bytes)), 2).$suffix;\n }", "public function getHumanSize( $decimals=2 )\n {\n $sz = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');\n $factor = floor((strlen($this->getSize()) - 1) / 3);\n if ($factor >= count($sz)) $factor = count($sz)-1;\n return sprintf(\"%.{$decimals}f\", $this->getSize() / pow(1024, $factor)) . $sz[$factor];\n }", "public static function file_size($size) { \n\t\t$places = Settings::get('DecimalPlaces');\n\t\t$dp = Settings::get('DecimalPoint');\n\t\t$ts = Settings::get('ThousandsSeparator');\n\t\treturn number_format((double) round($size/1024), 0, $dp, $ts).MSG_KB;\n\t}", "public function getClassName($size) {\n if ($this->params['metric'] && $this->params['hostname']) {\n return \"singleMetric\" . ucfirst(strtolower($size));\n } else if ($this->params['metric']) {\n return \"stackedMetric\" . ucfirst(strtolower($size));\n } else if ($this->params['graph']) {\n return \"report\" . ucfirst(strtolower($size));\n }\n }", "public function getSizeAttribute()\n {\n return $this->sizeToString();\n }", "public function getSize()\n {\n return 6;\n }", "public static function getDimensionSymbol(): ?string;", "function twentig_get_editor_font_sizes() {\n\t$sizes = array();\n\n\tif ( 'valentine' === get_template() ) {\n\n\t\t$h1_font_size = get_theme_mod( 'twentig_h1_font_size' );\n\t\t$h1_size_px = 84;\n\n\t\tif ( 'small' === $h1_font_size ) {\n\t\t\t$h1_size_px = 56;\n\t\t} elseif ( 'medium' === $h1_font_size ) {\n\t\t\t$h1_size_px = 64;\n\t\t} elseif ( 'large' === $h1_font_size ) {\n\t\t\t$h1_size_px = 72;\n\t\t}\n\n\t\t$sizes = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'h1',\n\t\t\t\t'size' => $h1_size_px,\n\t\t\t\t'slug' => 'h1',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h2',\n\t\t\t\t'size' => 48,\n\t\t\t\t'slug' => 'h2',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h3',\n\t\t\t\t'size' => 40,\n\t\t\t\t'slug' => 'h3',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h4',\n\t\t\t\t'size' => 32.01,\n\t\t\t\t'slug' => 'h4',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h5',\n\t\t\t\t'size' => 24.01,\n\t\t\t\t'slug' => 'h5',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h6',\n\t\t\t\t'size' => 18.01,\n\t\t\t\t'slug' => 'h6',\n\t\t\t),\n\t\t);\n\t}\n\treturn $sizes;\n}", "public static function get_name() {\r\n\t\treturn __( 'Upload Quota', 'psts' );\r\n\t}", "public static function get_unit( $value ) {\n\n\t\t$unit_used = '';\n\n\t\t// Trim the value.\n\t\t$value = trim( $value );\n\n\t\t// The array of valid units.\n\t\t$units = [ 'px', 'rem', 'em', '%', 'vmin', 'vmax', 'vh', 'vw', 'ex', 'cm', 'mm', 'in', 'pt', 'pc', 'ch' ];\n\n\t\tforeach ( $units as $unit ) {\n\n\t\t\t// Find what unit we're using.\n\t\t\tif ( false !== strpos( $value, $unit ) ) {\n\t\t\t\t$unit_used = $unit;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $unit_used;\n\n\t}", "public static function width($value = NULL){\n return '.width('.$value.')';\n }", "function formatsize($size) {\n \t\t\t\t$mb = 1024*1024;\n \t\t\t\tif ( $size > $mb ) {\n \t\t\t\t $mysize = sprintf (\"%01.2f\",$size/$mb) . \" MB\";\n \t\t\t\t} elseif ( $size >= 1024 ) {\n \t\t\t\t $mysize = sprintf (\"%01.2f\",$size/1024) . \" KB\";\n \t\t\t\t} else {\n \t\t\t\t $mysize = $size . \" bytes\";\n \t\t\t\t}\n\t\t\t\t\t\treturn $mysize;\n\t\t\t\t }", "function readableSize($size) {\n $bytes = array('B','KB','MB','GB','TB');\n foreach($bytes as $val) {\n if($size > 1024){\n\t$size = $size / 1024;\n }else{\n\tbreak;\n }\n }\n return round($size, 1).\" \".$val;\n}", "protected function getSize($value)\n {\n if (is_numeric($value)) {\n return $value;\n } elseif (is_array($value)) {\n return count($value);\n } elseif ($value instanceof \\SplFileObject) {\n return $value->getSize() / 1024;\n }\n\n return mb_strlen($value);\n }", "public function get_fontsize() {\n return $this->fontsize;\n }", "protected function _dimensions( $path, $mime ) {\n\t\treturn ( $stat = $this->stat( $path ) ) && $stat['width'] && $stat['height'] ? $stat['width'] . 'x' . $stat['height'] : '';\n\t}", "function august19_custom_image_sizes_names( $sizes ) {\n /* Pinegrow generated Image Sizes Names Begin*/\n /* This code will be replaced by returning names of custom image sizes. */\n /* Pinegrow generated Image Sizes Names End */\n return $sizes;\n}", "protected function getQuota() {\n\t\t$quota = \\GO::config()->quota * 1024;\n\t\tif($quota < $this->getTotalUsage() && $quota > 0)\n\t\t\treturn $quota;\n\t\tif(\\GO::user() && \\GO::user()->disk_quota)\n\t\t\treturn \\GO::user()->getDiskQuota();\n\t\treturn $quota;\n\t}", "function size_display($size){\r\n\t$sizetext = ($size>1023?' kb':' bytes');\r\n\t\r\n\treturn ($size>1023?number_format(($size/1024),2,'.',''):$size) . $sizetext;\r\n}", "static public function size_class_prefix()\n\t{\n\t\treturn FLAG_ICON_SIZE_CLASS_PREFIX;\n\t}", "public function getNameAttribute($value)\n {\n return mb_strimwidth($value, 0, 128, \"..\");\n }", "function codeless_get_team_thumbnail_size(){\n $team = codeless_get_mod( 'team_image_size', 'team_entry' );\n return $team;\n}", "function mixtape_qodef_get_masonry_gallery_image_size($size) {\n\n\t\t$image_size = 'mixtape_qodef_square';\n\n\t\tswitch($size):\n\n\t\t\tcase 'large-width':\n\t\t\t\t$image_size = 'mixtape_qodef_large_width';\n\t\t\t\tbreak;\n\t\t\tcase 'large-height':\n\t\t\t\t$image_size = 'mixtape_qodef_large_height';\n\t\t\t\tbreak;\n\t\t\tcase 'large-width-height':\n\t\t\t\t$image_size = 'mixtape_qodef_large_width_height';\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\treturn $image_size;\n\t}", "function affinity_mikado_get_masonry_gallery_image_size($size) {\n\n\t\t$image_size = 'affinity_mikado_square';\n\n\t\tswitch ($size):\n\n\t\t\tcase 'large-width':\n\t\t\t\t$image_size = 'affinity_mikado_large_width';\n\t\t\t\tbreak;\n\t\t\tcase 'large-height':\n\t\t\t\t$image_size = 'affinity_mikado_large_height';\n\t\t\t\tbreak;\n\t\t\tcase 'large-width-height':\n\t\t\t\t$image_size = 'affinity_mikado_large_width_height';\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\treturn $image_size;\n\t}", "public function _formatSize($value) {\n\t\t\tif (!is_array($value)) {\n\t\t\t\t$value = array('width' => $value);\n\t\t\t}\n\n\t\t\tif (!isset($value['width']) && !isset($value['height'])) {\n\t\t\t\ttrigger_error(__d('google', 'No size specified'), E_USER_ERROR);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (isset($value['width']) && !isset($value['height'])) {\n\t\t\t\t$value['height'] = $value['width'];\n\t\t\t}\n\t\t\telse if (isset($value['height']) && !isset($value['width'])) {\n\t\t\t\t$value['width'] = $value['height'];\n\t\t\t}\n\n\t\t\tif ($value['width'] * $value['height'] > $this->__sizeLimit) {\n\t\t\t\ttrigger_error(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t__d('google', 'Size of %dpx is greater than maximum allowed size %spx'),\n\t\t\t\t\t\t$value['width'] * $value['height'],\n\t\t\t\t\t\t$this->__sizeLimit\n\t\t\t\t\t),\n\t\t\t\t\tE_USER_ERROR\n\t\t\t\t);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $this->_formatGeneric('size', array($value['width'], $value['height']));\n\t\t}", "public function getValueFraction(): string\n {\n return Units::$variable->fraction($this->value);\n }", "function friendly_size(int $size, $unit = ''): string\n {\n $unit = strtoupper($unit);\n if ((!$unit && $size >= 1000*1000*1000) || $unit == \"GB\") {\n return number_format($size/(1000*1000*1000), 2).\"Gb\";\n }\n if ((!$unit && $size >= 1000*1000) || $unit == \"MB\") {\n return number_format($size/(1000*1000), 2).\"Mb\";\n }\n if ((!$unit && $size >= 1000) || $unit == \"KB\") {\n return number_format($size/(1000), 2).\"Kb\";\n }\n return number_format($size).\" bytes\";\n }", "function fmt_filesize( $size ){\n\tif ($size >= 1073741824) return ( round(($size / 1073741824), 2) . \" GB\" );\n if ($size >= 1048576) return ( round(($size / 1048576), 2) . \" MB\" );\n if ($size >= 1024) return ( round(($size / 1024), 2) . \" KB\" );\n\t\n\treturn ($size . ' bytes');\n}", "public function gidSize() { return $this->_m_gidSize; }", "public function getSize(): ?string\n {\n return isset($this->Size) ? $this->Size : null;\n }", "function determine_size_units($size = 0){\n\tif($size < 1024){\n\t\t$size .= ' b';\n\t}\n\tif($size >= 1024 and $size < 1048576){\n\t\t$size = round($size /= 1024);\n\t\t$size .= ' Kb';\n\t}\n\tif($size >= 1048576){\n\t\t$size = round($size /= 1048576);\n\t\t$size .= ' M';\n\t}\n\treturn $size;\n}", "private function getDecimalsMark() : int\n {\n $value = $this->scopeConfig->getValue(self::XML_PATH_DECIMALS_MARK);\n return isset($value) ? intval($value) : 2;\n }", "public function getSize()\n\t{\n\t\t$command = new Commands\\Command($this->_driver, 'get_window_size', null, array('window_handle' => 'current'));\n\t\t$results = $command->execute();\n\t\treturn $results['value'];\n\t}", "public function getXsiTypeName() {\n return \"Media_Size_StringMapEntry\";\n }", "public function getSize(\n string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT,\n $scopeCode = null\n ): string {\n return (string) $this->scopeConfig->getValue(\n self::XML_PATH_RIBBON_SIZE,\n $scope,\n $scopeCode\n );\n }", "public function getXsiTypeName() {\n return \"Media.Size\";\n }", "public function getDimensions()\r\n {\r\n return round($this->dimension1, 1) . \"x\" . round($this->dimension2, 1) . \"x\" . round($this->dimension3, 1) . ' ' . self::DIMENSION_UNIT;\r\n }", "function get_size()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_SIZE);\r\n }", "public function getSize() : float\n {\n return $this->size;\n }", "private function getPrecision($value)\n {\n return strlen(substr(strrchr($value, \".\"), 1));\n }", "public function getGross()\n {\n $value = $this->get(self::GROSS);\n return $value === null ? (string)$value : $value;\n }", "function publisher_get_block_size_class( $size = 0 ) {\n\n\t\t$output = '';\n\n\t\tif ( ! $size ) {\n\t\t\t$size = publisher_get_block_size();\n\t\t}\n\n\t\tif ( $size ) {\n\t\t\t$output = \"bsw-$size \";\n\t\t}\n\n\t\treturn $output;\n\t}" ]
[ "0.61306936", "0.583199", "0.5812914", "0.57850236", "0.5775636", "0.5692937", "0.56847066", "0.556415", "0.5560069", "0.5546885", "0.5540935", "0.5518208", "0.5517917", "0.55093604", "0.54552805", "0.54552805", "0.54512113", "0.54457253", "0.5440763", "0.54364717", "0.54338795", "0.5428173", "0.5423793", "0.540777", "0.5406352", "0.5400573", "0.53764325", "0.5371662", "0.5358208", "0.5357119", "0.53462315", "0.5304959", "0.5303973", "0.5299768", "0.5299214", "0.5263018", "0.5248357", "0.5224154", "0.52214587", "0.5218846", "0.5217515", "0.5197733", "0.5195997", "0.5183832", "0.5182896", "0.51789635", "0.51651424", "0.51615846", "0.5154405", "0.51536745", "0.51501656", "0.51413155", "0.5136913", "0.5136045", "0.5111813", "0.5105348", "0.5099336", "0.5092059", "0.5087661", "0.50792843", "0.50777894", "0.5077522", "0.50672346", "0.5061728", "0.5060767", "0.5053586", "0.5048592", "0.5042752", "0.503484", "0.5033211", "0.50221187", "0.50187373", "0.50149214", "0.50139916", "0.50130004", "0.50047284", "0.49897772", "0.49889335", "0.4980379", "0.4978715", "0.497803", "0.49766916", "0.49705854", "0.49665028", "0.49644944", "0.49642462", "0.49612293", "0.49609423", "0.4948972", "0.49462056", "0.49453264", "0.49413007", "0.49374557", "0.49349228", "0.4932399", "0.49309444", "0.49289748", "0.4928164", "0.49233937", "0.49201426" ]
0.7021309
0
Helper function to check if archive is a flex loop. This doesn't check if viewing an actual archive, but this layout should not be an option if ! is_archive()
Помощь функция для проверки, является ли архив гибким циклом. Эта функция не проверяет, отображается ли реальный архив, но такой формат не должен быть вариантом, если ! is_archive()
function mai_is_flex_loop() { // Bail if not a content archive. if ( ! mai_is_content_archive() ) { return false; } // Get columns. $columns = mai_get_columns(); // If we have more than 1 column or if we are using featured image as bg image, it's a flex loop. if ( ( $columns > 1 ) || ( 'background' === mai_get_archive_setting( 'image_location', true, genesis_get_option( 'image_location' ) ) ) ) { return true; } // Not a flex loop. return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mai_is_content_archive() {\n\n\tglobal $wp_query;\n\n\tif ( ! $wp_query->is_main_query() ) {\n\t\treturn false;\n\t}\n\n\t$is_archive = false;\n\n\t// Blog.\n\tif ( is_home() ) {\n\t\t$is_archive = true;\n\t}\n\t// Term archive.\n\telseif ( is_category() || is_tag() || is_tax() ) {\n\t\t$is_archive = true;\n\t}\n\t// CPT archive - this may be called too early to use get_post_type().\n\telseif ( is_post_type_archive() ) {\n\t\t$is_archive = true;\n\t}\n\t// Author archive.\n\telseif ( is_author() ) {\n\t\t$is_archive = true;\n\t}\n\t// Search results.\n\telseif ( is_search() ) {\n\t\t$is_archive = true;\n\t}\n\t// Date archives.\n\telseif( is_date() ) {\n\t\t$is_archive = true;\n\t}\n\n\treturn $is_archive;\n}", "function mixtape_qodef_is_masonry_template(){\n\n\t\t\t$page_id = mixtape_qodef_get_page_id();\n\t\t\t$page_template = get_page_template_slug($page_id);\n\t\t\t$page_options_template = mixtape_qodef_options()->getOptionValue('blog_list_type');\n\n\t\t\tif(!is_archive()){\n\t\t\t\tif($page_template == 'blog-masonry.php' || $page_template =='blog-masonry-full-width.php'){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}elseif(is_archive() || is_home()){\n\t\t\t\tif($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width'){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function isArchive(): bool\n {\n return in_array($this->name, [\n 'application/zip',\n 'application/x-rar-compressed',\n 'application/x-tar',\n 'application/gzip',\n ]);\n }", "function aton_qodef_is_masonry_template(){\n\n\t\t$page_id = aton_qodef_get_page_id();\n\t\t$page_template = get_page_template_slug($page_id);\n\t\t$page_options_template = aton_qodef_options()->getOptionValue('blog_list_type');\n\n\t\tif(!is_archive()){\n\t\t\tif($page_template == 'blog-masonry.php' || $page_template =='blog-masonry-full-width.php'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}elseif(is_archive() || is_home()){\n\t\t\tif($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isArchive()\n {\n\n if (is_post_type_archive(\"job-listing\")) {\n return true;\n }\n\n return false;\n }", "public function is_archive()\n {\n }", "public static function IsArchive();", "function is_archive() {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_archive();\n}", "public function is_archive() {\n\n\t\treturn wp_mail_smtp()->get_admin()->is_admin_page( 'logs' ) && ! isset( $_GET['mode'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t}", "function kalium_blog_is_in_the_loop() {\n\tglobal $blog_options;\n\n\treturn in_the_loop() && ! is_single() && ! empty( $blog_options );\n}", "function is_card_layout() {\n\treturn 'card' === get_theme_mod( 'archive_layout', 'card' );\n}", "function isLayoutType($zipfile =null) {\n\t\tif(!empty($zipfile)) {\n\t\t\tif(!$this->checkZip($zipfile)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$packagetype = $this->type();\n\n\t\t\t\tif($packagetype) {\n\t\t\t$lcasetype = strtolower($packagetype);\n\t\t\tif($lcasetype == 'layout') return true;\n\t\t}\n\t\treturn false;\n\t}", "function archive(){\n \n /*\n * set base variables\n */\n \n $this->View->add(\"wxp_content_template\", WXP::get_path(\"#loop\")->dir());\n \n /*\n * if posts exceed the amount of that allotted per page,\n * tell view to include the pager nav \n */\n \n global $wp_query;\n \n if($wp_query->max_num_pages > 1){\n $this->View->add(\"paged_archive\", true);\n }\n \n /*\n * include the error no posts template if the archive has no posts\n */\n \n if(!have_posts()){\n $this->View->add(\"wxp_content_template\", \n WXP::get_path(\"#error\")->name(\"no-posts\")->dir());\n } \n \n \n }", "public function isArchive(): ?bool\n {\n return $this->is_archive;\n }", "public function is_needed() {\n\t\treturn is_post_type_archive( PostType::get_instance()->get_post_type() );\n\t}", "public function isZipArchive()\n\t{\n\t\tif ( $this->type == 'application/zip' ) return true; //trivial\n\t\tif ( $this->type == 'application/x-zip-compressed' || // Support IE11 formData Content Type\n\t\t\t $this->type == 'application/octet-stream' )\n\t\t{ // Guess whether it's something we support.\n\t\t\treturn ( Strings::endsWith($this->name, '.zip') );\n\t\t}\n\t\treturn false;\n\t}", "public function hasArchive()\n\t{\n\t\treturn Archive::get()->Filter(['OriginalRecordClass' => $this->owner->getClassName(),'BigID' => $this->owner->BigID])->First();\n\t}", "public function canArchive();", "public static function getIsArchive(){\n return self::getProperty('is_archive');\n }", "function sydney_wc_archive_check() {\n if ( is_shop() || is_product_category() || is_product_tag() ) {\n return true;\n } else {\n return false;\n }\n}", "private static function unpackArchive()\n {\n if (!file_exists(self::getUpdateTmpDir() . 'archive.zip')) {\n return false;\n }\n \n $zip = new ZipArchive;\n if ($zip->open(self::getUpdateTmpDir() . 'archive.zip') === true) {\n $zip->extractTo(self::getUpdateTmpDir());\n $zip->close();\n \n return true;\n }\n \n return false;\n }", "public function isArchived()\n {\n return count( $this->getSections()) === count( $this->getSections( TRUE )) ?\n TRUE :\n FALSE ;\n }", "protected function isArchived()\n\t{\n\t\t$bindSQL = array(\t$this->idsite,\n\t\t\t\t\t\t\t\t$this->strDateStart,\n\t\t\t\t\t\t\t\t$this->strDateEnd,\n\t\t\t\t\t\t\t\t$this->periodId,\n\t\t\t\t\t\t\t\t);\n\t\t$timeStampWhere = '';\n\t\tif( $this->maxTimestampArchive != 0)\n\t\t{\n\t\t\t$timeStampWhere = \" AND UNIX_TIMESTAMP(ts_archived) >= ? \";\n\t\t\t$bindSQL[] = $this->maxTimestampArchive;\n\t\t}\n\n\t\t$idarchive = Zend_Registry::get('db')->fetchOne(\"\n\t\t\t\t\t\tSELECT idarchive\n\t\t\t\t\t\tFROM \".$this->tableArchiveNumeric.\"\n\t\t\t\t\t\tWHERE idsite = ?\n\t\t\t\t\t\t\tAND date1 = ?\n\t\t\t\t\t\t\tAND date2 = ?\n\t\t\t\t\t\t\tAND period = ?\n\t\t\t\t\t\t\tAND name = 'done'\n\t\t\t\t\t\t\tAND value = \".Piwik_ArchiveProcessing::DONE_OK.\"\n\t\t\t\t\t\t\t$timeStampWhere\n\t\t\t\t\t\tORDER BY ts_archived DESC\",\n\t\t\t\t\t\t$bindSQL\n\t\t\t\t\t);\n\t\tif(!empty($idarchive))\n\t\t{\n\t\t\treturn $idarchive;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected function checkExtraContentArchive()\n {\n if (!file_exists($this->temporaryPath.'import/extracontent.zip')) {\n return false;\n }\n\n return true;\n }", "function this_is_a_blog_page(){\n if (is_home() || is_singular( 'post' ) || is_post_type_archive('post') || is_tag() || is_category() || is_date() || is_search()) {\n if(!is_post_type_archive('product')){\n return true;\n }\n }\n return false;\n}", "function lwGetArchive($archive) {\n\tglobal $linkListCount;\n\tif($archive==FALSE) {\n\t\t$xmlFileName = 'archive/' . date(\"ym\") . 'archive.xml';\n\t}\n\telse {\n\t\t$xmlFileName = 'archive/' . $archive . 'archive.xml';\n\t} \n\tif(file_exists($xmlFileName)) {\n\t $xml = simplexml_load_file($xmlFileName);\n\t}\n\t$linkCount=0; \n\t$linkTotal=$linkListCount; \n\t$loginstatus = lw_logincheck();\n\techo '<div id=\"links\">';\n\tif($archive==FALSE) {\n\t\tif(!(linkwalla_iterateFiles(linkwalla_linkList,$linkTotal,$loginstatus))) {\n\t\t echo \"<p>No links yet. Run the <a href=\\\"lwInstaller.php\\\">Linkwalla Installer</a></p>\";\n\t\t}\n\t}\n\telse {\n\t\t$xmlFileName = 'archive/' . $archive . 'archive.xml';\n\t\tlinkwalla_linkList(0,1000,$xmlFileName,$loginstatus);\n\t}\n\techo '</div>';\n}", "private function layout_exists($layout){\n /* Listing the directories under the /layout dir */\n $layout_path = join(DIRECTORY_SEPARATOR, array(BASEPATH, 'layouts'));\n $layout_list = array_diff(scandir($layout_path), array('.', '..'));\n return in_array($layout, $layout_list);\n }", "function lpop_ma_archive_loop()\n{\n if ( ! genesis_html5() ) {\n\tgenesis_legacy_loop();\n\treturn;\n }\n\n do_action( 'genesis_before_entry' );\n\n printf( '<article %s>', genesis_attr( 'entry' ) );\n\n do_action( 'genesis_entry_header' );\n\n do_action( 'genesis_before_entry_content' );\n\n printf( '<div %s>', genesis_attr( 'entry-content' ) );\n\n lpop_miniaudit_reports(); // Make this part of an entry content\t\n \n echo '</div>'; //* end .entry-content\n\n do_action( 'genesis_after_entry_content' );\n\n do_action( 'genesis_entry_footer' );\n\n echo '</article>';\n\n do_action( 'genesis_after_entry' );\n}", "function isOldLayout()\n\t{\n\t\tif(!$this->pageLayout)\n\t\t\treturn false;\n\t\treturn ($this->pageLayout->version == 1);\n\t}", "function apevo_loop() {\n\t\tglobal $wp_query;\n\t\t$loop = ($wp_query->is_page) ? ((is_front_page()) ? 'front' : 'page') : (($wp_query->is_home) ? 'home' : (($wp_query->is_single) ? (($wp_query->is_attachment) ? 'attachment' : 'single') : (($wp_query->is_category) ? 'category' : (($wp_query->is_tag) ? 'tag' : (($wp_query->is_tax) ? 'tax' : (($wp_query->is_archive) ? (($wp_query->is_day) ? 'day' : (($wp_query->is_month) ? 'month' : (($wp_query->is_year) ? 'year' : (($wp_query->is_author) ? 'author' : 'archive')))) : (($wp_query->is_search) ? 'search' : (($wp_query->is_404) ? 'fourohfour' : 'nothing'))))))));\n\t\tcall_user_func(apply_filters('apevo_custom_loop', array($this, $loop)));\n\t}", "private function processArchive()\n {\n if (!defined('C__MODULE__LOGBOOK')) {\n return false;\n }\n global $g_comp_database;\n\n $l_error = false;\n $l_navbar = isys_component_template_navbar::getInstance();\n $l_daoLogbook = new isys_component_dao_logbook($g_comp_database);\n $l_has_edit_right = isys_auth_logbook::instance()\n ->is_allowed_to(isys_auth::EDIT, 'LOGBOOK/' . C__MODULE__LOGBOOK . C__PAGE__LOGBOOK_ARCHIVE);\n\n if ($_POST[\"navMode\"] == C__NAVMODE__SAVE) {\n try {\n $l_daoLogbook->archiveAccessible();\n $l_daoLogbook->saveArchivingSettings();\n } catch (Exception $e) {\n $l_error = $e->getMessage();\n $_POST[\"navMode\"] = C__NAVMODE__EDIT;\n }\n\n isys_application::instance()->template->assign(\"archiveDest\", $_POST[\"archiveDest\"]);\n }\n\n $l_ad = $l_daoLogbook->getArchivingSettings();\n\n $l_rules = [\n 'archiveInterval' => [\n 'p_strValue' => $l_ad[\"interval\"]\n ],\n 'archiveDest' => [\n 'p_strClass' => 'input-small',\n 'p_arData' => [\n \"0\" => isys_application::instance()->container->get('language')\n ->get(\"LC__UNIVERSAL__DATABASE_LOCAL\"),\n \"1\" => isys_application::instance()->container->get('language')\n ->get(\"LC__UNIVERSAL__DATABASE_REMOTE\")\n ],\n 'p_strSelectedID' => $l_ad[\"dest\"]\n ],\n 'archiveHost' => [\n 'p_strClass' => 'input-small',\n 'p_strValue' => $l_ad[\"host\"]\n ],\n 'archivePort' => [\n 'p_strClass' => 'input-small',\n 'p_strValue' => $l_ad[\"port\"]\n ],\n 'archiveDB' => [\n 'p_strClass' => 'input-small',\n 'p_strValue' => $l_ad[\"db\"]\n ],\n 'archiveUser' => [\n 'p_strClass' => 'input-small',\n 'p_strValue' => $l_ad[\"user\"]\n ],\n 'archivePass' => [\n 'p_strClass' => 'input-small',\n 'p_strValue' => '' // See ID-3436. Original value: $l_ad[\"pass\"]\n ]\n ];\n\n if (isset($_POST['navMode']) && ($_POST[\"navMode\"] == C__NAVMODE__EDIT || $_POST[\"navMode\"] == C__NAVMODE__NEW)) {\n $l_navbar->set_visible(false, C__NAVBAR_BUTTON__EDIT)\n ->set_active($l_has_edit_right, C__NAVBAR_BUTTON__SAVE)\n ->set_active(true, C__NAVBAR_BUTTON__CANCEL);\n } else {\n $l_navbar->set_active($l_has_edit_right, C__NAVBAR_BUTTON__EDIT)\n ->set_visible(false, C__NAVBAR_BUTTON__SAVE)\n ->set_visible(false, C__NAVBAR_BUTTON__CANCEL);\n }\n\n isys_application::instance()->template->assign('archiveDest', $l_ad['dest'])\n ->assign('archiveError', $l_error)\n ->assign('content_title', isys_application::instance()->container->get('language')\n ->get('LC__NAVIGATION__NAVBAR__ARCHIVE'))\n ->smarty_tom_add_rules('tom.content.bottom.content', $l_rules)\n ->include_template('contentbottomcontent', 'content/bottom/content/module__logbook__archive.tpl');\n }", "public function isArchiveable() {\n return true;\n }", "protected static function is_tax_archive() {\n\t\tif ( ! is_search() && ( is_tax() || is_category() || is_tag() ) ) {\n\t\t\treturn true;\n\t\t}\n\t}", "function load_archive( $archive_template ) {\n\t\t\tglobal $mojoURI;\n\t\t\t\n\t\t\t$parent_theme = get_template_directory() . '/mojo-gallery/';\n\t\t\t$child_theme = get_stylesheet_directory() . '/mojo-gallery/';\n\n\t\t\tif ( is_post_type_archive( array('mojo-gallery-album') ) ) :\n\n\t\t\t\t/**\n\t\t\t\t * First we check the stylesheet path to check for child themes\n\t\t\t\t */\n\t\t\t\tif ( is_dir( $child_theme) && file_exists( $child_theme . '/archive-mojo_gallery_album.php' ) ) :\n\t\t\t\t\n\t\t\t\t\t$archive_template = $child_theme . '/archive-mojo_gallery_album.php';\n\t\t\t\t/**\n\t\t\t\t * If the stylesheet path isn't valid we check the template path\n\t\t\t\t * this is to check if the parent theme has a template even if the child theme doesn't\n\t\t\t\t */\n\t\t\t\telseif ( is_dir( $parent_theme ) && file_exists( $parent_theme . '/archive-mojo_gallery_album.php' ) ) :\n\t\t\t\t\n\t\t\t\t\t$archive_template = $parent_theme . '/archive-mojo_gallery_album.php';\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * If we are sure the user doesn't have their own templates we load the plugin default\n\t\t\t\t */\n\t\t\t\telse :\n\t\t\t\t\n\t\t\t\t\t$archive_template = $mojoURI . '/templates/archive-mojo_gallery_album.php';\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tendif;\n\t\t\t\n\t\t\tendif;\n\n\t\t\treturn $archive_template;\n\t\t}", "function is_post_type_archive( $post_types = '' ) {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_post_type_archive( $post_types );\n}", "function isTheme($xmlobj) {\n\tif (! $xmlobj->details) return false;\n\tif (! $xmlobj->layout) return false;\n\n\tif (! $xmlobj->details->name) return false;\n\tif (! $xmlobj->details->author) return false;\n\tif (! $xmlobj->details->author['email']) return false;\n\tif (! $xmlobj->details->version) return false;\n\tif (! $xmlobj->details->protected) return false;\n\n\tif (! $xmlobj->layout->header) return false;\n\tif (! $xmlobj->layout->release) return false;\n\tif (! $xmlobj->layout->footer) return false;\n\n\treturn true;\n}", "function zp_portfolio_archive_template_items( $query ) {\r\n if ( is_admin() || ! $query->is_main_query() )\r\n return;\r\n\r\n if ( is_post_type_archive( 'portfolio' ) ) {\r\n $query->set( 'posts_per_page', -1 );\r\n return;\r\n }\r\n}", "public function hasLayout();", "public function hasLayout( $a_name )\r\n\t{\r\n\t\treturn isset($this->m_layout[trim((string)$a_name)]);\r\n\t}", "public function isFlexForm(): bool\n {\n return $this->flex || $this->config['config']['type'] === 'flex';\n }", "function fusion_portfolio_archive_template( $archive_post_template ) {\n\t$archive_portfolio_template = FUSION_CORE_PATH . '/templates/archive-avada_portfolio.php';\n\n\t// Checks if the archive is portfolio.\n\tif ( is_post_type_archive( 'avada_portfolio' )\n\t\t|| is_tax( 'portfolio_category' )\n\t\t|| is_tax( 'portfolio_skills' )\n\t\t|| is_tax( 'portfolio_tags' ) ) {\n\t\tif ( file_exists( $archive_portfolio_template ) ) {\n\t\t\tfusion_portfolio_scripts();\n\t\t\treturn $archive_portfolio_template;\n\t\t}\n\t}\n\treturn $archive_post_template;\n}", "public function check_duplicate_archive() {\n\t\t/* archive model list */\n\t\t$_AML = M('ArchiveModel')->get_modelList(true, true);\n\t\t$this->assign('_AML', $_AML);\n\n\t\t$_DAL = array();\n\t\tif('check' == ARequest::get('action')) {\n\t\t\tif(!check_token()) {\n\t\t\t\t$this->error(L('DATA_INVALID'), AServer::get_preUrl());\n\t\t\t}\n\t\t\tM('AdminLog')->add_log(ASession::get('m_userid'), L('CHECK_DUPLICATE_ARCHIVE'));\n\n\t\t\t$archiveModelId = ARequest::get('archive_model_id');\n\t\t\t$_ACL = M('ArchiveChannel')->get_myChannelList($archiveModelId);\n\t\t\tif(!empty($_ACL)) {\n\t\t\t\t$act = new ATree($_ACL, array(\n\t\t\t\t\t'archive_channel_id',\n\t\t\t\t\t'ac_parent_id',\n\t\t\t\t\t'ac_sub_channel'));\n\t\t\t\t$_t_acid = implode(',', $act->get_leafid(0));\n\t\t\t\t$_DAL = M()->query(\"SELECT COUNT(`a_title`) AS `dac`, `a_title` FROM __ARCHIVE__ WHERE `archive_channel_id` IN(\" . $_t_acid . \") GROUP BY `a_title` ORDER BY `dac` DESC LIMIT 0, \" . ARequest::get('page_size'), true);\n\t\t\t}\n\t\t}\n\t\t$this->assign('_DAL', $_DAL);\n\n\t\t$this->display();\n\t}", "public function alm_woocommerce_before_shop_loop() {\n\n\t\tif ( ! alm_is_woo_archive() ) { // Exit if not WooCommerce archive page.\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! alm_woo_is_shop_enabled() ) { // Shop.\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! alm_woo_is_shop_archive_enabled () ) { // Shop Archives.\n\t\t\treturn false;\n\t\t}\n\n\t\t$hide_pagination = alm_woo_hide_pagination();\n\t\t$hide_orderby = alm_woo_hide_orderby();\n\n\t\t$return = '<style>';\n\t\t$return .= $hide_pagination; // Hide Pagination.\n\t\t$return .= $hide_orderby; // Hide Orderby (If set).\n\t\t$return .= '</style>';\n\n\t\techo $return;\n\t}", "function isSlideshow()\n {\n $ic = 0;\n if (count($this->_files) == 0)\n {\n $this->populateFiles();\n }\n foreach ($this->_files as $afile)\n {\n ($afile->getFiletype() == 'image') ? $ic++ : '';\n if ($ic > 1)\n { \n return true;\n }\n }\n return false;\n }", "function tribe_is_in_main_loop() {\n\t\treturn apply_filters( 'tribe_is_main_loop', Tribe__Events__Templates::$isMainLoop );\n\t}", "private function _zip_mod_load() {\n\t\tif (is_object($this->zip)) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\tif (class_exists('ZipArchive')) {\n\t\t\t\t$this->zip = new ZipArchive;\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "function setup_link_remove_be_archive_loop() {\n remove_action( 'genesis_loop', 'ea_archive_loop' );\n return true;\n}", "public function hasLayoutExpired(): bool\n {\n $this->layout_cache_file = '';\n\n if ($this->cache_time < 0) {\n // Cache is not used.\n return true;\n }\n\n $layoutName = $this->layout . '.' .\n $this->router->getController() . '.' .\n $this->router->getAction() .\n $this->router->getImplodedParams();\n\n // We set the layout cached file for later use.\n $this->layout_cache_file = $this->cache_path . str_replace(['/', '\\\\'], '-', $layoutName);\n\n return $this->hasCacheExpired($this->layout_cache_file, $this->cache_time);\n }", "public function hasPortalLoopAppear(){\n return $this->_has(18);\n }", "public function isArchived()\n {\n return ! is_null($this->{$this->getArchivedAtColumn()});\n }", "function hook_loop_start() {\n\t\tif ( is_empathy() && $this->option( 'integrate_archive' ) ) {\n\t\t\techo '<h2>' . the_empathy_info( 'name', false, false ) . '</h2>';\n\t\t\t\n\t\t\tif ( the_empathy_info( 'descriptoin', false, false ) )\n\t\t\t\techo '<p>' . the_empathy_info( 'descriptoin', false, false ) . '<p>';\n\t\t}\n\t}", "function adventure_log_archive_page( $template ) {\n global $post;\n\n if ( is_post_type_archive( 'alog' ) ) {\n $template = dirname( __FILE__ ) . '/templates/archive-alog.php';\n }\n return $template;\n}", "public function valid() {\n\t\tif( ! defined( 'WPV_VERSION' )\n\t\t || !function_exists( 'wpv_has_wordpress_archive') )\n\t\t\treturn false;\n\n\t\t// get current type name\n\t\t$type = self::get_type_name();\n\n\t\t// check stored validation\n\t\tif( isset( self::$template_id[$type] ) && self::$template_id[$type] !== null && self::$template_id[$type] !== false )\n\t\t\treturn true;\n\n\t\t$archive = $type == 'post'\n\t\t\t? wpv_has_wordpress_archive()\n\t\t\t: wpv_has_wordpress_archive( 'post', $type );\n\n\t\tself::$template_id[$type] = $archive && $archive !== 0\n\t\t\t? $archive\n\t\t\t: false;\n\n\t\treturn self::$template_id[$type];\n\t}", "public function has_archive( $post_type ) {\n\t\tif ( \\is_string( $post_type ) ) {\n\t\t\t$post_type = \\get_post_type_object( $post_type );\n\t\t}\n\n\t\treturn ( ! empty( $post_type->has_archive ) );\n\t}", "public function renderArchive()\n {\n $news = $this->news->getAll();\n $vp = new \\VisualPaginator($this, 'vp');\n $page = $vp->page;\n $paginator = $vp->getPaginator();\n $paginator->setItemCount($news->count());\n $paginator->setItemsPerPage(5);\n $paginator->setPage($page);\n\n $template = $this->template;\n $template->title = \"Archiv aktualit\";\n $template->news = $news\n ->limit($paginator->getLength(), $paginator->getOffset());\n }", "function custom_do_qualityreports_archives_loop() {\n\techo '<div class=\"page hentry entry\">';\n\techo '<h1 class=\"entry-title\">'. get_the_title() .'</h1>';\n\techo '<div class=\"entry-content\">' . get_the_content() ;\n\t\n\techo '<div class=\"adc-grid-content\">';\n\t$args = array(\n\t\t'post_type' =>array( \n\t\t\t\t\t'qualityreports'\n\t\t\t\t\t),\n\t\t'posts_per_page' => -1,\n\t\t'post_parent' => 0,\n\t\t'orderby' => 'title',\n\t\t'order' => 'ASC'\n\t);\n\t\n\tglobal $wp_query;\n\t$wp_query = new WP_Query( $args );\n\tif( $wp_query->have_posts() ): \n\t\twhile( $wp_query->have_posts() ): $wp_query->the_post(); global $post;\n\t\t\t$classes = 'one-third';\n\t\t\tif( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 )\n\t\t\t\t$classes .= ' first';\n\t\t\t\t\techo '<div class=\"'. $classes . '\">';\n\t\t\t\t\t\techo '<div class=\"excerpt-thumb\">'. adc_get_excerpt_thumb().'</div>';\n\t\t\t\t\t\techo '<h4><a href=\"' . \n\t\t\t\t\t\tget_permalink();\n\t\t\t\t\t\techo '\">';\n\t\t\t\t\t\tthe_title();\n\t\t\t\t\t\techo '</a></h4>';\n\t\t\t\t\t\tthe_excerpt();\t\n\t\t\t\t\techo '</div>';\n\t\t\t\n\t\t\tendwhile;\n\t\t\tgenesis_posts_nav();\n\t\tendif;\n\t\twp_reset_query();\n\techo '</div><!-- end .adc-grid-content -->';\n\t\n\t\n\t\n\t\n\techo '</div><!-- end .entry-content -->';\n\techo '</div><!-- end .page .hentry .entry -->';\n}", "public function is_sidebar_layout( $layout = '' ){\r\n\r\n return self::current_sidebar_layout() == $layout ;\r\n\r\n }", "static function isArchived()\n {\n return !(self::$url == parse_url(self::$newest_url, PHP_URL_PATH));\n }", "public function get_before_loop_posts() {\n\t\tif ( function_exists('is_product') ) {\n\t\t\t\n\t\t\tif ( is_product() ) {\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\tif ( is_archive() || is_home() || is_single() || is_search() || is_404() ) {\n\t\t\t\n \n\t\t\tget_template_part( 'template-parts/archive-start' );\n\t\t\t\n\t\t\tadd_action( 'bric_after_loop', [$this, 'archive_end' ], 10 );\n\t\t\t\n\t\t//\techo '<div class=\"archive-posts-wrapper recent-posts '.$this->get_content_class( 'main' ).'\"><div class=\"row\">';\n\t\t\t\n\t\t\t\n\t\t\t//add_action( 'bric_after_loop', array( $this, 'close_div'), 10 );\t//call early so we can slide in the sidebar\n\t\t\t//add_action( 'bric_after_loop', array( $this, 'close_div'), 15 );\t\n\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function is_posts(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\n\t\treturn (in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo'), true)) ? true : false;\n\t}", "public function isArchived()\n {\n return (int) $this->archived == self::STATUS_ARCHIVED;\n }", "public function canReadFromArchive(PharData $archive): bool;", "public function isDefault()\n\t{\n\t\treturn \\IPS\\Dispatcher::i()->application->directory == 'blog';\n\t}", "function seasaltpress_is_view_with_layout_option() {\n\t// This option is available on all pages. It's also available on archives when there isn't a sidebar.\n\treturn ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );\n}", "public function isArchived()\n\t{\n\t\tif ($this->status != 'closed') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function _hasContainerView()\n {\n return isset($_REQUEST['_thisView']) && !empty($_REQUEST['_thisView']);\n }", "function linkwalla_archiveList($archive) {\n\tif ($handle = opendir('archive')) {\n\t\tif($archive == null) { echo '<a class=\"archiveLink currentArchive\">newish</a> | '; }\n\t\telse { echo '<a href=\"index.php\" class=\"archiveLink\">newish</a> | '; }\n\t\twhile (false !== ($eachfile = readdir($handle))) {\n\t\t\t$files [] = $eachfile;\n\t\t}\n\t\trsort($files);\n\t\t$i=0;\n\t\tforeach($files as $file){\n\t\t\tif (substr($file,-4,4)==\".xml\") {\n\t\t\t\t$year = substr($file,0,2);\n\t\t\t\t$month = substr($file,2,2);\n\t\t\t\tif($archive == $year . $month) { echo \"<a class=\\\"archiveLink $year$month currentArchive\\\">$month/$year</a> | \";}\n\t\t\t\telse { echo \"<a href=\\\"index.php?archive=$year$month\\\" class=\\\"archiveLink $year$month\\\">$month/$year</a> | \";}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t// Change the number below to decide how many months are initially revealed\n\t\t\tif ($i == 12) {\n\t\t\t\techo \"<span class=\\\"lwOldArchives\\\">\";\n\t\t\t}\n\t\t}\n\t\techo \"</span>\";\n\t\tclosedir($handle);\n\t}\n}", "public function hasZip()\n {\n return $this->hasFileType('zip');\n }", "public function isArchived(): bool\n {\n return $this->status == self::STATUS_ARCHIVED;\n }", "function et_is_job_menu(){\n\treturn is_post_type_archive('job') || get_post_type() == 'job' || is_home();\n}", "function codeless_is_inner_content(){\n $condition = false;\n\n // Condition to test if query is a blog\n if( ! codeless_is_blog_query() )\n $condition = true;\n\n\n if( (! codeless_page_from_builder() || \n ( codeless_get_page_layout() != 'fullwidth' \n && codeless_get_page_layout() != '' \n && codeless_get_page_layout() != 'default' ) || \n ( is_single() \n && get_post_type() == 'post' \n && codeless_get_post_style() != 'custom' ) \n )\n && $condition )\n\n return true;\n\n return false;\n}", "public function hasPortalLoopDisappear(){\n return $this->_has(19);\n }", "public function is_post_type_archive($post_types = '')\n {\n }", "public function verifyLayout($layout)\n {\n return $this->cacheEngine->isCached($layout);\n }", "function is404() {\n\t\treturn $this->View->template_resource == $this->get404Template() . '.tpl';\n\t}", "function is_podcast_download() {\n\t\t$download = false;\n\t\t$episode = false;\n\t\tglobal $wp_query;\n\t\tif ( isset( $wp_query->query_vars['podcast_episode'] ) && $wp_query->query_vars['podcast_episode'] ) {\n\t\t\t$download = true;\n\t\t\t$episode = intval( $wp_query->query_vars['podcast_episode'] );\n\t\t}\n\n\t\treturn apply_filters( 'ssp_is_podcast_download', $download, $episode );\n\t}", "function goya_is_blog () {\n\treturn ( is_archive() || is_author() || is_category() || is_home() || is_single() || is_tag()) && 'post' == get_post_type();\n}", "public function ismultiArchivo() {\n if ( in_array($this->tipo,['shp','shp/lab']) ) {\n return true;\n } else {\n return false;\n }\n }", "function libero_mikado_load_blog_assets() {\n\t\treturn libero_mikado_is_blog_template() || is_home() || is_single() || libero_mikado_has_blog_shortcode() || is_archive() || is_search() || libero_mikado_has_blog_widget();\n\t}", "function is_loop($i = 0)\n {\n }", "public function isDir()\n {\n return ( $this->object->content_type == self::$directory_type ) ;\n }", "function custom_type_archive_display($query) {\n if (is_post_type_archive('realestate_listings')) {\n $query->set('posts_per_page',9);\n return;\n }\n}", "private function _isCategoryPage()\n {\n $isCategoryPage = false;\n $handles = $this->_getLayout()->getUpdate()->getHandles();\n foreach($handles as $handle) {\n if($handle == self::PRODUCT_LIST_PAGE_MAIN_HANDLE) {\n $isCategoryPage = true;\n }\n }\n\n return $isCategoryPage;\n }", "public function isSlidesFromPosts(){\n\t\treturn $this->is_posts();\n\t}", "public function is_stream(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\t\t\n\t\treturn (!in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo', 'gallery'), true)) ? $source : false;\n\t}", "function codeless_is_layout_modern(){\n $layout_modern = codeless_get_mod( 'layout_modern' );\n\n if( codeless_get_meta( 'layout_modern' ) != 'default' && codeless_get_meta( 'layout_modern' ) != '' ){\n $layout_modern = codeless_get_meta( 'layout_modern' );\n }\n\n return $layout_modern;\n}", "function affinity_mikado_load_blog_assets() {\n\t\treturn affinity_mikado_is_ajax_enabled() || affinity_mikado_is_blog_template() || is_home() || is_single() || affinity_mikado_has_blog_shortcode() || is_archive() || is_search() || affinity_mikado_has_blog_widget();\n\t}", "protected function isIndex() {\n return $this->page === 'index';\n }", "function is_listings() {\r\n\t\treturn ( is_post_type_archive( 'listing' ) || is_page( ffd_get_page_id( 'listings' ) ) );\r\n\t}", "public function get_layout($alias) {\n\t\treturn (!empty($alias) && isset($this->layouts_manager_options['layouts'][$alias])) ? stripslashes_deep($this->layouts_manager_options['layouts'][$alias]) : false;\n\t}", "function is_feed() {\n\treturn(basename($_SERVER['PHP_SELF']) == XML_PAGE);\n}", "public function hasDefaultThemeLayout(): bool\n {\n return (bool) $this->defaultThemeLayout;\n }", "function isLanguageType($zipfile =null) {\n\t\tif(!empty($zipfile)) {\n\t\t\tif(!$this->checkZip($zipfile)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$packagetype = $this->type();\n\n\t\tif($packagetype) {\n\t\t\t$lcasetype = strtolower($packagetype);\n\t\t\tif($lcasetype == 'language') return true;\n\t\t}\n\t\treturn false;\n\t}", "public function show_archive()\n\t{\n\t\t$this->index(1);\n\t}", "public function getUseWorkspaceArchive()\n {\n return $this->use_workspace_archive;\n }", "private function isZipeable(): bool {\n\t\treturn $this->files->count();\n\t}", "static function currentIsArticle(): bool\n {\n return\n $GLOBALS['_index']->type === WebState::PAGE\n && $GLOBALS['_page']['type'] == Page::CATEGORY\n && $GLOBALS['_index']->segment !== null;\n }", "public function isDir()\n {\n return !$this->isPage();\n }", "public function archiveTemplate($archiveTemplate)\n {\n global $post;\n \n if (get_post_type($post) == \"pauta\" || is_post_type_archive('pauta'))\n {\n \tif(file_exists(get_stylesheet_directory().\"/archive-pauta.php\"))\n \t{\t\n \t\t$archive_template = get_stylesheet_directory().\"/archive-pauta.php\";\n \t}\n \telse \n \t{\n \t\t$archiveTemplate = $this->themeFilePath('archive-pauta.php');\n \t}\n }\n \n return $archiveTemplate;\n }", "function mp_ssv_events_template($archive_template)\n{\n if (is_post_type_archive('events') && get_theme_support('materialize')) {\n $archive_template = SSV_Events::PATH . '/custom-post-type/archive-events.php';\n }\n return $archive_template;\n}" ]
[ "0.6282635", "0.6276777", "0.6267492", "0.6255459", "0.61884147", "0.6185945", "0.6124314", "0.610723", "0.6095868", "0.59862787", "0.59439933", "0.5912041", "0.59014136", "0.57815915", "0.57696724", "0.5714028", "0.5699461", "0.5618901", "0.5596224", "0.55235755", "0.5519379", "0.5457917", "0.54397476", "0.54284817", "0.5390564", "0.5376934", "0.5350217", "0.5347674", "0.53289455", "0.53286374", "0.52691853", "0.5246292", "0.51749134", "0.5139115", "0.5135877", "0.5121816", "0.51183105", "0.5094273", "0.5092993", "0.5090943", "0.50700784", "0.50695676", "0.5069046", "0.5067184", "0.5064478", "0.50540984", "0.5051425", "0.5036477", "0.5031996", "0.50211066", "0.5020712", "0.50079596", "0.5000526", "0.49974102", "0.49898973", "0.4981347", "0.49802068", "0.49786428", "0.4968848", "0.49651313", "0.49639234", "0.49614984", "0.49539936", "0.4948329", "0.49222407", "0.49129784", "0.48884016", "0.48866758", "0.48865992", "0.48777848", "0.48764113", "0.48731917", "0.48670027", "0.48567668", "0.48456582", "0.48429507", "0.48311514", "0.4828893", "0.4826858", "0.48129496", "0.48091725", "0.48026997", "0.47967723", "0.47946674", "0.4789431", "0.47833773", "0.47794566", "0.47757575", "0.47724485", "0.47627503", "0.47606435", "0.47580793", "0.4757394", "0.47565007", "0.47559774", "0.47502378", "0.47474292", "0.4742959", "0.4722822", "0.47219598" ]
0.7995922
0
Filter the CPT's that get archive settings. Add via: $post_types['cpt_name'] = get_post_type_object( 'cpt_name' ); Remove via: unset( $post_types['cpt_name'] );
Фильтруйте CPT, которые получают настройки архива. Добавить через: $post_types['cpt_name'] = get_post_type_object( 'cpt_name' ); Удалить через: unset( $post_types['cpt_name'] );
function mai_get_cpt_settings_post_types() { return apply_filters( 'mai_cpt_settings_post_types', genesis_get_cpt_archive_types() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_custom_post_types_to_archives($query)\n{\n if (is_admin() || !$query->is_main_query()) {\n return;\n }\n\n if (is_category() || is_tag() && empty($query->query_vars['suppress_filters'])) {\n $cptui_post_types = cptui_get_post_type_slugs();\n\n $query->set(\n 'post_type',\n array_merge(\n array('post'),\n $cptui_post_types\n )\n );\n }\n}", "public function filter_post_type_args( $args, $post_type ) {\n\t\tif ( 'templatera' === $post_type ) {\n\t\t\t//$args['supports'] = array( 'title', 'editor', 'revisions' );\n\t\t\t$args['public'] = true;\n\t\t\t$args['publicly_queryable'] = true;\n\t\t\t$args['map_meta_cap'] = true;\n\t\t}\n\t\treturn $args;\n\t}", "protected function addCPTSupportToWpGetArchives()\n {\n add_filter('getarchives_where', function ($where, $args) {\n if (isset($args['post_type']) && $args['post_type']) {\n $where = \"WHERE post_type = '\".$args['post_type'].\"' AND post_status = 'publish'\";\n\n add_filter('get_archives_link', function($link) use ($args){\n $link = str_replace(home_url(), home_url().'/'.$args['post_type'], $link);\n return $link;\n }, 10, 2);\n }\n\n return $where;\n }, 10, 2);\n\n // Needed due to WPMU´s join-clause\n add_filter('getarchives_join', function ($join, $args) {\n if (isset($args['post_type']) && $args['post_type']) {\n $join = str_replace('post_post', 'post_'.$args['post_type'], $join);\n }\n return $join;\n }, 100, 2);\n\n }", "function amve_options_get_all_post_types() {\n\t$all_post_types = get_post_types();\n\tunset( $all_post_types['attachment'] );\n\tunset( $all_post_types['custom_css'] );\n\tunset( $all_post_types['customize_changeset'] );\n\tunset( $all_post_types['nav_menu_item'] );\n\tunset( $all_post_types['oembed_cache'] );\n\tunset( $all_post_types['wp_block'] );\n\tunset( $all_post_types['page'] );\n\tunset( $all_post_types['revision'] );\n\tunset( $all_post_types['user_request'] );\n\tasort( $all_post_types, SORT_STRING );\n\treturn $all_post_types;\n}", "private static function set_cpt(){\n\n\t\tif(!file_exists(INIT_DIR.\"/cpt.ini\")) return false;\n\n $post_types = parse_ini_file(INIT_DIR.\"/cpt.ini\", true);\n\n foreach($post_types as $post_type_name => $post_type){\n\n\n if(isset($post_type['remove']) and $post_type['remove']){\n\n\n CustomPostTypes::remove($post_type_name);\n\n } else {\n\n $post_type_params = array('labels' => array(\n 'name' => self::format_label($post_type['name']),\n 'singular_name' => self::format_label($post_type['singular_name']),\n 'all_items' => self::format_label($post_type['all_items']),\n 'add_new' => self::format_label($post_type['add_new']),\n 'add_new_item' => self::format_label($post_type['add_new_item']),\n 'edit' => self::format_label($post_type['edit']),\n 'edit_item' => self::format_label($post_type['edit_item']),\n 'new_item' => self::format_label($post_type['new_item']),\n 'view_item' => self::format_label($post_type['view_item']),\n 'search_items' => self::format_label($post_type['search_items']),\n 'not_found' => self::format_label($post_type['not_found']),\n 'not_found_in_trash' => self::format_label($post_type['not_found_in_trash']),\n 'parent_item_colon' => self::format_label($post_type['parent_item_colon']),\n ),\n 'description' => self::format_label($post_type['description']),\n 'public' => self::format_param($post_type['public']),\n 'publicly_queryable' =>self::format_param($post_type['publicly_queryable']),\n 'exclude_from_search' => self::format_param($post_type['exclude_from_search']),\n 'show_ui' => self::format_param($post_type['show_ui']),\n 'show_in_menu' => self::format_param($post_type['show_in_menu']),\n 'query_var' => self::format_param($post_type['query_var']),\n 'menu_icon' => self::format_param($post_type['menu_icon']),\n 'rewrite' => self::format_param($post_type['rewrite']),\n 'has_archive' => self::format_param($post_type['has_archive']),\n 'capability_type' => self::format_param($post_type['capability_type']),\n 'hierarchical' => self::format_param($post_type['hierarchical']),\n 'supports' => self::format_param($post_type['supports']),\n 'show_in_rest' => self::format_param($post_type['show_in_rest']),\n 'label' => $post_type_name,\n );\n\n if(isset($post_type['menu_position'])){\n $post_type_params['menu_position'] = self::format_param($post_type['menu_position']);\n }\n\n\n CustomPostTypes::add($post_type_name, $post_type_params);\n\n }\n\n }\n\n }", "function get_my_custom_post_types() {\n // Get all new CPTS\n $post_types = get_post_types(['public' => true ]);\n \n // Remove default CPTS\n unset($post_types['post']);\n unset($post_types['page']);\n unset($post_types['attachment']);\n\n return $post_types;\n }", "function ava_bb_enable_post_types( $post_types ) {\n\t$post_types[] = apply_filters( 'ava_beaver_builder_post_types', 'portfolio' );\n\treturn $post_types;\n}", "function remove_default_post_type($args, $postType) {\n if ($postType === 'post') {\n $args['public'] = false;\n $args['show_ui'] = false;\n $args['show_in_menu'] = false;\n $args['show_in_admin_bar'] = false;\n $args['show_in_nav_menus'] = false;\n $args['can_export'] = false;\n $args['has_archive'] = false;\n $args['exclude_from_search'] = true;\n $args['publicly_queryable'] = false;\n $args['show_in_rest'] = false;\n }\n\n return $args;\n}", "function category_archives( $wp_query ) {\n\n if ( ( $wp_query->get( 'category_name' ) || $wp_query->get( 'cat' ) ) && ( ! $wp_query->get( 'post_type' ) ) )\n $wp_query->set( 'post_type', 'any' );\n\n }", "public static function archivesToRegister()\n {\n $post_types = post_types();\n\n foreach ($post_types as $post_type => $label) {\n $archive_link = get_post_type_archive_link($post_type);\n if (! $archive_link) {\n unset($post_types[ $post_type ]);\n }\n }\n\n return apply_filters('stage_register_customizer_post_types', $post_types);\n }", "private function restorePostTypes() {\n\t\t$postTypes = aioseo()->helpers->getPublicPostTypes();\n\t\tforeach ( $postTypes as $postType ) {\n\t\t\t$name = $postType['name'];\n\t\t\tif ( 'type' === $name ) {\n\t\t\t\t$name = '_aioseo_type';\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->backup['postTypes'][ $name ]['searchAppearance'] ) ) {\n\t\t\t\t$this->restoreOptions( $this->backup['postTypes'][ $name ]['searchAppearance'], [ 'searchAppearance', 'postTypes', $name ] );\n\t\t\t\tunset( $this->backup['postTypes'][ $name ]['searchAppearance'] );\n\t\t\t\t$this->shouldBackup = true;\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->backup['postTypes'][ $name ]['social']['facebook'] ) ) {\n\t\t\t\t$this->restoreOptions( $this->backup['postTypes'][ $name ]['social']['facebook'], [ 'social', 'facebook', 'general', 'postTypes', $name ] );\n\t\t\t\tunset( $this->backup['postTypes'][ $name ]['social']['facebook'] );\n\t\t\t\t$this->shouldBackup = true;\n\t\t\t}\n\t\t}\n\t}", "function akamai_cacheable_post_types() {\n $default_types = [ 'post', 'page' ];\n\n /**\n * Filter: akamai_cacheable_post_types\n *\n * @since 0.7.0\n * @param array $types The list of post types that a purge will\n * fire for. Must add custom post types here!\n */\n return \\apply_filters(\n 'akamai_cacheable_post_types', $default_types );\n }", "function themify_specific_post_types(){\n\treturn array_unique(\n\t\tapply_filters('themify_specific_post_types', array(\n\t\t\t'menu',\n\t\t\t'slider',\n\t\t\t'highlight',\n\t\t\t'portfolio',\n\t\t\t'testimonial',\n\t\t\t'section'\n\t\t))\n\t);\n}", "public static function add_meta_boxes_filter( $post_types = array() ) {\n\t\t\t$post_types[] = 'sfwd-lessons';\n\t\t\t$post_types[] = 'sfwd-courses';\n\t\t\t$post_types[] = 'sfwd-topic';\n\t\t\t$post_types[] = 'sfwd-quiz';\n\t\t\treturn $post_types;\n\t\t}", "function _apw_allowed_post_types( $types )\n{\n\tunset( $types['attachment'] );\n\treturn $types;\n}", "public function output_filters( $post_type ) {\n\t\tif ( $post_type !== $this->object_type ) {\n\t\t\treturn;\n\t\t}\n\t\t$taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\t\t$taxonomies = array_filter( $taxonomies, array( $this, 'is_filterable' ) );\n\t\tarray_walk( $taxonomies, array( $this, 'output_filter_for' ) );\n\t}", "function get_post_types() {\n\treturn apply_filters( 'hnf_meta_hide_title', [] );\n}", "public function taxonomy_filter_restrict_manage_posts() {\n\t\tglobal $typenow;\n\n\t\t/* Only work for specific post type */\n\t\tif ( $typenow != 'wpgo_faq' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_types = get_post_types( array( '_builtin' => false ) );\n\n\t\tif ( in_array( $typenow, $post_types ) ) {\n\t\t\t$filters = get_object_taxonomies( $typenow );\n\n\t\t\tforeach ( $filters as $tax_slug ) {\n\t\t\t\tif ( ! isset( $_GET[$tax_slug] ) ) {\n\t\t\t\t\t$selected = '';\n\t\t\t\t} else {\n\t\t\t\t\t$selected = $_GET[$tax_slug];\n\t\t\t\t}\n\n\t\t\t\t$tax_obj = get_taxonomy( $tax_slug );\n\t\t\t\twp_dropdown_categories( array(\n\t\t\t\t\t'taxonomy' => $tax_slug,\n\t\t\t\t\t'name' => $tax_obj->name,\n\t\t\t\t\t'orderby' => 'name',\n\t\t\t\t\t'selected' => $selected,\n\t\t\t\t\t'hierarchical' => $tax_obj->hierarchical,\n\t\t\t\t\t'show_count' => true,\n\t\t\t\t\t'hide_empty' => true\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t}", "function add_custom_post_types_cat($query) {\n if (is_category() || is_tag() && empty ($query->query_vars['suppress_filters'])) {\n $query->set ('post_type', array (\n 'post', 'nav_menu_item', 'engine', 'launch_vehicle', 'stage', 'propellant'\n ));\n return $query;\n }\n}", "function algolia_exclude_post_types( $post_types ) {\n\tunset( $post_types['tumblr'] );\n\tunset( $post_types['coffee_checkins'] );\n\tunset( $post_types['presentation'] );\n\n\treturn $post_types;\n}", "function wptt_change_cpt_args( $args ){\n\n\t$args['public'] = true;\n\n\treturn $args;\n\n}", "function msd_yc_plugin_get_post_types() {\r\n // Get all registered types of posts\r\n $post_types = get_post_types('', 'names');\r\n // Post types to exclude\r\n $to_exclude = array('attachment', 'revision', 'nav_menu_item');\r\n\r\n return array_diff($post_types, $to_exclude);\r\n}", "function archive_filter($query) {\n if ($query->is_category()) {\n $query->set('post_type', 'recipe');\n }\n}", "function todo_restrict_manage_posts() {\n global $typenow;\n $args=array( 'public' => true, '_builtin' => false );\n $post_types = get_post_types($args);\n if ( in_array($typenow, $post_types) ) {\n $filters = get_object_taxonomies($typenow);\n foreach ($filters as $tax_slug) {\n $tax_obj = get_taxonomy($tax_slug);\n wp_dropdown_categories(array(\n 'show_option_all' => __('Category'),\n 'taxonomy' => $tax_slug,\n 'name' => $tax_obj->name,\n 'orderby' => 'term_order',\n 'selected' => $_GET[$tax_obj->query_var],\n 'hierarchical' => $tax_obj->hierarchical,\n 'show_count' => false,\n 'hide_empty' => true\n ));\n }\n }\n}", "public function _cb_restrict_manage_posts()\n\t{\n\t\tglobal $typenow;\n\n\t\tif ( $typenow !== $this->post_type )\n\t\t{\n\t\t\t// We only want to do this in the admin screen for this post type\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->_admin_filters as $taxonomy_id )\n\t\t{\n\t\t\t$taxonomy = get_taxonomy( $taxonomy_id );\n\t\t\twp_dropdown_categories(\n\t\t\t\tarray(\n\t\t\t\t\t'show_option_all' => sprintf( __( 'Show all %1$s' ), $taxonomy->label ),\n\t\t\t\t\t'taxonomy' => $taxonomy_id,\n\t\t\t\t\t'name' => $taxonomy_id,\n\t\t\t\t\t'orderby' => 'name',\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t\t'hide_empty' => true,\n\t\t\t\t\t'selected' => isset( $_GET[ $taxonomy_id ] ) ? $_GET[ $taxonomy_id ] : 0,\n\t\t\t\t\t'hide_if_empty' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function create_initial_post_types() {\n\tregister_post_type( 'post', array('exclude_from_search' => false) );\n\tregister_post_type( 'page', array('exclude_from_search' => false) );\n\tregister_post_type( 'attachment', array('exclude_from_search' => false) );\n\tregister_post_type( 'revision', array('exclude_from_search' => true) );\n}", "function _apw_get_post_type_args( $args )\n{\n\t// exclude built-in post types, show only custom post types\n\t$args['_builtin'] = false;\n\t\n\treturn $args;\n\n}", "public static function get_filtered_posts( $args=false )\n\t{\n\t\t$defaults = array(\n\t\t\t'post_type' => false\n\t\t);\n\t\t$args = wp_parse_args( $args, $defaults );\n\t\textract( $args, EXTR_SKIP );\n\n\t\tif ( ! $post_type ) {\n\t\t\t$post_type = get_post_type();\n\t\t}\n\t}", "function add_custom_types_to_tax( $query ) {\nif( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n\n// Get all your post types\n$post_types = get_post_types();\n\n$query->set( 'post_type', $post_types );\nreturn $query;\n}\n}", "public static function disable_post_types() {\n\t\tglobal $wp_post_types;\n\n\t\t$post_types_all = self::get_listing_post_types();\n\t\t$post_types_supported = get_theme_mod( 'inventor_general_post_types', $post_types_all );\n\t\t$post_types_unsupported = array_diff( $post_types_all, $post_types_supported );\n\n\t\tif ( is_array( $post_types_unsupported ) ) {\n\t\t\tforeach( $post_types_unsupported as $post_type ) {\n\t\t\t\tif ( ! empty( $wp_post_types[ $post_type ] ) ) {\n\t\t\t\t\tunset( $wp_post_types[ $post_type ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function bids_admin_posts_filter_restrict_manage_posts() {\r\n $type = 'post';\r\n if (isset($_GET['post_type'])) {\r\n $type = $_GET['post_type'];\r\n }\r\n\r\n //only add filter to post type you want\r\n if (FREELANCER_POST_TYPE == $type) {\r\n //change this to the list of values you want to show\r\n $taxonomies = get_terms('bid_category', array('hide_empty' => false));\r\n ?>\r\n <select name=\"ADMIN_FILTER_FIELD_VALUE\">\r\n <option value=\"\"><?php _e('Filter By Category', 'wose45436'); ?></option>\r\n <?php\r\n $current_v = isset($_GET['ADMIN_FILTER_FIELD_VALUE']) ? $_GET['ADMIN_FILTER_FIELD_VALUE'] : '';\r\n foreach ($taxonomies as $taxonomy) {\r\n printf(\r\n '<option value=\"%s\"%s>%s</option>', $taxonomy->slug, selected($taxonomy->slug, $current_v, false), $taxonomy->name\r\n );\r\n }\r\n ?>\r\n </select>\r\n <?php\r\n }\r\n}", "function rbtm_init_portfolio_cpt() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Properties', 'Post Type General Name', 'webmacz' ),\n\t\t'singular_name' => _x( 'Property', 'Post Type Singular Name', 'webmacz' ),\n\t\t'menu_name' => __( 'Property', 'webmacz' ),\n\t\t'name_admin_bar' => __( 'Properties', 'webmacz' ),\n\t\t'archives' => __( 'Item Archives', 'webmacz' ),\n\t\t'attributes' => __( 'Item Attributes', 'webmacz' ),\n\t\t'parent_item_colon' => __( 'Parent Item Property', 'webmacz' ),\n\t\t'all_items' => __( 'All Item Properties', 'webmacz' ),\n\t\t'add_new_item' => __( 'Add New Item Property', 'webmacz' ),\n\t\t'add_new' => __( 'Add New Property', 'webmacz' ),\n\t\t'new_item' => __( 'New Property Item', 'webmacz' ),\n\t\t'edit_item' => __( 'Edit Property Item', 'webmacz' ),\n\t\t'update_item' => __( 'Update Property Item', 'webmacz' ),\n\t\t'view_item' => __( 'View Property Item', 'webmacz' ),\n\t\t'view_items' => __( 'View Property Items', 'webmacz' ),\n\t\t'search_items' => __( 'Search Property item', 'webmacz' ),\n\t\t'not_found' => __( 'No Properties found', 'webmacz' ),\n\t\t'not_found_in_trash' => __( 'No Properties found in trash', 'webmacz' ),\n\t\t'featured_image' => __( 'Featured Image', 'webmacz' ),\n\t\t'set_featured_image' => __( 'Set Featured Image', 'webmacz' ),\n\t\t'remove_featured_image' => __( 'Remove Featured Image', 'webmacz' ),\n\t\t'use_featured_image' => __( 'Use as Featured Image', 'webmacz' ),\n\t\t'insert_into_item' => __( 'Insert into Property Item', 'webmacz' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this Property Item', 'webmacz' ),\n\t\t'items_list' => __( 'Property items list', 'webmacz' ),\n\t\t'items_list_navigation' => __( 'Property items list navigation', 'webmacz' ),\n\t\t'filter_items_list' => __( 'Filter Property Items list', 'webmacz' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'portfolio',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => false,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Properties', 'webmacz' ),\n\t\t'description' => __( 'A list of our Properties.', 'webmacz' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'author' ),\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-portfolio',\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'rewrite' => $rewrite,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'portfolio', $args );\n\n}", "function custom_unregister_theme_post_types() {\n\tglobal $wp_post_types;\n\tforeach ( [ 'project' ] as $post_type ) {\n\t\tif ( isset( $wp_post_types[ $post_type ] ) ) {\n\t\t\tunset( $wp_post_types[ $post_type ] );\n\t\t}\n\t}\n}", "private function get_post_types_with_archive_pages() {\n\t\t// We only want to index archive pages of public post types that have them.\n\t\t$public_post_types = $this->post_type->get_public_post_types( 'object' );\n\t\t$post_types_with_archive = \\array_filter( $public_post_types, [ $this->post_type, 'has_archive' ] );\n\n\t\t// We only need the post type names, not the objects.\n\t\t$post_types = [];\n\t\tforeach ( $post_types_with_archive as $post_type_with_archive ) {\n\t\t\t$post_types[] = $post_type_with_archive->name;\n\t\t}\n\n\t\treturn $post_types;\n\t}", "static function public_post_types() {\n $post_types \t\t= get_post_types(array(\n 'public' => false,\n '_builtin' => true,\n 'name' => 'attachment',\n 'show_ui'=>false,\n 'publicly_queryable'=>false\n ), 'names', 'NOT');\n // remove post type page from link picker\n // $post_types['page'] = 'page';\n $post_types \t\t= array_map(\"ucfirst\", $post_types);\n $post_types\t\t\t= apply_filters('avia_public_post_types', $post_types);\n self::$cache['post_types'] = $post_types;\n\n return $post_types;\n }", "public function handler_wp_restrict_manage_posts( $post_type )\n\t\t{\n\t\t\tif ( $post_type != $this->get_post_type() )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$taxonomies = get_object_taxonomies( $post_type, 'names' );\n\n\t\t\tif( empty( $taxonomies ) )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$terms = get_terms( $taxonomies, array( 'orderby' => 'name', 'oder' => 'ASC' ) );\n\n\t\t\tif( ! is_array( $terms ) || empty( $terms ) )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$last_filter = ( ! is_numeric( $this->filter_category ) ) ? 'all' : (int) $this->filter_category ;\n\n\t\t\techo\t'<label class=\"screen-reader-text\" for=\"av_elements_filter_elements\">' . __( 'Filter by Elements', 'avia_framework' ) . '</label>';\n\t\t\techo\t'<select id=\"av_elements_filter_elements\" class=\"postform\" name=\"av_elements_filter_elements\">';\n\t\t\techo\t\t'<option value=\"all\" ' . selected( $last_filter, 'all', false ) . '>'. __( 'All ALB Elements', 'avia_framework' ) . '</option>';\n\n\t\t\tforeach ( $terms as $term )\n\t\t\t{\n\t\t\t\techo\t'<option value=\"' . $term->term_id . '\" ' . selected( $last_filter, $term->term_id, false ) . '>'. $term->name . '</option>';\n\t\t\t}\n\n\t\t\techo '<select>';\n\n\t\t\t$args = array(\n\t\t\t\t\t'has_published_posts'\t=> array( $this->get_post_type() )\n\t\t\t\t);\n\n\t\t\t$users = get_users( $args );\n\t\t\t$uids = array();\n\n\t\t\tforeach( $users as $user )\n\t\t\t{\n\t\t\t\t$uids[] = $user->ID;\n\t\t\t}\n\n\t\t\t$sel_user = isset( $_REQUEST['av_elements_filter_user'] ) ? $_REQUEST['av_elements_filter_user'] : 0;\n\t\t\t$sel_user = is_numeric( $sel_user ) && ( (int) $sel_user >= 0 ) ? (int) $sel_user : 0;\n\n\t\t\t$args = array(\n\t\t\t\t\t'show_option_all'\t=> __( 'All users', 'avia_framework' ),\n\t\t\t\t\t'orderby'\t\t\t=> 'display_name',\n\t\t\t\t\t'order'\t\t\t\t=> 'ASC',\n\t\t\t\t\t'include'\t\t\t=> $uids,\n\t\t\t\t\t'name'\t\t\t\t=> 'av_elements_filter_user',\n\t\t\t\t\t'id'\t\t\t\t=> 'av_elements_filter_user',\n\t\t\t\t\t'class'\t\t\t\t=> 'postform',\n\t\t\t\t\t'selected'\t\t\t=> $sel_user\n\t\t\t\t);\n\n\t\t\twp_dropdown_users( $args );\n\t\t}", "function ava_bb_disable_post_types( $post_types ) {\n\tunset( $post_types[ apply_filters( 'ava_beaver_builder_post_types', 'team' ) ] );\n\treturn $post_types;\n}", "function namespace_add_custom_types( $query ) {\n if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {\n $query->set( 'post_type', array(\n 'post', 'insurance', 'risk', 'payroll', 'human-resources',\n ));\n }\n return $query;\n}", "function my_custom_link_query3( $query ){\n $cpt_to_remove = 'featurette'; // Edit this to your needs\n // find the corresponding array key\n $key = array_search( $cpt_to_remove, $query['post_type'] ); \n // remove the array item\n if( $key )\n unset( $query['post_type'][$key] );\n return $query; \n}", "function tkmnineteen_remove_post_custom_fields_now() {\n\tforeach ( get_post_types( '', 'names' ) as $post_type ) {\n\t\tremove_meta_box( 'postcustom' , $post_type , 'normal' );\n\t}\n}", "function fa_allowed_post_types(){\n\t// get the allowed post types from plugin settings\n\t$options = fa_get_options('settings');\n\t// merge the default post type with the allowed post types\n\t$allowed = array_unique( array_merge( array( 'post', 'page', fa_post_type_slide() ), (array)$options['custom_posts'] ) );\n\t\n\t// start the result\n\t$result\t = array();\n\tforeach( $allowed as $k => $post_type ){\n\t\tif( post_type_exists( $post_type ) ){\n\t\t\t$result[] = $post_type;\n\t\t}\n\t}\n\treturn $result;\t\n}", "private function restoreArchives() {\n\t\t$postTypes = aioseo()->helpers->getPublicPostTypes();\n\t\tforeach ( $postTypes as $postType ) {\n\t\t\t$name = $postType['name'];\n\t\t\tif ( 'type' === $name ) {\n\t\t\t\t$name = '_aioseo_type';\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->backup['archives'][ $name ]['searchAppearance'] ) ) {\n\t\t\t\t$this->restoreOptions( $this->backup['archives'][ $name ]['searchAppearance'], [ 'searchAppearance', 'archives', $name ] );\n\t\t\t\tunset( $this->backup['archives'][ $name ]['searchAppearance'] );\n\t\t\t\t$this->shouldBackup = true;\n\t\t\t}\n\t\t}\n\t}", "function settings_post_types_option() {\n\t\tglobal $edit_flow;\n\t\t$edit_flow->settings->helper_option_custom_post_type( $this->module );\n\t}", "function my_custom_link_query6( $query ){\n $cpt_to_remove = 'callout'; // Edit this to your needs\n // find the corresponding array key\n $key = array_search( $cpt_to_remove, $query['post_type'] ); \n // remove the array item\n if( $key )\n unset( $query['post_type'][$key] );\n return $query; \n}", "function uwmadison_add_custom_types( $query ) {\n\t if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n\t if ( !is_post_type_archive() && $query->is_archive() ) {\n\t $post_types = get_post_types( '', 'names' );\n\t $query->set( 'post_type', $post_types);\n\t return $query;\n\t }\n\t }\n\t}", "function tags_archives( $wp_query ) {\n\n if ( ( ( is_archive() || is_search() ) && $wp_query->get( 'tag' ) ) && ( ! $wp_query->get( 'post_type' ) ) )\n $wp_query->set( 'post_type', 'any' );\n\n }", "function cpt_portfolio_register_post_types() {\n\n\t/* Get the plugin settings. */\n\t$settings = get_option( 'plugin_cpt_portfolio', cpt_portfolio_get_default_settings() );\n\n\t/* Set up the arguments for the portfolio item post type. */\n\t$args = array(\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'exclude_from_search' => false,\n\t\t'hierarchical' => false,\n\t\t'has_archive' => $settings['portfolio_root'],\n\t\t'query_var' => 'portfolio_item',\n\t\t'capability_type' => 'portfolio_item',\n\t\t'map_meta_cap' => true,\n\n\t\t/* By default, only 2 caps are needed: 'manage_portfolio' and 'edit_portfolio_items'. */\n\t\t'capabilities' => array(\n\n\t\t\t// meta caps (don't assign these to roles)\n\t\t\t'edit_post' => 'edit_portfolio_item',\n\t\t\t'read_post' => 'read_portfolio_item',\n\t\t\t'delete_post' => 'delete_portfolio_item',\n\n\t\t\t// primitive caps used outside of map_meta_cap()\n\t\t\t'edit_posts' => 'edit_portfolio_items',\n\t\t\t'edit_others_posts' => 'manage_portfolio',\n\t\t\t'publish_posts' => 'manage_portfolio',\n\t\t\t'read_private_posts' => 'read',\n\n\t\t\t// primitive caps used inside of map_meta_cap()\n\t\t\t'read' => 'read',\n\t\t\t'delete_posts' => 'manage_portfolio',\n\t\t\t'delete_private_posts' => 'manage_portfolio',\n\t\t\t'delete_published_posts' => 'manage_portfolio',\n\t\t\t'delete_others_posts' => 'manage_portfolio',\n\t\t\t'edit_private_posts' => 'edit_portfolio_items',\n\t\t\t'edit_published_posts' => 'edit_portfolio_items'\n\t\t),\n\n\t\t/* The rewrite handles the URL structure. */\n\t\t'rewrite' => array(\n\t\t\t'slug' => !empty( $settings['portfolio_item_base'] ) ? \"{$settings['portfolio_root']}/{$settings['portfolio_item_base']}\" : $settings['portfolio_root'],\n\t\t\t'with_front' => false,\n\t\t\t'pages' => true,\n\t\t\t'feeds' => true,\n\t\t\t'ep_mask' => EP_PERMALINK,\n\t\t),\n\n\t\t/* What features the post type supports. */\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'thumbnail'\n\t\t),\n\n\t\t/* Labels used when displaying the posts. */\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Portfolio Items', 'cpt-portfolio' ),\n\t\t\t'singular_name' => __( 'Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'menu_name' => __( 'Portfolio', 'cpt-portfolio' ),\n\t\t\t'name_admin_bar' => __( 'Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'add_new' => __( 'Add New', 'cpt-portfolio' ),\n\t\t\t'add_new_item' => __( 'Add New Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'edit_item' => __( 'Edit Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'new_item' => __( 'New Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'view_item' => __( 'View Portfolio Item', 'cpt-portfolio' ),\n\t\t\t'search_items' => __( 'Search Portfolio', 'cpt-portfolio' ),\n\t\t\t'not_found' => __( 'No portfolio items found', 'cpt-portfolio' ),\n\t\t\t'not_found_in_trash' => __( 'No portfolio items found in trash', 'cpt-portfolio' ),\n\t\t\t'all_items' => __( 'Portfolio Items', 'cpt-portfolio' ),\n\n\t\t\t// Custom labels b/c WordPress doesn't have anything to handle this.\n\t\t\t'archive_title' => __( 'Portfolio', 'cpt-portfolio' ),\n\t\t)\n\t);\n\n\t/* Register the portfolio item post type. */\n\tregister_post_type( 'portfolio_item', $args );\n}", "public static function get_post_types()\n {\n }", "function vcex_get_post_types() {\n\t$post_types_list = array();\n\t$post_types = get_post_types( array(\n\t\t'public' => true\n\t) );\n\tif ( $post_types ) {\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\tif ( 'revision' != $post_type && 'nav_menu_item' != $post_type && 'attachment' != $post_type ) {\n\t\t\t\t$post_types_list[$post_type] = $post_type;\n\t\t\t}\n\t\t}\n\t}\n\treturn $post_types_list;\n}", "public static function get_post_types() {\n\t\treturn apply_filters( 'sticky_publish_types', array( 'post', 'page' ) );\n\t}", "function wpse_category_set_post_types( $query ){\n if( $query->is_category() && $query->is_main_query() ){\n $query->set( 'post_type', array( 'post', 'blog', 'people','press','testimonial','ssptv','project','industry','partner','solution','service','event','download' ) );\n }\n}", "function deactivate_post_type_support() {\n remove_post_type_support('page', 'comments');\n remove_post_type_support('page', 'author');\n remove_post_type_support('page', 'excerpt');\n remove_post_type_support('page', 'revisions');\n remove_post_type_support('page', 'date');\n}", "function custom_remove_post_type_support() {\t\t\n\tremove_post_type_support( 'coach', 'editor' );\n}", "function carob_assign_meta_boxes( $post_types ) {\n\n\t$post_types['portfolio'] = array( 'portfolio_options' );\n\t$post_types['post'] = array( 'all_options', 'page_title', 'page_layout' );\n\t$post_types['page'] = array( 'page_title', 'page_layout' );\n\n\treturn $post_types;\n}", "protected function post_types() {\r\n\t\t$post_types = array( 'pt-portfolio' );\r\n\t\t/**\r\n\t\t * Filters supported post types.\r\n\t\t *\r\n\t\t * @var array $post_types List supported post types.\r\n\t\t */\r\n\t\treturn apply_filters( 'gallery_meta_box_post_types', $post_types );\r\n\t}", "function wpse45436_admin_posts_filter_restrict_manage_posts(){\n $type = 'post';\n if (isset($_GET['post_type'])) {\n $type = $_GET['post_type'];\n }\n\n if ('post' == $type){\n $values = array(\n 'Grande evento' => 'outro',\n 'Eventos em série' => 'serie',\n );\n ?>\n <select name=\"tipo\">\n <option value=\"\"><?php _e('Todos os tipos de eventos ', 'wose45436'); ?></option>\n <?php $current_v = isset($_GET['tipo'])? $_GET['tipo']:''; foreach ($values as $label => $value) {\n printf\n (\n '<option value=\"%s\"%s>%s</option>',\n $value,\n $value == $current_v? ' selected=\"selected\"':'',\n $label\n );\n }\n ?>\n </select>\n <?php } //if submitted filter by post meta\n}", "function get_post_types() {\n\t\t$wpg_public_post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\tforeach( $wpg_public_post_types as $slug => $post_object ) {\n\t\t\tif ( $slug == 'attachment' ) {\n\t\t\t\tunset( $wpg_public_post_types[$slug] );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$wpg_public_post_types[$slug] = $post_object->labels->name;\n\t\t}\n\t\treturn $wpg_public_post_types;\n\t}", "function filter_search($query) {\n if (!$query->is_admin && $query->is_search) {\n $query->set('post_type', array('post','blog','press','ssptv','service','product','industry','project','download','event','job_opening','sectionpage'));\n }\n return $query;\n}", "function gfwa_exclude_post_types( $type ) {\n $filters = array( '', 'attachment' );\n $filters = apply_filters( 'gfwa_exclude_post_types', $filters );\n return(!in_array( $type, $filters ));\n}", "function flotheme_get_post_types() {\n\treturn array(\n 'projects' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n 'editor',\n 'thumbnail',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> false,\n //'rewrite' => array('slug'=>'project', 'with_front'=>true),\n //'menu_icon' => THEME_URL . '/images/icons/project.png'\n\t\t\t),\n\t\t\t'singular' => 'Project',\n\t\t\t'multiple' => 'Projects',\n\t\t\t'columns'\t=> array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n 'team' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n 'editor',\n 'thumbnail',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> false,\n //'rewrite' => array('slug'=>'project', 'with_front'=>true),\n //'menu_icon' => THEME_URL . '/images/icons/project.png'\n\t\t\t),\n\t\t\t'singular' => 'Team Member',\n\t\t\t'multiple' => 'Team Members',\n\t\t\t'columns'\t=> array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n 'client' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => false,\n 'show_ui' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n 'editor',\n 'thumbnail',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> false,\n //'rewrite' => array('slug'=>'project', 'with_front'=>false),\n //'menu_icon' => THEME_URL . '/images/icons/project.png'\n\t\t\t),\n\t\t\t'singular' => 'Client',\n\t\t\t'multiple' => 'Clients',\n\t\t\t'columns'\t=> array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n );\n}", "function namespace_add_post_type_vbs( $query ) {\n if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {\n $query->set( 'post_type', array(\n 'post', 'post_type_vbs'\n ));\n }\n return $query;\n}", "function my_custom_link_query4( $query ){\n $cpt_to_remove = 'staff'; // Edit this to your needs\n // find the corresponding array key\n $key = array_search( $cpt_to_remove, $query['post_type'] ); \n // remove the array item\n if( $key )\n unset( $query['post_type'][$key] );\n return $query; \n}", "private function migratePostTypes() {\n\t\t$postTypes = $this->options['seopress_news_name_post_types_list'];\n\t\tif ( empty( $postTypes ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$included = wp_list_filter( $postTypes, [ 'include' => true ] );\n\n\t\taioseo()->options->sitemap->news->postTypes->included = array_keys( $included );\n\t}", "public function register_post_types()\n\t{\n\t\t$cpts = $this->cpts;\n\n\t\tif ( is_null( $cpts ) ) return false;\n\n\t\tforeach ( $cpts as $name => $cpt ) {\n\t $labels = array(\n\t 'name' => ucwords( $name ),\n\t 'singular_name' => ucwords( $cpt['single'] ),\n\t 'all_items' => \"All \" . ucwords( $cpt['plural'] ),\n\t 'add_new' => \"Add New \" . ucwords( $cpt['single'] ),\n\t 'add_new_item' => \"Add New \" . ucwords( $cpt['single'] ),\n\t 'edit_item' => \"Edit \" . ucwords( $cpt['single'] ),\n\t 'new_item' => \"New \" . ucwords( $cpt['single'] ),\n\t 'view_item' => \"View \" . ucwords( $cpt['single'] ),\n\t 'search_items' => \"Search \" . ucwords( $cpt['plural'] ),\n\t 'not_found' => \"No \" . ucwords( $cpt['single'] ) . \" found\",\n\t 'not_found_in_trash'=> \"No \" . ucwords( $cpt['single'] ) . \" found in trash\",\n\t 'parent_item_colon' => \"Parent \" . ucwords( $cpt['single'] ) . \":\",\n\t 'menu_name' => _x( ucwords( $cpt['plural'] ), 'wordpress' )\n\t );\n\n\t $args = array_merge(\n\t \tarray(\n\t\t 'labels' => $labels,\n\t\t 'query_var' => $name,\n\t\t 'rewrite' => true,\n\t\t 'public' => false,\n\t\t 'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t 'show_in_menu' => true,\n\t\t 'show_in_nav_menus' => false,\n\t\t 'publicly_queryable'=> false,\n\t\t 'exclude_from_search' => true,\n\t\t 'has_archive' => true,\n\t\t 'can_export' => true,\n\t\t 'capability_type' => 'post',\n\t\t 'capabilities' => array(\n\t\t 'read' => true,\n\t\t 'create_posts' => true, // Toggles support for the \"Add New\" function\n\t\t ),\n\t\t 'map_meta_cap' => true, // Set to false, if users are not allowed to edit/delete existing posts\n\t\t ),\n\t\t $cpt['args']\n\t\t );\n\n\t /**\n\t * Register the Post Type\n\t *\n\t */\n\t register_post_type( $name, $args );\n\t }\n\t}", "function _filter_by_taxonomy() {\n\t\n\t // only display these taxonomy filters on desired custom post_type listings\n\t global $typenow;\n\t \n\t if ($typenow == 'projects') {\n\t\n\t // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list\n\t $filters = array('project-type');\n\t\n\t foreach ($filters as $tax_slug) {\n\t \t\n\t // retrieve the taxonomy object\n\t $tax_obj = get_taxonomy($tax_slug);\n\t \n\t $tax_name = $tax_obj->labels->name;\n\t \n\t // retrieve array of term objects per taxonomy\n\t $terms = get_terms($tax_slug);\n\t\n\t // output html for taxonomy dropdown filter\n\t echo \"<select name='$tax_slug' id='$tax_slug' class='postform'>\";\n\t \n\t echo \"<option value=''>Show All $tax_name</option>\";\n\t \n\t foreach ($terms as $term) {\n\t \t\n\t // output each select option line, check against the last $_GET to show the current option selected\n\t echo '<option value='. $term->slug, $_GET[$tax_slug] == $term->slug ? ' selected=\"selected\"' : '','>' . $term->name .' (' . $term->count .')</option>';\n\t \n\t }//foreach\n\t \n\t echo \"</select>\";\n\t \n\t }//foreach\n\t \n\t }//if\n\t \n\t}", "function wpse45436_posts_filter( $query ){\n global $pagenow;\n $type = 'post';\n if (isset($_GET['post_type'])) {\n $type = $_GET['post_type'];\n }\n if ( 'nwswa_reservation' == $type && is_admin() && $pagenow=='edit.php' && isset($_GET['ADMIN_FILTER_FIELD_VALUE']) && $_GET['ADMIN_FILTER_FIELD_VALUE'] != '') {\n $query->query_vars['meta_key'] = 'nwswa_reservation_status';\n $query->query_vars['meta_value'] = $_GET['ADMIN_FILTER_FIELD_VALUE'];\n }\n}", "public function filters()\n {\n add_filter('Timber\\PostClassMap', function () {\n return get_cpt_classmap();\n });\n\n add_filter('acf/format_value/type=relationship', [$this, 'towa_resolve_cpts'], 9999, 3);\n add_filter('acf/format_value/type=post_object', [$this, 'towa_resolve_cpt'], 9999, 3);\n\n // faster load times in backend\n add_filter('acf/settings/remove_wp_meta_box', '__return_true');\n\n add_filter('wpseo_metabox_prio', [$this, 'yoast_to_bottom']);\n\n add_filter('jpeg_quality', function () {\n return 100;\n });\n }", "function custom_type_archive_display($query) {\n if (is_post_type_archive('realestate_listings')) {\n $query->set('posts_per_page',9);\n return;\n }\n}", "public function _post_filter()\n {\n global $typenow, $wp_query;\n if (in_array($typenow, $this->post_type)) {\n wp_dropdown_categories([\n 'show_option_all' => sprintf(__('Show all %s', 'rebe'), $this->plural),\n 'taxonomy' => $this->name,\n 'name' => $this->name,\n 'orderby' => 'name',\n 'selected' => isset($wp_query->query[$this->name]) ? $wp_query->query[$this->name] : '',\n 'hierarchical' => true,\n 'show_count' => true,\n 'hide_empty' => true,\n ]);\n }\n }", "function make_cpt(){\n\n register_post_type('clients',\n //options\n array(\n 'labels' => array(\n 'name' => __( 'Clients' ),\n 'singular_name' => __( 'Client' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-businessman',\n 'supports' => array(\n 'title',\n 'custom-fields'\n )\n )\n );\n\n register_post_type('sitecontent',\n //options\n array(\n 'labels' => array(\n 'name' => __( 'Site Content' ),\n 'singular_name' => __( 'Site Content' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-media-document',\n 'supports' => array(\n 'title',\n 'custom-fields'\n )\n )\n );\n\n register_post_type('sitedesign',\n //options\n array(\n 'labels' => array(\n 'name' => __( 'Site Design' ),\n 'singular_name' => __( 'Site Design' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-image-crop',\n 'supports' => array(\n 'title',\n 'custom-fields'\n )\n )\n );\n\n register_post_type('timeline',\n //options\n array(\n 'labels' => array(\n 'name' => __( 'Timelines' ),\n 'singular_name' => __( 'Timeline' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-calendar-alt',\n 'supports' => array(\n 'title',\n 'custom-fields'\n )\n )\n );\n\n register_post_type('development',\n //options\n array(\n 'labels' => array(\n 'name' => __( 'Development' ),\n 'singular_name' => __( 'Development' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-admin-site-alt3',\n 'supports' => array(\n 'title',\n 'custom-fields'\n )\n )\n );\n\n\n\n}", "public function allowed_types_for_filter() {\n\n\t\tif ( false !== $this->_allowed_types ) {\n\t\t\treturn $this->_allowed_types;\n\t\t}\n\n\t\t$allowed_types = jet_blog_settings()->get( 'allow_filter_for', 'post' );\n\n\t\tif ( ! $allowed_types ) {\n\t\t\t$allowed_types = array( 'post' );\n\t\t}\n\n\t\tif ( ! is_array( $allowed_types ) ) {\n\t\t\t$allowed_types = array( $allowed_types );\n\t\t}\n\n\t\t$this->_allowed_types = $allowed_types;\n\n\t\treturn $allowed_types;\n\n\t}", "function namespace_add_custom_types( $query ) {\n if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n $query->set( 'post_type', array(\n 'post', 'nav_menu_item', 'whats-happening', 'concert', 'community-info', 'splash-post',\n ));\n return $query;\n }\n}", "public static function filterDisableMetaboxPosttypes( $postTypes ) {\n\t\tif ( get_option( 'cmtt_disable_metabox_all_post_types' ) ) {\n\t\t\t$postTypes = get_post_types();\n\t\t}\n\t\treturn $postTypes;\n\t}", "function process_post_types(){\r\n \r\n // Get task\r\n $post_types = acf_maybe_get($this->data['tasks'], 'post_types', array());\r\n $post_type = array_shift($post_types);\r\n \r\n // No post type to process\r\n if(!$post_type) return;\r\n \r\n // Get object\r\n $object = get_post_type_object($post_type);\r\n \r\n // Processing\r\n if($this->data['offset'] === -1){\r\n \r\n // Update data\r\n $this->data['offset'] = 0;\r\n \r\n // Count\r\n $count = $this->count_posts($post_type);\r\n \r\n // Send response\r\n $this->send_response(array(\r\n 'message' => \"Processing: <strong>{$object->label}</strong> ({$count} post\" . ($count > 1 ? 's' : '') . \")\",\r\n 'status' => 'info',\r\n ));\r\n \r\n }\r\n \r\n // Items\r\n $items = get_posts(array(\r\n 'post_type' => $post_type,\r\n 'post_status' => 'any',\r\n 'posts_per_page' => get_field('items_per_request'),\r\n 'fields' => 'ids',\r\n 'offset' => $this->data['offset'],\r\n ));\r\n \r\n // Finished\r\n if(!$items){\r\n \r\n // Update data\r\n $this->data['offset'] = -1;\r\n $this->data['tasks']['post_types'] = $post_types; // array_shift() already removed current object\r\n \r\n // Empty response\r\n $this->send_response();\r\n \r\n }\r\n \r\n // Temp vars\r\n $left = $this->stats['left'];\r\n $offset = $this->data['offset'];\r\n $orphan = $this->data['orphan'];\r\n $deleted = $this->data['deleted'];\r\n \r\n // Vars\r\n $found = array();\r\n \r\n // Loop items\r\n foreach($items as $item_id){\r\n \r\n // Vars\r\n $title = get_the_title($item_id);\r\n $link = admin_url(\"post.php?post={$item_id}&action=edit\");\r\n \r\n // Meta\r\n $meta = $this->clean_meta($item_id, $this->confirm); // Confirm = true/false/null (confirm/cancel/doesn't exists)\r\n $count = count($meta);\r\n \r\n // Update vars\r\n $left--;\r\n $offset++;\r\n $orphan += $count;\r\n $deleted += $this->confirm ? $count : 0;\r\n \r\n // No orphan found\r\n if(!$meta) continue;\r\n \r\n $found['messages'][] = \"{$object->labels->singular_name}: <a href='{$link}' target='_blank'>{$title}</a> - {$count} orphan meta found\";\r\n \r\n $found['debug'][] = array(\r\n 'post_id' => $item_id,\r\n 'title' => $title,\r\n 'orphan' => $meta\r\n );\r\n \r\n }\r\n \r\n // Ask confirmation\r\n if($found && $this->confirm === null){\r\n \r\n $found['messages'][] = \"Perform cleanup?\";\r\n \r\n // Send response\r\n $this->send_response(array(\r\n 'message' => $found['messages'],\r\n 'debug' => $found['debug'],\r\n 'event' => 'confirm',\r\n 'status' => 'warning',\r\n ));\r\n \r\n }\r\n \r\n // Reset confirm\r\n $this->confirm = null;\r\n \r\n // Update data\r\n $this->stats['left'] = $left;\r\n $this->data['offset'] = $offset;\r\n $this->data['orphan'] = $orphan;\r\n $this->data['deleted'] = $deleted;\r\n \r\n // Empty response\r\n $this->send_response();\r\n \r\n }", "function gpc_cpt_pre_get_posts( $query ) {\n // do not modify queries in the admin\n if( is_admin() ) {\n return $query;\n }\n // only modify queries for specified post type\n if( isset( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] === 'custom_post_type_name' ) {\n $query->set( 'orderby', 'meta_value' );\t\n $query->set( 'meta_key', 'some_custom_field' );\t \n $query->set( 'order', 'ASC' ); \n }\n // return\n return $query;\n}", "public function get_allowed_post_types() {\n\t\t$allowed_post_types = apply_filters( 'f1_multi_section_reports_post_types', array( 'post' ) );\n\t\tif( !array( $allowed_post_types ) ) {\n\t\t\t$allowed_post_types = array( $allowed_post_types );\n\t\t}\n\n\t\treturn $allowed_post_types;\n\t}", "function register_post_types() {\n\t\tinclude('functions/project.cpt.php');\n\t\tinclude('functions/sketchbook.cpt.php');\n\t}", "function tmsc_zoninator_post_type_support() {\n\t$post_types = apply_filters( 'tmsc_curated_zones_post_types', array( 'post', 'tms_object', 'exhibition', 'constituent' ) );\n\t// Add the Zoninator taxonomy for the defined post types\n\tforeach ( $post_types as $post_type ) {\n\t\tadd_post_type_support( $post_type, 'zoninator_zones' );\n\t\tregister_taxonomy_for_object_type( 'zoninator_zones', $post_type );\n\t}\n\t// The Zoninator internal post_types array has already been written and cached by this point.\n\t// We must override it to enabled these post types for the recent posts dropdown and AJAX searches.\n\tz_get_zoninator()->post_types = $post_types;\n}", "function maybe_register_cpt() {\n // Add an option to enable the CPT\n add_action( 'admin_init', array( $this, 'settings_api_init' ) );\n\n // Check on theme switch if theme supports CPT and setting is disabled\n add_action( 'after_switch_theme', array( $this, 'activation_post_type_support' ) );\n\n $setting = 1;\n\n if ( class_exists( 'Jetpack_Options' ) ) {\n $setting = Jetpack_Options::get_option_and_ensure_autoload( self::OPTION_NAME, '0' );\n }\n\n // Bail early if Testimonial option is not set and the theme doesn't declare support\n if ( empty( $setting ) && ! $this->site_supports_custom_post_type() ) {\n return;\n }\n\n // Enable Omnisearch for CPT.\n if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) {\n new Jetpack_Omnisearch_Posts( self::CUSTOM_POST_TYPE );\n }\n\n // CPT magic\n $this->register_post_types();\n add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );\n add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );\n add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE ), array( $this, 'flush_rules_on_first_testimonial' ) );\n add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) );\n\n // Admin Customization\n add_filter( 'enter_title_here', array( $this, 'change_default_title' ) );\n add_filter( sprintf( 'manage_%s_posts_columns', self::CUSTOM_POST_TYPE), array( $this, 'edit_title_column_label' ) );\n add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );\n add_action( 'customize_register', array( $this, 'customize_register' ) );\n\n // Only add the 'Customize' sub-menu if the theme supports it.\n $num_testimonials = self::count_testimonials();\n if ( ! empty( $num_testimonials ) && current_theme_supports( self::CUSTOM_POST_TYPE ) ) {\n add_action( 'admin_menu', array( $this, 'add_customize_page' ) );\n }\n\n // Add to Jetpack XML sitemap\n add_filter( 'jetpack_sitemap_post_types', array( $this, 'add_to_sitemap' ) );\n\n // Adjust CPT archive and custom taxonomies to obey CPT reading setting\n add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ), 20 );\n add_filter( 'infinite_scroll_settings', array( $this, 'infinite_scroll_click_posts_per_page' ) );\n\n // Register [jetpack_testimonials] always and\n // register [testimonials] if [testimonials] isn't already set\n add_shortcode( 'jetpack_testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );\n\n if ( ! shortcode_exists( 'testimonials' ) ) {\n add_shortcode( 'testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );\n }\n\n // If CPT was enabled programatically and no CPT items exist when user switches away, disable\n if ( $setting && $this->site_supports_custom_post_type() ) {\n add_action( 'switch_theme', array( $this, 'deactivation_post_type_support' ) );\n }\n }", "function ootheme_get_post_types() {\n\t\treturn array(\n\t\t\t'venue' => array(\n\t\t\t\t'config' => array(\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t'menu_position' => 20,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'supports'=> array(\n\t\t\t\t\t\t'title',\n\t\t\t\t\t\t'page-attributes',\n\t\t\t\t\t\t'thumbnail',\n\t\t\t\t\t\t'comments',\n\t\t\t\t\t),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'edit_post' => 'edit_venue',\n\t\t\t\t\t\t'edit_posts' => 'edit_venues',\n\t\t\t\t\t\t'edit_others_posts' => 'edit_others_venues',\n\t\t\t\t\t\t'publish_posts' => 'publish_venues',\n\t\t\t\t\t\t'read_post' => 'read_venues',\n\t\t\t\t\t\t'read_private_posts' => 'read_private_venues',\n\t\t\t\t\t\t'delete_post' => 'delete_venues'\n\t\t\t\t\t),\n\t\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t\t\t'rewrite' => array('slug' => 'profile'),\n\t\t\t\t),\n\t\t\t\t'singular' => 'Advertiser',\n\t\t\t\t'multiple' => 'Advertisers',\n\t\t\t\t'columns'\t=> array(\n\t\t\t\t\t'featured',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\t'config' => array(\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t'menu_position' => 20,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'supports'=> array(\n\t\t\t\t\t\t'title',\n\t\t\t\t\t\t'thumbnail',\n\t\t\t\t\t),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'edit_post' => 'edit_venue',\n\t\t\t\t\t\t'edit_posts' => 'edit_venues',\n\t\t\t\t\t\t'edit_others_posts' => 'edit_others_venues',\n\t\t\t\t\t\t'publish_posts' => 'publish_venues',\n\t\t\t\t\t\t'read_post' => 'read_venues',\n\t\t\t\t\t\t'read_private_posts' => 'read_private_venues',\n\t\t\t\t\t\t'delete_post' => 'delete_venues'\n\t\t\t\t\t),\n\t\t\t\t\t'show_in_nav_menus'=> false,\n\t\t\t\t),\n\t\t\t\t'singular' => 'Event',\n\t\t\t\t'multiple' => 'Events',\n\t\t\t\t'columns'\t=> array(),\n\t\t\t),\n\t\t\t'issue' => array(\n\t\t\t\t'config' => array(\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t'menu_position' => 20,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'supports'=> array(\n\t\t\t\t\t\t'title',\n\t\t\t\t\t\t'page-attributes',\n\t\t\t\t\t\t'thumbnail',\n\t\t\t\t\t),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'edit_post' => 'edit_venue',\n\t\t\t\t\t\t'edit_posts' => 'edit_venues',\n\t\t\t\t\t\t'edit_others_posts' => 'edit_others_venues',\n\t\t\t\t\t\t'publish_posts' => 'publish_venues',\n\t\t\t\t\t\t'read_post' => 'read_venues',\n\t\t\t\t\t\t'read_private_posts' => 'read_private_venues',\n\t\t\t\t\t\t'delete_post' => 'delete_venues'\n\t\t\t\t\t),\n\t\t\t\t\t'show_in_nav_menus'=> false,\n\t\t\t\t),\n\t\t\t\t'singular' => 'Issue',\n\t\t\t\t'multiple' => 'Issues',\n\t\t\t\t'columns'\t=> array(\n\t\t\t\t\t'featured',\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'featured-vendor' => array(\n\t\t\t\t'config' => array(\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t'menu_position' => 20,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'show_ui'\t\t=> false,\n\t\t\t\t\t'show_in_menu'\t=> false,\n\t\t\t\t\t'show_in_admin_bar'\t=> false,\n\t\t\t\t\t'supports'=> array(),\n\t\t\t\t\t'show_in_nav_menus'=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "public static function get_archive_posts($post_type,$category,$posts_per_page = 6, $page = 0, $exclude) {\n\n //build custom taxonomy\n $tax = $post_type . \"-category\";\n\n $exclude = implode(\",\", $exclude);\n //build query arguments array with post type and custom taxonomy category\n $args = array(\n 'post_type' => $post_type,\n 'tax_query' => array(\n 'relation' => 'AND',\n array(\n 'taxonomy' => $tax,\n 'field' => 'slug',\n 'terms' => array($category)\n ),\n array(\n 'taxonomy' => $tax,\n 'field' => 'slug',\n 'terms' => array('all-access'),\n 'operator' => 'NOT IN'\n )\n ),\n 'posts_per_page' => $posts_per_page,\n 'paged' => $page\n );\n //$posts = get_posts($args);\n\n $wp_query = new WP_Query;\n $posts = $wp_query->query($args);\n\n $max_pages = $wp_query->max_num_pages;\n $more_posts = ($max_pages > 1 && $max_pages != $page) ? \"true\" : \"false\";\n\n $posts_array = array();\n\n //iterate and grab needed info from each posts\n\n foreach ($posts as $p) {\n $id = $p->ID;\n $category = get_post_meta($id, 'category_heading', true);\n\n if ($category == '') {\n $category = self::get_custom_post_category($post_type,$p);\n } else {\n $category = get_post_meta($id, 'category_heading', true);\n }\n\n //get permalink\n $permalink = get_permalink($p->ID);\n $permalink = empty($permalink) ? '' : $permalink;\n //get featured image\n\n $featured_img_full = self::get_featured_image($p,'2/3-image-with-text');\n $featured_img_medium = self::get_featured_image($p,'large-thumbnail');\n\n $post_type = get_post_type($p);\n $category_landscape_img = MultiPostThumbnails::get_post_thumbnail_url($post_type, 'category-landscape-image', $p->ID);\n\n //if no category landscape image inserted, use full image\n if (empty($category_landscape_img)) {\n $category_landscape_img = $featured_img_full;\n }\n\n $p_array = array( 'category' => $category\n , 'permalink' => $permalink\n , 'featured_img_full' => $featured_img_full\n , 'featured_img_medium' => $featured_img_medium\n , 'category_landscape_img' => $category_landscape_img\n , 'title' => $p->post_title\n , 'post_id' => $p->ID\n );\n\n array_push($posts_array, $p_array);\n }\n\n return array('posts' => $posts_array\n , 'more_posts' => $more_posts\n );\n\n\n }", "function theme_post_type() {\n\t\t$labels_envio = array(\n\t\t\t\t'name' => _x( 'Envios', 'Post Type General Name', THEME_NAME ),\n\t\t\t\t'singular_name' => _x( 'Envio', 'Post Type Singular Name', THEME_NAME ),\n\t\t\t\t'menu_name' => __( 'Envios', THEME_NAME ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Envio:', THEME_NAME ),\n\t\t\t\t'all_items' => __( 'All Envios', THEME_NAME ),\n\t\t\t\t'view_item' => __( 'View Envio', THEME_NAME ),\n\t\t\t\t'add_new_item' => __( 'Add New Envio', THEME_NAME ),\n\t\t\t\t'add_new' => __( 'Add New', THEME_NAME ),\n\t\t\t\t'edit_item' => __( 'Edit Envio', THEME_NAME ),\n\t\t\t\t'update_item' => __( 'Update Envio', THEME_NAME ),\n\t\t\t\t'search_items' => __( 'Search Envio', THEME_NAME ),\n\t\t\t\t'not_found' => __( 'Not found', THEME_NAME ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', THEME_NAME ),\n\t\t);\n\t\t$args_envio = array(\n\t\t\t\t'label' => __( 'envio', THEME_NAME ),\n\t\t\t\t'description' => __( 'Tipos de gastos de envio', THEME_NAME ),\n\t\t\t\t'labels' => $labels_envio,\n\t\t\t\t'supports' => array( 'title'),\n\t\t\t\t'taxonomies' => array( 'envio_type'),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'menu_position' => 57,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'menu_icon' => 'dashicons-location'\n\t\t);\n\t\tregister_post_type( 'envio', $args_envio );\n\n\n\t\t$labels_reparto = array(\n\t\t\t\t'name' => _x( 'Repartos', 'Post Type General Name', THEME_NAME ),\n\t\t\t\t'singular_name' => _x( 'Reparto', 'Post Type Singular Name', THEME_NAME ),\n\t\t\t\t'menu_name' => __( 'Repartos', THEME_NAME ),\n\t\t\t\t'parent_item_colon' => __( 'Parent reparto:', THEME_NAME ),\n\t\t\t\t'all_items' => __( 'All Repartos', THEME_NAME ),\n\t\t\t\t'view_item' => __( 'View reparto', THEME_NAME ),\n\t\t\t\t'add_new_item' => __( 'Add New reparto', THEME_NAME ),\n\t\t\t\t'add_new' => __( 'Add New', THEME_NAME ),\n\t\t\t\t'edit_item' => __( 'Edit reparto', THEME_NAME ),\n\t\t\t\t'update_item' => __( 'Update reparto', THEME_NAME ),\n\t\t\t\t'search_items' => __( 'Search reparto', THEME_NAME ),\n\t\t\t\t'not_found' => __( 'Not found', THEME_NAME ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', THEME_NAME ),\n\t\t);\n\t\t$args_reparto = array(\n\t\t\t\t'label' => __( 'Reparto', THEME_NAME ),\n\t\t\t\t'description' => __( 'Zonas de reparto', THEME_NAME ),\n\t\t\t\t'labels' => $labels_reparto,\n\t\t\t\t'supports' => array( 'title'),\n\t\t\t\t'taxonomies' => array( 'reparto_type'),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'menu_position' => 57,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'menu_icon' => 'dashicons-admin-site'\n\t\t);\n\t\tregister_post_type( 'reparto', $args_reparto );\n\t}", "public function disable_view_mode( $post_types ) {\n\t\tunset( $post_types['job_listing'] );\n\t\treturn $post_types;\n\t}", "function SearchFilter($query) {\nif ($query->is_search) {\n$query->set('post_type', array('post', 'Bibliotech', 'Spotlights'));\n}\nreturn $query;\n}", "function custom_post_author_archive($query) {\n if ($query->is_author)\n $query->set( 'post_type', array('post', 'page','about') );\n remove_action( 'pre_get_posts', 'custom_post_author_archive' );\n}", "function jdd_add_custom_types_to_taxonomies( $query ) {\n\n\tif ( is_home() || ( is_category() || is_tag() && $query->is_archive() ) ) {\n\t\tif ( empty( $query->query_vars['suppress_filters'] ) ) {\n\t\t\t$query->set(\n\t\t\t\t'post_type',\n\t\t\t\tarray(\n\t\t\t\t\t'post',\n\t\t\t\t\t'amp_story',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\treturn $query;\n}", "function wpse45436_admin_posts_filter_restrict_manage_posts(){\n $type = 'nwswa_reservation';\n if (isset($_GET['post_type'])) {\n $type = $_GET['post_type'];\n }\n\n //only add filter to post type you want\n if ('nwswa_reservation' == $type){\n //change this to the list of values you want to show\n //in 'label' => 'value' format\n $values = array(\n\t\t\t'Bestätigt' => 'bestätigt', \n\t\t\t'Storniert' => 'storniert',\n );\n ?>\n <select name=\"ADMIN_FILTER_FIELD_VALUE\">\n <option value=\"\"><?php _e('Status ', 'wose45436'); ?></option>\n <?php\n $current_v = isset($_GET['ADMIN_FILTER_FIELD_VALUE'])? $_GET['ADMIN_FILTER_FIELD_VALUE']:'';\n foreach ($values as $label => $value) {\n printf\n (\n '<option value=\"%s\"%s>%s</option>',\n $value,\n $value == $current_v? ' selected=\"selected\"':'',\n $label\n );\n }\n ?>\n </select>\n <?php\n }\n}", "private function getAllPostTypesNames() {\n\n\t\t/** @var WP_Post_Type[] $postTypesObjects */\n\t\t$postTypesObjects = get_post_types( array( 'public' => true ), 'objects' );\n\n\t\t$postTypes = array();\n\t\t$excludeList = array( 'attachment' );\n\n\t\tforeach( $postTypesObjects as $postType ){\n\t\t\tif( ! in_array( $postType->name, $excludeList ) ){ // Exclude if in list\n\n\t\t\t\t$postTypes[ $postType->name ] = sprintf( '<span style=\"display: inline-block; width: 150px; margin-right: 1em;\">%1$s</span> <i>( %2$s )</i>',\n\t\t\t\t\t$postType->label,\n\t\t\t\t\t$postType->name\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t\treturn $postTypes;\n\n\t}", "function add_cpt_histories_filter() {\r\n\r\n // only display these taxonomy filters on desired custom post_type listings\r\n global $typenow;\r\n if ($typenow == 'cpt_histories' ) {\r\n\r\n // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list\r\n //$filters = array('plants', 'animals', 'insects');\r\n $filters = array('histories_categories');\r\n foreach ($filters as $tax_slug) {\r\n // retrieve the taxonomy object\r\n $tax_obj = get_taxonomy($tax_slug);\r\n $tax_name = $tax_obj->labels->name;\r\n // retrieve array of term objects per taxonomy\r\n $terms = get_terms($tax_slug);\r\n\r\n\t\t\t$_GET += array($tax_slug => null); // define\r\n // output html for taxonomy dropdown filter\r\n echo \"<select name='$tax_slug' id='$tax_slug' class='postform'>\";\r\n echo \"<option value=''>Show All $tax_name</option>\";\r\n foreach ($terms as $term) {\r\n // output each select option line, check against the last $_GET to show the current option selected\r\n echo '<option value='. $term->slug, $_GET[$tax_slug] == $term->slug ? ' selected=\"selected\"' : '','>' . $term->name .' (' . $term->count .')</option>';\r\n }\r\n echo \"</select>\";\r\n }\r\n }\r\n}", "function iron_pre_get_post_types ( $query )\n{\n\tglobal $iron_post_types, $iron_query, $post;\n\n\t$post_type = $query->get('post_type');\n\t$posts_per_page = $query->get('posts_per_page');\n\n\t$iron_query->post_type = $post_type;\n\n\tif ( in_array($post_type, $iron_post_types) )\n\t{\n\t\tif ( empty($posts_per_page) || $posts_per_page == 0 ) {\n\t\t\t$posts_per_page = get_iron_option($post_type . 's_per_page');\n\t\t\t$query->set( 'posts_per_page', $posts_per_page);\n\t\t}\n\t}\n\n\n\tif ( 'event' == $post_type )\n\t{\n\t\t$order = $query->get('order');\n\t\t$orderby = $query->get('orderby');\n\n\t\tif ( is_admin() && ! $query->get('ajax') ) {\n\n\t\t\t// Furthest to Oldest\n\t\t\tif ( empty( $order ) )\n\t\t\t\t$query->set('order', 'ASC');\n\t\t\t\t\n\t\t\tif ( empty( $orderby ) )\n\t\t\t\t$query->set('orderby', 'date');\t\n\n\t\t} else {\n\n\t\t\tif(empty($query->query_vars['filter'])) {\n\t\t\t\t$filter = get_field('events_filter', $post->ID);\n\t\t\t\tif(empty($filter)) {\n\t\t\t\t\t$filter = ( empty( $_POST['eventsfilter'] ) ? 'upcoming' : sanitize_key($_POST['eventsfilter']) );\n\t\t\t\t}\n\t\t\n\t\t\t\t$query->query_vars['filter'] = $filter;\n\t\t\t}\t\n\t\t\t\n\t\t\t$filter = $query->query_vars['filter'];\n\t\t\t$iron_query->query_vars['filter'] = $filter;\n\t\t\t\t\t\n\t\t\t// reset Post Status\n\t\t\t$query->set('post_status', array(''));\n\t\t\t\n\t\t}\n\n\n\t}else if ( 'album' == $post_type ) {\n\t\n\t\tif ( !is_admin() ) {\n\t\t\t$query->set( 'posts_per_page', -1 );\n\t\t}\t\n\t}\n\n}", "public static function set_all_listing_post_types() {\n\t\t$post_types = get_post_types( array(), 'objects' );\n\t\tif ( ! empty( $post_types ) ) {\n\t\t\tforeach ( $post_types as $post_type ) {\n\t\t\t\tif ( $post_type->show_in_menu === 'listings' ) {\n\t\t\t\t\tself::$listings_types[] = get_post_type_object( $post_type->name );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn self::$listings_types;\n\t}", "public function maybe_filter() {\n\n\t\tif ( !get_current_screen() or ( $this->post_type != get_current_screen()->post_type ) )\n\t\t\treturn;\n\n\t\tadd_filter( 'request', array( $this, 'filter_posts_by_post_meta' ) );\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'filters' ) );\n\n\t}", "function W3TCflushCustomPostTypesPageCache( $post_id ) {\n if( !defined( 'W3TC' ) ) {\n return false;\n }\n\n $postTypes = array(\n 'page' => true,\n 'post' => true\n );\n\n if( array_key_exists( get_post_type( $post_id ), $postTypes ) ) {\n w3tc_pgcache_flush();\n w3tc_dbcache_flush();\n }\n}", "public function filter_content()\n\t{\n\t\t$cpts = $this->cpts;\n\n\t\tforeach ( $cpts as $name => $cpt ) {\n\t\t\tif ( isset( $cpt['shortcodable'] ) && true === $cpt['shortcodable'] ) {\n\n\t\t\t\tadd_filter( 'the_content', function ( $the_content ) use ( $name ) {\n\t\t\t\t\tglobal $post;\n\n\t\t\t\t $query = get_posts(\"post_type=$name\"); // Use $name\n\n\t\t\t\t if ( $query ) {\n\t\t\t\t foreach ( $query as $q ) {\n\n\t\t\t\t $options = get_post_meta($q->ID, $name, true);\n\n\t\t\t\t if ( ( $options !== \"\" && isset( $options ) ) && array_key_exists( 'display_to_page', $options ) && array_key_exists( 'shortcode', $options ) && get_the_ID() == $options['display_to_page'] ) {\n\t\t\t\t $the_content .= do_shortcode( $options['shortcode'] );\n\t\t\t\t }\n\n\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\t return $the_content;\n\t\t\t\t} );\n\n\t\t\t}\n\t\t}\n\t}", "function mai_cta_acf_get_posts( $args, $field, $post_id ) {\n\t$post_types = [];\n\n\tif ( isset( $_REQUEST['nonce'] ) && wp_verify_nonce( $_REQUEST['nonce'], 'acf_nonce' ) && isset( $_REQUEST[ 'post_type' ] ) && ! empty( $_REQUEST[ 'post_type' ] ) ) {\n\t\t$post_types = $_REQUEST[ 'post_type' ];\n\t}\n\n\tif ( ! $post_types ) {\n\t\treturn $args;\n\t}\n\n\tforeach ( (array) $post_types as $post_type ) {\n\t\t$args['post_type'][] = sanitize_text_field( wp_unslash( $post_type ) );\n\t}\n\n\treturn $args;\n}", "function sm_pre_get_posts( $query ) {\n // or current query is not the main query\n if ( is_admin() || ! $query->is_main_query() ){\n return;\n }\n\n // edit the query only when post type is 'accommodation'\n // if it isn't, return\n if ( !is_post_type_archive( 'property' ) ){\n return;\n }\n\n $meta_query = array();\n\n // add meta_query elements\n if( !empty( get_query_var( 'city' ) ) ){\n $meta_query[] = array( 'key' => 'type', 'value' => get_query_var( 'type' ), 'compare' => 'LIKE' );\n }\n\n if( !empty( get_query_var( 'address' ) ) ){\n $meta_query[] = array( 'key' => 'address', 'value' => get_query_var( 'address' ), 'compare' => 'LIKE' );\n }\n\n if( count( $meta_query ) > 1 ){\n $meta_query['relation'] = 'AND';\n }\n\n if( count( $meta_query ) > 0 ){\n $query->set( 'meta_query', $meta_query );\n }\n}", "function add_custom_types_to_tax( $query ) {\n\tif( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n\n\t\t// Get all your post types\n\t\t$post_types = get_post_types();\n\n\t\t$query->set( 'post_type', $post_types );\n\t\treturn $query;\n\t}\n}", "public static function types() {\n\t\treturn apply_filters( 'citepro_post_types', array( 'post', 'page' ) );\n\t}", "private function _allowed_post_types(){\n\t\t// get the allowed post types from plugin settings\n\t\t$options = fa_get_options('settings');\n\t\t// merge the default post type with the allowed post types\n\t\t$allowed = array_unique( array_merge( array( 'post' ), (array)$options['custom_posts'] ) );\n\t\t// get the post types set on slider\n\t\t$set \t = (array)$this->options['slides']['post_type'];\n\t\t// start the result\n\t\t$result\t = array();\n\t\tforeach( $set as $k => $post_type ){\n\t\t\tif( post_type_exists( $post_type ) && in_array( $post_type, $allowed ) ){\n\t\t\t\t$result[] = $post_type;\n\t\t\t}\n\t\t}\n\t\t// for mixed content sliders, add the slide post type and page post type\n\t\tif( 'mixed' == $this->options['slides']['type'] ){\n\t\t\t$result = (array)$allowed;\n\t\t\t$result[] = fa_post_type_slide();\n\t\t\t$result[] = 'page';\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "protected function init_defaults_post_types(){\n\t return array('post');\n\t}" ]
[ "0.712941", "0.68971956", "0.68861055", "0.6788533", "0.6761468", "0.67229486", "0.666778", "0.6639411", "0.66035295", "0.65848804", "0.6573268", "0.65545166", "0.65454566", "0.65420777", "0.6502791", "0.6495623", "0.6494843", "0.64861625", "0.64693636", "0.6449982", "0.6442838", "0.6436373", "0.64115393", "0.6389235", "0.6383408", "0.63651896", "0.6363065", "0.6333785", "0.63240683", "0.6323352", "0.63130844", "0.6312484", "0.6305399", "0.6305376", "0.6279179", "0.6278349", "0.6268211", "0.6248161", "0.62375534", "0.6233672", "0.6218584", "0.619903", "0.61936766", "0.6190235", "0.6177754", "0.61675495", "0.61590683", "0.61349773", "0.6134428", "0.6132738", "0.6127803", "0.61240494", "0.61239123", "0.6121185", "0.6118301", "0.6100633", "0.6086455", "0.6070966", "0.60694355", "0.6068884", "0.60647994", "0.60615987", "0.6060106", "0.6052816", "0.60479647", "0.60466915", "0.6046372", "0.6038979", "0.6034365", "0.60335535", "0.6026007", "0.60072446", "0.600477", "0.5999429", "0.5991357", "0.5986944", "0.5982037", "0.597688", "0.59741265", "0.595389", "0.59515554", "0.59465855", "0.59437954", "0.59411263", "0.5937433", "0.59349054", "0.59341127", "0.5932989", "0.5929461", "0.5928586", "0.5923402", "0.5916758", "0.59146124", "0.5913805", "0.5912507", "0.5912457", "0.5904772", "0.5904765", "0.59041893", "0.5898405" ]
0.7618946
0
Create a breadcrumb of the current dir and path.
Создайте хлебные крошки текущей директории и пути.
public function GetBreadcrumbFromPath() { $html = "<ul class='src-breadcrumb'>\n"; $html .= "<li><a href='?'>" . basename($this->baseDir) . "</a>/</li>"; $path = null; foreach($this->breadcrumb as $val) { $path .= "$val/"; $html .= "<li><a href='?path={$path}'>{$val}</a>/</li>"; } $html .= "</ul>\n"; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function breadcrumb() {}", "function renderBreadcrumb() {\n\n\t\t//$basedir = $_GET['dir'] ? str_replace($_SERVER['DOCUMENT_ROOT'], '', $_GET['dir']) : '';\n\t\t\n\t\t$bcstart = '\n\t <div id=\"breadcrumb\">\n\t <div id=\"breadcrumb-dummy\">&nbsp;</div>\n\t\t';\n\n\t\t$bcend = '\n\t <div class=\"div-clr\">&nbsp;</div>\n\t </div>\n\t <input type=\"text\" id=\"breadcrumb-textual\" value=\"'.$this->relbasedir.'\" current=\"'.$this->relbasedir.'\" />\n\t\t';\n\n\t\t$bc_item = '\n <div class=\"breadcrumb-item\" item=\"###NUM###\" path=\"###PATH###\">\n\t\t\t\t\t\t\t<div class=\"label\">###NAME###</div>\n \t###SUBITEMS###\n\t <div class=\"div-clr\">&nbsp;</div>\n\t </div>\n\t\t';\n\n\t\t$bde = explode('/', $this->relbasedir);\n\n\t\t$bc = '\n <div class=\"breadcrumb-item\" item=\"0\" path=\"\">\n\t\t\t\t\t\t\t<div class=\"label\">'.$this->getIcon('silk t3-icon-apps t3-icon-pagetree-root', 'Home').'</div>\n \t'.$this->getSubdirectories('', $bde[0]).'\n\t <div class=\"div-clr\">&nbsp;</div>\n\t </div>\n\t\t';\n\n\t\t$i = 1;\n\t\t$path = '';\n\t\tforeach($bde as $k => $v) {\n\t\t\tif ($v != '') {\n\t\t\t\t$path .= $v.'/';\n\t\t\t\t$bc .= $bc_item;\n\t\t\t\t$bc = t3lib_parsehtml::substituteMarker($bc, '###NUM###', $i);\n\t\t\t\t$bc = t3lib_parsehtml::substituteMarker($bc, '###PATH###', $path);\n\t\t\t\t$bc = t3lib_parsehtml::substituteMarker($bc, '###NAME###', $v);\n\t\t\t\t$bc = t3lib_parsehtml::substituteMarker($bc, '###SUBITEMS###', $this->getSubdirectories($path, ($bde[$k + 1] ? $bde[$k + 1] : '')));\n\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$content = $bcstart.$bc.$bcend;\n\t\t\n\t\treturn $content;\n\t}", "public static function breadcrumb() {\n\n\t\t\tif ( !( ( AE_Helpers::is_page() && get_theme_mod( 'page_breadcrumb', 1 ) == 0 ) || ( AE_Helpers::is_blog_single() && get_theme_mod( 'post_breadcrumb', 1 ) == 0 ) || ( AE_Helpers::is_blog_archive() && get_theme_mod( 'archive_breadcrumb', 1 ) == 0 ) ) ) {\n\n\t\t\t\t$index = 1;\n\n\t\t\t\techo '<ol class=\"breadcrumb\" itemscope itemtype=\"http://schema.org/BreadcrumbList\">';\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Front Page\n\t\t\t\t\t *\n\t\t\t\t\t * Always insert the link to the front page.\n\t\t\t\t\t */\n\t\t\t\t\tif( is_home() && is_front_page() ){\n\t\t\t\t\t\tself::breadcrumb_item( 'You Are Home', '', $index );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself::breadcrumb_item( 'Home', home_url(), $index );\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Blog\n\t\t\t\t\t *\n\t\t\t\t\t * Check if the current template is part of the blog.\n\t\t\t\t\t */\n\t\t\t\t\tif ( AE_Helpers::is_blog() ) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Blog: General\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * Insert the link if on a general blog page or the title if on the main page.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif ( get_option( 'show_on_front' ) == 'page' ) {\n\n\t\t\t\t\t\t\tif ( is_home() ) {\n\t\t\t\t\t\t\t\tself::breadcrumb_item( get_page( get_option( 'page_for_posts' ) )->post_title, '', $index );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tself::breadcrumb_item( get_page( get_option( 'page_for_posts' ) )->post_title, get_permalink( get_option( 'page_for_posts' ) ), $index );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( is_single() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Blog: Single Post\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a blog post.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( get_the_title(), '', $index );\n\n\t\t\t\t\t\t} elseif ( is_category() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Category\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a category archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( single_cat_title( 'Category: ', false ), '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( is_tag() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Tag\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a tag archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( single_tag_title( 'Tag: ', false ), '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( is_day() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Day\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a day archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Archive for ' . get_the_time( 'F jS, Y' ), '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( is_month() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Month\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a month archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Archive for ' . get_the_time( 'F, Y' ), '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( is_year() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Year\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a year archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Archive for ' . get_the_time( 'Y' ), '', $index );\n\n\t\t\t\t\t\t} elseif ( is_author() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Archive: Author\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is an author archive.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Author: ' . get_the_author(), '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( isset( $_GET['paged'] ) && !empty( $_GET['paged'] ) ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Blog: Paged\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template is a paginated blog loop.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Blog Archives', '', $index );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif ( is_search() ) {\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Search Results\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * If the current template shows search results.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::breadcrumb_item( 'Search Results', '', $index );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif ( AE_Helpers::is_woocommerce() ) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * WooCommerce\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * If the current template is part of WooCommerce.\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\t$trail = AE_Compatibility_WooCommerce::breadcrumb();\n\n\t\t\t\t\t\tforeach ( $trail as $item ) {\n\t\t\t\t\t\t\tself::breadcrumb_item( $item, '', $index );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif ( is_page() ) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Ancestors\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * If the current page has ancestors.\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif( $ancestors = get_post_ancestors( get_the_ID() ) ){\n\t\t\t\t\t\t\tforeach( array_reverse( $ancestors ) as $ancestor ) {\n\t\t\t\t\t\t\t\tself::breadcrumb_item( get_the_title( $ancestor ), get_permalink( $ancestor ), $index );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Page\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * If the current template is a page.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tself::breadcrumb_item( get_the_title(), '', $index );\n\n\t\t\t\t\t} elseif( is_home() && get_queried_object()->post_count == 0 ) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * 404 Blog Error\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * If there are no posts on the blog.\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tself::breadcrumb_item( 'Blog', '', $index );\n\n\t\t\t\t\t} elseif( is_post_type_archive() || is_tax() || ( is_singular() && !in_array( get_post_type(), array( 'post', 'page' ) ) ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Custom Post Types\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * Check if the current template is a custom post type.\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\t$post_type = get_post_type_object( get_post_type() )->labels;\n\n\t\t\t\t\t\tif( is_post_type_archive() ) {\n\n\t\t\t\t\t\t\t// Archive\n\t\t\t\t\t\t\tself::breadcrumb_item( $post_type->name, '', $index );\n\n\t\t\t\t\t\t} elseif( is_tax() ) {\n\n\t\t\t\t\t\t\t// Archive\n\t\t\t\t\t\t\tself::breadcrumb_item( $post_type->name, get_post_type_archive_link( get_post_type() ), $index );\n\n\t\t\t\t\t\t\t// Taxonomy\n\t\t\t\t\t\t\tself::breadcrumb_item( get_the_archive_title(), '', $index );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Archive\n\t\t\t\t\t\t\tself::breadcrumb_item( $post_type->name, get_post_type_archive_link( get_post_type() ), $index );\n\n\t\t\t\t\t\t\t// Singular\n\t\t\t\t\t\t\tself::breadcrumb_item( get_the_title(), '', $index );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\techo '</ol>';\n\n\t\t\t}\n\n\t\t}", "function breadcrumb($where)\n{\n\techo '<a id=\"breadcrumb\" href=\"?do=view_files&where=../\">Home</a>';\n\t $bc=explode(\"/\",$where);\nwhile(list($key,$val)=each($bc)){\n $dir='';\n if($key > 1){\n $n=1;\n while($n < $key){\n $dir.='/'.$bc[$n];\n $val=$bc[$n];\n $n++;\n }\n if($key < count($bc)-1) echo ' < <a id=\"breadcrumb\" href=\"?do=view_files&where=..'.$dir.'/\">'.$val.'</a>';\n }\n}\n}", "public function breadcrumb() {\n $controller = $this->CI->router->fetch_class();\n $cn = str_replace('_', ' ', $controller);\n $method_name = $this->CI->router->fetch_method();\n $mn = str_replace('_', ' ', $method_name);\n if ($controller != '') {\n $action_name = '<li><a href=\"' . site_url($controller . \"/index\") . '\">' . ucwords($cn) . '<i class=\"fa fa-angle-right\"></i></a></li>';\n } else {\n $action_name = '';\n }\n if ($mn != '') {\n $method = '<li class=\"active\">' . ucwords($mn) . '</li>';\n } else {\n $method = '';\n }\n $crumb = '<ul class=\"page-breadcrumb\">\n <li><a href=\"javascript:void(0);\"><i class=\"fa fa-home\"></i> Home<i class=\"fa fa-angle-right\"></i></a></li>' . $action_name . $method . '</ul>';\n echo $crumb;\n }", "function _breadcrumbs($curdir, $displayseparator = ' &raquo; ')\n{\n\t//Get localized name for the Home directory\n\t$homedir = $GLOBALS[\"messages\"][\"homelink\"];\n\n // Initialize first crumb and set it to the home directory.\n\t$breadcrumbs[] = \"<a href=\\\"\".make_link(\"list\", \"\", NULL).\"\\\">$homedir</a>\";\n\n\t// Take the current directory and split the string into an array at each '/'.\n\t$patharray = explode('/', $curdir);\n\n // Find out the index for the last value in our path array\n\t $lastx = array_keys($patharray);\n\t $last = end($lastx);\n\n // Build the rest of the breadcrumbs\n $crumbdir = \"\";\n foreach ($patharray AS $x => $crumb)\n {\n // Add a new directory to the directory list so the link has the\n // correct path to the current crumb.\n\t\t$crumbdir = $crumbdir . $crumb;\n\t\tif ($x != $last):\n // If we are not on the last index, then create a link using $crumb\n // as the text.\n\n\t\t\t$breadcrumbs[] = \"<a href=\\\"\".make_link(\"list\", $crumbdir, NULL).\"\\\">\".htmlspecialchars($crumb).\"</a>\";\n\n\t\t\t// Add a separator between our crumbs.\n\t\t\t$crumbdir = $crumbdir . DIRECTORY_SEPARATOR;\n\t\telse:\n\t\t\t// Don't create a link for the final crumb. Just display the crumb name.\n $breadcrumbs[] = htmlspecialchars($crumb);\n\t\tendif;\n }\n\n\t// Build temporary array into one string.\n return implode($displayseparator, $breadcrumbs);\n}", "public function generateBreadcrumb() {\n $ci = &get_instance();\n $i = 1;\n $uri = $ci->uri->segment($i);\n $link = '<ol class=\"breadcrumb\"><li><a href=\"'.base_url().'\"><i class=\"fa fa-dashboard\"></i> Home</a></li>';\n\n while ($uri != '') {\n $prep_link = '';\n for ($j = 1; $j <= $i; $j++) {\n $prep_link .= $ci->uri->segment($j) . '/';\n }\n\n if ($ci->uri->segment($i + 1) == '') {\n $link .= '<li class=\"active\">';\n $link .= ucwords($ci->uri->segment($i)) . '</li> ';\n } else {\n $link .= '<li><a href=\"#\">';\n $link .= ucwords($ci->uri->segment($i)) . '</a><span class=\"divider\"></span></li> ';\n }\n\n $i++;\n $uri = $ci->uri->segment($i);\n }\n $link .= '</ol>';\n return $link;\n }", "function mcneese_breadcrumb($vars) {\n $breadcrumb = (array) $vars['breadcrumb'];\n $output = '';\n\n $breadcrumb[0] = '<a href=\"' . base_path() . '\" class=\"link-home\" title=\"Home\">' . t(\"Home\") . '</a>';\n\n $count = 0;\n $total = count($breadcrumb);\n\n foreach ($breadcrumb as $key => &$crumb) {\n $output .= '<li class=\"crumb\">' . $crumb . '</li>';\n\n $count++;\n if ($count < $total) {\n $output .= '<div class=\"crumb-trail\">»</div>';\n }\n }\n\n return $output;\n}", "final public static function breadcrumb()\n\t{\n\t\treturn Breadcrumb::getInstance();\n\t}", "function basic_breadcrumbs($sep = \"/\")\n{\n\tglobal $post, $wp_query;\n\n\t$parent = null;\n\n\t/**\n\t * Specified category\n\t */\n\tif (is_single()) {\n\t\t$category = get_the_category($post->ID);\n\t\tif (!empty($category)) {\n\t\t\t$cat = $category[0];\n\t\t} else {\n\t\t\t$cat = null;\n\t\t}\n\t} elseif (is_category()) {\n\t\t$cat = get_term_by( 'slug', get_query_var('category_name'), 'category' );\n\t} elseif (is_tag()) {\n\t\t$cat = get_term_by( 'slug', get_query_var('tag'), 'post_tag' );\n\t} elseif (is_archive()) {\n\t\t$cat = null;\n\t}\n\n\tif (isset($cat) && $cat->parent != 0) {\n\t\t$parent = get_category($cat->parent);\n\t}\n\n\t$bcrumb_custom_post_types = unserialize(constant('BREADCRUMB_POST_TYPES'));\n\n\t// Now build up the breadcrumbs\n\t$output = '<li>';\n\t$output .= '<a href=\"/\">Home</a> <span class=\"divider\">'.$sep.'</span> ';\n/**\n\t * Post TYPE\n\t */\n\tif(isset($bcrumb_custom_post_types) && in_array(get_query_var('post_type'), $bcrumb_custom_post_types)) {\n\n\tif($post->post_parent == 0){\n\t\t$permalink = get_site_url();\n\t\t$output .= '<a href=\"' . $permalink . '\">' . ucwords(str_replace(\"-\", \" \", get_query_var('post_type'))) . '</a>';\n\t} else {\n\t\t$permalink = get_permalink( $post->post_parent );\n\t\t$output .= '<a href=\"' . $permalink . '\">' . get_the_title($post->post_parent) . '</a>';\n\t}\n\n\t}\n\telseif (is_category()) {\n\t\tif ($parent) {\n\t\t\t$output .= '<a href=\"' . get_category_link($parent->term_id) . '\">' . $parent->name . '</a> <span class=\"divider\">'.$sep.'</span> ';\n\t\t}\n\t\t$output .= ucfirst($cat->name);\n\t}\n\t/**\n\t * Displaying on an archive page\n\t */\n\telseif (is_tag()) {\n\t\tif ($parent) {\n\t\t\t$output .= '<a href=\"' . get_category_link($parent->term_id) . '\">' . $parent->name . '</a> <span class=\"divider\">'.$sep.'</span> ';\n\t\t}\n\t\t$output .= ucfirst($cat->name);\n\t}\n\t/**\n\t * Displaying on an archive page\n\t */\n\telseif (is_author(get_the_author())) {\n\t\t$output .= \"Articles by \";\n\t\t$login = get_query_var('author_name');\n\t\t$author = get_userdatabylogin($login);\n\t\t$author_name = $author->nickname;\n\t\t$output .= ucfirst($author_name);\n\t}\n\t/**\n\t * Displaying on an archive page\n\t */\n\telseif (is_archive()) {\n\n\t\tif ($parent) {\n\t\t\t$output .= '<a href=\"' . get_category_link($parent->term_id) . '\">' . $parent->name . '</a> <span class=\"divider\">'.$sep.'</span> ';\n\t\t}\n\t\tif (is_date()) {\n\t\t\tif ( is_day() ) :\n\t\t\t\t$output .= 'Articles from '.get_the_date( 'jS F Y' );\n\t\t\telseif ( is_month() ) :\n\t\t\t\t$output .= 'Articles from '.get_the_date( 'F Y' );\n\t\t\telseif ( is_year() ) :\n\t\t\t\t$output .= 'Articles from '.get_the_date( 'Y' );\n\t\t\telse :\n\t\t\t\t$output .= 'Articles';\n\t\t\tendif;\n\t\t} else {\n\t\t\tif (is_custom_post_type($post->post_type)) {\n\t\t\t\t$output .= post_type_archive_title('', false);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t * Attachment media\n\t */\n\telseif (is_attachment()) {\n\t\t$output .= '<a href=\"' . get_permalink($post->post_parent) . '\">' . get_the_title($post->post_parent) . '</a>';\n\t\t//$output .= get_the_title();\n\t}\n\t/**\n\t * Post or Page\n\t */\n\telseif (is_single()) {\n\t\tif (isset($parent)) {\n\t\t\t$output .= '<a href=\"' . get_category_link($parent->term_id) . '\">' . $parent->name . '</a>';\n\t\t}\n\t\tif (isset($cat)) {\n\t\t\tif($parent){\n\t\t\t\t$output .= ' <span class=\"divider\">'.$sep.'</span> ';\n\t\t\t}\n\t\t\t$output .= '<a href=\"' . get_category_link($cat->term_id) . '\">' . $cat->name . '</a>';\n\t\t}\n\t\t//$output .= get_the_title();\n\t}\n\n\t/**\n\t * Post or Page\n\t */\n\telseif (is_page()) {\n\n\t\t$output .= get_the_title();\n\n\t}\n\t/**\n\t * Displaying on an archive page\n\t */\n\telseif (is_search()) {\n\t\t$output .= 'Search results for \"'.get_search_query().'\"';\n\t}\n\n\t$output .= '</li>';\n\n\treturn $output;\n}", "function breadcrumb(){\n\t global $view;\n\t \n \t$view_header = ucfirst($view);\n\treturn \"<ul class='breadcrumb'>\n\t <li>System</li>\n\t <li class='active'>$view_header</li>\n\t </ul>\";\n }", "function breadcrumb($items = null, $options = array()) {\n\n\tif(setting('home')->id == page()->parent->id) return;\n\n\t// $out is where we store the markup we are creating in this function\n\t$out = '';\n\n\t$defaults = array(\n\t\t'appendCurrent' => true,\n\t\t'class' => 'breadcrumb flex flex-wrap flex-gap-xxxs font-secondary',\n\t);\n\n\tif($items === null) $items = page();\n\tif($items instanceof Page) $items = $items->parents();\n\tif(!$items->count) return '';\n\n\t$options = _mergeOptions($defaults, $options);\n\n\t$out .= \"<ul class='$options[class]' style='z-index: 999'>\";\n\n\tforeach($items as $item) {\n\t\t$out .= \"<li><a href='$item->url'>$item->title</a> / </li>\";\n\t}\n\n\tif($options['appendCurrent']) {\n\t\t$page = $items->wire('page');\n\t\t$out .= \"<li><span class='current'>$page->title</span></li>\";\n\t}\n\n\t$out .= \"</ul>\";\n\n\treturn $out;\n}", "public function addBreadcrumb(){\n $contador=count($this->parseUrl());\n $arrayLink[0]='';\n echo \"<a href=\" . DIRPAGE . 'home' .\">Home</a> >\";\n for($i=0;$i < $contador; $i++){\n $arrayLink[0].=$this->parseUrl()[$i] . '/'; #vai receber o link da url do array retornado de parseUrl()\n echo \"<a href=\" . DIRPAGE . $arrayLink[0] . \">\" . $this->parseUrl()[$i] . \"</a>\"; #criado um link para cada um\n if($i<$contador-1){ # Se nao for o ultimo link, acrescenta '>'\n echo \" > \";\n }\n }\n }", "function printBreadCrumbs(){\n\t\t?>\n\t\t\t<ol class=\"breadcrumb\">\n\t \t\t\t<li><a href=\"#\">Home</a></li>\n\t \t\t\t<li class=\"active\">Technology Services</li>\n\t\t\t</ol>\n\n\t\t<?php\n\n\t}", "function breadcrumbs($separator = ' &raquo; ' , $home = 'Home')\r{\r // If you do not use a web_root subdirectory, set $directory2=\"\"; (NO trailing /)\r $directory2 = \"\" ;\r\r // This gets the REQUEST_URI (/path/to/file.php), splits the string (using '/') into an array, and then filters out any empty values\r $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ;\r $path_array = array_filter(explode('/',$path)) ;\r\r // This line of code accommodates using a subfolder (/var/www/html/<this folder>) as root\r // This removes the first item in the array path so it doesn't repeat\r if ($directory2 != \"\")\r {\r array_shift($path_array) ;\r }\r\r // This will build our \"base URL\" ... Also accounts for HTTPS :)\r $base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/'. $directory2 ;\r\r // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL)\r $breadcrumbs = Array(\"<li><a href=\\\"$base\\\">$home</a></li>\") ;\r\r // Get the index for the last value in our path array\r $last = end(array_keys($path));\r\r // Initialize the counter\r $crumb_counter = 2 ;\r\r // Build the rest of the breadcrumbs\r foreach ($path_array as $crumb)\r {\r // Our \"title\" is the text that will be displayed representing the filename without the .suffix\r // If there is no \".\" in the crumb, it is a directory\r if (strpos($crumb,\".\") == false)\r {\r $title = $crumb ;\r }\r else\r {\r $title = substr($crumb,0,strpos($crumb,\".\")) ;\r }\r\r // If we are not on the last index, then create a hyperlink\r if ($crumb != $last)\r {\r $calling_page_array = array_slice(array_values(array_filter(explode('/',$path))),0,$crumb_counter,false) ;\r $calling_page_path = \"/\".implode('/',$calling_page_array);\r $breadcrumbs[] = \"<li><a href=\".$calling_page_path.\">\".$title.\"</a></li>\" ;\r }\r\r // Otherwise, just display the title\r else\r {\r $breadcrumbs[] = $title ;\r }\r\r $crumb_counter = $crumb_counter + 1 ;\r\r }\r // Build our temporary array (pieces of bread) into one big string :)\r return implode($separator, $breadcrumbs) ;\r}", "function _taxonomy_breadcrumb_generate_breadcrumb($tid, $is_term_page = FALSE) {\n $term = taxonomy_term_load($tid);\n\n // Generate the HOME breadcrumb.\n $home_text = variable_get('taxonomy_breadcrumb_home', t('Home'));\n if ($home_text != '') {\n $breadcrumb[] = l($home_text, NULL);\n }\n // Generate the VOCABULARY breadcrumb.\n $vocabulary_path = _taxonomy_breadcrumb_get_vocabulary_path($term->vid);\n if ($vocabulary_path != NULL) {\n $vocabulary = taxonomy_vocabulary_load($term->vid);\n $breadcrumb[] = l(_taxonomy_breadcrumb_tt(\"taxonomy:vocabulary:$term->tid:name\", $vocabulary->name), $vocabulary_path);\n }\n\n // Generate the TERM breadcrumb.\n $parent_terms = array_reverse(taxonomy_get_parents_all($tid));\n foreach ($parent_terms as $parent_term) {\n $term_path = _taxonomy_breadcrumb_get_term_path($parent_term->tid);\n if ($term_path == NULL) {\n $uri = taxonomy_term_uri($parent_term);\n $term_path = $uri['path'];\n }\n if ($term_path == '<none>') {\n continue;\n }\n\n $term_title = $parent_term->name;\n\n // Use the SYNONYM instead of TERM, if we want to.\n // if (variable_get('taxonomy_breadcrumb_use_synonym', FALSE)) {\n // TODO The taxonomy synonym functionality has been removed.\n // TODO Is there a way to do this?\n // $synonyms = array() /*taxonomy_get_synonyms($parent_term->tid)*/;\n // if (!empty($synonyms)) {\n // $term_title = $synonyms[0];\n // }\n // }\n // Do not create links to own self if we are on a taxonomy/term page.\n if ($is_term_page && $parent_term->tid == $tid) {\n $breadcrumb[] = check_plain(_taxonomy_breadcrumb_tt(\"taxonomy:term:$parent_term->tid:name\", $term_title));\n }\n else {\n $breadcrumb[] = l(_taxonomy_breadcrumb_tt(\"taxonomy:term:$parent_term->tid:name\", $term_title), $term_path);\n }\n }\n\n // Remove the breadcrumb for the term currently being viewed.\n if (!is_null($breadcrumb) && $is_term_page) {\n array_pop($breadcrumb);\n }\n\n return $breadcrumb;\n}", "public function breadcrumbs()\n {\n $this->breadcrumbAction();\n\n $content = $this->runReplacer('breadcrumbs');\n\n if($this->checkFileExists($this->breadcrumb_path, true)) {\n File::put($this->breadcrumb_path, '<?php' . PHP_EOL . $content);\n } else {\n File::append($this->breadcrumb_path, $content);\n }\n $this->info('Breadcrumbs added Successfully in ' . $this->breadcrumb_path);\n }", "function jetpack_breadcrumbs() {\n\tif ( ! is_page() || is_front_page() ) {\n\t\treturn;\n\t}\n\n\tglobal $post;\n\n\t$ancestors = array_reverse( get_post_ancestors( $post->ID ) );\n\n\t$before = '<nav class=\"entry-breadcrumbs\">';\n\t$after = '</nav>';\n\n\t$home = '<a href=\"' . esc_url( home_url( \"/\" ) ) . '\" class=\"home-link\" rel=\"home\">' . __( 'Home', 'jetpack' ) . '</a>';\n\n\t$breadcrumb = '';\n\n\tif ( $ancestors ) {\n\t\tforeach ( $ancestors as $ancestor ) {\n\t\t\t$breadcrumb .= '<a href=\"' . esc_url( get_permalink( $ancestor ) ) . '\">' . esc_html( get_the_title( $ancestor ) ) . '</a>';\n\t\t}\n\t}\n\n\t$breadcrumb .= '<span class=\"current-page\">' . esc_html( get_the_title( $post->ID ) ) . '</span>';\n\n\techo $before . $home . $breadcrumb . $after;\n}", "public function breadcrumb($divider = null)\n {\n\n // Set ol class\n $this->class('breadcrumb');\n\n // Create ol element\n $ol = $this->tag('ol', $this->getSave('bitems'));\n\n // Set aria\n $this->aria('label', 'breadcrumb');\n\n // Check for divider\n if (!is_null($divider))\n {\n\n // Check for proper quote\n if(strpos($divider, \"'\") !== false)\n {\n\n $this->astyle('--bs-breadcrumb-divider: ' . $divider . ';');\n\n } else {\n\n $this->astyle(\"--bs-breadcrumb-divider: '\" . $divider . \"';\");\n\n }\n\n }\n\n // Create nav element\n $nav = $this->tag('nav', $ol);\n\n // Reset bitem\n $this->reset('bitems');\n\n return $nav;\n\n }", "private function _createBreadcrumbs()\n\t{\n\n\t\t$this->data['breadcrumbs'] = array();\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text'\t\t => $this->language->get('text_home'),\n\t\t\t'href'\t\t => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),\n\t\t\t'separator'\t => false\n\t\t);\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text'\t\t => $this->language->get('text_payment'),\n\t\t\t'href'\t\t => $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'),\n\t\t\t'separator'\t => ' :: '\n\t\t);\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text'\t\t => $this->language->get('heading_title'),\n\t\t\t'href'\t\t => $this->url->link('payment/pagseguro', 'token=' . $this->session->data['token'], 'SSL'),\n\t\t\t'separator'\t => ' :: '\n\t\t);\n\t}", "protected function generateCrumb()\n {\n $crumb = [];\n \n $crumb[] = $this->getRootFolder();\n if ($this->getCurrentFolder()->id == self::All_POSTED_FILES_ID) {\n $crumb[] = $this->getAllPostedFilesFolder();\n } elseif ($this->getCurrentFolder()->id != self::ROOT_ID) {\n if ($this->getCurrentFolder() !== null) {\n $temp = [];\n $temp[] = $this->getCurrentFolder();\n $parent = $this->getCurrentFolder()->parentFolder;\n while ($parent != null) {\n $temp[] = $parent;\n $parent = $parent->parentFolder;\n }\n $crumb = array_merge($crumb, array_reverse($temp));\n } \n } \n return $crumb;\n }", "function thim_learnpress_breadcrumb() {\n\t\tif ( is_front_page() || is_404() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the query & post information\n\t\tglobal $post;\n\t\t$icon = '<span class=\"breadcrum-icon\"><i class=\"fa fa-angle-right\" aria-hidden=\"true\"></i></span>';\n\t\t// Build the breadcrums\n\t\techo '<ul itemprop=\"breadcrumb\" itemscope itemtype=\"http://schema.org/BreadcrumbList\" id=\"breadcrumbs\" class=\"breadcrumbs\">';\n\n\t\t// Home page\n\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( home_url( '/' ) ) . '\" title=\"' . esc_attr__( 'Home', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'Home', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"1\">' . $icon . '</li>';\n\n\t\tif ( is_single() ) {\n\n\t\t\t$categories = get_the_terms( $post, 'course_category' );\n\n\t\t\tif ( get_post_type() == 'lp_course' ) {\n\t\t\t\t// All courses\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\t\t\t}\n\t\t\tif ( get_post_type() == 'lp_collection' ) {\n\t\t\t\t// All courses\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_collection' ) ) . '\" title=\"' . esc_attr__( 'Collections', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'Collections', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\t\t\t} else {\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_permalink( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '\" title=\"' . esc_attr( get_the_title( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '\"><span itemprop=\"name\">' . esc_html( get_the_title( get_post_meta( $post->ID, '_lp_course', true ) ) ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\t\t\t}\n\n\t\t\t// Single post (Only display the first category)\n\t\t\tif ( isset( $categories[0] ) ) {\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_term_link( $categories[0] ) ) . '\" title=\"' . esc_attr( $categories[0]->name ) . '\"><span itemprop=\"name\">' . esc_html( $categories[0]->name ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\t\t\t}\n\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr( get_the_title() ) . '\">' . esc_html( get_the_title() ) . '</span><meta itemprop=\"position\" content=\"3\"></li>';\n\n\t\t} else {\n\t\t\tif ( is_tax( 'course_category' ) || is_tax( 'course_tag' ) ) {\n\t\t\t\t// All courses\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\n\t\t\t\t// Category page\n\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr( single_term_title( '', false ) ) . '\">' . esc_html( single_term_title( '', false ) ) . '</span><meta itemprop=\"position\" content=\"3\"></li>';\n\t\t\t} else {\n\t\t\t\tif ( ! empty( $_REQUEST['s'] ) && ! empty( $_REQUEST['ref'] ) && ( $_REQUEST['ref'] == 'course' ) ) {\n\t\t\t\t\t// All courses\n\t\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_course' ) ) . '\" title=\"' . esc_attr__( 'All courses', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'All courses', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"2\">' . $icon . '</li>';\n\n\t\t\t\t\t// Search result\n\t\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr__( 'Search results for:', 'course-builder' ) . ' ' . esc_attr( get_search_query() ) . '\">' . esc_html__( 'Search results for:', 'course-builder' ) . ' ' . esc_html( get_search_query() ) . '</span><meta itemprop=\"position\" content=\"3\"></li>';\n\t\t\t\t} else {\n\t\t\t\t\tif ( get_post_type() == 'lp_collection' ) {\n\t\t\t\t\t\t// All courses\n\t\t\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><a itemprop=\"item\" href=\"' . esc_url( get_post_type_archive_link( 'lp_collection' ) ) . '\" title=\"' . esc_attr__( 'Collections', 'course-builder' ) . '\"><span itemprop=\"name\">' . esc_html__( 'Collections', 'course-builder' ) . '</span></a><meta itemprop=\"position\" content=\"2\"></li>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\"><span itemprop=\"name\" title=\"' . esc_attr__( 'All courses', 'course-builder' ) . '\">' . esc_html__( 'All courses', 'course-builder' ) . '</span><meta itemprop=\"position\" content=\"2\"></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo '</ul>';\n\t}", "static function displayBreadcrumbs($path) {\n $folders = explode('/', $path);\n $url = '/files';\n\n echo '<p>';\n\n foreach ($folders as $folder) {\n $url .= $folder . '/';\n\n if (empty($folder)) $folder = 'root';\n\n echo '<a href=\"' . $url . '\">' . $folder . '</a>' . ' / ';\n }\n\n echo '</p>';\n }", "protected function generate_package_breadcrumb()\n {\n }", "function breadcrumbs($separator = ' &raquo; ', $home = 'Home') {\n // This gets the REQUEST_URI (/path/to/file.php), splits the string (using '/') into an array, and then filters out any empty values\n $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n\n // This will build our \"base URL\" ... Also accounts for HTTPS :)\n $base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n\n // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL)\n //$breadcrumbs = Array(\"<a href=\\\"$base\\\">$home</a>\");\n $breadcrumbs = Array();\n\n // Find out the index for the last value in our path array\n $last = end(array_keys($path));\n\n // Build the rest of the breadcrumbs\n foreach ($path AS $x => $crumb) {\n // Our \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n $title = ucwords(str_replace(Array('.php', '_'), Array('', ' '), $crumb));\n\n // If we are not on the last index, then display an <a> tag\n if ($x != $last)\n $breadcrumbs[] = \"<a href=\\\"$base$crumb\\\">$title</a>\";\n // Otherwise, just display the title (minus)\n else\n $breadcrumbs[] = $title;\n }\n\n // Build our temporary array (pieces of bread) into one big string :)\n return implode($separator, $breadcrumbs);\n}", "function breadcrumb(){\n\t\n\t$CI =& get_instance();\n\t$CI->load->helper('url');\n\t$classe = ucfirst($CI->router->class);\n\tif ($classe == 'painel'):\n\t\t$classe = anchor($CI->router->class, 'Home');\n\telse:\n\t\t$classe = anchor($CI->router->class, $classe);\n\tendif;\n\t$metodo = ucwords(str_replace('_', ' ', $CI->router->method));\n\tif ($metodo && $metodo != 'Index'):\n\t\t$metodo = \" &raquo; \".anchor($CI->router->class.\"/\".$CI->router->method, $metodo);\n\telse:\n\t\t$metodo = '';\n\tendif;\n\treturn '<p>Sua localiza&ccedil;&atilde;o: '.anchor('painel', 'Painel').' &raquo; '.$classe.$metodo.'</p>';\n}", "function breadcrumbs($separator = ' &raquo; ', $home = 'Home') {\n \n $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n $base_url = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n $breadcrumbs = array(\"<a href=\\\"$base_url$crumb\\\">$home</a>\");\n \n $last = end(array_keys($path));\n \n foreach ($path AS $x => $crumb) {\n $title = ucwords(str_replace(array('.php', '_'), Array('', ' '), $crumb));\n if ($x != $last){\n $breadcrumbs[] = \"<a href=\\\"$base_url$crumb\\\">$title</a>\";\n }else{\n $breadcrumbs[] = $title;\n }\n }\n \n return implode($separator, $breadcrumbs);\n}", "public function generate_breadcrumbs() {\n\t\treturn $this->breadcrumbs_generator->generate( $this->context );\n\t}", "function create_rml_breadcrumb($rml_id, $current_rml_id, $rml_bc_separator, $rml_bc_home_text){\r\n\t\t\t$rml_bc_css_needed = true;\r\n\t\t\t$output = '';\r\n\t\t\t$rml_obj = $this->get_rml_obj($rml_id);\r\n\r\n\t\t\tif(empty($rml_obj)){\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\r\n\t\t\t$path_elements = array();\r\n\t\t\t$home_element = array('name' => $rml_bc_home_text === '' ? $rml_obj->name : $rml_bc_home_text, 'link' => $this->add_to_current_url('', '', false));\r\n\t\t\t$existing_rml_slug = strtolower(urldecode(get_query_var($this->settings['rml_slug'])));\r\n\t\t\tif(!empty($existing_rml_slug) && $rml_id !== -1){ // Not origin level and not unorganized\r\n\t\t\t\t$slug_chain = explode('/',$existing_rml_slug);\r\n\t\t\t\t$count_of_slug_chain = count($slug_chain);\r\n\t\t\t\t$start_pos = $rml_obj->id > 0 ? strlen($rml_obj->jig_absolute_path)+1 : 0;\r\n\t\t\t\t$path_elements = $this->fetch_rml_bc_path_elements_recursively($rml_obj->children, $slug_chain, $count_of_slug_chain, $start_pos);\r\n\t\t\t}else{ // Origin level\r\n\t\t\t\t$home_element['last'] = true;\r\n\t\t\t}\r\n\t\t\tarray_unshift($path_elements, $home_element); // add home to the elements\r\n\r\n\t\t\tswitch($rml_bc_separator){\r\n\t\t\t\t\tcase 'default': \t\t$rml_bc_separator = ' &raquo;'; break;\r\n\t\t\t\t\tcase 'greater': \t\t$rml_bc_separator = ' &gt;'; \tbreak;\r\n\t\t\t\t\tcase 'comma': \t\t\t$rml_bc_separator = ','; \t\tbreak;\r\n\t\t\t\t\tcase 'slash': \t\t\t$rml_bc_separator = ' /'; \t\tbreak;\r\n\t\t\t\t\tcase 'doubleslash': \t$rml_bc_separator = ' //'; \t\tbreak;\r\n\t\t\t\t\tcase 'minus': \t\t\t$rml_bc_separator = ' -'; \t\tbreak;\r\n\t\t\t\t\tcase 'plus': \t\t\t$rml_bc_separator = ' +'; \t\tbreak;\r\n\t\t\t\t\tcase 'arrow': \t\t\t$rml_bc_separator = ' &rarr;'; \tbreak;\r\n\t\t\t\t\tcase 'bslash': \t\t\t$rml_bc_separator = ' \\\\'; \t\tbreak;\r\n\t\t\t\t\tcase 'doublebslash': \t$rml_bc_separator = ' \\\\\\\\'; \tbreak;\r\n\t\t\t\t\tcase 'middledot': \t\t$rml_bc_separator = ' ·'; \t\tbreak;\r\n\t\t\t\t\tcase 'dobulecolon': \t$rml_bc_separator = ' ::'; \t\tbreak;\r\n\t\t\t\t\tcase 'numbersign': \t\t$rml_bc_separator = ' #'; \t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$output_parts = array();\r\n\t\t\tforeach ($path_elements as $path_element) {\r\n\t\t\t\tif(!is_array($path_element)){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(empty($path_element['last'])){\r\n\t\t\t\t\t$output_parts[] = '<a href=\"'.esc_url($path_element['link']).'\" >'.$path_element['name'].'</a>';\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$output_parts[] = $path_element['name'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$output .= '<div class=\"jig-rmlBreadcrumb\">'.implode($rml_bc_separator.' ', $output_parts).'</div>';\r\n\t\t\treturn $output;\r\n\t\t}", "function createBreadCrumb($l2=NULL, $l2_href=NULL, $l3=NULL){\n\t$breadCrumb = array();\n\t$sep = '<span class=\"sep\">/</span>';\n\t$breadCrumb[] = '<span class=\"level1\"><a href=\"index.php\">Home</a></span>';\n\t\n\tif ($l2 != NULL)\n\t\t{\n\t\t$breadCrumb[] = '<span class=\"level2\"><a href=\"'.$l2_href.'\">'.ucwords(strtolower($l2)).'</a></span>';\n\t\t}\n\t\t\n\tif ($l3 != NULL)\n\t\t{\n\t\t$breadCrumb[] = '<span class=\"level3\">'.ucwords(strtolower($l3)).'</span>';\n\t\t}\t\n\t\n\treturn implode($sep,$breadCrumb);\t\n\t}", "public function create_bread_crumb_menu($p_current_pid, $p_root_url, $p_start_text = 'Home', $p_end_text = '', $p_end_url=''){\n $v_ret = '';\n $v_zindex = 2;\n $v_current_pid = $p_current_pid;\n while($v_current_pid>0){\n $v_row = $this->select_one(array('module_id'=>$v_current_pid));\n if($v_row==1){\n $v_parent_text = $this->get_module_text();\n $v_parent_key = $this->get_module_key();\n $v_current_pid = $this->get_module_pid();\n $v_ret = '<li><a style=\"z-index:'.$v_zindex.'\" href=\"'.$p_root_url.$v_parent_key.'\">'.$v_parent_text.'</a></li>'.$v_ret;\n $v_zindex++;\n }else $v_current_pid=0;\n\n }\n if($p_start_text!=''){\n $v_ret = '<li class=\"first\"><a style=\"z-index:'.$v_zindex.'\" href=\"'.$p_root_url.'\">'.$p_start_text.'</a></li>'.$v_ret;\n }\n if($p_end_text!=''){\n $v_ret = $v_ret.'<li class=\"last\"><a style=\"z-index:1\"'.($p_end_url!=''?' href=\"'.$p_end_url.'\"':'').'>'.$p_end_text.'</a></li>';\n }\n if($v_ret!=''){\n $v_ret = '<div id=\"breadcrumb\"><ul class=\"crumbs\">'.$v_ret.'</ul></div>';\n }\n return $v_ret;\n }", "function buildBreadcrumb($last_item=\"\")\n\t{\n\t\t/**\n\t\t * Breadcrump template view\n\t\t * build a crump for every uri segment\n\t\t */\n\t\t$controller_methods = E_CONTROLLER_METHOS::ALL;\n\t\t$stop_at_controller\t= false;\n\n\t\tif ($last_item != \"\"){\n\t\t\t$stop_at_controller = true;\n\t\t}\n\n\n\t\t$ci =& get_instance();\n\t\t$segs = $ci->uri->segment_array();\n\n\n\t\t$BREADCRUMB\t= '<ul id=\"breadcrumb\" class=\"breadcrumb\" name=\"breadcrumb\" role=\"banner\">\n\t\t\t<li><a href=\"'.site_url().'home\">'.lang(\"home\").'</a></li>';\n\n\t\t$tmp\t\t= \"\";\n\t\t$ex_uri \t= explode(\"/\", $ci->uri->uri_string);\n\n\t\twrite2Debugfile(\"buildBreadcrumb.log\", \"uri_string[\".$ci->uri->uri_string.\"] exploded-uri_string\".print_r($ex_uri, true).\"\\nsegments-array-\".print_r($segs, true) , false);\n\n\t\t$is_parameter \t= false;\n\n\t\tforeach ($ex_uri as $key => $uri)\n\t\t{\n\t\t\tif ($uri == \"home\"){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$tmp \t.= $uri.\"/\";\n\n\t\t\t$icon\t= \"\";\n\t\t\tif (array_key_exists($uri, $controller_methods))\n\t\t\t{\n\t\t\t\t$icon = $controller_methods[$uri][\"icon\"].\" \";\n\t\t\t\t\t\n\t\t\t\tif ($stop_at_controller == true)\n\t\t\t\t{\n\t\t\t\t\t$last_piece \t= $tmp;\n\t\t\t\t\t$c \t\t\t\t= ($key+1);\n\t\t\t\t\t$lbl \t\t\t= lang($uri).'' ;\n\n\t\t\t\t\tif ($last_item != \"\"){\n\t\t\t\t\t\t$lbl .= ' <i class=\"fa fa-angle-double-right\"></i> '.$last_item.\"/\";\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ($c < count($ex_uri))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($last_item == \"\"){\n\t\t\t\t\t\t\t$lbl .= $ex_uri[$c].\"-\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$last_piece .= $ex_uri[$c].\"/\";\n\t\t\t\t\t\t$c++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$BREADCRUMB .= '<li'.(count($ex_uri) == $c ? ' class=\"active\"':\"\").'>';\n\t\t\t\t\t$BREADCRUMB .= '<a href=\"'.base_url().substr($last_piece, 0, -1).'\">'.$icon.''.ucfirst(substr($lbl, 0, -1)).'</a>';\n\t\t\t\t\t$BREADCRUMB .= '</li>';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$BREADCRUMB .= '<li'.(count($ex_uri) == $key ? ' class=\"active\"':\"\").'>';\n\t\t\t$BREADCRUMB .= '<a href=\"'.base_url().substr($tmp, 0, -1).'\">'.$icon.''.ucfirst(lang($ex_uri[$key])).'</a>';\n\t\t\t$BREADCRUMB .= '</li>';\n\t\t\t//write2Debugfile(\"buildBreadcrumb.log\", \"key[\".$key.\"] uri[\".$uri.\"]\" );\n\t\t}\n\t\t$BREADCRUMB .= '</ul>';\n\t\treturn $BREADCRUMB;\n\t}", "function crimtrac_breadcrumb(&$variables) {\n $breadcrumb = $variables['breadcrumb'];\n $output = '';\n\n // Determine if we are to display the breadcrumb.\n $show_breadcrumb = theme_get_setting('zen_breadcrumb');\n if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') {\n\n // Optionally get rid of the homepage link.\n $show_breadcrumb_home = theme_get_setting('zen_breadcrumb_home');\n if (!$show_breadcrumb_home) {\n array_shift($breadcrumb);\n }\n\n // Return the breadcrumb with separators.\n if (!empty($breadcrumb)) {\n $breadcrumb_separator = filter_xss_admin(theme_get_setting('zen_breadcrumb_separator'));\n $trailing_separator = $title = '';\n if (theme_get_setting('zen_breadcrumb_title')) {\n $item = menu_get_item();\n if (!empty($item['tab_parent'])) {\n // If we are on a non-default tab, use the tab's title.\n $breadcrumb[] = check_plain($item['title']);\n }\n else {\n $breadcrumb[] = drupal_get_title();\n }\n }\n elseif (theme_get_setting('zen_breadcrumb_trailing')) {\n $trailing_separator = $breadcrumb_separator;\n }\n\n // Provide a navigational heading to give context for breadcrumb links to\n // screen-reader users.\n if (empty($variables['title'])) {\n $variables['title'] = t('You are here');\n }\n // Unless overridden by a preprocess function, make the heading invisible.\n if (!isset($variables['title_attributes_array']['class'])) {\n $variables['title_attributes_array']['class'][] = 'element-invisible';\n }\n\n // Build the breadcrumb trail.\n $output = '<nav class=\"breadcrumb\" role=\"navigation\">';\n $output .= '<dl><dt' . drupal_attributes($variables['title_attributes_array']) . '>' . $variables['title'] . '</dt>';\n $output .= '<dd><ol><li>' . implode($breadcrumb_separator . '</li><li>', $breadcrumb) . $trailing_separator . '</li></ol></dd></dl>';\n $output .= '</nav>';\n }\n }\n\n return $output;\n}", "function breadcrumb(){\n $CI =& get_instance();\n $CI->load->helper('url');\n $classe = ucfirst($CI->router->class);//ucfirts() :função p deixar a primeira letra da classe em maiusculo\n if ($classe == 'Painel'):\n $classe = anchor($CI->router->class, 'Início');\n else:\n $classe = anchor($CI->router->class, $classe);\n endif;\n $metodo = ucwords(str_replace('_', ' ' , $CI->router->method)); //ucwords: para deixar a primeira letra de cada palavra em maisuculo\n if ($metodo && $metodo != 'Index'):\n $metodo = \" &raquo; \".anchor($CI->router->class.\"/\".$CI->router->method, $metodo);\n else:\n $metodo = '';\n endif;\n return '<p>Sua localização: '.anchor('painel', 'Painel').' &raquo; '.$classe.$metodo.'</p>';\n }", "function breadcrumb($crumbs, $youarehere, $categoryId)\r\n{ \r\n if(!count($crumbs))\r\n return;\r\n $style = ' style=\"padding: 0 1em;width: '.round(66.6667/count($crumbs), 4).'%\" ';\r\n foreach($crumbs as $crumb)\r\n {\r\n if(strstr($crumb['href'],'report/category'))\r\n {\r\n echo '<li class=\"hide-overflow-text hide-on-small-only',strstr($crumb['href'],$youarehere) ? ' secondary-text\"' : '\"',$style,'>',categoryDropdown($categoryId,false,'window.location=\"'.BUNZ_HTTP_DIR.'report/category/\" + this.value'),'</li>';\r\n } elseif(strstr($crumb['href'],$youarehere)) {\r\n echo '<li',$style,' class=\"secondary-text gn-multiline hide-overflow-text hide-on-small-only\"><i class=\"',$crumb['icon'],'\"></i><em>',$crumb['title'],'</em><small>&rarr;you are here&larr;</small></li>';\r\n } else {\r\n echo '<li',$style,' class=\"hide-overflow-text hide-on-small-only\"><a href=\"',BUNZ_HTTP_DIR,$crumb['href'],'\"', isset($crumb['icon']) ? \" class='{$crumb['icon']}'\" : '','>',$crumb['title'],'</a></li>',\"\\n\";\r\n }\r\n }\r\n}", "protected function generate_breadcrumbs()\n\t{\n\t\t// Search for a category with the same name as the contrib type. This is a bit ugly, but there really isn't any better option\n\t\t$categories = $this->cache->get_categories();\n\t\t$category = new \\titania_category;\n\n\t\tforeach ($categories as $category_id => $category_row)\n\t\t{\n\t\t\t$category->__set_array($category_row);\n\t\t\t$name = $category->get_name();\n\n\t\t\tif ($name == $this->contrib->type->lang['lang'] || $name == $this->contrib->type->lang['langs'])\n\t\t\t{\n\t\t\t\t// Generate the main breadcrumbs\n\t\t\t\t$this->display->generate_breadcrumbs(array(\n\t\t\t\t\t$name => $category->get_url(),\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "function breadcrumb($trace, $include_sitename = true, $cat_separator = '')\n{\n global $config;\n $foo = '';\n $fii = \"<ol class=\\\"breadcrumb\\\">\\n\";\n $c = count($trace);\n if (!$cat_separator) {\n $cat_separator = $config['cat_separator'];\n }\n\n if ($include_sitename) {\n $foo .= $config['site_name'] . ' ' . $cat_separator . ' ';\n if ($c) {\n $fii .= \"<li class=\\\"breadcrumb-item\\\"><a href=\\\"$config[site_url]\\\"><span class=\\\"oi oi-home\\\"></span></a></li>\\n\";\n } else {\n $fii .= \"<li class=\\\"breadcrumb-item active\\\"><span class=\\\"oi oi-home\\\"></span></li>\\n\";\n }\n }\n\n $i = 0;\n\n foreach ($trace as $k => $v) {\n $i++;\n $foo .= $v . ' ' . $cat_separator . ' ';\n if ($i < $c) {\n if (is_numeric($k)) {\n $fii .= \"<li>$v</li>\\n\";\n } else {\n $fii .= \"<li class=\\\"breadcrumb-item\\\"><a href=\\\"$k\\\">$v</a></li>\\n\";\n }\n } else {\n $fii .= \"<li class=\\\"breadcrumb-item active\\\">$v</a></li>\\n\";\n }\n }\n\n $foo = substr($foo, 0, -1 * strlen($cat_separator) - 1);\n $fii .= '</ol>';\n return array('head' => $foo, 'breadcrumb' => $fii);\n}", "function woocommerce_breadcrumb( $args = array() ) {\n $args = wp_parse_args( $args, apply_filters( 'woocommerce_breadcrumb_defaults', array(\n 'delimiter' => '<li class=\"separator\">/</li>',\n 'wrap_before' => '<nav class=\"woocommerce-breadcrumb\" ' . ( is_single() ? 'itemprop=\"breadcrumb\"' : '' ) . '><ul class=\"cpm-breadcrumb\">',\n 'wrap_after' => '</ul></nav>',\n 'before' => '<li>',\n 'after' => '</li>',\n 'home' => _x( 'Home', 'breadcrumb', 'woocommerce' )\n ) ) );\n\n $breadcrumbs = new WC_Breadcrumb();\n\n if ( $args['home'] ) {\n $breadcrumbs->add_crumb( $args['home'], apply_filters( 'woocommerce_breadcrumb_home_url', home_url() ) );\n }\n\n $args['breadcrumb'] = $breadcrumbs->generate();\n\n wc_get_template( 'global/breadcrumb.php', $args );\n }", "function get_breadcrumb(): string\n{\n global $post;\n\n $trail = '';\n $breadcrumbs = [];\n\n if ($post->post_parent) {\n $parent_id = $post->post_parent;\n\n while ($parent_id) {\n $page = get_post($parent_id);\n $breadcrumbs[] = '<li class=\"c-breadcrumbs__list-item c-breadcrumbs__list-item--separated\">\n <a href=\"' . get_the_permalink($page->ID) . '\">' . get_the_title($page->ID) . '</a>\n </li>';\n\n $parent_id = $page->post_parent;\n }\n\n $trail = implode('', array_reverse($breadcrumbs));\n }\n\n return $trail . '<li class=\"c-breadcrumbs__list-item c-breadcrumbs__list-item--separated\">' . get_the_title($post->ID) . \"</li>\";\n}", "function arl_breadcrumb($variables) {\n $breadcrumb = $variables['breadcrumb'];\n\n if (!empty($breadcrumb)) {\n // Provide a navigational heading to give context for breadcrumb links to\n // screen-reader users. Make the heading invisible with .element-invisible.\n $output = '<h2 class=\"element-invisible\">' . t('You are here') . '</h2>';\n $classes[] = 'inline';\n\n foreach ($breadcrumb as $k => $v) {\n if ($k == (count($breadcrumb) - 1)) {\n $classes[] = 'last';\n }\n $breadcrumb[$k] = '<span class=\"' . implode(' ', $classes) . '\">' . $v . '</span>';\n }\n $output .= '<div class=\"breadcrumb\">' . implode(' <span class=\"delimiter\">»</span> ', $breadcrumb) . '</div>';\n return $output;\n }\n}", "public function getBreadCrumb()\n {\n $aPaths = array();\n $aPath = array();\n\n $iBaseLanguage = oxRegistry::getLang()->getBaseLanguage();\n /** @var oxSeoEncoder $oSeoEncoder */\n $oSeoEncoder = oxRegistry::get(\"oxSeoEncoder\");\n $aPath['title'] = oxRegistry::getLang()->translateString('MY_ACCOUNT', $iBaseLanguage, false);\n $aPath['link'] = $oSeoEncoder->getStaticUrl($this->getViewConfig()->getSelfLink() . \"cl=account\");\n $aPaths[] = $aPath;\n\n $aPath['title'] = oxRegistry::getLang()->translateString('MY_DOWNLOADS', $iBaseLanguage, false);\n $aPath['link'] = $this->getLink();\n $aPaths[] = $aPath;\n\n return $aPaths;\n }", "function breadcrumb( $links ) {\n echo \"<div id=\\\"breadcrumb\\\">\\n\";\n $first = true;\n foreach ($links as $link) {\n if (!$first) {\n echo \"&nbsp;|&nbsp;\";\n }\n $first = false;\n echo \"$link\\n\";\n }\n echo \"</div>\\n\";\n }", "function newBreadcrumb() {\n\t$breadCrumbObject = new breadcrumbsMake();\n\t$breadCrumb = $breadCrumbObject->makeBread() ;\n\treturn $breadCrumb;\n}", "function breadcrumb_trail( $args = array() ) {\n\n\t/* Create an empty variable for the breadcrumb. */\n\t$breadcrumb = '';\n\n\t/* Set up the default arguments for the breadcrumb. */\n\t$defaults = array(\n\t\t'container' => 'div', // div, nav, p, etc.\n\t\t'separator' => '/',\n\t\t'before' => __( 'Browse:', 'breadcrumb-trail' ),\n\t\t'after' => false,\n\t\t'front_page' => true,\n\t\t'show_home' => __( 'Home', 'breadcrumb-trail' ),\n\t\t'network' => false,\n\t\t'echo' => true\n\t);\n\n\t/* Allow singular post views to have a taxonomy's terms prefixing the trail. */\n\tif ( is_singular() ) {\n\t\t$post = get_queried_object();\n\t\t$defaults[\"singular_{$post->post_type}_taxonomy\"] = false;\n\t}\n\n\t/* Apply filters to the arguments. */\n\t$args = apply_filters( 'breadcrumb_trail_args', $args );\n\n\t/* Parse the arguments and extract them for easy variable naming. */\n\t$args = wp_parse_args( $args, $defaults );\n\n\t/* Get the trail items. */\n\t$trail = breadcrumb_trail_get_items( $args );\n\n\t/* Connect the breadcrumb trail if there are items in the trail. */\n\tif ( !empty( $trail ) && is_array( $trail ) ) {\n\n\t\t/* Open the breadcrumb trail containers. */\n\t\t$breadcrumb = '<' . tag_escape( $args['container'] ) . ' class=\"breadcrumb-trail breadcrumbs\" itemprop=\"breadcrumb\">';\n\n\t\t/* If $before was set, wrap it in a container. */\n\t\t$breadcrumb .= ( !empty( $args['before'] ) ? '<span class=\"trail-before\">' . $args['before'] . '</span> ' : '' );\n\n\t\t/* Adds the 'trail-begin' class around first item if there's more than one item. */\n\t\tif ( 1 < count( $trail ) )\n\t\t\tarray_unshift( $trail, '<span class=\"trail-begin\">' . array_shift( $trail ) . '</span>' );\n\n\t\t/* Adds the 'trail-end' class around last item. */\n\t\tarray_push( $trail, '<span class=\"trail-end\">' . array_pop( $trail ) . '</span>' );\n\n\t\t/* Format the separator. */\n\t\t$separator = ( !empty( $args['separator'] ) ? '<span class=\"sep\">' . $args['separator'] . '</span>' : '<span class=\"sep\">/</span>' );\n\n\t\t/* Join the individual trail items into a single string. */\n\t\t$breadcrumb .= join( \" {$separator} \", $trail );\n\n\t\t/* If $after was set, wrap it in a container. */\n\t\t$breadcrumb .= ( !empty( $args['after'] ) ? ' <span class=\"trail-after\">' . $args['after'] . '</span>' : '' );\n\n\t\t/* Close the breadcrumb trail containers. */\n\t\t$breadcrumb .= '</' . tag_escape( $args['container'] ) . '>';\n\t}\n\n\t/* Allow developers to filter the breadcrumb trail HTML. */\n\t$breadcrumb = apply_filters( 'breadcrumb_trail', $breadcrumb, $args );\n\n\t/* Output the breadcrumb. */\n\tif ( $args['echo'] )\n\t\techo $breadcrumb;\n\telse\n\t\treturn $breadcrumb;\n}", "function junio_breadcrumb() {\n\t$txtHome = 'Inicio';\n\n\tif (is_home() || is_404() || !have_posts())\n\t\treturn;\n\t\n\techo '<ol class=\"breadcrumb\">';\n\tif (!is_home()) {\n\t\t\techo '<li><a href=\"';\n\t\t\techo get_option('home');\n\t\t\techo '\">';\n\t\t\techo ' '.$txtHome;\n\t\t\techo \"</a></li>\";\n\t\t\tif (is_category() || is_single()) {\n\t\t\t\t\techo '<li>';\n\t\t\t\t\tthe_category(' </li><li> ');\n\t\t\t\t\tif (is_single()) {\n\t\t\t\t\t\t\techo \"</li><li>\";\n\t\t\t\t\t\t\tthe_title();\n\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t}\n\t\t\t} elseif (is_page()) {\n\t\t\t\t\techo '<li>';\n\t\t\t\t\techo the_title();\n\t\t\t\t\techo '</li>';\n\t\t\t}\n\t}\n\techo '</ol>';\n}", "function rovoko_breadcrumb( $args = [] ) {\n\tif ( ! class_exists( 'Rovoko_Breadcrumb' ) ) {\n\t\treturn;\n\t}\n\t$args = wp_parse_args( $args, [\n\t\t'class' => '',\n\t\t'separator' => ''\n\t] );\n\t$breadcrumb = new Rovoko_Breadcrumb();\n\t$entries = $breadcrumb->get_entries();\n\n\tif ( empty( $entries ) ) {\n\t\treturn;\n\t}\n\t$separator = apply_filters( 'rovoko_breadcrumb_separator', $args['separator'] );\n\tob_start();\n\t$count = count( $entries );\n\t$d = 0;\n\tforeach ( $entries as $entry ) {\n\t\t$d ++;\n\t\t$entry = wp_parse_args( $entry, array(\n\t\t\t'label' => '',\n\t\t\t'url' => ''\n\t\t) );\n\n\t\tif ( empty( $entry['label'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( ! empty( $entry['url'] ) ) {\n\t\t\tprintf(\n\t\t\t\t'<a class=\"item link\" href=\"%1$s\">%2$s</a>',\n\t\t\t\tesc_url( $entry['url'] ),\n\t\t\t\tesc_attr( $entry['label'] )\n\t\t\t);\n\t\t} else {\n\t\t\tprintf( '<span class=\"item title\" >%s</span>', esc_html( $entry['label'] ) );\n\t\t}\n\t\tif ( $d < $count ) {\n\t\t\techo '<span class=\"separator \">' . $separator . '</span>';\n\t\t}\n\t}\n\n\t$output = ob_get_clean();\n\n\tif ( $output ) {\n\t\t$home_link = '<a href=\"' . home_url( '/' ) . '\" class=\"breadcrumb-home-icon\"><span class=\"flaticon-internet-1\"></span></a>';\n\t\tprintf( '<div class=\"' . rovoko_ptitle_inner_class( [\n\t\t\t\t'class' => 'ef5-breadcrumb',\n\t\t\t\t'echo' => false,\n\t\t\t\t'inner' => false\n\t\t\t] ) . ' \"><div class=\"breadcrumb %1$s\">%2$s %3$s</div></div>', $args['class'], $home_link, $output );\n\t}\n}", "function SimplyCivi_breadcrumb($breadcrumb) {\n // Don't add the title if menu_breadcrumb exists. TODO: Add a settings \n // checkbox to optionally control the display.\n if (!module_exists('menu_breadcrumb') && count($breadcrumb) > 0) {\n $breadcrumb[] = drupal_get_title();\n }\n return '<div class=\"breadcrumb\">'. implode(' &rsaquo; ', $breadcrumb) .'</div>';\n}", "function Breadcrumbs($activeTab) {\n\n\t\tglobal $bcMenu; // NOW i can use this inside this function\n\t\t$menuLen = count($bcMenu);\n\n\t\techo '<nav>';\n\t\t// left sidebar menu here\n\t\techo '<ul class=\"Breadcrumbs\">';\n\t\tfor ($x = 0; $x < $menuLen; $x++) {\n\t\t\techo '<li><a href=\"#\">' . $bcMenu[$x] . '</a>';\n\t\t\tif ($x < ($menuLen -1)) {\n\t\t\t\techo '&nbsp;&nbsp;>&nbsp;&nbsp;';\n\t\t\t}\n\t\t}\n\t\techo '</ul>';\n\t\techo '</nav>';\n\t}", "function ncstate_official_breadcrumb($variables) {\n // Wrap separator with span element.\n if (!empty($variables['breadcrumb'])) {\n // Provide a navigational heading to give context for breadcrumb links to\n // screen-reader users. Make the heading invisible with .element-invisible.\n $output = '<span class=\"access\">' . t('You are here') . '</span>';\n $output .= '<div class=\"breadcrumb\">' . implode('<span class=\"separator\"> ' . theme_get_setting('breadcrumb_separator') . '</span>', $variables['breadcrumb']) . '</div>';\n return $output;\n }\n}", "function wp_bac_breadcrumb() {\n //Variable (symbol >> encoded) and can be styled separately.\n //Use >> for different level categories (parent >> child >> grandchild)\n $delimiter = '<span class=\"delimiter\"> &raquo; </span>';\n //Use bullets for same level categories ( parent . parent )\n $delimiter1 = '<span class=\"delimiter1\"> &bull; </span>';\n \n //text link for the 'Home' page\n $main = 'Home';\n //Display only the first 30 characters of the post title.\n $maxLength= 30;\n \n //variable for archived year\n $arc_year = get_the_time('Y');\n //variable for archived month\n $arc_month = get_the_time('F');\n //variables for archived day number + full\n $arc_day = get_the_time('d');\n $arc_day_full = get_the_time('l'); \n \n //variable for the URL for the Year\n $url_year = get_year_link($arc_year);\n //variable for the URL for the Month\n $url_month = get_month_link($arc_year,$arc_month);\n \n /*is_front_page(): If the front of the site is displayed, whether it is posts or a Page. This is true\n when the main blog page is being displayed and the 'Settings > Reading ->Front page displays'\n is set to \"Your latest posts\", or when 'Settings > Reading ->Front page displays' is set to\n \"A static page\" and the \"Front Page\" value is the current Page being displayed. In this case\n no need to add breadcrumb navigation. is_home() is a subset of is_front_page() */\n \n //Check if NOT the front page (whether your latest posts or a static page) is displayed. Then add breadcrumb trail.\n if (!is_front_page()) {\n //If Breadcrump exists, wrap it up in a div container for styling.\n //You need to define the breadcrumb class in CSS file.\n echo '<div class=\"breadcrumb\">';\n \n //global WordPress variable $post. Needed to display multi-page navigations.\n global $post, $cat;\n //A safe way of getting values for a named option from the options database table.\n $homeLink = get_option('home'); //same as: $homeLink = get_bloginfo('url');\n //If you don't like \"You are here:\", just remove it.\n echo 'You are here: <a href=\"' . $homeLink . '\">' . $main . '</a>' . $delimiter; \n \n //Display breadcrumb for single post\n if (is_single()) { //check if any single post is being displayed.\n //Returns an array of objects, one object for each category assigned to the post.\n //This code does not work well (wrong delimiters) if a single post is listed\n //at the same time in a top category AND in a sub-category. But this is highly unlikely.\n $category = get_the_category();\n $num_cat = count($category); //counts the number of categories the post is listed in.\n \n //If you have a single post assigned to one category.\n //If you don't set a post to a category, WordPress will assign it a default category.\n if ($num_cat <=1) //I put less or equal than 1 just in case the variable is not set (a catch all).\n {\n echo get_category_parents($category[0], true,' ' . $delimiter . ' ');\n //Display the full post title.\n echo ' ' . get_the_title();\n }\n //then the post is listed in more than 1 category.\n else {\n //Put bullets between categories, since they are at the same level in the hierarchy.\n echo the_category( $delimiter1, multiple);\n //Display partial post title, in order to save space.\n if (strlen(get_the_title()) >= $maxLength) { //If the title is long, then don't display it all.\n echo ' ' . $delimiter . trim(substr(get_the_title(), 0, $maxLength)) . ' ...';\n }\n else { //the title is short, display all post title.\n echo ' ' . $delimiter . get_the_title();\n }\n }\n }\n //Display breadcrumb for category and sub-category archive\n elseif (is_category()) { //Check if Category archive page is being displayed.\n //returns the category title for the current page.\n //If it is a subcategory, it will display the full path to the subcategory.\n //Returns the parent categories of the current category with links separated by '»'\n echo 'Archive Category: \"' . get_category_parents($cat, true,' ' . $delimiter . ' ') . '\"' ;\n }\n //Display breadcrumb for tag archive\n elseif ( is_tag() ) { //Check if a Tag archive page is being displayed.\n //returns the current tag title for the current page.\n echo 'Posts Tagged: \"' . single_tag_title(\"\", false) . '\"';\n }\n //Display breadcrumb for calendar (day, month, year) archive\n elseif ( is_day()) { //Check if the page is a date (day) based archive page.\n echo '<a href=\"' . $url_year . '\">' . $arc_year . '</a> ' . $delimiter . ' ';\n echo '<a href=\"' . $url_month . '\">' . $arc_month . '</a> ' . $delimiter . $arc_day . ' (' . $arc_day_full . ')';\n }\n elseif ( is_month() ) { //Check if the page is a date (month) based archive page.\n echo '<a href=\"' . $url_year . '\">' . $arc_year . '</a> ' . $delimiter . $arc_month;\n }\n elseif ( is_year() ) { //Check if the page is a date (year) based archive page.\n echo $arc_year;\n }\n //Display breadcrumb for search result page\n elseif ( is_search() ) { //Check if search result page archive is being displayed.\n echo 'Search Results for: \"' . get_search_query() . '\"';\n }\n //Display breadcrumb for top-level pages (top-level menu)\n elseif ( is_page() && !$post->post_parent ) { //Check if this is a top Level page being displayed.\n echo get_the_title();\n }\n //Display breadcrumb trail for multi-level subpages (multi-level submenus)\n elseif ( is_page() && $post->post_parent ) { //Check if this is a subpage (submenu) being displayed.\n //get the ancestor of the current page/post_id, with the numeric ID\n //of the current post as the argument.\n //get_post_ancestors() returns an indexed array containing the list of all the parent categories.\n $post_array = get_post_ancestors($post);\n \n //Sorts in descending order by key, since the array is from top category to bottom.\n krsort($post_array); \n \n //Loop through every post id which we pass as an argument to the get_post() function.\n //$post_ids contains a lot of info about the post, but we only need the title.\n foreach($post_array as $key=>$postid){\n //returns the object $post_ids\n $post_ids = get_post($postid);\n //returns the name of the currently created objects\n $title = $post_ids->post_title;\n //Create the permalink of $post_ids\n echo '<a href=\"' . get_permalink($post_ids) . '\">' . $title . '</a>' . $delimiter;\n }\n the_title(); //returns the title of the current page.\n }\n //Display breadcrumb for author archive\n elseif ( is_author() ) {//Check if an Author archive page is being displayed.\n global $author;\n //returns the user's data, where it can be retrieved using member variables.\n $user_info = get_userdata($author);\n echo 'Archived Article(s) by Author: ' . $user_info->display_name ;\n }\n //Display breadcrumb for 404 Error\n elseif ( is_404() ) {//checks if 404 error is being displayed\n echo 'Error 404 - Not Found.';\n }\n else {\n //All other cases that I missed. No Breadcrumb trail.\n }\n echo '</div>';\n }\n}", "public function renderBreadcrumbs($appendCurrent = true) {\n\n\t\t$out = '';\n\t\t$loggedin = $this->wire('user')->isLoggedin();\n\t\t$touch = $this->wire('session')->get('touch');\n\t\t$separator = \"<span class='divider'>/</span>\";\n\n\t\tif(!$touch && $loggedin && $this->className() == 'AdminThemeSemanticHelpers') {\n\n\t\t\tif($this->wire('config')->debug) {\n\t\t\t\t$label = __('Debug Mode Tools', '/wire/templates-admin/debug.inc');\n\t\t\t\t$out .=\n\t\t\t\t\t\"<li><a href='#' title='$label' onclick=\\\"$('#debug_toggle').click();return false;\\\">\" .\n\t\t\t\t\t\"<i class='fa fa-cog'></i></a>$separator</li>\";\n\t\t\t}\n\n\t\t\tif($this->wire('process') != 'ProcessPageList') {\n\t\t\t\t$url = $this->wire('config')->urls->admin . 'page/';\n\t\t\t\t$tree = $this->_('Tree');\n\t\t\t\t$out .=\n\t\t\t\t\t\"<a class='section' href='$url' data-tab-text='$tree' data-tab-icon='sitemap' title='$tree'>\" .\n\t\t\t\t\t\"<i class='fa fa-sitemap'></i></a>$separator\";\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->wire('breadcrumbs') as $breadcrumb) {\n\t\t\t$title = $breadcrumb->get('titleMarkup');\n\t\t\tif(!$title) $title = $this->wire('sanitizer')->entities1($this->_($breadcrumb->title));\n\t\t\t$out .= \"<a class='section' href='{$breadcrumb->url}'>{$title}</a>$separator\";\n\t\t}\n\n\t\tif($appendCurrent) $out .= \"<div class='active section'>\" . $this->getHeadline() . \"</div>\";\n\n\t\treturn $out;\n\t}", "function centity_set_breadcrumb() {\n $breadcrumb = array(\n l(t('Home'), '<front>'),\n l(t('Administration'), 'admin'),\n l(t('Content'), 'admin/content'),\n l(t('Centity'), 'admin/content/centity'),\n );\n drupal_set_breadcrumb($breadcrumb);\n}", "function replicator_breadcrumb($breadcrumb) {\n if (!empty($breadcrumb)) {\n $title = drupal_get_title();\n if (!empty($title)) {\n // Get separator\n global $theme_info;\n if (theme_get_setting('replicator_breadcrumb_separator')) {\n $sep = '<span class=\"breadcrumb-sep\">'. theme_get_setting('replicator_breadcrumb_separator').'</span>';\n }\n $breadcrumb[]='<span class=\"breadcrumb-current\">'. $title .'</span>';\n }\n return '<div class=\"breadcrumb\">'. implode($sep, $breadcrumb) .'</div>';\n }\n}", "function bread_crumb($itens)\n\t{\n\t\t$str = \"\";\n\t\t$str .= \"<ol class=\\\"breadcrumb\\\">\\n\";\n\n\t\tforeach($itens as $item)\n\t\t{\n\n\t\t\tif($item['url'] == '')\n\t\t\t{\n\t\t\t\t$str .= \" <li class=\\\"active\\\">\".$item['caption'].\"</li>\\n\";\n\t\t\t} else {\n\t\t\t\t$str .= \" <li>\".anchor($item['url'], $item['caption']).\"</li>\\n\";\n\t\t\t}\n\t\t}\n\n\t\t$str .= \"</ol>\\n\";\n\n\t\treturn $str;\n\n\t}", "protected function generateBreadcrumb($curItem) {\n //if(empty($curItem) || !$this->getOption(G3_SETTINGS_SHOWBREADCRUMB)) return '';\n if(empty($curItem)) return '';\n\t\tif($curItem['curitem']['type'] == 'album')\n\t\t{\n\t\t\tif(!$this->getOption(G3_SETTINGS_SHOWBREADCRUMB_ALBUM)) return '';\n\t\t}\n\t else {\n\t\t\tif(!$this->getOption(G3_SETTINGS_SHOWBREADCRUMB_PHOTO)) return '';\n\t\t}\n\n $result = '<p class=\"g3client_breadcrumb\">';\n $result .= __('You are here', 'g3client');\n $result .= ': ';\n\n foreach(array_reverse($curItem['parents']) as $curParent) {\n $result .= '<span>';\n $result .= '<a href=\"';\n $result .= G3Client_Output::genURL(array('item' => $curParent['id']));\n $result .= '\" title=\"';\n $result .= !empty($curParent['slug']) ? $curParent['slug'] : $curParent['title'];\n $result .= '\">';\n $result .= $curParent['title'];\n $result .= '</a>';\n $result .= '</span> &middot; ';\n }\n\n $result .= '<span class=\"g3client_curitem\">';\n $result .= $curItem['curitem']['title'];\n $result .= '</span>';\n\n $result .= '</p>';\n\n return $result;\n }", "public function getBreadcrumbs()\n {\n if ($this->getConfig()->getControl('breadcrumbs')) {\n\n $config = $this->getConfig()->getBreadcrumbsConfig();\n $scope_params = []; // The cumulative array of scope params for breadcrumbs.\n $scope = $config['scope'];\n $base_params = $this->getUrlBaseParameters();\n\n $display_params = $this->getUrlDisplayParameters($config, $base_params);\n\n // Let's get started...\n $route = $this->getRoute();\n $crumbs = [];\n\n $home_label = $this->getConfig()->getDomain();\n\n $url = $route.$this->urlQueryString($display_params);\n $home_crumb = [\n 'home' => [\n 'display' => $home_label,\n 'url' => $url\n ]\n ];\n if ($config['show_home'])\n $crumbs = $home_crumb;\n\n $up = [];\n $deepest = [];\n $title = '';\n\n // Loop through specified crumb keys...\n foreach ($config['parameters'] as $key) {\n\n // If available in base_parameters, build a breadcrumb and titlecrumb for this parameter.\n // If using query scope, add this param to cumulative stack of values comprising scope.\n if (array_key_exists($key, $base_params)) {\n\n $url_base_params = array_add($scope_params, $key, $base_params[$key]);\n\n if ($scope == 'query')\n $scope_params = array_add($scope_params, $key, $base_params[$key]);\n\n // Make the crumb.\n $url = $route.$this->urlQueryString(array_merge($url_base_params, $display_params));\n $crumbs[$key] = [\n 'display' => $base_params[$key],\n 'url' => $url\n ];\n\n $title = $this->crumbsTitle($crumbs);\n\n // Save next-to-last and last crumbs for link header\n // and other uses, omitting sort/view/limit params.\n $generic_url = $route.$this->urlQueryString($url_base_params);\n $up = !$deepest ? [\n 'parameter' => 'catalog',\n 'display' => $home_label,\n 'url' => $route\n ] : $deepest;\n $deepest = [\n 'parameter' => $key,\n 'display' => $title,\n 'url' => $generic_url\n ];\n }\n }\n\n $titlecrumbs_sep = $this->getConfig()->ls('ui.symbol.separator.titlecrumbs');\n\n if (!$title)\n $title = $this->crumbsTitle($crumbs);\n\n\n $query_params = $this->getQueryParameters();\n\n\n $self = $this->urlSelf();\n\n return [\n 'config' => [\n 'scope' => $config['scope'],\n 'persist_sort' => $config['persist_sort'],\n 'persist_view' => $config['persist_view'],\n 'show_home' => $config['show_home'],\n 'home_label' => $home_label,\n 'separators' => [\n 'breadcrumbs' => $this->getConfig()->ls('ui.symbol.separator.breadcrumbs'),\n 'titlecrumbs' => $titlecrumbs_sep\n ],\n 'text_ending' => $config['text_ending']\n ],\n 'route' => $route,\n 'base_parameters' => $base_params,\n 'crumbs' => $crumbs,\n 'title' => $title,\n 'rel' => [\n 'deepest' => $deepest,\n 'up' => $up,\n 'self' => $self\n ]\n ];\n }\n\n return null;\n }", "protected function generateBreadcrumb($curItem) {\n if(empty($curItem) || !$this->getOption(G3_SETTINGS_SHOWBREADCRUMB)) return '';\n\n $result = '<p class=\"g3client_breadcrumb\">';\n $result .= __('You are here', 'g3client');\n $result .= ': ';\n\n foreach(array_reverse($curItem['parents']) as $curParent) {\n $result .= '<span>';\n $result .= '<a href=\"';\n $result .= G3Client_OutputUtil::genURL(array('item' => $curParent['id']));\n $result .= '\" title=\"';\n $result .= !empty($curParent['slug']) ? $curParent['slug'] : $curParent['title'];\n $result .= '\">';\n $result .= $curParent['title'];\n $result .= '</a>';\n $result .= '</span> &middot; ';\n }\n\n $result .= '<span class=\"g3client_curitem\">';\n $result .= $curItem['curitem']['title'];\n $result .= '</span>';\n\n $result .= '</p>';\n\n return $result;\n }", "function breadCrumb()\n\t{\n\t\t$sql='SELECT a.category_name AS Category,a.category_id as maincatid, b.category_name AS SubCategory, b.category_id,pt.title\n\t\tFROM category_table a INNER JOIN category_table b ON a.category_id = b.category_parent_id \n\t\tinner join products_table pt on b.category_id=pt.category_id WHERE pt.product_id ='.(int)$_GET['prodid'].\" AND pt.status=1\";\n\t\t$query = new Bin_Query();\n\t\tif($query->executeQuery($sql))\n\t\t\treturn Display_DProductDetail::breadCrumb($query->records);\n\t}", "protected function _generateBreadcrumb()\r\n {\r\n // id_menu_package = 'Tour Packages'\r\n $listTitle = $this->view->translate('id_menu_package');\r\n\r\n if($this->_hasParam('id')) {\r\n // Param\r\n $packageId = $this->_getParam('id');\r\n\r\n // Model\r\n $packageDescDb = new Model_DbTable_PackageDescription;\r\n\r\n // Data\r\n $packageTitle =\r\n $packageDescDb->getTitleById($packageId, $this->_languageId);\r\n }\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n $links = null;\r\n switch ($this->_request->getActionName()) {\r\n case 'view':\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => $this->view->baseUrl('package'),\r\n $packageTitle => '',\r\n );\r\n $this->view->pageTitle = $packageTitle;\r\n break;\r\n case 'detail':\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => $this->view->baseUrl('package'),\r\n $packageTitle => '',\r\n );\r\n $this->view->pageTitle = $packageTitle;\r\n break;\r\n case 'index':\r\n default:\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => '',\r\n );\r\n $this->view->pageTitle = $listTitle;\r\n }\r\n Zend_Registry::set('breadcrumb', $links);\r\n }", "function aalto_blogs_breadcrumbs( $args = array() ) {\n\tif ( is_front_page() ) {\n\t\treturn;\n\t}\n\n\tif ( ! get_theme_mod( 'breadcrumbs' ) ) {\n\t\treturn;\n\t}\n\tglobal $post;\n\t$defaults = array(\n\t\t'separator_icon' => '&gt;',\n\t\t'breadcrumbs_id' => 'breadcrumbs',\n\t\t'breadcrumbs_classes' => 'breadcrumb-trail breadcrumbs hidden-xs',\n\t\t'home_title' => 'Home'\n\t);\n\t$args = apply_filters( 'aalto_blogs_breadcrumbs_args', wp_parse_args( $args, $defaults ) );\n\t$separator = '<span class=\"separator\"> ' . esc_attr( $args['separator_icon'] ) . ' </span>';\n $title_sanitised = get_the_title() ?: '(No Title)';\n\t/***** Begin Markup *****/\n\t// Open the breadcrumbs\n\t$html = '<div id=\"' . esc_attr( $args['breadcrumbs_id'] ) . '\" class=\"' . esc_attr( $args['breadcrumbs_classes'] ) . '\">';\n\t// Add Homepage link & separator (always present)\n\t$html .= '<span class=\"item-home\"><a class=\"bread-link bread-home\" href=\"' . get_home_url() . '\" title=\"' . esc_attr( $args['home_title'] ) . '\">' . esc_attr( $args['home_title'] ) . '</a></span>';\n\t$html .= $separator;\n\t// Post\n\tif ( is_singular( 'post' ) ) {\n\t\t$category = get_the_category();\n\t\t$category_values = array_values( $category );\n\t\t$last_category = end( $category_values );\n\t\t$cat_parents = rtrim( get_category_parents( $last_category->term_id, true, ';' ), ';' );\n\t\t$cat_parents = explode( ';', $cat_parents );\n\t\tforeach ( $cat_parents as $parent ) {\n\t\t\t$html .= '<span class=\"item-cat\">' . wp_kses( $parent, wp_kses_allowed_html( 'a' ) ) . '</span>';\n\t\t\t$html .= $separator;\n\t\t}\n\t\t$html .= '<span class=\"item-current item-' . $post->ID . '\"><span class=\"bread-current bread-' . $post->ID . '\" title=\"' . $title_sanitised . '\">' . $title_sanitised . '</span></span>';\n\t} elseif ( is_singular( 'page' ) ) {\n\t\tif ( $post->post_parent ) {\n\t\t\t$parents = get_post_ancestors( $post->ID );\n\t\t\t$parents = array_reverse( $parents );\n\t\t\tforeach ( $parents as $parent ) {\n\t\t\t\t$html .= '<span class=\"item-parent item-parent-' . esc_attr( $parent ) . '\"><a class=\"bread-parent bread-parent-' . esc_attr( $parent ) . '\" href=\"' . esc_url( get_permalink( $parent ) ) . '\" title=\"' . ( get_the_title( $parent ) ?: '(No Title)' ) . '\">' . ( get_the_title( $parent ) ?: '(No Title)' ) . '</a></span>';\n\t\t\t\t$html .= $separator;\n\t\t\t}\n\t\t}\n\t\t$html .= '<span class=\"item-current item-' . $post->ID . '\"><span title=\"' . $title_sanitised . '\"> ' . $title_sanitised . '</span></span>';\n\t} elseif ( is_singular( 'attachment' ) ) {\n\t\t$parent_id = $post->post_parent;\n\t\t$parent_title = get_the_title( $parent_id ) ?: '(No Title)';\n\t\t$parent_permalink = esc_url( get_permalink( $parent_id ) );\n\t\t$html .= '<span class=\"item-parent\"><a class=\"bread-parent\" href=\"' . esc_url( $parent_permalink ) . '\" title=\"' . esc_attr( $parent_title ) . '\">' . esc_attr( $parent_title ) . '</a></span>';\n\t\t$html .= $separator;\n\t\t$html .= '<span class=\"item-current item-' . $post->ID . '\"><span title=\"' . $title_sanitised . '\"> ' . $title_sanitised . '</span></span>';\n\t} elseif ( is_singular() ) {\n\t\t$post_type = get_post_type();\n\t\t$post_type_object = get_post_type_object( $post_type );\n\t\t$post_type_archive = get_post_type_archive_link( $post_type );\n\t\t$html .= '<span class=\"item-cat item-custom-post-type-' . esc_attr( $post_type ) . '\"><a class=\"bread-cat bread-custom-post-type-' . esc_attr( $post_type ) . '\" href=\"' . esc_url( $post_type_archive ) . '\" title=\"' . esc_attr( $post_type_object->labels->name ) . '\">' . esc_attr( $post_type_object->labels->name ) . '</a></span>';\n\t\t$html .= $separator;\n\t\t$html .= '<span class=\"item-current item-' . $post->ID . '\"><span class=\"bread-current bread-' . $post->ID . '\" title=\"' . $post->post_title . '\">' . $post->post_title . '</span></span>';\n\t} elseif ( is_category() ) {\n\t\t$parent = get_queried_object()->category_parent;\n\t\tif ( $parent !== 0 ) {\n\t\t\t$parent_category = get_category( $parent );\n\t\t\t$category_link = get_category_link( $parent );\n\t\t\t$html .= '<span class=\"item-parent item-parent-' . esc_attr( $parent_category->slug ) . '\"><a class=\"bread-parent bread-parent-' . esc_attr( $parent_category->slug ) . '\" href=\"' . esc_url( $category_link ) . '\" title=\"' . esc_attr( $parent_category->name ) . '\">' . esc_attr( $parent_category->name ) . '</a></span>';\n\t\t\t$html .= $separator;\n\t\t}\n\t\t$html .= '<span class=\"item-current item-cat\"><span class=\"bread-current bread-cat\" title=\"' . $post->ID . '\">' . single_cat_title( '', false ) . '</span></span>';\n\t} elseif ( is_tag() ) {\n\t\t$html .= '<span class=\"item-current item-tag\"><span class=\"bread-current bread-tag\">' . single_tag_title( '', false ) . '</span></span>';\n\t} elseif ( is_author() ) {\n\t\t$html .= '<span class=\"item-current item-author\"><span class=\"bread-current bread-author\">' . get_queried_object()->display_name . '</span></span>';\n\t} elseif ( is_day() ) {\n\t\t$html .= '<span class=\"item-current item-day\"><span class=\"bread-current bread-day\">' . get_the_date() . '</span></span>';\n\t} elseif ( is_month() ) {\n\t\t$html .= '<span class=\"item-current item-month\"><span class=\"bread-current bread-month\">' . get_the_date( 'F Y' ) . '</span></span>';\n\t} elseif ( is_year() ) {\n\t\t$html .= '<span class=\"item-current item-year\"><span class=\"bread-current bread-year\">' . get_the_date( 'Y' ) . '</span></span>';\n\t} elseif ( is_archive() ) {\n\t\t$custom_tax_name = get_queried_object()->name;\n\t\t$html .= '<span class=\"item-current item-archive\"><span class=\"bread-current bread-archive\">' . esc_attr( $custom_tax_name ) . '</span></span>';\n\t} elseif ( is_search() ) {\n\t\t$html .= '<span class=\"item-current item-search\"><span class=\"bread-current bread-search\">Search results for: ' . get_search_query() . '</span></span>';\n\t} elseif ( is_404() ) {\n\t\t$html .= '<span>Error 404</span>';\n\t} elseif ( is_home() ) {\n\t\t$html .= '<span>' . ( get_the_title( get_option( 'page_for_posts' ) ) ?: '(No Title)' ) . '</span>';\n\t}\n\t$html .= '</div>';\n\t$html = apply_filters( 'aalto_blogs_breadcrumbs_filter', $html );\n\techo wp_kses_post( $html );\n}", "function culturefeed_ui_set_profile_breadcrumb() {\n\n global $user;\n\n // Set the breadcrumb.\n $active_trail = array();\n\n $active_trail[] = array(\n 'title' => t('Home'),\n 'href' => '<front>',\n 'link_path' => '',\n 'localized_options' => array(),\n 'type' => 0,\n );\n\n $active_trail[] = array(\n 'title' => t('My profile'),\n 'href' => 'user/' . $user->uid,\n 'link_path' => '',\n 'localized_options' => array(),\n 'type' => 0,\n );\n\n $active_trail[] = array(\n 'title' => $user->name,\n 'href' => $_GET['q'],\n 'link_path' => '',\n 'localized_options' => array(),\n 'type' => 0,\n );\n\n menu_set_active_trail($active_trail);\n\n}", "static function breadcrumbs( $atts = false ) {\r\n\r\n if ( !function_exists( 'flawless_breadcrumbs' ) ) {\r\n return;\r\n }\r\n\r\n return flawless_breadcrumbs( array(\r\n 'return' => true,\r\n 'hide_breadcrumbs' => false\r\n ) );\r\n\r\n }", "public function getBreadcrumbPath()\n {\n if (!$this->_categoryPath) {\n $path = array();\n if ($category = $this->getCategory()) {\n $pathInStore = $category->getPathInStore();\n $pathIds = array_reverse(explode(',', $pathInStore));\n\n $categories = $category->getParentCategories();\n\n // add category path breadcrumb\n foreach ($pathIds as $categoryId) {\n if (isset($categories[$categoryId]) && $categories[$categoryId]->getName()) {\n //ADDONLINE : metre l'url de la page cms si elle est configurée\n $pageCms = null;\n if ($categories[$categoryId]->getNavigationType() == Addonline_CategoryNavigation_Model_Catalog_Category_Attribute_Source_Navigationtype::PAGE_CMS\n && $categories[$categoryId]->getPageCms()) {\n $pageCms = $categories[$categoryId]->getPageCms();\n }\n //FIN ADDONLINE\n $path['category'.$categoryId] = array(\n 'label' => $categories[$categoryId]->getName(),\n 'link' => $pageCms?Mage::getUrl('/').$pageCms:($this->_isCategoryLink($categoryId) ? $categories[$categoryId]->getUrl() : ''),\n 'navigation_type' => $categories[$categoryId]->getNavigationType()\n );\n }\n }\n }\n\n if ($this->getProduct()) {\n $path['product'] = array('label'=>$this->getProduct()->getName());\n }\n\n $this->_categoryPath = $path;\n }\n return $this->_categoryPath;\n }", "function breadcrumb(){\n $CI =& get_instance();\n $CI->load->helper('url');\n $classe = ucfirst($CI->router->class);\n if($classe=='Painel'):\n $classe = anchor($CI->router->class,'Painel adm - Fast-Food Agora');\n else:\n $classe = anchor($CI->router->class,$classe);\n endif;\n \n $metodo = ucwords(str_replace('_', ' ', $CI->router->method));\n if ($metodo && $metodo != 'Index'):\n $metodo = \" &raquo; \".anchor($CI->router->class.\"/\".$CI->router->method, $metodo);\n else: \n $method = '';\n endif;\n return '<p>Sua localização: '.anchor('painel','Painel').' &raquo; '.$classe.$metodo.'</p>';\n \n}", "public static function getBreadcrumbs()\n {\n $startarticle = rex_article::get(rex_article::getSiteStartArticleId());\n $breadcrumb_start_only = true;\n $breadcrumbs = '';\n if ($startarticle instanceof rex_article) {\n $breadcrumbs = '<a href=\"' . $startarticle->getUrl() . '\"><span class=\"fa-icon fa-home\"></span></a>';\n }\n $current_article = rex_article::getCurrent();\n if ($current_article instanceof rex_article) {\n $path = $current_article->getPathAsArray();\n // Categories\n foreach ($path as $id) {\n $article = rex_category::get($id);\n if ($article instanceof rex_category && $id !== rex_article::getSiteStartArticleId()) {\n $breadcrumb_start_only = false;\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;<a href=\"' . $article->getUrl() . '\">' . $article->getName() . '</a>';\n } elseif ($startarticle instanceof rex_article) {\n $breadcrumb_start_only = true;\n $breadcrumbs = '<a href=\"' . $startarticle->getUrl() . '\"><span class=\"fa-icon fa-home\"></span></a>';\n }\n }\n // Articles\n if (!$current_article->isStartArticle() && !$current_article->isSiteStartArticle()) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;<a href=\"' . $current_article->getUrl() . '\">' . $current_article->getName() . '</a>';\n $breadcrumb_start_only = false;\n }\n }\n // Addons\n if (rex_addon::get('d2u_courses')->isAvailable()) {\n foreach (d2u_courses_frontend_helper::getBreadcrumbs() as $breadcrumb) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;' . $breadcrumb;\n $breadcrumb_start_only = false;\n }\n }\n if (rex_addon::get('d2u_immo')->isAvailable()) {\n foreach (d2u_immo_frontend_helper::getBreadcrumbs() as $breadcrumb) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;' . $breadcrumb;\n $breadcrumb_start_only = false;\n }\n }\n if (rex_addon::get('d2u_jobs')->isAvailable()) {\n foreach (d2u_jobs_frontend_helper::getBreadcrumbs() as $breadcrumb) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;' . $breadcrumb;\n $breadcrumb_start_only = false;\n }\n }\n if (rex_addon::get('d2u_machinery')->isAvailable()) {\n foreach (d2u_machinery_frontend_helper::getBreadcrumbs() as $breadcrumb) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;' . $breadcrumb;\n $breadcrumb_start_only = false;\n }\n }\n if (rex_addon::get('d2u_references')->isAvailable()) {\n foreach (d2u_references_frontend_helper::getBreadcrumbs() as $breadcrumb) {\n $breadcrumbs .= ' &nbsp;»&nbsp;&nbsp;' . $breadcrumb;\n $breadcrumb_start_only = false;\n }\n }\n return $breadcrumb_start_only ? '' : $breadcrumbs;\n }", "public function createBreadcrumb($additionalLinks = false, $list = true, $class = 'breadcrumb', $itemClass = 'breadcrumb-item')\n {\n $breadcrumb = (($list === true && $this->getBreadcrumbElement() !== false) ? '<'.$this->getBreadcrumbElement().Check::checkIfEmpty($class, ' class=\"'.$class.'\"').'>' : '');\n if ($this->checkLinkOffsetMatch('/', 0)) {\n $breadcrumb.= $this->displayBreadcrumbItem('<li class=\"'.$itemClass.' '.$this->getActiveClass().'\">', '').'Home'.$this->displayBreadcrumbItem('<li>', '');\n } else {\n $breadcrumb.= $this->displayBreadcrumbItem('<li'.Check::checkIfEmpty($itemClass, ' class=\"'.$itemClass.'\"').'>', '', $list).'<a href=\"/\" title=\"Home\"'.(!$this->isBreadcrumbList() && !empty(trim($itemClass)) ? ' class=\"'.$itemClass.'\"' : '').'>Home</a>'.$this->displayBreadcrumbItem('</li>', '', $list);\n $numlinks = (is_array($this->current) ? count($this->current) : 0);\n for ($i = 0; $i < $numlinks; $i++) {\n if ($i == ($numlinks - 1) && $additionalLinks === false) {\n $breadcrumb.= Check::checkIfSet($list, '<'.$this->displayBreadcrumbItem('li', 'span').Check::checkIfEmpty($itemClass, ' class=\"'.$itemClass.' '.$this->getActiveClass().'\"').'>', $this->getBreadcrumbSeparator()).$this->current[$i]['text'].Check::checkIfSet($list, '</'.$this->displayBreadcrumbItem('li', 'span').'>');\n } else {\n $breadcrumb.= $this->displayBreadcrumbItem('<li'.Check::checkIfEmpty($itemClass, ' class=\"'.$itemClass.'\"').'>', Check::checkIfSet($list, '', $this->getBreadcrumbSeparator()), $list).'<a href=\"'.$this->current[$i]['link'].'\" title=\"'.$this->current[$i]['text'].'\"'.(!$this->isBreadcrumbList() && !empty(trim($itemClass)) ? ' class=\"'.$itemClass.'\"' : '').'>'.$this->current[$i]['text'].'</a>'.$this->displayBreadcrumbItem('</li>', '', $list);\n }\n }\n $breadcrumb.= $this->createAdditionalBreadcrumbItems($additionalLinks, $list, $itemClass);\n }\n return $breadcrumb.(($list === true && $this->getBreadcrumbElement() !== false) ? '</'.$this->getBreadcrumbElement().'>' : '');\n }", "public function AddBreadcrumbs()\n\t{\n\t\t// Handle reverse Breadcrumbs\n\t\t$crumbs = array();\n\t\t$page = $this->page;\n\t\t\n\t\twhile($page->details['parentid'])\n\t\t{\t\n\t\t\t$page = new PageContent($page->details['parentid']);\n\t\t\t$crumbs[] = array('title' => $page->details['pagetitle'], 'link' => $page->Link());\n\t\t}\n\t\t\n\t\tforeach($crumbs as $crumb)\n\t\t{\n\t\t\t$this->AddBreadcrumb($crumb['title'], $crumb['link']);\t\n\t\t}\n\t\t\n\t\t$this->AddBreadcrumb($this->page->details['pagetitle']);\n\t}", "function phptemplate_breadcrumb($breadcrumb) {\n if (count($breadcrumb) > 1) {\n $breadcrumb[] = drupal_get_title();\n if ($breadcrumb) {\n return '<div class=\"breadcrumb\">'. implode(' &rsaquo; ', $breadcrumb) .\"</div>\\n\";\n }\n }\n}", "function tech_breadcrumbs() {\n\t// Thanks to dimox for the code\n\t//http://dimox.net/wordpress-breadcrumbs-without-a-plugin/\n\tglobal $tech;\n\t$delimiter = '&raquo;';\n\t$name = __('Home' ,'techozoic');\n\t$currentBefore = '<span class=\"current\">';\n\t$currentAfter = '</span>';\n\t \n\tif ( !is_home() || !is_front_page() || is_paged() ) {\n \n\t\techo '<div id=\"crumbs\">';\n \n\t\tglobal $post;\n\t\t$home = home_url();\n\t\techo '<a href=\"' . $home . '\">' . $name . '</a> ' . $delimiter . ' ';\n \n\t\tif ( is_category() ) {\n\t\t global $wp_query;\n\t\t $cat_obj = $wp_query->get_queried_object();\n\t\t $thisCat = $cat_obj->term_id;\n\t\t $thisCat = get_category($thisCat);\n\t\t $parentCat = get_category($thisCat->parent);\n\t\t if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));\n\t\t echo $currentBefore . __('Archive for category &#39;' ,'techozoic');\n\t\t single_cat_title();\n\t\t echo '&#39;' . $currentAfter;\n\t \n\t\t} elseif ( is_day() ) {\n\t\t echo '<a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';\n\t\t echo '<a href=\"' . get_month_link(get_the_time('Y'),get_the_time('m')) . '\">' . get_the_time('F') . '</a> ' . $delimiter . ' ';\n\t\t echo $currentBefore . get_the_time('d') . $currentAfter;\n\t \n\t\t} elseif ( is_month() ) {\n\t\t echo '<a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';\n\t\t echo $currentBefore . get_the_time('F') . $currentAfter;\n\t \n\t\t} elseif ( is_year() ) {\n\t\t echo $currentBefore . get_the_time('Y') . $currentAfter;\n\t \n\t\t} elseif ( is_single() && !is_attachment() ) {\n\t\t $cat = get_the_category(); \n\t\t $cat = $cat[0];\n\t\t echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');\n\t\t echo $currentBefore;\n\t\t the_title();\n\t\t echo $currentAfter;\n\t \n\t\t} elseif ( is_page() && !$post->post_parent ) {\n\t\t echo $currentBefore;\n\t\t the_title();\n\t\t echo $currentAfter;\n\t \n\t\t} elseif ( is_page() && $post->post_parent ) {\n\t\t $parent_id = $post->post_parent;\n\t\t $breadcrumbs = array();\n\t\t while ($parent_id) {\n\t\t\t$page = get_page($parent_id);\n\t\t\t$breadcrumbs[] = '<a href=\"' . get_permalink($page->ID) . '\">' . get_the_title($page->ID) . '</a>';\n\t\t\t$parent_id = $page->post_parent;\n\t\t }\n\t\t $breadcrumbs = array_reverse($breadcrumbs);\n\t\t foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';\n\t\t echo $currentBefore;\n\t\t the_title();\n\t\t echo $currentAfter;\n\t \n\t\t} elseif ( is_search() ) {\n\t\t echo $currentBefore . __('Search results for &#39;' ,'techozoic') . get_search_query() . '&#39;' . $currentAfter;\n\t \n\t\t} elseif ( is_tag() ) {\n\t\t echo $currentBefore . __('Posts tagged &#39;' ,'techozoic');\n\t\t single_tag_title();\n\t\t echo '&#39;' . $currentAfter;\n\t \n\t\t} elseif ( is_author() ) {\n\t\t global $author;\n\t\t $userdata = get_userdata($author);\n\t\t echo $currentBefore . __('Articles posted by ' ,'techozoic') . $userdata->display_name . $currentAfter;\n\t \n\t\t} elseif ( is_404() ) {\n\t\t echo $currentBefore . __('Error 404' ,'techozoic') . $currentAfter;\n\t\t}\n\t \n\t\tif ( get_query_var('paged') ) {\n\t\t if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';\n\t\t echo __('Page' , 'techozoic') . ' ' . get_query_var('paged');\n\t\t if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';\n\t\t}\n \n\t\techo '</div>';\n \n\t}\n}", "function\t_frozen_breadcrumbs() {\n\t\t\t//Depending on the page.\n\t\t\tif (!is_home() && !is_front_page()) {\n\t\t\t\t?>\n\t\t\t\t\t<ul class=\"breadcrumbs\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href=\"<?php print(home_url('/')); ?>\">Home</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t//Depending on the page.\n\t\t\t\t\t\t\tif (is_category() || is_single()) {\n\t\t\t\t\t\t\t\t//Get the category.\n\t\t\t\t\t\t\t\t$cats\t=\tget_the_category();\n\n\t\t\t\t\t\t\t\t//For each catgory.\n\t\t\t\t\t\t\t\tforeach($cats as $cat) {\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php print(get_category_link($cat -> term_id)); ?>\"\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"<?php _e($cat -> name); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t<?php _e($cat -> name); ?></a>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif (is_page()) {\n\t\t\t\t\t\t\t\t//If this post doesn't have a parent.\n\t\t\t\t\t\t\t\tif (!$post -> post_parent) {\n\t\t\t\t\t\t\t\t\t//Get ancestors.\n\t\t\t\t\t\t\t\t\t$ancestors\t=\tget_post_ancestors($post -> ID);\n\n\t\t\t\t\t\t\t\t\t//Sort the ancestors.\n\t\t\t\t\t\t\t\t\tkrsort($ancestors);\n\n\t\t\t\t\t\t\t\t\t//For each ancestor.\n\t\t\t\t\t\t\t\t\tforeach($ancestors as $anc) {\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php print(get_permalink($anc)); ?>\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"<?php print(get_the_title($anc)); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php print(get_the_title($anc)); ?></a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\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}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<li class=\"current\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t//Get the title.\n\t\t\t\t\t\t\tthe_title();\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}", "public static function getBreadcrumbs( $del = \" &raquo; \" ) \n\t{\n\t\t$text['home'] = __('Home', 'Mint'); // text for the 'Home' link\n\t\t$text['category'] = __('Archive by Category \"%s\"', 'Mint'); // text for a category page\n\t\t$text['search'] = __('Search Results for \"%s\" Query', 'Mint'); // text for a search results page\n\t\t$text['tag'] = __('Posts Tagged \"%s\"', 'Mint'); // text for a tag page\n\t\t$text['author'] = __('Articles Posted by %s', 'Mint'); // text for an author page\n\t\t$text['404'] = __('Error 404', 'Mint'); // text for the 404 page\n\n\t\t$showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show\n\t\t$showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show\n\t\t$delimiter = $del; // delimiter between crumbs\n\t\t$before = '<span class=\"current\">'; // tag before the current crumb\n\t\t$after = '</span>'; // tag after the current crumb\n\t\t/* === END OF OPTIONS === */\n\n\t\tglobal $post;\n\t\t$homeLink = home_url() . '/';\n\t\t$linkBefore = '<span>';\n\t\t$linkAfter = '</span>';\n\t\t$linkAttr = ' ';\n\t\t$link = $linkBefore . '<a' . $linkAttr . ' href=\"%1$s\">%2$s</a>' . $linkAfter;\n\n\t\tif (is_home() || is_front_page()) {\n\n\t\t\tif ($showOnHome == 1) echo '<div id=\"breadcrumbs\"><a href=\"' . $homeLink . '\">' . $text['home'] . '</a></div>';\n\n\t\t} else {\n\n\t\t\techo '<div id=\"breadcrumbs\">' . sprintf($link, $homeLink, $text['home']) . $delimiter;\n\n\t\t\tif ( is_category() ) {\n\t\t\t\t$thisCat = get_category(get_query_var('cat'), false);\n\t\t\t\tif ($thisCat->parent != 0) {\n\t\t\t\t\t$cats = get_category_parents($thisCat->parent, TRUE, $delimiter);\n\t\t\t\t\t$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);\n\t\t\t\t\t$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);\n\t\t\t\t\techo $cats;\n\t\t\t\t}\n\t\t\t\techo $before . sprintf($text['category'], single_cat_title('', false)) . $after;\n\n\t\t\t} elseif ( is_search() ) {\n\t\t\t\techo $before . sprintf($text['search'], get_search_query()) . $after;\n\n\t\t\t} elseif ( is_day() ) {\n\t\t\t\techo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;\n\t\t\t\techo sprintf($link, get_month_link(get_the_time('Y'),get_the_time('m')), get_the_time('F')) . $delimiter;\n\t\t\t\techo $before . get_the_time('d') . $after;\n\n\t\t\t} elseif ( is_month() ) {\n\t\t\t\techo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;\n\t\t\t\techo $before . get_the_time('F') . $after;\n\n\t\t\t} elseif ( is_year() ) {\n\t\t\t\techo $before . get_the_time('Y') . $after;\n\n\t\t\t} elseif ( is_single() && !is_attachment() ) {\n\t\t\t\tif ( get_post_type() != 'post' ) {\n\t\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\t\t$slug = $post_type->rewrite;\n\t\t\t\t\tprintf($link, $homeLink . '/' . $slug['slug'] . '/', $post_type->labels->singular_name);\n\t\t\t\t\tif ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;\n\t\t\t\t} else {\n\t\t\t\t\t$cat = get_the_category(); $cat = $cat[0];\n\t\t\t\t\t$cats = get_category_parents($cat, TRUE, $delimiter);\n\t\t\t\t\tif ($showCurrent == 0) $cats = preg_replace(\"#^(.+)$delimiter$#\", \"$1\", $cats);\n\t\t\t\t\t$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);\n\t\t\t\t\t$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);\n\t\t\t\t\techo $cats;\n\t\t\t\t\tif ($showCurrent == 1) echo $before . get_the_title() . $after;\n\t\t\t\t}\n\n\t\t\t} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {\n\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\techo $before . $post_type->labels->singular_name . $after;\n\n\t\t\t} elseif ( is_attachment() ) {\n\t\t\t\t$parent = get_post($post->post_parent);\n\t\t\t\t$cat = get_the_category($parent->ID); $cat = $cat[0];\n\t\t\t\t$cats = get_category_parents($cat, TRUE, $delimiter);\n\t\t\t\t$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);\n\t\t\t\t$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);\n\t\t\t\techo $cats;\n\t\t\t\tprintf($link, get_permalink($parent), $parent->post_title);\n\t\t\t\tif ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;\n\n\t\t\t} elseif ( is_page() && !$post->post_parent ) {\n\t\t\t\tif ($showCurrent == 1) echo $before . get_the_title() . $after;\n\n\t\t\t} elseif ( is_page() && $post->post_parent ) {\n\t\t\t\t$parent_id = $post->post_parent;\n\t\t\t\t$breadcrumbs = array();\n\t\t\t\twhile ($parent_id) {\n\t\t\t\t\t$page = get_page($parent_id);\n\t\t\t\t\t$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));\n\t\t\t\t\t$parent_id = $page->post_parent;\n\t\t\t\t}\n\t\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t\t\tfor ($i = 0; $i < count($breadcrumbs); $i++) {\n\t\t\t\t\techo $breadcrumbs[$i];\n\t\t\t\t\tif ($i != count($breadcrumbs)-1) echo $delimiter;\n\t\t\t\t}\n\t\t\t\tif ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;\n\n\t\t\t} elseif ( is_tag() ) {\n\t\t\t\techo $before . sprintf($text['tag'], single_tag_title('', false)) . $after;\n\n\t\t\t} elseif ( is_author() ) {\n\t\t\t\tglobal $author;\n\t\t\t\t$userdata = get_userdata($author);\n\t\t\t\techo $before . sprintf($text['author'], $userdata->display_name) . $after;\n\n\t\t\t} elseif ( is_404() ) {\n\t\t\t\techo $before . $text['404'] . $after;\n\t\t\t}\n\n\t\t\tif ( get_query_var('paged') ) {\n\t\t\t\tif ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';\n\t\t\t\techo __('Page', 'Mint') . ' ' . get_query_var('paged');\n\t\t\t\tif ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';\n\t\t\t}\n\n\t\t\techo '</div>';\n\n\t\t}\n\t}", "function elife_breadcrumb($variables) {\n $breadcrumb = $variables['breadcrumb'];\n if (!empty($breadcrumb)) {\n // Provide a navigational heading to give context for breadcrumb links to\n // screen-reader users. Make the heading invisible with .element-invisible.\n $output = '<h2 class=\"element-invisible\">' . t('You are here') . '</h2>';\n $crumbs = '<ul class=\"breadcrumbs clearfix\">';\n $array_size = count($breadcrumb);\n $i = 0;\n while ( $i < $array_size) {\n $crumbs .= '<li class=\"crumb breadcrumb-' . $i;\n if ($i == 0) {\n $crumbs .= ' first';\n $breadcrumb[$i] = l(t('eLife'), '<front>', array('html' => TRUE));\n }\n if ($i+1 == $array_size) {\n $crumbs .= ' last';\n }\n $crumbs .= '\"><span class=\"wrapper\">' . $breadcrumb[$i] . '</span></li>';\n $i++;\n }\n $crumbs .= '</ul>';\n return $crumbs;\n }\n}", "function art_breadcrumb_woker($breadcrumb) {\n $breadcrumb = menu_get_active_breadcrumb();\n if (!empty($breadcrumb)) {\n return '<div class=\"breadcrumb\">' . implode(' | ', $breadcrumb) . '</div>';\n }\n}", "function the_breadcrumb() \r\n{\r\n\tglobal $post;\r\n\t$pageId = '';\r\n\t$postType = '';\r\n\t$pageTitle = '';\r\n\t$output = '';\r\n\t\r\n\tif(!is_home())\r\n\t{\r\n\t\t\r\n\t\t$output .= '<ul class=\"breadcrumb breadcrumb-'.$postType.'\"><li class=\"homeLink\"><a href=\"'.get_option('home').'\" title=\"NHCOA homepage\">Home</a><span class=\"divider\">></span></li>';\r\n\t\t\r\n\t\tif(is_page())\r\n\t\t{\r\n\t\t\t$pageId = $post->ID;\r\n\t\t\t$postType = get_post_type($post);\r\n\t\t\t$pageTitle = get_the_title($pageId);\r\n\t\t\t$list = get_ancestors($pageId, $postType);\r\n\t\t\t$list = array_reverse($list);\r\n\t\t}\r\n\t\tif(is_category())\r\n\t\t{\r\n\t\t\t$pageId = get_query_var('cat');\r\n\t\t\t$postType = 'category';\r\n\t\t\t$pageTitle = get_the_category_by_ID($pageId);\r\n\t\t\t$list = get_ancestors($pageId, $postType);\r\n\t\t\t//$list = array_reverse($list);\r\n\t\t}\r\n\t\tif(is_single())\r\n\t\t{\r\n\t\t\t$pageId = $post->ID;\r\n\t\t\t$postType = get_post_type($post);\r\n\t\t\t$pageTitle = get_the_title($pageId);\r\n\t\t\t$cats = get_the_category($pageId);\r\n\t\t\tusort($cats,'cmp');\r\n\t\t\tforeach($cats as $cat)\r\n\t\t\t{\r\n\t\t\t\t$output .='<li><a href=\"'.get_category_link($cat->term_id ).'\">'.$cat->cat_name.'</a><span class=\"divider\">></span></li>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(is_category() || is_page())\r\n\t\t{\r\n\t\t\tforeach($list as $item)\r\n\t\t\t{\r\n\t\t\t\t$itemTitle = get_the_title($item);\r\n\t\t\t\t$output .= '<li><a href=\"'.get_permalink($item).'\" title=\"'.$itemTitle.'\">'.$itemTitle.'</a><span class=\"divider\">></span></li>';\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\t$output .= $pageTitle.'</ul>';\t\t\r\n\t}\t\r\n\techo $output;\r\n}", "function breadcrumbs($crumb_list=array()) {\n\t\t$CI =& get_instance();\n $CI->load->helper('html');\n $CI->load->helper('url');\n \n\t\t$default_crumb_list = array('Home'=>'');\n\t\t$crumb_list = array_merge($default_crumb_list,$crumb_list);\n\t\t\n $crumbs = '';\n $crumb_links = array();\n $crumb_count = count($crumb_list);\n $labels = array_keys($crumb_list);\n $paths = array_values($crumb_list);\n for ($i = 0; $i<$crumb_count; $i++)\n {\n $label = $labels[$i];\n $path = $paths[$i];\n if ($i == $crumb_count-1)\n {\n $crumb_links[] = $label;\n }\n else\n {\n $crumb_links[] = anchor($path,$label) . ' <span class=\"divider\">/</span>';\n }\n }\n $crumb_string = ul($crumb_links,array('class'=>'breadcrumb'));\n\t\t$crumb_xml = simplexml_load_string($crumb_string);\n $crumb_xml_items = $crumb_xml->li;\n $crumb_count = count($crumb_xml_items);\n $last_crumb = $crumb_xml_items[$crumb_count-1];\n $last_crumb->addAttribute('class','active');\n $crumbs = $crumb_xml->asXML();\n return $crumbs;\n\t}", "protected function createBreadCrumbs($key, $label)\n {\n $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');\n\n if ($breadcrumbs) {\n $breadcrumbs->addCrumb(\n 'home', array(\n 'label' => $this->__('Home'),\n 'title' => $this->__('Home'),\n 'link' => Mage::getBaseUrl()\n )\n );\n\n $isLandingPageEnabled = $this->getHelper()->getConfig()->getFlag(Zip_Payment_Model_Config::CONFIG_LANDING_PAGE_ENABLED_PATH);\n\n if ($isLandingPageEnabled) {\n $breadcrumbs->addCrumb(\n Zip_Payment_Model_Config::LANDING_PAGE_URL_IDENTIFIER, array(\n 'label' => $this->__('About Zip Payment'),\n 'title' => $this->__('About Zip Payment'),\n 'link' => $this->getHelper()->getUrl(Zip_Payment_Model_Config::LANDING_PAGE_URL_ROUTE)\n )\n );\n }\n\n $breadcrumbs->addCrumb(\n $key, array(\n 'label' => $this->__($label),\n 'title' => $this->__($label)\n )\n );\n }\n }", "function the_breadcrumb() {\n\t\t if (!is_home()) {\n\t\t echo '<a href=\"';\n\t\t echo get_option('home');\n\t\t echo '\">';\n\t\t bloginfo('name');\n\t\t echo \"</a> \";\n\t\t if (is_category() || is_single()) {\n\t\t the_category('title_li=');\n\t\t if (is_single()) {\n\t\t echo \" \";\n\t\t the_title();\n\t\t }\n\t\t } elseif (is_page()) {\n\t\t echo the_title();\n\t\t }\n\t\t }\n\t\t}", "function bootstrap_foundation_breadcrumb($breadcrumb) {\n if(count($breadcrumb) <= 1) {\n return \"\";\n }\n \n // Don't add the title if menu_breadcrumb exists. TODO: Add a settings\n // checkbox to optionally control the display.\n if (!module_exists('menu_breadcrumb') && count($breadcrumb) > 0) {\n $breadcrumb[] = drupal_get_title();\n }\n \n $crumbs = implode(' &rsaquo; ', $breadcrumb);\n \n return $crumbs != '' ? '<div class=\"breadcrumb\">'. $crumbs .'</div>' : '';\n}", "public static function breadcrumbs() {\n\t\tif ( ! self::has_breadcrumbs() ) return;\n\t\t?>\n\t\t\t<h6 id=\"header-breadcrumbs\">\n\t\t\t\t<?php dimox_breadcrumbs( '&middot;' ) ?>\n\t\t\t</h6>\n\t\t<?php\n\t}", "function woocommerce_breadcrumb($args = array())\n {\n }", "function my_menu_breadcrumb_item_markup($markup, $breadcrumb) {\r\n\t// $markup is in the format of <a href=\"{Menu Item URL}\">{Menu Item Title}</a>\r\n\t// $breadcrumb is the Menu item object itself\r\n\treturn '<li>' . $markup . '</li>';\r\n}", "function dla_home_theme_breadcrumb($breadcrumb){\n\n // Remove 'home' breadcrumb (first array element) if it is present\n if (!empty($breadcrumb)) {\n array_shift($breadcrumb);\n }\n\n // Get sitename.\n $sitename = variable_get('site_name', 'drupal');\n\n // Prepend MBLWHOI Library and DLA to breadcrumbs.\n array_unshift($breadcrumb, \n l('MBLWHOI Library', 'http://www.mblwhoilibrary.org'),\n l('WHOI DLA', '<front>')\n );\n\n // Append page title.\n $breadcrumb[] = drupal_get_title();\n\n return '<div class=\"breadcrumb\">' . implode(' » ', $breadcrumb) . '</div>';\n}", "function getBreadcrumbs() \n{\n\t// add root folder element manually if not a shared link user\t\n\n\t$str=\"\";\n\t\n\t// do not display breadcrumbs menu if only one element is there\n\tif (count($_SESSION[\"path\"])<1 || (count($_SESSION[\"path\"])==1 && strlen($_SESSION[\"hash\"])))\n\t\treturn \"\";\n\t\t\n\tglobal $conn;\n\t$str=\"\";\n\t$folderid = $_SESSION[\"current_folder\"];\n\twhile ($folderid!=0) \n\t{\n\t\t$list=db_query(\"SELECT * FROM \".AddTableWrappers(\"doc_files\").\" WHERE \".AddFieldWrappers(\"id\").\"=\".$folderid, $conn);\n\t\tif ($curitem=db_fetch_array($list)) \n\t\t{\n\t\t\t$str=\" / <a href=\".$_SERVER[PHP_SELF].\"?hash=\".$curitem[\"hash\"].\">\".$curitem[\"name\"].\"</a>\".$str;\n\t\t\t$folderid=$curitem[\"parent_folder_id\"];\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$folderid=0; // error in directory structure\n\t\t}\n\t}\n\t\n\tif (strlen($_SESSION[\"hash\"])==0)\n\t\t$str = \"<li><a href=\".$_SERVER[PHP_SELF].\"?folder=0>\".ROOT_FOLDER.\"</a><li>\".$str;\n\t\t\n\treturn $str;\n}", "function _breadcrumb()\n{\n global $lc_breadcrumbSeparator;\n\n $args = func_get_args();\n\n if (!$lc_breadcrumbSeparator) {\n $lc_breadcrumbSeparator = '&raquo;';\n }\n\n if (count($args) == 1 && is_array($args[0])) {\n $args = $args[0];\n }\n\n echo implode(\" {$lc_breadcrumbSeparator} \", $args);\n}", "function get_breadcrumb($script='', $run='', $class='', $method='') {\n $html = array(\"<ul class=\\\"uk-breadcrumb\\\">\");\n if (empty($script)) {\n\t$script = \"<span>All Scripts</span>\";\n } else {\n\t$script = \"<a href=\\\"script-info.php?script={$script}\\\">{$script}</a>\"; \n }\n $html[] = \"<li>{$script}</li>\";\n if (empty($run)) {\n\t$run = \"<span>All Runs</span>\";\n } else {\n\t$run = \"<a href\\\"run-info.php?run={$run}\\\">{$run}</a>\";\n }\n $html[] = \"<li>{$run}</li>\";\n if (!empty($class)) {\n\t$html[] = \"<li><a href=\\\"class-info.php?class={$class}\\\">{$class}</a></li>\";\n }\n if (!empty($method)) {\n\t$html[] = \"<li><a href=\\\"method-info.php?class={$class}\".\n\t\t \"&method={$method}}\\\">{$method}</a></li>\";\n }\n $html[] = \"</ul>\";\n return implode(\"\\n\", $html);\n}", "function govstrap_crumbs_breadcrumb_link(array $item) {\n\n $prefix = '';\n\n if ($item['href'] == '<front>'){\n $prefix = '<p class=\"afma-breadcrum-prefix\">You are here:</p>';\n $item['localized_options']['html'] = TRUE;\n $item['title'] = '<i class=\"fal fa-home\"></i><span class=\"sr-only\">Home</span>';\n }\n\n if ('<nolink>' === $item['href']) {\n $out_put = $prefix . check_plain($item['title']);\n }\n else {\n $options = isset($item['localized_options']) ? $item['localized_options'] : array();\n $out_put = $prefix . l($item['title'], $item['href'], $options);\n }\n\n return $out_put;\n}", "function phi_breadcrumbs() {\n\t\n\tif(get_option('phi_breadcrumb')==false){\n\t\t\n\techo '<div id=\"breadcrumb\">';\n\t\n \tif(get_option(phi_breadcrumb)==false){\n\t$delimiter = ' / ';\n\t\n\t$name = get_option('phi_trans_home');\n\t\n\tif ( !is_home() || !is_front_page() || is_paged() ) {\n\t\tglobal $post;\n\t\t$home = get_bloginfo('url');\n\t\techo get_option('phi_trans_breadcrumb').' '.'<a href=\"' . $home . '\">' . $name . '</a> ' . $delimiter . ' ';\n \n\t\tif ( is_category() ) {\n\t\t\tglobal $wp_query;\n\t\t\t$cat_obj = $wp_query->get_queried_object();\n\t\t\t$thisCat = $cat_obj->term_id;\n\t\t\t$thisCat = get_category($thisCat);\n\t\t\t$parentCat = get_category($thisCat->parent);\n\t\t\tif ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));\n\t\t\techo 'Archive by category &#39;';\n\t\t\tsingle_cat_title();\n\t\t\techo '&#39;';\n \n\t\t} elseif ( is_day() ) {\n \techo '<a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';\n \techo '<a href=\"' . get_month_link(get_the_time('Y'),get_the_time('m')) . '\">' . get_the_time('F') . '</a> ' . $delimiter . ' ';\n \techo get_the_time('d');\n \n\t\t} elseif ( is_month() ) {\n \techo '<a href=\"' . get_year_link(get_the_time('Y')) . '\">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';\n \techo get_the_time('F');\n \n\t\t} elseif ( is_year() ) {\n \techo get_the_time('Y');\n \n\t\t} elseif ( is_single() ) {\n\t\t\t$cat = get_the_category(); $cat = $cat[0];\n\t\t\tif($cat!=''){\n\t\t\techo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');\n\t\t\t}\n\t\t\t\n\t\t\tthe_title();\n \n\t\t} \n\t\t\t\n\t\t\n\t\t\telseif ( is_page() && !$post->post_parent ) {\n\t\t\tthe_title();\n \n\t\t} elseif ( is_page() && $post->post_parent ) {\n\t\t\t$parent_id = $post->post_parent;\n\t\t\t$breadcrumbs = array();\n\t\t\twhile ($parent_id) {\n\t\t\t\t$page = get_page($parent_id);\n\t\t\t\t$breadcrumbs[] = '<a href=\"' . get_permalink($page->ID) . '\">' . get_the_title($page->ID) . '</a>';\n\t\t\t\t$parent_id = $page->post_parent;\n\t\t\t}\n\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t\tforeach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';\n\t\t\tthe_title();\n \n\t\t} elseif ( is_search() ) {\n\t\t\techo 'Search results for &#39;' . get_search_query() . '&#39;';\n \n\t\t} elseif ( is_tag() ) {\n\t\t\techo 'Posts tagged &#39;';\n\t\t\tsingle_tag_title();\n\t\t\techo '&#39;';\n \n\t\t} elseif ( is_author() ) {\n\t \t\tglobal $author;\n\t\t\t$userdata = get_userdata($author);\n\t\t\techo 'Articles posted by ' . $userdata->display_name;\n\t\t}\n \n\t\tif ( get_query_var('paged') ) {\n\t\t\tif ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';\n\t\t\techo __('Page') . ' ' . get_query_var('paged');\n\t\t\tif ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';\n\t\t}\n \n\t}\n}\necho '</div>';\n}\n\n}", "function manami_breadcrumb() {\n\t\t$custom = array(\n\t\t\t'wrap_before' => '<nav class=\"woocommerce-breadcrumb\"><div class=\"container container-fluid\">',\n 'wrap_after' => '</div></nav>',\n\t\t);\n\t\treturn $custom;\n\t}", "function custom_breadcrumbs() {\n\t// Settings\n\t$separator\t\t = '/';\n\t$breadcrums_id\t = 'breadcrumbs';\n\t$breadcrums_class = 'breadcrumbs';\n\t$home_title\t\t = 'Homepage';\n\n\t// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)\n\t$custom_taxonomy\t= 'product_cat';\n\n\t// Get the query & post information\n\tglobal $post,$wp_query;\n\n\t// Build the breadcrums\n\techo '<ul id=\"' . $breadcrums_id . '\" class=\"' . $breadcrums_class . '\">';\n\t// Home page\n\tif( !is_front_page() ) {\n\t\techo '<li class=\"item-home\"><a class=\"bread-link bread-home\" href=\"' . get_home_url() . '\" title=\"' . $home_title . '\">' . $home_title . '</a></li>';\n\t\techo '<li class=\"separator separator-home\"> ' . $separator . ' </li>';\n\t}\n\n\tif ( is_archive() && !is_tax() && !is_category() && !is_tag() ) {\n\t\techo '<li class=\"item-current item-archive\"><strong class=\"bread-current bread-archive\">' . post_type_archive_title($prefix, false) . '</strong></li>';\n\t} else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {\n\t\t// If post is a custom post type\n\t\t$post_type = get_post_type();\n\t\t// If it is a custom post type display name and link\n\t\tif($post_type != 'post') {\n\t\t\t$post_type_object = get_post_type_object($post_type);\n\t\t\t$post_type_archive = get_post_type_archive_link($post_type);\n\n\t\t\techo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive . '\" title=\"' . $post_type_object->labels->name . '\">' . $post_type_object->labels->name . '</a></li>';\n\t\t\techo '<li class=\"separator\"> ' . $separator . ' </li>';\n\t\t}\n\n\t\t$custom_tax_name = get_queried_object()->name;\n\t\techo '<li class=\"item-current item-archive\"><strong class=\"bread-current bread-archive\">' . $custom_tax_name . '</strong></li>';\n\t} else if ( is_single() ) {\n\t\t// If post is a custom post type\n\t\t$post_type = get_post_type();\n\n\t\t// If it is a custom post type display name and link\n\t\tif($post_type != 'post') {\n\t\t\t$post_type_object = get_post_type_object($post_type);\n\t\t\t$post_type_archive = get_post_type_archive_link($post_type);\n\n\t\t\techo '<li class=\"item-cat item-custom-post-type-' . $post_type . '\"><a class=\"bread-cat bread-custom-post-type-' . $post_type . '\" href=\"' . $post_type_archive . '\" title=\"' . $post_type_object->labels->name . '\">' . $post_type_object->labels->name . '</a></li>';\n\t\t\techo '<li class=\"separator\"> ' . $separator . ' </li>';\n\t\t}\n\n\t\t// Get post category info\n\t\t$category = get_the_category();\n\n\t\tif(!empty($category)) {\n\t\t\t// Get last category post is in\n\t\t\t$last_category = end(array_values($category));\n\n\t\t\t// Get parent any categories and create array\n\t\t\t$get_cat_parents = rtrim(get_category_parents($last_category->term_id, true, ','),',');\n\t\t\t$cat_parents = explode(',',$get_cat_parents);\n\n\t\t\t// Loop through parent categories and store in variable $cat_display\n\t\t\t$cat_display = '';\n\t\t\tforeach($cat_parents as $parents) {\n\t\t\t\t$cat_display .= '<li class=\"item-cat\">'.$parents.'</li>';\n\t\t\t\t$cat_display .= '<li class=\"separator\"> ' . $separator . ' </li>';\n\t\t\t}\n\t\t}\n\n\t\t// If it's a custom post type within a custom taxonomy\n\t\t$taxonomy_exists = taxonomy_exists($custom_taxonomy);\n\t\tif(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {\n\t\t\t$taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );\n\t\t\t$cat_id\t\t = $taxonomy_terms[0]->term_id;\n\t\t\t$cat_nicename = $taxonomy_terms[0]->slug;\n\t\t\t$cat_link\t = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);\n\t\t\t$cat_name\t = $taxonomy_terms[0]->name;\n\t\t}\n\n\t\t// Check if the post is in a category\n\t\tif(!empty($last_category)) {\n\t\t\techo $cat_display;\n\t\t\techo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\n\t\t// Else if post is in a custom taxonomy\n\t\t} else if(!empty($cat_id)) {\n\t\t\techo '<li class=\"item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '\"><a class=\"bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '\" href=\"' . $cat_link . '\" title=\"' . $cat_name . '\">' . $cat_name . '</a></li>';\n\t\t\techo '<li class=\"separator\"> ' . $separator . ' </li>';\n\t\t\techo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\t\t} else {\n\t\t\techo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</strong></li>';\n\t\t}\n\t} else if ( is_category() ) {\n\t\t// Category page\n\t\techo '<li class=\"item-current item-cat\"><strong class=\"bread-current bread-cat\">' . single_cat_title('', false) . '</strong></li>';\n\t} else if ( is_page() ) {\n\t\t// Standard page\n\t\tif( $post->post_parent ){\n\t\t\t// If child page, get parents \n\t\t\t$anc = get_post_ancestors( $post->ID );\n\n\t\t\t// Get parents in the right order\n\t\t\t$anc = array_reverse($anc);\n\n\t\t\t// Parent page loop\n\t\t\tif ( !isset( $parents ) ) $parents = null;\n\t\t\tforeach ( $anc as $ancestor ) {\n\t\t\t\t$parents .= '<li class=\"item-parent item-parent-' . $ancestor . '\"><a class=\"bread-parent bread-parent-' . $ancestor . '\" href=\"' . get_permalink($ancestor) . '\" title=\"' . get_the_title($ancestor) . '\">' . get_the_title($ancestor) . '</a></li>';\n\t\t\t\t$parents .= '<li class=\"separator separator-' . $ancestor . '\"> ' . $separator . ' </li>';\n\t\t\t}\n\n\t\t\t// Display parent pages\n\t\t\techo $parents;\n\n\t\t\t// Current page\n\t\t\techo '<li class=\"item-current item-' . $post->ID . '\"><strong title=\"' . get_the_title() . '\"> ' . get_the_title() . '</strong></li>';\n\t\t} else {\n\t\t\t// Just display current page if not parents\n\t\t\techo '<li class=\"item-current item-' . $post->ID . '\"><strong class=\"bread-current bread-' . $post->ID . '\"> ' . get_the_title() . '</strong></li>';\n\t\t}\n\t} else if ( is_tag() ) {\n\t\t// Tag page\n\n\t\t// Get tag information\n\t\t$term_id\t\t= get_query_var('tag_id');\n\t\t$taxonomy\t = 'post_tag';\n\t\t$args\t\t = 'include=' . $term_id;\n\t\t$terms\t\t = get_terms( $taxonomy, $args );\n\t\t$get_term_id\t= $terms[0]->term_id;\n\t\t$get_term_slug = $terms[0]->slug;\n\t\t$get_term_name = $terms[0]->name;\n\n\t\t// Display the tag name\n\t\techo '<li class=\"item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '\"><strong class=\"bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '\">' . $get_term_name . '</strong></li>';\n\t} elseif ( is_day() ) {\n\t\t// Day archive\n\n\t\t// Year link\n\t\techo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</a></li>';\n\t\techo '<li class=\"separator separator-' . get_the_time('Y') . '\"> ' . $separator . ' </li>';\n\n\t\t// Month link\n\t\techo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><a class=\"bread-month bread-month-' . get_the_time('m') . '\" href=\"' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . ' Archives</a></li>';\n\t\techo '<li class=\"separator separator-' . get_the_time('m') . '\"> ' . $separator . ' </li>';\n\n\t\t // Day display\n\t\techo '<li class=\"item-current item-' . get_the_time('j') . '\"><strong class=\"bread-current bread-' . get_the_time('j') . '\"> ' . get_the_time('jS') . ' ' . get_the_time('M') . ' Archives</strong></li>';\n\t} else if ( is_month() ) {\n\t\t// Month Archive\n\n\t\t\t// Year link\n\t\techo '<li class=\"item-year item-year-' . get_the_time('Y') . '\"><a class=\"bread-year bread-year-' . get_the_time('Y') . '\" href=\"' . get_year_link( get_the_time('Y') ) . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</a></li>';\n\t\techo '<li class=\"separator separator-' . get_the_time('Y') . '\"> ' . $separator . ' </li>';\n\n\t\t// Month display\n\t\techo '<li class=\"item-month item-month-' . get_the_time('m') . '\"><strong class=\"bread-month bread-month-' . get_the_time('m') . '\" title=\"' . get_the_time('M') . '\">' . get_the_time('M') . ' Archives</strong></li>';\n\t} else if ( is_year() ) {\n\t\t// Display year archive\n\t\techo '<li class=\"item-current item-current-' . get_the_time('Y') . '\"><strong class=\"bread-current bread-current-' . get_the_time('Y') . '\" title=\"' . get_the_time('Y') . '\">' . get_the_time('Y') . ' Archives</strong></li>';\n\t} else if ( is_author() ) {\n\t\t// Auhor archive\n\n\t\t// Get the author information\n\t\tglobal $author;\n\t\t$userdata = get_userdata( $author );\n\n\t\t// Display author name\n\t\techo '<li class=\"item-current item-current-' . $userdata->user_nicename . '\"><strong class=\"bread-current bread-current-' . $userdata->user_nicename . '\" title=\"' . $userdata->display_name . '\">' . 'Author: ' . $userdata->display_name . '</strong></li>';\n\t} else if ( get_query_var('paged') ) {\n\n\t// Paginated archives\n\t\techo '<li class=\"item-current item-current-' . get_query_var('paged') . '\"><strong class=\"bread-current bread-current-' . get_query_var('paged') . '\" title=\"Page ' . get_query_var('paged') . '\">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';\n\t} else if ( is_search() ) {\n\t\t// Search results page\n\t\techo '<li class=\"item-current item-current-' . get_search_query() . '\"><strong class=\"bread-current bread-current-' . get_search_query() . '\" title=\"Search results for: ' . get_search_query() . '\">Search results for: ' . get_search_query() . '</strong></li>';\n\t} elseif ( is_404() ) {\n\t\t// 404 page\n\t\techo '<li>' . 'Error 404' . '</li>';\n\t}\n\t\techo '</ul>';\n}", "protected function get_post_crumb() {\n\n\t\t$categories = get_the_category();\n\n\t\t$cat_crumb = '';\n\n\t\tif ( 1 === count( $categories ) ) {\n\t\t\t// If in single category, show it, and any parent categories.\n\t\t\t$cat_crumb = $this->get_term_parents( $categories[0]->cat_ID, 'category', true ) . $this->args['sep'];\n\t\t}\n\t\tif ( count( $categories ) > 1 ) {\n\t\t\tif ( $this->args['heirarchial_categories'] ) {\n\t\t\t\t// Show parent categories - see if one is marked as primary and try to use that.\n\t\t\t\t$primary_category_id = get_post_meta( get_the_ID(), '_category_permalink', true ); // Support for sCategory Permalink plugin.\n\t\t\t\tif ( ! $primary_category_id && function_exists( 'yoast_get_primary_term_id' ) ) {\n\t\t\t\t\t// Support for Yoast SEO plugin, even if the Yoast Breadcrumb feature is not enabled.\n\t\t\t\t\t$primary_category_id = yoast_get_primary_term_id();\n\t\t\t\t}\n\t\t\t\tif ( $primary_category_id ) {\n\t\t\t\t\t$cat_crumb = $this->get_term_parents( $primary_category_id, 'category', true ) . $this->args['sep'];\n\t\t\t\t} else {\n\t\t\t\t\t$cat_crumb = $this->get_term_parents( $categories[0]->cat_ID, 'category', true ) . $this->args['sep'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$crumbs = [];\n\t\t\t\t// Don't show parent categories (unless the post happen to be explicitly in them).\n\t\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t\t$crumbs[] = $this->get_breadcrumb_link(\n\t\t\t\t\t\tget_category_link( $category->term_id ),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t$category->name\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$cat_crumb = implode( $this->args['list_sep'], $crumbs ) . $this->args['sep'];\n\t\t\t}\n\t\t}\n\t\t$crumb = $cat_crumb . single_post_title( '', false );\n\n\t\t/**\n\t\t * Filter the Power post breadcrumb.\n\t\t *\n\t\t * @since 2.5.0\n\t\t *\n\t\t * @param string $crumb HTML markup for the post breadcrumb.\n\t\t * @param array $args Arguments used to generate the breadcrumbs. Documented in Power_Breadcrumbs::get_output().\n\t\t */\n\t\treturn apply_filters( 'power_post_crumb', $crumb, $this->args, $cat_crumb );\n\n\t}", "function DisplayBreadcrumbs()\n\t{\t\n\t}", "function wstd_breadcrumb() {\r\n\tif ( is_home() || ( is_division() && is_page_top() ) )\r\n\t\treturn;\r\n\tglobal $post;\r\n\t$bc = array();\r\n\tif ( !is_division() ) {\r\n\t\t$bc[] = array( 'Workstore Tokyo Do', home_url() );\r\n\t\tif ( is_page() ) {\r\n\t\t\t$anc = get_ancestors( $post->ID, 'page' );\r\n\t\t\trsort( $anc );\r\n\t\t\tforeach ( $anc as $page_id ) {\r\n\t\t\t\t$bc[] = array( get_the_title( $page_id ), get_permalink( $page_id ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$bc[] = get_the_title( $post );\r\n\t}\r\n\tif ( !empty( $bc ) ) { ?>\r\n<ul class=\"breadcrumb\">\r\n<?php\r\n\t\tforeach ( $bc as $link ) {\r\n\t\t\tif ( is_array( $link ) ) { ?>\r\n<li><a href=\"<?php echo esc_url( $link[1] ); ?>\"><?php echo esc_html( $link[0] ); ?></a></li>\r\n<?php\r\n\t\t\t} else { ?>\r\n<li><?php echo esc_html( $link ); ?></li>\r\n<?php\r\n\t\t\t}\r\n\t\t} ?>\r\n</ul>\r\n<?php\r\n\t}\r\n}", "function links_breadcrumbs($root, $cid)\n{\n global $_CONF, $_TABLES, $LANG_LINKS;\n\n $breadcrumb = '';\n $separator = ' &gt; ';\n\n $cat = addslashes($cid);\n $c = $cid;\n $pid = '';\n if ($root != $cid) {\n while ($pid != $root) {\n $parent = DB_query(\"SELECT cid,pid,category FROM {$_TABLES['linkcategories']} WHERE cid='{$cat}'\");\n $A = DB_fetchArray($parent);\n if ($cid != $c) {\n $content = stripslashes($A['category']);\n $url = $_CONF['site_url'] . '/links/index.php?category='\n . urlencode($A['cid']);\n $breadcrumb = COM_createLink($content, $url) . $separator\n . $breadcrumb;\n } else {\n $breadcrumb = '<b>' . $A['category'] . '</b>' . $breadcrumb;\n }\n $pid = $A['pid'];\n $c = $A['pid'];\n $cat = addslashes($c);\n }\n }\n\n $url = $_CONF['site_url'] . '/links/index.php';\n if (empty($breadcrumb)) {\n $breadcrumb = '<b>' . $LANG_LINKS['root'] . '</b>';\n } else {\n $breadcrumb = COM_createLink($LANG_LINKS['root'], $url) . $separator . $breadcrumb;\n }\n\n $breadcrumb = '<span class=\"links-breadcrumb\">' . $LANG_LINKS[126] . ' '\n . $breadcrumb . '</span>';\n\n return $breadcrumb;\n}", "public function setBreadcrumbs()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif ($menu = $app->getMenu()->getActive()) {\n\t\t\t$pathway \t= $app->getPathWay();\n\t\t\t$menu\t \t= $menu->query;\n\t\t\n\t\t\tif (!KInflector::isPlural($this->getName()) && $menu['view'] != 'forum') \n\t\t\t\t$pathway->addItem($this->getDocumentSubtitle(), $this->createRoute());\n\t\t}\n\t}", "function idocs_breadcrumb( $before = '<div class=\"idocs-breadcrumbs\">', $after = '</div>' ){\n\t// if isn't post type document, return\n\tif( !is_singular( idocs_post_type() ) ){\n\t\treturn false;\n\t}\n\t\n\tglobal $post;\n\t$parents = get_ancestors( $post->ID, idocs_post_type() );\n\t\n\t$template = '<a href=\"%1$s\" title=\"%2$s\">%2$s</a>';\n\t$links = array(\n\t\t0 => sprintf( $template, get_bloginfo('url'), __('Home', 'idocs') )\n\t);\n\t\n\tif( $parents && is_array($parents) ){\t\t\n\t\t$terms = wp_get_post_terms( $parents[0], idocs_taxonomy() );\t\n\t\tif( $terms && !is_wp_error( $terms ) ){\n\t\t\t\n\t\t\t$cats = get_ancestors( $terms[0]->term_id, idocs_taxonomy() );\n\t\t\tif( $cats ){\n\t\t\t\t$cats = array_reverse( $cats );\n\t\t\t\tforeach( $cats as $cat ){\n\t\t\t\t\t$term = get_term($cat, idocs_taxonomy());\n\t\t\t\t\t$links[] = sprintf( $template, get_term_link( $term ), $term->name );\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$links[] = sprintf( $template, get_term_link( $terms[0] ), $terms[0]->name );\n\t\t}\n\t\t\n\t\t$parents = array_reverse($parents);\n\t\tforeach( $parents as $doc_id ){\n\t\t\t$links[] = sprintf( $template, get_permalink( $doc_id ), get_the_title( $doc_id ) );\n\t\t}\n\t}else{\n\t\t$terms = wp_get_post_terms( $post->ID, idocs_taxonomy() );\t\n\t\tif( $terms && !is_wp_error( $terms ) ){\n\t\t\t\n\t\t\t$cats = get_ancestors( $terms[0]->term_id, idocs_taxonomy() );\n\t\t\tif( $cats ){\n\t\t\t\t$cats = array_reverse( $cats );\n\t\t\t\tforeach( $cats as $cat ){\n\t\t\t\t\t$term = get_term($cat, idocs_taxonomy());\n\t\t\t\t\t$links[] = sprintf( $template, get_term_link( $term ), $term->name );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$links[] = sprintf( $template, get_term_link( $terms[0] ), $terms[0]->name );\n\t\t}\n\t}\n\t\n\t$links[] = $post->post_title;\t\n\t$html = $before. implode(' / ', $links) . $after. \"\\n\";\t\n\treturn $html;\n}", "function breadcrumbs($id){\n\t\tglobal $data;//Category data from header include\n\t\t$current = $data[$id];\n\t\t$parent_id = $current[\"parent_category_id\"];\n\t\t$parents = array();\n\t\t$parent_id = $current[\"parent_category_id\"] === 0 ? null : $current[\"parent_category_id\"];\n\t\twhile (isset($data[$parent_id])) {\n\t\t\t$current = $data[$parent_id];\n\t\t\t$parent_id = $current[\"parent_category_id\"];\n\t\t\t$parents[] = '<a href=\"view_category.php?category_id='.$current['category_id'].'\">'.$current[\"name\"].'</a> > ';\n\t\t}\n\t\techo implode(\" \", array_reverse($parents));\n\t}", "function breadcrumbs($id){\n\t\tglobal $data;//Category data from header include\n\t\t$current = $data[$id];\n\t\t$parent_id = $current[\"parent_category_id\"];\n\t\t$parents = array();\n\t\t$parent_id = $current[\"parent_category_id\"] === 0 ? null : $current[\"parent_category_id\"];\n\t\twhile (isset($data[$parent_id])) {\n\t\t\t$current = $data[$parent_id];\n\t\t\t$parent_id = $current[\"parent_category_id\"];\n\t\t\t$parents[] = '<a href=\"view_category.php?category_id='.$current['category_id'].'\">'.$current[\"name\"].'</a> > ';\n\t\t}\n\t\techo implode(\" \", array_reverse($parents));\n\t}", "protected function _getBreadcrumbs()\n {\n if (!$this->_crumbs) {\n $helper = Mage::helper('crumbs');\n $pageType = $helper->getPageType();\n $crumbs = array();\n\n if ($pageType == $helper::PAGE_TYPE_DIRECT_PRODUCT) {\n\n $regProd = Mage::registry('current_product');\n $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($regProd->getId());\n $crumbs = Mage::getModel('crumbs/breadcrumbs')->getProductBreadcrumbs($product);\n $lastCrumbTitle = Mage::registry('current_product')->getName();\n\n } elseif ($pageType == $helper::PAGE_TYPE_CATEGORY_PRODUCT) {\n\n //$crumbs = Mage::getModel('crumbs/breadcrumbs')->getDirectBreadcrumbs();\n //$lastCrumbTitle = Mage::registry('current_product')->getName();\n $regProd = Mage::registry('current_product');\n $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($regProd->getId());\n $crumbs = Mage::getModel('crumbs/breadcrumbs')->getProductBreadcrumbs($product);\n $lastCrumbTitle = Mage::registry('current_product')->getName();\n\n } elseif ($pageType == $helper::PAGE_TYPE_CATEGORY) {\n\n $crumbs = Mage::getModel('crumbs/breadcrumbs')->getDirectBreadcrumbs(true);\n $lastCrumbTitle = Mage::registry('current_category')->getName();\n\n }\n\n if (Mage::helper('crumbs')->showOnlyOnePath() || $pageType == $helper::PAGE_TYPE_CATEGORY) {\n $crumbs = $this->getLongestPath($crumbs); \n } elseif (Mage::helper('crumbs')->hideDuplicates()) {\n $crumbs = $this->hideDubCategories($crumbs);\n }\n\n if (count($crumbs) == 1) {\n $crumbs = $this->addLastCrumb($crumbs, $lastCrumbTitle);\n }\n\n $this->_crumbs = $crumbs;\n }\n\n return $this->_crumbs;\n }", "function oneltd_get_breadcrumbs()\n\t{\n\t\tglobal $post;\n\t\n\t\t$ancestors = get_post_ancestors( $post );\n\t\t$ancestors = array_reverse($ancestors);\n\t\t$ancestors[] = $post->ID;\n\t\techo '<ul id=\"breadcrumbs\">';\n\t\t\n\t\t// If on the \"homepage\" (posts listing page) display blog as the top page - easily changed to news etc!\n\t\tif( is_home() ):\n\t\t\techo '<li><a href=\"/blog\">blog</a></li>';\n\t\telse:\n\t\t\n\t\t\tforeach($ancestors as $crumb)\n\t\t\t{\n\t\t\t\techo '<li><a href=\"';\n\t\t\t\techo get_permalink($crumb);\n\t\t\t\techo '\">';\n\t\t\t\techo get_the_title($crumb);\n\t\t\t\techo '</a></li>';\n\t\t\t}\t\n\t\tendif;\n\t\t\n\t\techo '</ul>';\n\t}", "function thumbwhere_trackmetadata_set_breadcrumb() {\n $breadcrumb = array(\n l(t('Home'), '<front>'),\n l(t('Administration'), 'admin'),\n l(t('TrackMetadata'), 'admin/content'),\n l(t('TrackMetadata'), 'admin/thumbwhere/thumbwhere_trackmetadatas'),\n );\n\n drupal_set_breadcrumb($breadcrumb);\n}" ]
[ "0.75598556", "0.69891673", "0.6983649", "0.6909792", "0.68622", "0.68598044", "0.68085", "0.67473984", "0.67449015", "0.6661941", "0.662242", "0.65769863", "0.6500509", "0.6489445", "0.6487247", "0.64869636", "0.645919", "0.64450246", "0.6418843", "0.63972896", "0.6377557", "0.63645464", "0.6362128", "0.6354375", "0.6326468", "0.6306835", "0.6293136", "0.6291181", "0.6290869", "0.62882876", "0.62817305", "0.6254514", "0.6250417", "0.62475467", "0.6215095", "0.6147078", "0.6142823", "0.6131574", "0.61276263", "0.6122439", "0.6115313", "0.6063378", "0.60498947", "0.60378665", "0.60348624", "0.6033408", "0.6020958", "0.60075325", "0.60031736", "0.59988093", "0.59958464", "0.599137", "0.59812987", "0.5978602", "0.59759396", "0.5965558", "0.59619296", "0.5959548", "0.59483224", "0.5944674", "0.59424525", "0.59328616", "0.5926109", "0.59212476", "0.59204704", "0.5915574", "0.5907892", "0.5905286", "0.590343", "0.59034073", "0.588871", "0.5841345", "0.5839869", "0.58367693", "0.58358586", "0.5834581", "0.5832028", "0.5831254", "0.58293754", "0.5828635", "0.5825494", "0.5814458", "0.5814178", "0.57979804", "0.57917297", "0.5789037", "0.5774847", "0.5766579", "0.5764415", "0.5764165", "0.5758816", "0.5758602", "0.5751413", "0.5744785", "0.57296133", "0.5726072", "0.5726072", "0.5725539", "0.5721394", "0.57193655" ]
0.7349029
1
Get the details such as encoding and line endings from the file.
Получите сведения, такие как кодировка и конечные символы строки, из файла.
public function DetectFileDetails() { $this->encoding = null; // Detect character encoding if(function_exists('mb_detect_encoding')) { if($res = mb_detect_encoding($this->content, "auto, ISO-8859-1", true)) { $this->encoding = $res; } } // Is it BOM? if(substr($this->content, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF)) { $this->encoding .= " BOM"; } // Checking style of line-endings $this->lineendings = null; if(isset($this->encoding)) { $lines = explode("\n", $this->content); $l = strlen($lines[0]); if(substr($lines[0], $l-1, 1) == "\r") { $this->lineendings = " Windows (CRLF) "; } /*elseif(substr($lines[0], $l-1, 1) == "\r") { $this->lineendings = " Mac (xxxx) "; } */ else { $this->lineendings = " Unix (LF) "; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readInfo()\n {\n return file_get_contents($this->filePath);\n }", "public function getInfo()\n {\n return $this->file->getInfo();\n }", "function get_file_info()\n {\t\t\t\n return( array(\n 'file_name' => $this->out_file_complete,\n 'file_ext' => $this->file_extension,\n 'file_type' => $this->file_type,\n 'width' => $this->vars['in_file_width'],\n 'height' => $this->vars['in_file_height'],\n ) );\n }", "private function readMetaData() {\n\t\t// 30 char : numéro de version\n\t\t$str=\"\";$len = 0;\n\t\t$len = $this->readByte();\n\t\t$this->fileVersion = substr(fread($this->handle, 30), 0, $len);\n\t\t\n\t\t$this->version = intval(substr($this->fileVersion, 20, 1));\n\t\techo \"Version is \".$this->version.PHP_EOL;\n\t\t\n\t/*\n\tThe information concerned is, in order of reading within the file:\n\t\t- The title of the piece;\n\t\t- The subtitle of the piece;\n\t\t- The interpret of the piece;\n\t\t- The album from which the piece was taken;\n\t\t- The author of the piece;\n\t\t- The copyright;\n\t\t- The name of the author of the tablature;\n\t\t- An 'instructional' line about the tablature.\n\t*/\n\t\t$this->title \t\t= $this->readString();\n\t\t$this->subtitle \t= $this->readString();\n\t\t$this->interpret \t= $this->readString();\n\t\t$this->album \t\t= $this->readString();\n\t\t$this->author \t\t= $this->readString();\n\t\t$this->copyright \t= $this->readString();\n\t\t$this->fileauthor \t= $this->readString();\n\t\t$this->fileinfo \t= $this->readString();\n\n\t\t// Read notice\n\t\t$notice_lines = $this->readInteger();\n\t\tfor($i = 0; $i < $notice_lines; $i++) {\n\t\t\t$this->notice .= $this->readString().PHP_EOL;\n\t\t}\n\n\t\t$this->triplefeel\t= $this->readByte();\n\t}", "public function getFileEncoding()\n {\n return $this->fileEncoding;\n }", "function read_info($filename){\n\tif(!file_exists($filename)) return array();\n\t$fin = file($filename);\n\tfor($i=0;$i<count($fin);$i++){\n\t\t$lne = explode(\" \", $fin[$i]);\n\t\tif($lne[0][count($lne[0])] == \":\")\n\t\t\t$lne[0] = substr($lne[0], 0, -1);\n\t\t$ret[$lne[0]] = $lne[1];\n\t}\n\treturn $ret;\n}", "private function getFileDetails() {\n\t \t$FileName = $this->file['name'];\n\t \t$fileTmpName = $this->file['tmp_name'];\n\t \t$fileSize = $this->file['size'];\n\t \t$fileError = $this->file['error'];\n\n\t \treturn [\n\t \t\t\"FileName\" => $FileName, \n\t \t\t\"fileTmpName\" => $fileTmpName,\n\t \t\t\"fileSize\" => $fileSize,\n\t \t\t\"fileError\" => $fileError\n\t \t];\n\t }", "public function getInfo()\n {\n $error = $this->getMessage().PHP_EOL;\n $error .= 'File: '.$this->getFile().PHP_EOL;\n $error .= 'Line: '.$this->getLine().PHP_EOL;\n\n return $error;\n }", "private function getLocaleContents(){\n\t\t\t$ini = $_SERVER['DOCUMENT_ROOT'].'/admin/locale/'.$this->locale.'.ini';\n\t\t\treturn parse_ini_file($ini, true);\n\t\t}", "public function getEncoding() {\n\t\treturn $this->fetchRow ( 'PRAGMA encoding' );\n\t}", "function get_file_description($file)\n{\n}", "protected function readFile()\n {\n $reader = Reader::createFromPath($this->filename);\n return $reader->fetchAssoc();\n }", "public function read()\n {\n return $this->preParse($this->file->readFile());\n }", "private function getFileDominantLineEnding(string $file)\n {\n static $eols = array(\n \"\\0x000D000A\", // [UNICODE] CR+LF: CR (U+000D) followed by LF (U+000A)\n \"\\0x000A\", // [UNICODE] LF: Line Feed, U+000A\n \"\\0x000B\", // [UNICODE] VT: Vertical Tab, U+000B\n \"\\0x000C\", // [UNICODE] FF: Form Feed, U+000C\n \"\\0x000D\", // [UNICODE] CR: Carriage Return, U+000D\n \"\\0x0085\", // [UNICODE] NEL: Next Line, U+0085\n \"\\0x2028\", // [UNICODE] LS: Line Separator, U+2028\n \"\\0x2029\", // [UNICODE] PS: Paragraph Separator, U+2029\n \"\\0x0D0A\", // [ASCII] CR+LF: Windows, TOPS-10, RT-11, CP/M, MP/M, DOS, Atari TOS, OS/2, Symbian OS, Palm OS\n \"\\0x0A0D\", // [ASCII] LF+CR: BBC Acorn, RISC OS spooled text output.\n \"\\0x0A\", // [ASCII] LF: Multics, Unix, Unix-like, BeOS, Amiga, RISC OS\n \"\\0x0D\", // [ASCII] CR: Commodore 8-bit, BBC Acorn, TRS-80, Apple II, Mac OS <=v9, OS-9\n \"\\0x1E\", // [ASCII] RS: QNX (pre-POSIX)\n \"\\0x15\", // [EBCDEIC] NEL: OS/390, OS/400\n );\n $cur_cnt = 0;\n $cur_eol = \"\\n\";\n foreach ($eols as $eol) {\n if (($count = substr_count($file, $eol)) > $cur_cnt) {\n $cur_cnt = $count;\n $cur_eol = $eol;\n }\n }\n\n return $cur_eol;\n }", "public function get_encoding()\n {\n }", "public function getEncoding();", "public function getEncoding();", "function readPpt()\n\t{\n\t\t$fileHandle = fopen($this->filename, \"r\");\n\t\t$line = @fread($fileHandle, filesize($this->filename));\n\t\t$lines = explode(chr(0x0f),$line);\n\t\t$outtext = '';\n\n\t\tforeach($lines as $thisline) \n\t\t{\n\t\t\t#print $thisline . \"\\n\";\n\t\t\tif (strpos($thisline, chr(0x00).chr(0x00).chr(0x00)) == 1) \n\t\t\t{\n\n\t\t\t\t$text_line = substr($thisline, 4);\n\t\t\t\t$end_pos = strpos($text_line, chr(0x00));\n\t\t\t\t$text_line = substr($text_line, 0, $end_pos);\n\t\t\t\t$text_line = preg_replace(\"/[^a-zA-Z0-9\\s\\,\\.\\-\\n\\r\\t@\\/\\_\\(\\)]/\",\"\",$text_line);\n\t\t\t\tif (strlen($text_line) > 1) \n\t\t\t\t{\n\n\t\t\t\t\t$outtext .= substr($text_line, 0, $end_pos).\"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $outtext;\n\t}", "public function getContents()\n {\n if ($this->file) {\n return $this->directory->readFile($this->directory->getRelativePath($this->file));\n }\n return '';\n }", "function read($file,$lf=FALSE) {\n\t\t$out=@file_get_contents($file);\n\t\treturn $lf?preg_replace('/\\r\\n|\\r/',\"\\n\",$out):$out;\n\t}", "public function readLines()\n {\n if (!$this->file->isReadable()) {\n return false;\n }\n\n ini_set('auto_detect_line_endings', $this->options['autoDetectLineEnding']);\n\n $content = file($this->file->getPath(), FILE_IGNORE_NEW_LINES);\n\n if (!$this->options['convertEncoding']) {\n return $content;\n }\n\n // convert encoding\n $converted = array();\n\n foreach ($content as $line) {\n $converted[] = mb_convert_encoding(\n $line,\n $this->options['toEncoding'],\n $this->options['fromEncoding']\n );\n }\n\n return $converted;\n }", "public function getFileLine()\n {\n return $this->name.':'.$this->hash;\n }", "function _getFileContent()\n {\n $buffer = array();\n if ($fp = @fopen($this->_GedcomFile, 'r')) {\n while (!feof($fp)) {\n $buffer[] = trim(fgets($fp, 1024));\n }\n fclose($fp);\n // unset the last line if it's empty\n if (empty($buffer[count($buffer) - 1])) {\n unset($buffer[count($buffer) - 1]);\n }\n $this->_FileContent = $buffer;\n unset($buffer);\n } else {\n Genealogy_Parser::_raiseError('Cannot open file '.$this->_GedcomFile);\n }\n }", "public function get()\n {\n $fileContents = explode(PHP_EOL, $this->directory->readFile($this->logFile));\n return $fileContents;\n }", "function read_lines()\n {\n $this->filename;\n }", "function get_file_data( $file, $all_headers, $context = '' ) {\n\t$fp = fopen( $file, 'r' );\n\t$file_data = fread( $fp, 8192 );\n\tfclose( $fp );\n\n\t$file_data = str_replace( array(\"\\r\",': '), array(\"\\n\",':'), $file_data );\n\tforeach ( $all_headers as $field => $regex ) {\n\t\tif ( preg_match( '/^[ \\t\\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] )\n\t\t\t$all_headers[ $field ] = ( $match[1] );\n\t\telse\n\t\t\t$all_headers[ $field ] = '';\n\t}\n\treturn $all_headers;\n}", "public function getRawInfo()\n {\n return $this->_rawInfo;\n }", "function getGramInfoFile();", "public function fileLine(): string;", "public function getEncodingFormat();", "public function getFormatLine()\n {\n if(($line = fgets($this->formatFile)) == FALSE)\n return FALSE;\n else\n return $line;\n }", "public function read()\n {\n $lines = readLines($this->fileName, $this->fileEncoding);\n $fetch = array();\n\n foreach ($lines as $line) {\n $fields = preg_split('/\\s+/', $line);\n if (count($fields) == 3) {\n array_push(\n $fetch,\n array('url' => $fields[0],\n 'length' => $fields[1],\n 'filename' => $fields[2])\n );\n }\n }\n $this->data = $fetch;\n }", "function sed_infoget($file, $limiter='SED', $maxsize=32768)\r\n{\r\n\t$result = array();\r\n\r\n\tif($fp = @fopen($file, 'r'))\r\n\t{\r\n\t\t$limiter_begin = \"[BEGIN_\".$limiter.\"]\";\r\n\t\t$limiter_end = \"[END_\".$limiter.\"]\";\r\n\t\t$data = fread($fp, $maxsize);\r\n\t\t$begin = mb_strpos($data, $limiter_begin);\r\n\t\t$end = mb_strpos($data, $limiter_end);\r\n\r\n\t\tif ($end>$begin && $begin>0)\r\n\t\t{\r\n\t\t\t$lines = mb_substr($data, $begin+8+mb_strlen($limiter), $end-$begin-mb_strlen($limiter)-8);\r\n\t\t\t$lines = explode (\"\\n\",$lines);\r\n\r\n\t\t\tforeach ($lines as $k => $line)\r\n\t\t\t{\r\n\t\t\t\t$linex = explode (\"=\", $line);\r\n\t\t\t\t$ii=1;\r\n\t\t\t\twhile (!empty($linex[$ii]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$result[$linex[0]] .= trim($linex[$ii]);\r\n\t\t\t\t\t$ii++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{ $result['Error'] = 'Warning: No tags found in '.$file; }\r\n\t}\r\n\telse\r\n\t{ $result['Error'] = 'Error: File '.$file.' is missing!'; }\r\n\t@fclose($fp);\r\n\treturn ($result);\r\n}", "public function info()\n\t{\n\t\t//TODO make this more useful\n\t\treturn get_dir_file_info( $this->cache_base . 'ce_cache', false );\n\t}", "protected function handleEncodingLine()\n {\n // If the last line on the stack is complete now, we can\n // investigate the line a little further...\n $mostCurrentLine =& $this->_lines[count($this->_lines)-1];\n $priorLine =& $this->_lines[count($this->_lines)-1];\n if (!$mostCurrentLine->isContinued()) {\n $mostCurrentLineData = $mostCurrentLine->getDatafields();\n \n // set file encoding if specified\n if (isset($mostCurrentLineData[0])\n && strtolower($mostCurrentLineData[0]) == 'encoding') {\n $this->setEncoding($mostCurrentLineData[1]);\n array_pop($this->_lines); // remove last encoding line\n }\n }\n }", "public function getTextEncoding () {}", "function getEncoding($file='',$data=''){\n\n\t\t\tif(!empty($file)) {\n\t\t\t\t$data = weFile::loadPart($file,0,256);\n\t\t\t}\n\n\t\t\tif(empty($data)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$match = array();\n\t\t\t$encoding = 'ISO-8859-1';\n\t\t\t$trenner = \"[\\040|\\n|\\t|\\r]*\";\n\t\t\t$pattern =\"(encoding\".$trenner.\"=\".$trenner.\"[\\\"|\\'|\\\\\\\\]\".$trenner.\")([^\\'\\\">\\040? \\\\\\]*)\";\n\n\t\t\tif(eregi($pattern,$data,$match)){\n\t\t\t\tif(strtoupper($match[2])!='ISO-8859-1'){\n\t\t\t\t\t$encoding = 'UTF-8';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $encoding;\n\t}", "public function getHeaders(){\n return fgetcsv($this->file);\n }", "private function getEncoding()\n {\n return $this->encoding;\n }", "private function linesFromFile()\n {\n return explode(\n \"\\n\",\n $this->file->fread($this->file->getSize())\n );\n }", "public function getArquivoDesc(){\n\t\treturn $this->arquivoDesc;\n\t}", "function getFileData($file)\n {\n $fp = fopen($file, \"r\");\n\n $data .= \"<pre>\";\n while (!feof($fp)) {\n $data = fgets($fp, 900);\n $data .= htmlspecialchars($data);\n }\n $data .= \"</pre>\";\n\n return $data;\n }", "protected function getFileInformation($path) {\n $file = pathinfo($path);\n\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $mimetype = finfo_file($finfo, $path);\n // Check if mimetype is supported.\n if (!in_array($mimetype, $this->valid_mimes)) {\n if ($mimetype == 'text/plain') {\n $mimetype = 'application/octet-stream';\n }\n else {\n $this->triggerError('Unsupported mime type: ' . $mimetype);\n }\n }\n\n $contents = file_get_contents($path);\n\n return [\n 'name' => str_replace(' ', '-', $file['filename']),\n 'filename' => $file['basename'],\n 'extension' => $file['extension'],\n 'mimetype' => $mimetype,\n 'contents' => $contents,\n 'size' => strlen($contents)\n ];\n }", "public function current()\n {\n $line = fgets($this->handle);\n $this->length = strlen($line);\n fseek($this->handle, $this->offset);\n\n return str_replace(\"\\xEF\\xBB\\xBF\", '', $line);\n }", "public function getHeaderLine(): string;", "function getLine()\n\t{\n\t\tif($this->parseFile)\n\t\t{\n\t\t\tif(!feof($this->fid))\n\t\t\t{\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t$line = trim(fgets($this->fid));\n\t\t\t\t}\n\t\t\t\twhile(!feof($this->fid) && !$line);\n\t\t\t\treturn $line;\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$line = trim($this->bibtexString[$this->currentLine]);\n\t\t\t\t$this->currentLine++;\n\t\t\t}\n\t\t\twhile($this->currentLine < count($this->bibtexString) && !$line);\n\t\t\treturn $line;\n\t\t}\n\t}", "function detect_utf_bom_encoding($filename) {\n // Unicode BOM is U+FEFF, but after encoded, it will look like this.\n define ('UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));\n define ('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));\n define ('UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));\n define ('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));\n define ('UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));\n\n $text = file_get_contents($filename);\n $first2 = substr($text, 0, 2);\n $first3 = substr($text, 0, 3);\n $first4 = substr($text, 0, 3);\n \n if ($first3 == UTF8_BOM) return 'UTF-8';\n elseif ($first4 == UTF32_BIG_ENDIAN_BOM) return 'UTF-32BE';\n elseif ($first4 == UTF32_LITTLE_ENDIAN_BOM) return 'UTF-32LE';\n elseif ($first2 == UTF16_BIG_ENDIAN_BOM) return 'UTF-16BE';\n elseif ($first2 == UTF16_LITTLE_ENDIAN_BOM) return 'UTF-16LE';\n}", "private function _additionalRecord()\n\t{\n\t\t$bytes = $this->_additional7_3(); // source system characteristics\n\t\t$bytes .= $this->_additional7_4(); // machine specific \"float\" type information.\n\t\t// $bytes .= $this->_additional7_5(); // variable sets\n\t\t$bytes .= $this->_additional7_11(); // variable params\n\t\t$bytes .= $this->_additional7_13(); // extended names\n\t\t$bytes .= $this->_additional7_14(); // extended names\n\t\t$bytes .= $this->_additional7_16(); // number of cases\n\t\t$bytes .= $this->_additional7_20(); // charset\n\t\treturn $bytes;\n\t}", "function file_info($path){\r\n\t$name = get_path_this($path);\r\n\t$size = get_filesize($path);\r\n\t$info = array(\r\n\t\t'name'\t\t\t=> iconv_app($name),\r\n\t\t'path'\t\t\t=> iconv_app(get_path_father($path)),\r\n\t\t'ext'\t\t\t=> get_path_ext($path),\r\n\t\t'type' \t\t\t=> 'file',\r\n\t\t'mode'\t\t\t=> get_mode($path),\r\n\t\t'atime'\t\t\t=> fileatime($path), //Last access time\r\n\t\t'ctime'\t\t\t=> filectime($path), //Created\r\n\t\t'mtime'\t\t\t=> filemtime($path), //Last Modified\r\n\t\t'is_readable'\t=> intval(is_readable($path)),\r\n\t\t'is_writeable'\t=> intval(is_writeable($path)),\r\n\t\t'size'\t\t\t=> $size,\r\n\t\t'size_friendly'\t=> size_format($size, 2)\r\n\t);\r\n\treturn $info;\r\n}", "private function readLines()\n {\n $filesize = filesize($this->filename);\n\n $contents = [];\n\n if (file_exists($this->filename) && $filesize > 0) {\n $handle = fopen($this->filename, 'r');\n $contents = trim(fread($handle, $filesize));\n $contents = explode(\"\\n\", $contents);\n\n fclose($handle);\n }\n\n return $contents;\n\n }", "function sed_infoget($file, $limiter = 'SED', $maxsize = 32768)\n\t{\n\t$result = array();\n\n\tif ($fp = @fopen($file, 'r'))\n\t\t{\n\t\t$limiter_begin = \"[BEGIN_\".$limiter.\"]\";\n\t\t$limiter_end = \"[END_\".$limiter.\"]\";\n\t\t$data = fread($fp, $maxsize);\n\t\t$begin = mb_strpos($data, $limiter_begin);\n\t\t$end = mb_strpos($data, $limiter_end);\n\n\t\tif ($end > $begin && $begin > 0)\n\t\t\t{\n\t\t\t$lines = mb_substr($data, $begin+8+mb_strlen($limiter), $end-$begin-mb_strlen($limiter)-8);\n\t\t\t$lines = explode (\"\\n\", $lines);\n\n\t\t\tforeach ($lines as $k => $line)\n\t\t\t\t{\n\t\t\t\t$linex = explode (\"=\", $line);\n\t\t\t\t$ii = 1;\n\t\t\t\twhile (!empty($linex[$ii]))\n\t\t\t\t\t{\n\t\t\t\t\t@$result[$linex[0]] .= trim($linex[$ii]);\n\t\t\t\t\t$ii++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\telseif (mb_substr(mb_strtolower($file), mb_strlen($file) - 12) == \".install.php\")\n\t\t\t{ $result['Error'] = 'Optional install file'; }\n\t\telseif (mb_substr(mb_strtolower($file), mb_strlen($file) - 14) == \".uninstall.php\")\n\t\t\t{ $result['Error'] = 'Optional uninstall file'; }\n\t\telse\n\t\t\t{ $result['Error'] = 'Warning: No markers found in '.$file; }\n\t\t@fclose($fp);\n\t\t}\n\telse\n\t\t{ $result['Error'] = 'Error: File '.$file.' is missing!'; }\t\n\treturn ($result);\n\t}", "abstract public function getFileRawInformation($file_path, $read_from_cache=true);", "public function getCharset(){ return $this->getField('charset','UTF-8'); }", "private function checkEncoding(): void\n {\n // the filename and comment fields for this file\n // MUST be encoded using UTF-8. (see APPENDIX D)\n if (mb_check_encoding($this->fileName, 'UTF-8') &&\n mb_check_encoding($this->comment, 'UTF-8')) {\n $this->generalPurposeBitFlag |= GeneralPurposeBitFlag::EFS;\n }\n }", "private function getRawMeta()\n {\n $pattern = \"/^(\\/(\\*)|---)[[:blank:]]*(?:\\r)?\\n\"\n . \"(?:(.*?)(?:\\r)?\\n)?(?(2)\\*\\/|---)[[:blank:]]*(?:(?:\\r)?\\n|$)/s\";\n if (preg_match($pattern, $this->getRawContent(), $rawMetaMatches) && isset($rawMetaMatches[3]))\n return $rawMetaMatches[3];\n }", "public function get_load_encoding()\n {\n return $this->load_encoding;\n }", "public function getEncoding(): string;", "public function readHeader() {\n $this->dbaseVersionId = $this->readWord();\n\n $year = $this->readWord() + 1900;\n $month = $this->readWord();\n $day = $this->readWord();\n $this->lastModified = mktime(0, 0, 0, $year, $month, $day);\n\n $this->numRecords = $this->readWord(4, true);\n $this->headerLength = $this->readWord(2, true);\n $this->recordLength = $this->readWord(2, true);\n\n $this->skipTo(32);\n\n while ($this->readChar() != \"\\x0d\") {\n $this->undoRead();\n $this->readFieldHeader();\n }\n }", "function read_file() {}", "public function getContents()\n {\n return fopen($this->file, 'r');\n }", "public function getFileInfo($file)\n {\n $info = array();\n // open file for reading\n $fp = fopen($file, 'r');\n // get first line in the file\n $r = fgets($fp);\n fclose($fp);\n $row = array();\n foreach (array(\"\\t\", ',', ';', '|') as $chr) {\n $row = str_getcsv($r, $chr);\n if (sizeof($row)>1) {\n $info['delim'] = $chr;\n break;\n }\n }\n // if delimiter not known, can't parse the file\n if (empty($info['delim'])) {\n return false;\n }\n // save first row data\n $info['first_row'] = $row;\n // find likely column names\n $this->updateFieldsDueToInfo($info);\n $fields = $this->getFieldData();\n foreach ($row as $i=>$v) {\n foreach ($fields as $f=>$fd) {\n if (!empty($fd['pattern']) && empty($fd['used'])\n && preg_match(\"#{$fd['pattern']}#i\", $v)\n ) {\n $info['columns'][$i] = $f;\n $fields[$f]['used'] = true;\n break;\n }\n }\n }\n // if no column names found, do not skip first row\n $info['skip_first'] = !empty($info['columns']);\n return $info;\n }", "function get_style_info($style_file = '') {\n\tif ( '' == $style_file ) {\n\t\treturn false;\n\t}\n\n\t$style_path = K2STYLESPATH . $style_file;\n\tif (!file_exists($style_path)) return false;\n\t$style_data = implode( '', file( $style_path ) );\n\n\t// parse the data\n\tpreg_match(\"|Author Name\\s*:(.*)|i\", $style_data, $author);\n\tpreg_match(\"|Author Site\\s*:(.*)|i\", $style_data, $site);\n\tpreg_match(\"|Style Name\\s*:(.*)|i\", $style_data, $style);\n\tpreg_match(\"|Style URI\\s*:(.*)|i\", $style_data, $stylelink);\n\tpreg_match(\"|Version\\s*:(.*)|i\", $style_data, $version);\n\tpreg_match(\"|Comments\\s*:(.*)|i\", $style_data, $comments);\n\tpreg_match(\"|Header Text Color\\s*:\\s*#*([\\dABCDEF]+)|i\", $style_data, $header_text_color);\n\tpreg_match(\"|Header Width\\s*:\\s*(\\d+)|i\", $style_data, $header_width);\n\tpreg_match(\"|Header Height\\s*:\\s*(\\d+)|i\", $style_data, $header_height);\n\n\treturn array(\n\t\t'style' => trim($style[1]),\n\t\t'stylelink' => trim($stylelink[1]),\n\t\t'author' => trim($author[1]),\n\t\t'site' => trim($site[1]),\n\t\t'version' => trim($version[1]),\n\t\t'comments' => trim($comments[1]),\n\t\t'header_text_color' => trim($header_text_color[1]),\n\t\t'header_width' => trim($header_width[1]),\n\t\t'header_height' => trim($header_height[1])\n\t);\n}", "protected function getLine() {\n\t\treturn fgetcsv($this->fileHandler, 8092, $this->parser->getSeparator());\n\t}", "public function read ()\n {\n $array = parse_ini_file($this->filename, true);\n if (!$array) {\n throw new File_INI_Exception(\n _('Unable to read the file')\n );\n }\n return $array;\n }", "function ReadInfo()\n\t{\n\t}", "function _getEncodedDataFromFile($filename, $encoding, $fh=null)\n {\n if (!is_readable($filename)) {\n $err = PEAR::raiseError('Unable to read file: ' . $filename);\n return $err;\n }\n\n if (!($fd = fopen($filename, 'rb'))) {\n $err = PEAR::raiseError('Could not open file: ' . $filename);\n return $err;\n }\n\n $data = '';\n\n switch ($encoding) {\n case 'quoted-printable':\n while (!feof($fd)) {\n $buffer = $this->_quotedPrintableEncode(fgets($fd));\n if ($fh) {\n fwrite($fh, $buffer);\n } else {\n $data .= $buffer;\n }\n }\n break;\n\n case 'base64':\n while (!feof($fd)) {\n // Should read in a multiple of 57 bytes so that\n // the output is 76 bytes per line. Don't use big chunks\n // because base64 encoding is memory expensive\n $buffer = fread($fd, 57 * 9198); // ca. 0.5 MB\n $buffer = base64_encode($buffer);\n $buffer = chunk_split($buffer, 76, $this->_eol);\n if (feof($fd)) {\n $buffer = rtrim($buffer);\n }\n\n if ($fh) {\n fwrite($fh, $buffer);\n } else {\n $data .= $buffer;\n }\n }\n break;\n\n case '8bit':\n case '7bit':\n default:\n while (!feof($fd)) {\n $buffer = fread($fd, 1048576); // 1 MB\n if ($fh) {\n fwrite($fh, $buffer);\n } else {\n $data .= $buffer;\n }\n }\n }\n\n fclose($fd);\n\n if (!$fh) {\n return $data;\n }\n }", "public function getLine(): string\n {\n // if the file isn't open, we can't read a line\n if ($this->file_handle === null) {\n throw new Exception(\"Cannot read frrom file \" . $this->getFileName() . \" because it is not currently open.\");\n }\n\n // if we're at the end of the file, return an empty string\n if($this->file_end_of_file()) {\n return '';\n }\n\n // use fgets() to read from the file handle and trim off any white space such as a new line at the end of the string\n return trim(fgets($this->file_handle));\n }", "function readFile($filepath = \"\", $charset = \"utf8\");", "function readHeaderFile ($filename) {\n\t\treturn (!is_readable($filename) || !is_file($filename)) ?\n\t\t\tnull :\n\t\t\tself::parseHeaders( preg_replace(\"~\\n{2,}~\", \"\\n\", file_get_contents($filename)) );\n\t}", "function parse_ini_file($filename,$process_sections=false)\n{\n\treturn array();\n}", "function extractText() {\r\n\t\t$blu_string = '';\r\n\t\tif (is_file($this->string_readfile)) {\r\n\t\t\t$handle = fopen($this->string_readfile, 'r');\r\n\t\t\t$line_num = 1;\r\n\t\t\twhile (!feof($handle)) {\r\n\t\t\t\t//default -1 (read all lines)\r\n\t\t\t\tif ($this->limit_lines == $line_num) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t//line with max length of 2^19\r\n\t\t\t\t$line = trim(fgets($handle, 528288));\r\n\t\t\t\tif ($line != \"\") {\r\n\t\t\t\t\t$blu_string .= \" \".$line;\r\n\t\t\t\t\t$line_num++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfclose($handle);\r\n\t\t} else {\r\n\t\t\t//echo \"*** Text file NOT FOUND\";\r\n\t\t}\r\n\t\t$this->string_used = $blu_string;\r\n\t\treturn $blu_string;\r\n\t}", "public static function info ($file)\n\t\t{\n\t\tif (! is_file ($file))\n\t\t\t{\n\t\t\t\\limbo\\log::debug ('Could not find file ' . $file);\n\t\t\t\n\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t$info = new \\finfo (FILEINFO_MIME_TYPE);\n\t\t\n\t\t$output['mime'] = $info->file ($file);\n\t\t$output['size'] = filesize ($file);\n\t\t\t\n\t\treturn $output;\n\t\t}", "public static function getSupportedFileFormat(): string;", "public function getCharset();", "protected function parse() {\n $this->file->open(FILE_MODE_READ);\n $section= NULL;\n $sections= array();\n while (FALSE !== ($line= $this->file->readLine())) {\n if ('' === $line || '#' === $line{0}) {\n continue;\n } else if (' ' === $line{0} || \"\\t\" === $line{0}) {\n sscanf($line, \"%*[ \\t]%s %[^\\r]\", $key, $value);\n $sections[$section][$key]= $value;\n } else {\n $section= strtolower(trim($line, '[]'));\n }\n }\n $this->file->close();\n return $sections;\n }\n\n /**\n * Look up DSN. Reparses fileig file every time its called.\n *\n * @param rdbms.DSN dsn\n */\n public function lookup($dsn) {\n if (!$this->file->exists()) return;\n\n $host= strtolower($dsn->getHost());\n $sections= $this->parse();\n if (!isset($sections[$host]['query'])) return;\n\n sscanf($sections[$host]['query'], '%s %*s %s %d', $proto, $host, $port);\n $dsn->url->setHost($host);\n $dsn->url->setPort($port);\n }\n }", "private function readHeaders(){\n $fp = fopen($this->modulePath,'r');\n $file_data = fread($fp,filesize($this->modulePath));\n fclose($fp);\n\n //Make sure we catch CR-only line endings.\n $file_data = str_replace(\"\\r\", \"\\n\", $file_data);\n\n //The back array's format.\n $allHeaders = array(\n 'Name' => 'Module Name',\n 'Version' => 'Version',\n 'Description' => 'Description',\n 'Icon' => 'Icon',\n 'Author' => 'Author',\n 'AuthorURI' => 'Author URI',\n 'Auth' => 'Auth', //Need login to access\n );\n foreach ( $allHeaders as $field => $regex ) {\n if ( preg_match( '/^[ \\t\\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] ) {\n $allHeaders[ $field ] = $this->_cleanup_header_comment( $match[1] );\n //Has the useless part.\n } else {\n $allHeaders[ $field ] = '';\n }\n }\n\n //Add the isSystem info.\n if($this->isSystem){\n $allHeaders['System'] = True;\n }else{\n $allHeaders['System'] = False;\n }\n\n //Add the path, used by the ModuleStage\n $allHeaders['Path'] = $this->modulePath;\n\n //Make sure the headers is correct.\n //'Name','Path' is not empty.\n if( ( $allHeaders['Name'] == '' ) or ( $allHeaders['Path'] == '') ){\n $this->isError = true;\n return $this->errorPage('UNTITLED');\n }else{\n return $allHeaders;\n }\n }", "public function getFileContent()\n {\n return file_get_contents($this->path);\n }", "public function parse($fileName)\n\t{\n\t\t$fileInfo = new FileInfo;\n\n\t\t$fileInfo->fileName = $fileName;\n\n\t\tif (! file_exists($fileName))\n\t\t{\n\t\t\treturn $fileInfo;\n\t\t}\n\n\t\t$lines = file($fileName);\n\n\t\tif (! $lines)\n\t\t{\n\t\t\treturn $fileInfo;\n\t\t}\n\n\t\t$msgid = '';\n\t\t$msgstr = '';\n\t\t$msgPlural = '';\n\t\t$msgPlurals = [];\n\n\t\t$head = '';\n\n\t\t$info = '';\n\n\t\t$state = -1;\n\n\t\tforeach ($lines as $line)\n\t\t{\n\t\t\t$line = trim($line);\n\n\t\t\t$match = [];\n\n\t\t\tswitch ($state)\n\t\t\t{\n\t\t\t\tcase - 1 :\n\t\t\t\t\t// Start parsing\n\t\t\t\t\tif (! $line)\n\t\t\t\t\t{\n\t\t\t\t\t\t// First empty line stops header\n\t\t\t\t\t\t$state = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$head .= $line . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\t// Waiting for msgid\n\t\t\t\t\tif (preg_match('/^msgid \"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgid = stripcslashes($match[1]);\n\t\t\t\t\t\t$state = 1;\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$info .= $line . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t// Reading msgid, waiting for msgstr\n\t\t\t\t\tif (preg_match('/^msgstr \"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgstr = stripcslashes($match[1]);\n\t\t\t\t\t\t$state = 2;\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^msgid_plural \"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgPlural = stripcslashes($match[1]);\n\t\t\t\t\t\t$state = 1;\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^msgstr\\[(\\d+)\\] \"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgPlurals[stripcslashes($match[1])] = stripcslashes($match[2]);\n\t\t\t\t\t\t$state = 1;\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^\"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgid = stripcslashes($match[1]);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t// Reading msgstr, waiting for blank\n\t\t\t\t\tif (preg_match('/^\"(.*)\"$/', $line, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$msgstr = stripcslashes($match[1]);\n\t\t\t\t\t}\n\t\t\t\t\telseif (empty($line))\n\t\t\t\t\t{\n\t\t\t\t\t\t// We have a complete entry\n\t\t\t\t\t\t$e = new \\stdClass;\n\t\t\t\t\t\t$e->info = $info;\n\t\t\t\t\t\t$e->string = $msgstr;\n\t\t\t\t\t\t$fileInfo->strings[$msgid] = $e;\n\n\t\t\t\t\t\t$state = 0;\n\t\t\t\t\t\t$info = '';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Comment or blank line?\n\t\t\tif (empty($line)\n\t\t\t\t|| preg_match('/^#/', $line))\n\t\t\t{\n\t\t\t\tif ($msgPlural)\n\t\t\t\t{\n\t\t\t\t\t$t = new \\stdClass;\n\t\t\t\t\t$t->plural = $msgPlural;\n\t\t\t\t\t$t->forms = $msgPlurals;\n\t\t\t\t\t$t->info = $info;\n\t\t\t\t\t$fileInfo->stringsPlural[$msgid] = $t;\n\n\t\t\t\t\t$msgPlural = '';\n\t\t\t\t\t$msgPlurals = [];\n\t\t\t\t\t$state = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$fileInfo->head = $head;\n\n\t\treturn $fileInfo;\n\t}", "public function read()\n\t{\n\t\t$datos = array();\n\t\trewind($this->_File);\n\t\twhile(!feof($this->_File))\n\t\t $datos[] = fgets($this->_File);\n\t\treturn $datos;\n\t}", "public function content(): string\n {\n return $this->fileContents[$this->env];\n }", "private function getTextFromFile(){\n \n if (file_exists($this->f1)){\n $letterText = file($this->f);\n return $letterText[0];\n }\n return false;\n }", "public function parseFile($fn) {\n\t\t$this->fh = @fopen($fn, \"r\");\n\t\tif(!$this->fh) throw new Exception(\"Unable to open file {$fn}.\");\n\t\t\n\t\t// Check header.\n\t\t$header = $this->parseComment();\n\t\tif(preg_match(self::REGEXHDR, $header, $matches)) {\n\t\t\tif($matches[1] !== self::VERSION) throw new Exception(\"Wrong Mork version: {$matches[1]}.\");\n\t\t\t$this->say1(\"Detected Mork version\", $matches[1]);\n\t\t} else throw new Exception(\"Incorrect file header: {$header}\");\n\t\t\n\t\twhile (($token = $this->readUntil($dummy, '//', '@$${', '<', '{')) !== false) {\n\t\t\tswitch($token) {\n\t\t\t\tcase '//': // Comment\n\t\t\t\t\t$this->say2(\"Found COMMENT\");\n\t\t\t\t\t$comment = $this->parseComment();\n\t\t\t\t\t$this->say1(\"Comment: {$comment}\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '@$${': // Group\n\t\t\t\t\t$this->say2(\"Found GROUP\");\n\t\t\t\t\t$this->parseGroup();\n\t\t\t\t\tbreak;\n\t\t\t\tcase '<': // Dict\n\t\t\t\t\t$this->say2(\"Found DICT\");\n\t\t\t\t\t$this->parseDict();\n\t\t\t\t\tbreak;\n\t\t\t\tcase '{': // Table\n\t\t\t\t\t$this->say2(\"Found TABLE\");\n\t\t\t\t\t$this->parseTable();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // EOF\n\t\t\t\t\t$this->say2(\"Found EOF\");\n\t\t\t}\n\t\t}\n\t\tfclose($this->fh);\n\t\t\n\t\t// Produce output.\n\t\tswitch($this->format) {\n\t\t\tcase self::OUTPUTCSV:\n\t\t\t\t$this->csv();\n\t\t\t\tbreak;\n\t\t\tcase self::OUTPUTJSON:\n\t\t\t\t$this->json();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->stats();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getEncoding(): int\n {\n return $this->encoding;\n }", "public\n function getEncoding()\n {\n return $this->encoding;\n }", "public function readFile($file,$format = Data::FORMAT_PHP ) \n {\n return Data::decode_file($file, $format);\n }", "function getline()\n {\n $this->line = fgets($this->fp);\n return $this->line;\n }", "function enc_get_info($path,$keep_data=FALSE){\n\t\t$header=enc_get_header();\n\t\tif(!is_file($path)){\n\t\t\treturn FALSE;\n\t\t}\n\t\tif($fp=@fopen($path,'rb')){\n\t\t\t$hdr=fread($fp,strlen(CRYPTO_HEADER));\n\t\t\tif($header['magic']=CRYPTO_HEADER===$hdr){\n\t\t\t\t$header['mode']=enc_read_prefixed_bytes($fp,2);\n\t\t\t\t$header['iv']=enc_read_prefixed_bytes($fp,2);\n\t\t\t\t$header['salt']=enc_read_prefixed_bytes($fp,2);\n\t\t\t\t$header['hmac']=enc_read_prefixed_bytes($fp,2);\n\t\t\t\t$header['rounds']=enc_read_int($fp,4);\n\t\t\t\t$header['datalen']=enc_read_int($fp,8);\n\t\t\t\tif($header['datalen']>0){\n\t\t\t\t\tif($keep_data){\n\t\t\t\t\t\t$header['data']=fread($fp,$header['datalen']);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfseek($fp,$header['datalen'],SEEK_CUR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$header['tag']=enc_read_prefixed_bytes($fp,2);\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t}\n\t\treturn $header['magic']?$header:FALSE;\n\t}", "public function getCharset(): string;", "function readFileFixed($convert = \"ASCII\",$delimiter=array(),$maxline=10,$debug=false)\n {\n if ($debug) \n {\n if (count($delimiter)>0) echo \"readFileFixed, bearbeite Datei \".$this->fileName.\" mit Format $convert und \".count($delimiter).\" Spalten.\\n\";\n else echo \"readFileFixed, bearbeite Datei \".$this->fileName.\". Erste Zeile gleich hier analysieren.\\n\";\n }\n $resultArray=array();\n $i=0;\n if ($this->fileName !== false) \n {\n if ($convert != \"ASCII\")\n {\n //echo \"read full file.\\n\";\n $result = @file_get_contents($this->fileName); // dopelter Speicher\n if ($result !== false) \n {\n //$encoding = mb_detect_encoding( $content, array(\"UTF-8\",\"UTF-32\",\"UTF-32BE\",\"UTF-32LE\",\"UTF-16\",\"UTF-16BE\",\"UTF-16LE\"), TRUE );\n $encoding = mb_detect_encoding( $result);\n //$content = mb_convert_encoding($content, \"UTF-8\", $convert);\n $content = mb_convert_encoding($result, \"ASCII\", $convert);\n //$encoding2 = mb_detect_encoding( $content, array(\"UTF-8\",\"UTF-32\",\"UTF-32BE\",\"UTF-32LE\",\"UTF-16\",\"UTF-16BE\",\"UTF-16LE\"), TRUE );\n $encoding2 = mb_detect_encoding( $content); // after conversion\n\n if ($debug) \n {\n //echo \"readFileFixed, full file, bearbeite Datei \".$this->fileName.\" mit Format $convert:\\n\";\n echo \" File gefunden, Textformat $encoding -> $encoding2\\n\"; // oder \".mb_detect_encoding($content).\"\n echo \" \".strlen($result).\" characters, \".strlen($content).\" chars after encoding to ASCII and \".mb_strlen($result,$convert).\" Multibyte Characters with format $convert found in Input.\\n\";\n\n }\n // Separate lines\n $content = str_replace(array(\"\\r\\n\", \"\\n\\r\", \"\\r\"), \"\\n\", $content);\n $content = explode(\"\\n\", $content);\n foreach ($content as $index => $line) \n {\n if (($i==0) && ($delimiter==[]))\n {\n //echo \"Use first line to find delimiters.\\n\";\n $oldstart=false; $oldstring=\"\";\n $tabs=explode(\" \",$line);\n $countTabs=sizeof($tabs); // sizeof trifft noch jede Menge Eintraeg mit einem blank \n if ($countTabs>1)\n {\n //echo \"Erste Zeile :\\\"$line\\\"\\n\"; \n $delimiter=array();\n foreach ($tabs as $index => $string)\n {\n if (($string == \" \") || ($string == \"\")) \n {\n //unset($tabs[$index]);\n }\n else \n {\n $stringTrimmed = trim($string);\n if ($oldstart !== false) // schon etwas gefunden\n {\n $delimiter[$oldstring][\"Index\"]=$oldstart;\n $begin=$oldend; // beim ersten Mal steht das auf Pos von oldstring, im Normalfall 0\n //if ($debug) echo \" \".str_pad($index,2).\" | \\\"$string\\\" \\n\";\n if (strlen($stringTrimmed)>0) $end=strpos($line,$stringTrimmed); // das Ende kann nur der Anfang des nächsten Eintrages sein, nicht das Ende des Wortes\n else \n {\n echo \"Trimmed String is empty, original string was \\\"$string\\\" \\n\"; \n $end=strlen($line); // wenn strlen 0 ist haben wir ein non doisplayable character, Tab oder end of line\n }\n if ($end<$begin) $end=strpos($line,\" \".$stringTrimmed)+1; // Needle am ANfang mit einem Blank erweitern und schauen ob wir dann die richtige Position finden\n $delimiter[$oldstring][\"Begin\"]=$begin;\n $delimiter[$oldstring][\"End\"]=$end;\n $delimiter[$oldstring][\"Length\"]=$end-$begin;\n if ($debug) echo \" \".str_pad($index,2).\" | \".str_pad(\"\\\"$oldstring\\\"\",40).\" $begin/$end \\n\";\n $oldstart=$index;\n $oldstring=$stringTrimmed;\n $oldend=$end;\n if ($end == strlen($line))\n {\n echo \"End of line found. Stopp analyzing.\\n\";\n break; // stopp we are at the end, ignore trailing blanks\n } \n }\n else // Wir suchen erstmal, blanks sind schon aussortiert, wir fangen mit einem Wort an\n {\n $oldstart=$index;\n $oldstring=$stringTrimmed;\n $oldend=strpos($line,$oldstring);\n //if ($debug) echo \" \".str_pad($index,2).\" | \\\"$string\\\" Erster Treffer Init, Eintrag endet auf Position $oldend\\n\";\n } \n } \n } \n $begin=$oldend;\n $end=strlen($line);\n if ($end<$begin) $end=strpos($line,\" \".$stringTrimmed)+1; // mit einem Blank erweitern\n if ($begin<$end) // zumindet 1 Zeichen\n {\n $delimiter[$oldstring][\"Index\"]=$oldstart;\n $delimiter[$oldstring][\"Begin\"]=$begin;\n $delimiter[$oldstring][\"End\"]=$end;\n $delimiter[$oldstring][\"Length\"]=$end-$begin;\n }\n if ($debug) echo str_pad($oldstart,2).\" | \".str_pad(\"\\\"$oldstring\\\"\",40).\" $begin/$end \\n\"; \n //print_r($delimiter);\n //echo \"Zeile mit gefundene Spalten: \".sizeof($delimiter).\" \\n\"; \n if (sizeof($delimiter)>1) $i++;\n } // ende if count tabs\n //$this->readFileFixedLine($line,$delimiter,true); // Test, hier stimmt noch alles\n $delimiter2=array(); $offset=0;\n foreach ($delimiter as $index => $entry) // irgend etwas läuft falsch und wir wissen nicht was \n {\n $delimiter2[$index][\"Begin\"]=$entry[\"Begin\"]-$offset;\n $delimiter2[$index][\"Length\"]=$entry[\"Length\"];\n //if ($index==0) $offset=3;\n }\n $delimiter=$delimiter2;\n }\n else \n {\n /* der obere Teil ist gleich wie bei FirstLine, jetzt wird aber wirklich eingelesen */\n $resultArray[$i] = $this->readFileFixedLine($line,$delimiter,$debug);\n if ($i++>$maxline) break;\n }\n }\n }\n else echo \"File is empty.\\n\";\n }\n elseif (($handle = fopen($this->fileName, \"r\")) !== false)\n {\n if ($debug) echo \"readFileFixed, line per line, bearbeite Datei \".$this->fileName.\" mit Format $convert:\\n\";\n while (($result=fgets($handle)) !== false) \n {\n //if ($convert != \"UTF-8\") $result=mb_convert_encoding($result,\"UTF-8\",$convert);\n if ($debug) echo $result;\n if ($i==0) \n {\n $oldstart=false; $oldstring=\"\";\n $tabs=explode(\" \",$result);\n $countTabs=sizeof($tabs); // count geht nach dem Index\n if ($countTabs>1)\n {\n if (sizeof($delimiter)<1)\n {\n //echo \"Gefundene Spalten: \".$countTabs.\" \\n\"; print_R($tabs);\n $delimiter=array();\n foreach ($tabs as $index => $string)\n {\n if (($string == \" \") || ($string == \"\")) \n {\n //unset($tabs[$index]);\n }\n else \n {\n $string = trim($string); \n //if ($debug) echo str_pad($index,2).\" | \\\"$string\\\" \\n\";\n if ($oldstart !== false) \n {\n $delimiter[$oldstring][\"Index\"]=$oldstart;\n $begin=$oldend;\n $end=strpos($result,$string);\n if ($end<$begin) $end=strpos($result,\" \".$string)+1; // mit einem Blank erweitern\n $delimiter[$oldstring][\"Begin\"]=$begin;\n $delimiter[$oldstring][\"End\"]=$end;\n $delimiter[$oldstring][\"Length\"]=$end-$begin;\n if ($debug) echo str_pad($index,2).\" | \".str_pad(\"\\\"$oldstring\\\"\",40).\" $begin/$end \\n\"; \n $oldstart=$index;\n $oldstring=$string;\n $oldend=$end;\n }\n else \n {\n $oldstart=$index;\n $oldstring=$string;\n $oldend=strpos($result,$oldstring);\n } \n } \n } \n $delimiter[$oldstring][\"Index\"]=$oldstart;\n $begin=$oldend;\n $end=strlen($result);\n if ($end<$begin) $end=strpos($result,\" \".$string)+1; // mit einem Blank erweitern\n $delimiter[$oldstring][\"Begin\"]=$begin;\n $delimiter[$oldstring][\"End\"]=$end;\n $delimiter[$oldstring][\"Length\"]=$end-$begin;\n if ($debug) echo str_pad($oldstart,2).\" | \".str_pad(\"\\\"$oldstring\\\"\",40).\" $begin/$end \\n\"; \n }\n //print_r($delimiter);\n echo \"Zeile mit insgesamt \".sizeof($delimiter).\" gefundene Spalten. \\n\"; \n if (sizeof($delimiter)>1) $i++;\n }\n }\n else \n {\n /* der obere Teil ist gleich wie bei FirstLine, jetzt wird aber wirklich eingelesen */\n $resultArray[$i] = $this->readFileFixedLine($result,$delimiter,false); // andernfalls debug einsetzen\n if ($i++>$maxline) break;\n }\n }\n fclose($handle);\n }\n }\n else echo \"Filename empty.\\n\";\n return($resultArray);\n }", "function getFileContent()\n {\n // Check if file exists\n if (file_exists($this->fileName)) {\n // Open the file, or die\n $file = fopen($this->fileName, \"r\") or die(\"Failed to load file!\");\n // Get the first line of the file\n $headersData = fgets($file);\n // Get the data and save it in an array\n $headers = explode(',', $headersData);\n // Remove all whitespace and quotes\n $headers = $this->removeWhitespaceAndQuotes($headers);\n // Crate an array for the rest of the file\n $contentArray = [];\n // As long as there is an line left in the file, continue the loop\n while (($line = fgets($file)) !== false) {\n // Get the data of the line and save it in an array\n $tempContent = explode(',', $line);\n // Remove whitespace from the strings in the array\n $tempContent = $this->removeWhitespaceAndQuotes($tempContent);\n // Make the title of the information the key of the array objects\n // makes it easier to get a specific value. Example \"Grade\"\n $content = array_combine($headers, $tempContent);\n // Push the array from the line to the content array\n array_push($contentArray, $content);\n }\n // Close the file\n fclose($file);\n // Return the content of the file\n return $contentArray;\n } else {\n // Print an error if the file cannot be opened and exit the code\n print(\"<p>The \" . $this->fileName . \" file does not exist. Please upload the data.csv file at the <a href='data.php'>data.php</a> page!</p>\");\n exit();\n }\n }", "function read_system() {\n $content = file(ROOT_PATH . 'data/system.hbdata');\n foreach ((array) $content as $line) {\n $line = trim($line);\n if (strpos($line, '//') !== 0) {\n $arr = explode(':', $line);\n $setting[$arr[0]] = explode(',', $arr[1]);\n }\n }\n return $setting;\n }", "static function parseFile($fp) {\n $res = file($fp);\n if ($res) {\n $res = implode(\"\", $res);\n $res = stripslashes($res);\n return $res;\n } else {\n throw new Exception(\"model file not found: $fp\");\n }\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }" ]
[ "0.65984654", "0.59430176", "0.58782524", "0.58756846", "0.57749844", "0.5741651", "0.56889", "0.56235313", "0.560669", "0.5602052", "0.5580893", "0.55795914", "0.55408055", "0.5490084", "0.5473527", "0.5370461", "0.5370461", "0.53522307", "0.534788", "0.5344871", "0.5307112", "0.530165", "0.5294133", "0.52867234", "0.5268358", "0.5236396", "0.5206847", "0.52053684", "0.51821345", "0.5154124", "0.5148769", "0.51303756", "0.51158476", "0.5112798", "0.5108432", "0.5106903", "0.51064557", "0.5094808", "0.50765043", "0.50744283", "0.5060453", "0.5060403", "0.5055994", "0.5050279", "0.50502074", "0.504797", "0.5047488", "0.5026508", "0.5018396", "0.50180656", "0.50162584", "0.5010295", "0.50080514", "0.5000638", "0.4997529", "0.49974152", "0.4996732", "0.49809727", "0.4977999", "0.49694034", "0.49685305", "0.49652764", "0.49493954", "0.49378696", "0.49366105", "0.4934122", "0.49300814", "0.4926273", "0.492242", "0.49194092", "0.49190944", "0.49162984", "0.4915321", "0.49091786", "0.48988768", "0.48988456", "0.48947868", "0.4891952", "0.48892835", "0.48791835", "0.4876985", "0.48688895", "0.486767", "0.486619", "0.48609734", "0.48296458", "0.48239595", "0.48229018", "0.4822319", "0.48202494", "0.4817772", "0.4810571", "0.4810313", "0.4810313", "0.4810313", "0.4810313", "0.4810313", "0.4810313", "0.4810313", "0.4810313" ]
0.7629329
0
Checks whether the given element is a valid email address.
Проверяет, является ли заданный элемент действительным адресом электронной почты.
function _element_email_validate($element, &$form_state) { if (!valid_email_address($element['#value'])) { form_error($element, t('The @name option must contain a valid email address.', array('@name' => $element['#title']))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _content_reminder_email_element_validate($element, &$form_state, $form) {\n if (!empty($element['#value']) && !valid_email_address($element['#value'])) {\n form_error($element, t('Please enter a valid email address.'));\n }\n}", "function isValidEmailAddress ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\r\n }", "static function isValid_email_address($data){\r\n return (bool)filter_var($data, FILTER_VALIDATE_EMAIL);\r\n }", "function is_valid_email($address)\n\t{\n\t\tif (!$address)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif(eregi(\"([_\\.0-9a-z-]+@)([0-9a-z][0-9a-z-]+\\.)+([a-z]{2,3})\", $address))\n\t\t{\n\t\t\t$ary_address = ($address);\n\t\t\tif ($ary_address[0])\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function checkemail($address)\n\t\t{\n\t\t return (preg_match('/^[a-z\\d_\\.\\-]+@([a-z\\d\\-]+)(?:\\.(?1)){1,2}$/i',$address)) ? true : false;\n\t\t}", "function is_email_address($email)\n{\n\t$regexp = \"/^[a-z0-9]+([a-z0-9_\\+\\\\.-]+)*@([a-z0-9]+([\\.-][a-z0-9]+)*)+\\\\.[a-z]{2,}$/i\";\n\treturn (bool) preg_match($regexp, $email);\n}", "function is_email_address($email)\n{\n\t$regexp = \"/^[a-z0-9]+([a-z0-9_\\+\\\\.-]+)*@([a-z0-9]+([\\.-][a-z0-9]+)*)+\\\\.[a-z]{2,}$/i\";\n\treturn (bool) preg_match($regexp, $email);\n}", "function is_email($address=''){\n $address = htmlspecialchars(trim($address));\n return (bool) preg_match('/^([a-z0-9\\+_\\-]+)(\\.[a-z0-9\\+_\\-]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}$/ix', $address);\n}", "public static function email ($email){\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)){\n return false;\n }\n return true;\n }", "function is_valid_email($field) {\n\t//address using FILTER_SANITIZE_EMAIL\n\t$field = filter_var($field, FILTER_SANITIZE_EMAIL);\n\t//filter_var() validates the e-mail\n\t//address using FILTER_VALIDATE_EMAIL\n\treturn filter_var($field, FILTER_VALIDATE_EMAIL);\n}", "function check_email($address) {\n\t\treturn (preg_match ( '/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_`{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ( $address ) ));\n\t}", "function is_valid_email ($address) {\n return (preg_match(\n '/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_`{|}~]+'. // the user name\n '@'. // the ubiquitous at-sign\n '([-0-9A-Z]+\\.)+' . // host, sub-, and domain names\n '([0-9A-Z]){2,4}$/i', // top-level domain (TLD)\n trim($address)));\n}", "public static function validateEmail($address)\n {\n if (empty($address)) {\n return false;\n }\n\n if (PMF_String::strpos($address, '\\0') !== false) {\n return false;\n }\n\n $unsafe = array(\"\\r\", \"\\n\");\n if ($address !== str_replace($unsafe, '', $address)) {\n return false;\n }\n\n if (false === filter_var($address, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n\n return true;\n }", "function isEmail($value)\n\t{\n\t\treturn (bool) preg_match(ISPK_EMAIL_VALID, $value);\n\t}", "function isEmail($address) {\r\n $invalid = array();\r\n // @explode() - Splits string by comma into an array.\r\n $emailAddresses = explode(\",\", $address);\r\n\r\n // Iterates over each array value.\r\n foreach($emailAddresses as $emailAdd) {\r\n $emailAdd = trim($emailAdd);\r\n // Test input whether it's valid address.\r\n if (empty($emailAdd) || !filter_var($emailAdd, FILTER_VALIDATE_EMAIL)) {\r\n // if validation fails, add failed email to an array.\r\n $invalid[] = $emailAdd;\r\n }\r\n }\r\n // No invalid address found in an array.\r\n if(empty($invalid)) {\r\n return true;\r\n }\r\n elseif (count($invalid) == 1) {\r\n form_set_error('audit_trail_emails', t('%email is not a valid e-mail address.', array('%email' => reset($invalid))));\r\n }\r\n else {\r\n form_set_error('audit_trail_emails', t('%emails are not valid e-mail addresses.', array('%emails' => implode(', ', $invalid))));\r\n }\r\n}", "public function validateEmail($value) {\n\t\treturn filter_var($value, FILTER_VALIDATE_EMAIL) !== false;\n\t}", "function isEmailAddress($field, $msg = false)\r\n\t{\r\n\t\t$value = $this->_getValue($field);\r\n\t\tif ($msg == false) $msg = 'The field <strong>'.$field.'</strong> is not a valid email-address.';\r\n\t\t\t\t\r\n\t\t$pattern = \"/^([a-zA-Z0-9])+([\\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\\.[a-zA-Z0-9_-]+)+/\";\r\n\t\t\r\n\t\tif(preg_match($pattern, $value))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_errorList[$field][] = $msg;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function check_email_address($email) {\n\t if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\treturn false;\n\t }\n\t $email_array = explode(\"@\", $email);\n\t $local_array = explode(\".\", $email_array[0]);\n\t for ($i = 0; $i < sizeof($local_array); $i++) {\n\t\tif(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]\".\n\t\t\t\t \"{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",$local_array[$i])) \n\t\t{\n\t\t return false;\n\t\t}\n\t }\n\t if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\tif (sizeof($domain_array) < 2) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t for ($i = 0; $i < sizeof($domain_array); $i++) \n\t\t{\n\t\t if(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9\\._-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\",$domain_array[$i])) \n\t\t {\n\t\t\treturn false;\n\t\t }\n\t\t}\n\t }\n\t return true;\n\t}", "function is_valid_email_address($email){\n\t\t$qtext = '[^\\\\x0d\\\\x22\\\\x5c\\\\x80-\\\\xff]';\n\t\t$dtext = '[^\\\\x0d\\\\x5b-\\\\x5d\\\\x80-\\\\xff]';\n\t\t$atom = '[^\\\\x00-\\\\x20\\\\x22\\\\x28\\\\x29\\\\x2c\\\\x2e\\\\x3a-\\\\x3c'.\n\t\t\t'\\\\x3e\\\\x40\\\\x5b-\\\\x5d\\\\x7f-\\\\xff]+';\n\t\t$quoted_pair = '\\\\x5c[\\\\x00-\\\\x7f]';\n\t\t$domain_literal = \"\\\\x5b($dtext|$quoted_pair)*\\\\x5d\";\n\t\t$quoted_string = \"\\\\x22($qtext|$quoted_pair)*\\\\x22\";\n\t\t$domain_ref = $atom;\n\t\t$sub_domain = \"($domain_ref|$domain_literal)\";\n\t\t$word = \"($atom|$quoted_string)\";\n\t\t$domain = \"$sub_domain(\\\\x2e$sub_domain)*\";\n\t\t$local_part = \"$word(\\\\x2e$word)*\";\n\t\t$addr_spec = \"$local_part\\\\x40$domain\";\n\t\treturn preg_match(\"!^$addr_spec$!\", $email) ? 1 : 0;\n}", "public static function email_address( $addr )\r\n\t\t{\r\n\r\n\t\t\t// If valid Email Address return true\r\n\t\t\treturn (bool)preg_match( '/^[A-Z0-9._%-]+@(?:[A-Z0-9-]+\\.)+[A-Z]{2,6}$/i', $addr );\r\n\r\n\t\t}", "function is_valid_email($EmailAddress){\n //http://php.net/manual/en/function.filter-var.php\n //filter_var can also validate: FILTER_VALIDATE_IP FILTER_VALIDATE_INT FILTER_VALIDATE_BOOLEAN FILTER_VALIDATE_URL FILTER_SANITIZE_STRING\n //flags FILTER_NULL_ON_FAILURE FILTER_FLAG_PATH_REQUIRED FILTER_FLAG_STRIP_LOW FILTER_FLAG_STRIP_HIGH\n $EmailAddress = clean_email($EmailAddress);\n if ($EmailAddress && filter_var($EmailAddress, FILTER_VALIDATE_EMAIL)) {\n return $EmailAddress;\n }\n }", "public static function validateEmailAddr($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "private function validateEmail($data, $field, $id)\n\t{\n\t\tglobal $herr;\n\n\t\t$result = filter_var($data, FILTER_SANITIZE_EMAIL);\n\t\tif (strcasecmp($result, $data) != 0)\n\t\t{\n\t\t\t$herr->errorPutMessage($this->etype,\n\t\t\t\t'EMail address contains invalid characters.', $this->estate,\n\t\t\t\t$field, $id);\n\t\t\treturn false;\n\t\t}\n\t\t$result = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\tif (!$result)\n\t\t{\n\t\t\t$herr->errorPutMessage($this->etype,\n\t\t\t\t'EMail address not formatted correctly.', $this->estate,\n\t\t\t\t$field, $id);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function isEmail($email)\n {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) return true;\n else return false;\n }", "function validateEmail ($address) {\r\n return preg_match('/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9_-]+(\\.[_a-z0-9-]+)+$/i',$address);\r\n }", "public function testEmail()\n\t{\n\t\t$this->assertTrue(validate_email('al@fx.fr'), 'al@fx.fr is a valid email address');\n\n\t\t$this->assertFalse(validate_email('al @fx.fr'), 'al @fx.fr is not a valid email address');\n\n\t\t$this->assertFalse(validate_email('al'), 'al is not a valid email address');\n\t}", "function is_valid_address($email){\n\t\t$qtext = '[^\\\\x0d\\\\x22\\\\x5c\\\\x80-\\\\xff]';\n\t\t$dtext = '[^\\\\x0d\\\\x5b-\\\\x5d\\\\x80-\\\\xff]';\n\t\t$atom = '[^\\\\x00-\\\\x20\\\\x22\\\\x28\\\\x29\\\\x2c\\\\x2e\\\\x3a-\\\\x3c'.\n\t\t\t'\\\\x3e\\\\x40\\\\x5b-\\\\x5d\\\\x7f-\\\\xff]+';\n\t\t$quoted_pair = '\\\\x5c[\\\\x00-\\\\x7f]';\n\t\t$domain_literal = \"\\\\x5b($dtext|$quoted_pair)*\\\\x5d\";\n\t\t$quoted_string = \"\\\\x22($qtext|$quoted_pair)*\\\\x22\";\n\t\t$domain_ref = $atom;\n\t\t$sub_domain = \"($domain_ref|$domain_literal)\";\n\t\t$word = \"($atom|$quoted_string)\";\n\t\t$domain = \"$sub_domain(\\\\x2e$sub_domain)*\";\n\t\t$local_part = \"$word(\\\\x2e$word)*\";\n\t\t$addr_spec = \"$local_part\\\\x40$domain\";\n\n\t\treturn preg_match(\"!^$addr_spec$!\", $email) ? 1 : 0;\n\t}", "function check_email($email) \n{\n\t// First, we check that there's one @ symbol, and that the lengths are right\n\tif (!preg_match('/^[a-z0-9&\\'\\.\\-_\\+]+@[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)*+[a-z]{2}/is', $email)) \n\t{\n\t// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n\treturn false;\n\t}\n\telse\t \n\treturn true;\n}", "public static function email($str)\n\t\t{\n\t\t\treturn filter_var($str, FILTER_VALIDATE_EMAIL) !== false;\n\t\t}", "private function isValidEmail(): bool\n {\n if(!filter_var($this->creditCard->getEmail(), FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n\n return true;\n }", "public function testEmail()\n {\n // $email = \"joelfzop@gmail.com\";\n // $result = (bool) filter_var($email, FILTER_VALIDATE_EMAIL);\n\n $result = Email::validate('joelfzop@gmail.com');\n $this->assertTrue($result);\n\n $result2 = Email::validate('joelfzop@@gmail.com');\n $this->assertFalse($result2);\n }", "function isValidEmailAddress ( $email = null )\n\t{\n\t\t$m = array () ;\n\t\tif ( is_string($email) )\n\t\t{\n\t\t\tpreg_match('/'.DBValidator::EMAIL.'/',$email,$m);\n\t\t}\n\t\treturn !empty($m) && !empty($m[0]) ;\n\t}", "function\t\t\t\t// O - TRUE if OK, FALSE otherwise\nvalidate_email($email)\t\t\t// I - Email address\n{\n // Check for both \"name@example.com\" and \"Full Name <name@example.com>\"\n return (preg_match(\"/^[a-zA-Z0-9_\\\\.+-]+@[a-zA-Z0-9\\\\.-]+\\\\.[a-zA-Z]{2,}\\$/\",\n $email) ||\n preg_match(\"/^[^<]*<[a-zA-Z0-9_\\\\.+-]+@[a-zA-Z0-9\\\\.-]+\\\\.\"\n .\"[a-zA-Z]{2,}>\\$/\", $email));\n}", "function is_valid_email( $email ){\n\t$valid = filter_var( $email, FILTER_VALIDATE_EMAIL );\n\treturn $valid;\n}", "function valid_email($email_address)\n\t{\n\t\t\n\t\tif(preg_match(\"/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9-])+.([a-zA-Z0-9-.])+$/\", $email_address)) {return true;}\n\t \treturn false;\n\t}", "public static function isEmail($email){\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "public function testEmail(string $email): bool {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "public function testUserEmailIsAnEmail()\n {\n //$this->assertContains('@',$this->userClass->getEmail());\n //$this->assertContains('.',$this->userClass->getEmail());\n /* $this->assertContains('/^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*\n @'.'[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$/',$this->userClass->getEmail()); */\n $this->assertTrue((bool)filter_var($this->userClass->getEmail(),FILTER_VALIDATE_EMAIL));\n }", "private function email(string $value): bool\n {\n return filter_var($value, FILTER_VALIDATE_EMAIL);\n }", "function isEmail($var) {\n return filter_var($var, FILTER_VALIDATE_EMAIL);\n }", "protected function verify_argument_of_type_email($arg) {\n if (is_string($arg) &&\n preg_match('/^[A-Za-z0-9\\._+-]+@[A-Za-z0-9\\.-]+$/', $arg)) {\n return TRUE;\n }\n return FALSE;\n }", "function is_valid_email_address($email){\n\t$qtext = '[^\\\\x0d\\\\x22\\\\x5c\\\\x80-\\\\xff]';\n\t$dtext = '[^\\\\x0d\\\\x5b-\\\\x5d\\\\x80-\\\\xff]';\n\t$atom = '[^\\\\x00-\\\\x20\\\\x22\\\\x28\\\\x29\\\\x2c\\\\x2e\\\\x3a-\\\\x3c'.\n\t\t'\\\\x3e\\\\x40\\\\x5b-\\\\x5d\\\\x7f-\\\\xff]+';\n\t$quoted_pair = '\\\\x5c[\\\\x00-\\\\x7f]';\n\t$domain_literal = \"\\\\x5b($dtext|$quoted_pair)*\\\\x5d\";\n\t$quoted_string = \"\\\\x22($qtext|$quoted_pair)*\\\\x22\";\n\t$domain_ref = $atom;\n\t$sub_domain = \"($domain_ref|$domain_literal)\";\n\t$word = \"($atom|$quoted_string)\";\n\t$domain = \"$sub_domain(\\\\x2e$sub_domain)*\";\n\t$local_part = \"$word(\\\\x2e$word)*\";\n\t$addr_spec = \"$local_part\\\\x40$domain\";\n\treturn preg_match(\"!^$addr_spec$!\", $email) ? 1 : 0;\n}", "function checkEmail($email) {\n\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn true;\n\t } else {\n\t\treturn false;\n\t }\n}", "public static function email($email)\n {\n return false !== filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "function valid_email_address($mail) {\n\t $user = '[a-zA-Z0-9_\\-\\.\\+\\^!#\\$%&*+\\/\\=\\?\\`\\|\\{\\}~\\']+';\n\t $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.?)+';\n\t $ipv4 = '[0-9]{1,3}(\\.[0-9]{1,3}){3}';\n\t $ipv6 = '[0-9a-fA-F]{1,4}(\\:[0-9a-fA-F]{1,4}){7}';\n\t\n\t return preg_match(\"/^$user@($domain|(\\[($ipv4|$ipv6)\\]))$/\", $mail);\n\t}", "function checkEmail($email) {\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function is_valid_email_address($email_address)\n {\n return preg_match(\"/^(?!.{255,})(?!.{65,}@)([!#-'*+\\/-9=?^-~-]+)(?>\\.(?1))*@(?!.*[^.]{64,})(?>[a-z\\d](?>[a-z\\d-]*[a-z\\d])?\\.){1,126}[a-z]{2,6}$/iD\", $email_address);\n }", "function valid_email($email) {\n\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "public function valid() {\n\t\treturn filter_var( $this->address, FILTER_VALIDATE_EMAIL ) ? TRUE : FALSE;\n\t}", "function is_email( $email )\n{\n\treturn filter_var( $email , FILTER_VALIDATE_EMAIL );\n}", "protected function validateEmail($attribute, $value) : bool\n {\n return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;\n }", "public static function validEmail($email = \"\"){\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "public static function isEmailValid($value) {\n return filter_var($value, FILTER_VALIDATE_EMAIL);\n }", "public function validate_email($email){\n if(empty($email)){\n return false;\n }else{\n //remove any tags\n $cleanemail = strip_tags($email);\n\n if(preg_match($this->emailExpression,$cleanemail)){\n return true;\n }else{\n return false;\n }\n\n }\n\n }", "function validaEmail($email) {\n return (false !== filter_var($email, FILTER_VALIDATE_EMAIL));\n}", "public static function validEmail($_text) {\n\t\treturn is_string(filter_var($_text,FILTER_VALIDATE_EMAIL));\n\t}", "static function validateEmailSyntax($email) {\n $atom = '[-a-z0-9!#$%&\\'*+/=?^_`{|}~]'; // allowed characters for part before \"at\" character\n $domain = '([-a-z0-9]*[a-z0-9]+)'; // allowed characters for part after \"at\" character\n $regex = '^'.$atom.'+'. // One or more atom characters.\n '(\\.'.$atom.'+)*'. // Followed by zero or more dot separated sets of one or more atom characters.\n '@'. // Followed by an \"at\" character.\n '('.$domain.'{1,63}\\.)+'. // Followed by one or max 63 domain characters (dot separated).\n $domain.'{2,63}'. // Must be followed by one set consisting a period of two\n '$'; // or max 63 domain characters.\n if(eregi($regex,$email)) return true;\n else return false;\n }", "static function validEmail($email): bool\n {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n }\n\n return false;\n\n\n }", "function is_valid_email($email = '')\n{\n return preg_match('#^[a-z0-9.!\\#$%&\\'*+-/=?^_`{|}~]+@([0-9.]+|([^\\s\\'\"<>]+\\.+[a-z]{2,6}))$#si', $email);\n}", "function validateAddressSyntax($email)\n {\n if (preg_match(\"/^[-_a-z0-9+]+(\\.[-_a-z0-9+]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\\.)+[a-z]{2,4}$/\", $email))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function isEmail($var){\n\treturn filter_var($var,FILTER_VALIDATE_EMAIL);\n}", "protected function _validate_email_address( $email_address )\n\t{\n\t\treturn (bool) preg_match( '/.+@(.+\\.)+.+/', $email_address );\n\t}", "function isEmail($str) {\n // There's a built in PHP tool that has a go at this\n\treturn filter_var($str, FILTER_VALIDATE_EMAIL);\n}", "function is_email($value){\n\tif($value==null||$value=='')\n\t\treturn E_FORM_EMPTY;\n\treturn is_valid_email_address($value)==true;\n}", "function check_email_address($email) {\r\n // First, we check that there's one @ symbol, and that the lengths are right\r\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\r\n // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\r\n return false;\r\n }\r\n // Split it into sections to make life easier\r\n $email_array = explode(\"@\", $email);\r\n $local_array = explode(\".\", $email_array[0]);\r\n for ($i = 0; $i < sizeof($local_array); $i++) {\r\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\r\n return false;\r\n }\r\n } \r\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name\r\n $domain_array = explode(\".\", $email_array[1]);\r\n if (sizeof($domain_array) < 2) {\r\n return false; // Not enough parts to domain\r\n }\r\n for ($i = 0; $i < sizeof($domain_array); $i++) {\r\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}", "public static function isEmail($value) {\n \n return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;\n \n }", "public static function validateEmail($text) {\n\t\tif (\n\t\t\t!empty($text) &&\n\t\t\tstrlen($text) >= CONST_CORE_MIN_STRINGLENGTH &&\n\t\t\tstrlen($text) <= CONST_CORE_MAX_STRINGLENGTH &&\n\t\t\tfilter_var($text, FILTER_VALIDATE_EMAIL)\n\t\t\t) {\n\t\t\treturn true;\n\t\t\t}\n\t\treturn false;\n\t}", "function isEmail(string $string)\n{\n if (filter_var($string, FILTER_VALIDATE_EMAIL)) {\n return true;\n }\n}", "private function isEmail($email)\r\n\t{\r\n\t\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\r\n\t}", "public function is_email( $string ){\n\t\treturn filter_var($string, FILTER_VALIDATE_EMAIL); \n\t}", "public function is_email($value)\n\t{\n\t\t if($this->is_empty($value)\n\t\t \t\t|| preg_match('/^[a-zA-Z0-9.-_]+@[a-zA-Z0-9.-_]+\\.[a-zA-Z0-9.-_]+$/', \n\t\t \t\ttrim($value)))\n\t\t {\n\t\t \treturn true;\n\t\t }\n\t\t return false;\n\t}", "static function isEmail($val){\n\t\t$val = filter_var($val, FILTER_SANITIZE_EMAIL);\n\t\t$bool = false;\n\t\tif(self::isEmpty($val)){\n\t\t\t$bool = false;\n\t\t}else if(filter_var($val, FILTER_VALIDATE_EMAIL)){\n\t\t\t$bool = true;\n\t\t}\n\n\t\treturn $bool;\n\t}", "public function email($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL) ? true : false;\n }", "private function validateEmail($email)\n\t{\n\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) return true;\n\t\treturn false;\n\t}", "function check_email_address($email) {\n// First, we check that there's one @ symbol, \n// and that the lengths are right.\n\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t// Email invalid because wrong number of characters \n\t// in one section or wrong number of @ symbols.\n\treturn false;\n\t}\n// Split it into sections to make life easier\n\t$email_array = explode(\"@\", $email);\n\t$local_array = explode(\".\", $email_array[0]);\n\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\tif\n\t(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t$local_array[$i])) {\n\t return false;\n\t}\n\t}\n// Check if domain is IP. If not, \n// it should be valid domain name\n\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t$domain_array = explode(\".\", $email_array[1]);\n\t\tif (sizeof($domain_array) < 2) {\n\t\t return false; // Not enough parts to domain\n\t\t}\n\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\",\n\t\t$domain_array[$i])) {\n\t\t return false;\n\t\t }\n\t\t}\n\t}\nreturn true;\n}", "function checkAddress($email) {\n\tif(!filter_var($email, FILTER_VALIDATE_EMAIL)) return false;\n\tif(function_exists('checkdnsrr')) {\n\t\t$host = substr($email, strpos($email, '@') + 1);\n\t\treturn checkdnsrr($host, 'MX');\n\t}\n\treturn true;\n}", "public function isEmailEntry()\n {\n if (filter_var($this->input, FILTER_VALIDATE_EMAIL)) {\n return true;\n } else {\n return false;\n }\n }", "public function validateEMail($email) {\n\t\tif(preg_match(\"/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/i\", $email)) {\n\t\t\treturn true; }\n\t\telse {\n\t\t\treturn false; }\n\t}", "public static function isValidEmail($email){\n\t\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n\t}", "function is_email_valid($email)\n{\n if (empty($email) || strlen($email) > 100) {\n return false;\n }\n // regex to match RFC 2822 email\n preg_match(email_regex_rfc2822, $email, $matches);\n return !empty($matches);\n}", "function isEmailAddress($email)\n\t{\n\t\t// Split the email into a local and domain\n\t\t$atIndex\t= strrpos($email, \"@\");\n\t\t$domain\t\t= substr($email, $atIndex+1);\n\t\t$local\t\t= substr($email, 0, $atIndex);\n\n\t\t// Check Length of domain\n\t\t$domainLen\t= strlen($domain);\n\t\tif ($domainLen < 1 || $domainLen > 255) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the local address\n\t\t// The last character in local cannot be a period ('.')\n\t\t$allowed\t= 'A-Za-z0-9!#&*+=?_-';\n\t\t$regex\t\t= \"/^[$allowed][\\.$allowed]{0,63}$/\";\n\t\tif (!preg_match($regex, $local) || substr($local, -1) == '.') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// No problem if the domain looks like an IP address\n\t\t$regex\t\t= '/^[0-9\\.]+$/';\n\t\tif (preg_match($regex, $domain)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check Lengths\n\t\t$localLen\t= strlen($local);\n\t\tif ($localLen < 1 || $localLen > 64) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the domain\n\t\t$domain_array\t= explode(\".\", rtrim($domain, '.'));\n\t\t$regex\t\t= '/^[A-Za-z0-9-]{0,63}$/';\n\t\tforeach ($domain_array as $domain) {\n\n\t\t\t// Must be something\n\t\t\tif (!$domain) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check for invalid characters\n\t\t\tif (!preg_match($regex, $domain)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check for a dash at the beginning of the domain\n\t\t\tif (strpos($domain, '-') === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check for a dash at the end of the domain\n\t\t\t$length = strlen($domain) -1;\n\t\t\tif (strpos($domain, '-', $length) === $length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "function validate_email($email) {\r\n\r\n\t\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\r\n\t\t\r\n\t}", "private function validateEmail() {\n\t\tif( !filter_var( $this->email, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->error = 'Email address did not validate';\n\t\t\treturn false;\n\t\t} // end if\n\t\treturn true;\n\t}", "function isEmailValid($email)\n{\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n }\n return false;\n}", "function is_valid_email( $_string ) {\n\treturn (preg_match( \"/^[-^!#$%&'*+\\/=?`{|}~.\\w]+@[a-z0-9]+([.-][a-z0-9]+)*$/i\", $_string ) > 0 );\n}", "public static function email($input)\n\t{\n\t\treturn (bool) filter_var($input, FILTER_VALIDATE_EMAIL);\n\t}", "function validateEmail( $em )\n\t{\n\t\t$pattern = '/^[a-z\\d]+(?:[\\-\\.\\_][a-z\\d]+)*[a-z\\d]+@[\\w\\d]+(?:[-\\.][a-z\\d][a-z\\d\\-]*[a-z\\d])*[a-z\\d]+\\.([a-z]{2,4})(\\.([a-z]{2,4}))*$/i';\n\t\treturn preg_match($pattern,$em) ? true : false;\n\t}", "function isEmail($str)\n {\n return filter_var($str, FILTER_VALIDATE_EMAIL);\n }", "function isEmail($str)\n {\n return filter_var($str, FILTER_VALIDATE_EMAIL);\n }", "function isValidEmail($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "function isValidEmail($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "public static function isEmail($string)\n {\n return filter_var($string, FILTER_VALIDATE_EMAIL) !== false;\n }", "function valid_email($address)\n{\n//if (filter_var($address, FILTER_VALIDATE_EMAIL))\n\t$pattern = \"/^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{2,})$/i\";\n\tif (preg_match($pattern, $address)) {\n//if (ereg('^[a-zA-Z0-9 \\._\\-]+@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]+$', $address))\n\t\treturn true;\n\n\t}else {\n\t\treturn false;\n\t}\n}", "function validate_email($attr, $msg) {\n\t\tif(preg_match(\n\t\t\t\t'/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_`{|}~]+'. // the user name\n\t\t\t\t'@'. // the ubiquitous at-sign\n\t\t\t\t'([-0-9A-Z]+\\.)+' . // host, sub-, and domain names\n\t\t\t\t'([0-9A-Z]){2,4}$/i', // top-level domain (TLD)\n\t\t\t\ttrim($this->_attributes[$attr]))) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t$this->_errors[] = array($attr, $msg);\n\t\t\treturn false;\n\t\t}\n\t}", "function check_email_address($email) \n\t{\n // First, we check that there's one @ symbol, \n // and that the lengths are right.\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n // Email invalid because wrong number of characters \n // in one section or wrong number of @ symbols.\n return false;\n }\n // Split it into sections to make life easier\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n for ($i = 0; $i < sizeof($local_array); $i++) {\n if\n(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n?'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n$local_array[$i])) {\n return false;\n }\n }\n // Check if domain is IP. If not, \n // it should be valid domain name\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n $domain_array = explode(\".\", $email_array[1]);\n if (sizeof($domain_array) < 2) {\n return false; // Not enough parts to domain\n }\n for ($i = 0; $i < sizeof($domain_array); $i++) {\n if\n(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n?([A-Za-z0-9]+))$\",\n$domain_array[$i])) {\n return false;\n }\n }\n }\n return true;\n}", "function ValidateEmail($data)\n\t{\n\t\tif(strlen($data) < 5 || strpos($data, '@') == false || strpos($data, '.') == false || stripos($data, ' ') != false)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "function Is_email($user)\n{\n\tif(filter_var($user, FILTER_VALIDATE_EMAIL)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function isValidEmail($email) {\n //If this check fails, there's no need to continue\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n //extract host\n list($user, $host) = explode(\"@\", $email);\n //check, if host is accessible\n if (!checkdnsrr($host, \"MX\") && !checkdnsrr($host, \"A\")) {\n return false;\n }\n return true;\n}", "function check_email($email)\n{\n\treturn preg_match('/^\\S+@[\\w\\d.-]{2,}\\.[\\w]{2,6}$/iU', $email) ? TRUE : FALSE;\n}", "function validate_email ( $sValue )\n{\n return (boolean)preg_match('/^([\\w\\d\\x80-\\xff_.+-])+@(([\\w\\d\\x80-\\xff-])+.)+([\\w\\d\\x80-\\xff]{2,4})+$/D', $sValue);\n}" ]
[ "0.7811595", "0.7779888", "0.7735906", "0.74954027", "0.74883574", "0.74729717", "0.74729717", "0.7436475", "0.74206084", "0.73901105", "0.73869723", "0.7343846", "0.7332016", "0.730633", "0.72971827", "0.72865295", "0.72785807", "0.7276951", "0.7270523", "0.7268427", "0.7246743", "0.7241414", "0.7229154", "0.72179675", "0.72178364", "0.72145057", "0.72072524", "0.72056866", "0.72033286", "0.72012234", "0.71892595", "0.71890074", "0.71835786", "0.7181495", "0.7180854", "0.7179505", "0.717758", "0.7175035", "0.7172946", "0.7168054", "0.7161922", "0.71618134", "0.71558607", "0.7151519", "0.7150142", "0.71494454", "0.7144723", "0.7142747", "0.71362245", "0.71357626", "0.71339643", "0.71325314", "0.712655", "0.7125683", "0.71160483", "0.7106071", "0.7105148", "0.71048653", "0.7103046", "0.71025455", "0.7102324", "0.7098811", "0.709444", "0.70871466", "0.70809036", "0.70789486", "0.7076784", "0.7075844", "0.7070811", "0.7068964", "0.70664126", "0.7062158", "0.7061707", "0.706143", "0.7057489", "0.70469075", "0.7042967", "0.70402503", "0.70395905", "0.7032684", "0.7032386", "0.70322305", "0.702896", "0.70274925", "0.7027447", "0.7026885", "0.70252013", "0.70236945", "0.70236945", "0.7023387", "0.7023387", "0.70180064", "0.7017075", "0.70142615", "0.70125824", "0.7011218", "0.7008682", "0.69955105", "0.6986342", "0.6982535" ]
0.7831211
0
Checks whether the given element is alphanumeric only.
Проверяет, является ли данный элемент только алфаванumericом.
function _element_alnum_validate($element, &$form_state) { if (!ctype_alnum($element['#value'])) { form_error($element, t('The @name option must contain letters and numbers only.', array('@name' => $element['#title']))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAlphanumeric()\n {\n return $this->matchesPattern('^[[:alnum:]]*$');\n }", "public function is_alphanumeric($value)\n\t{\n\t\tif($this->is_empty($value)\n\t\t\t|| preg_match('/^[a-zA-Z0-9\\._\\/\\\\&*!#$()@`?;:\"\\'\\t\\s\\rn\\n\\a><{}[]+$/', trim($value))) \n\t\t{\n\t\t \treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function is_alphanumeric($string)\n{\n return preg_match('/[0-9a-zA-Z]/', $string);\n}", "public function is_alphanumeric ( $value )\r\n\t{\r\n\t\t$value = str_replace ( ' ', '', trim ( $value ) );\r\n\t\treturn ctype_alnum ( $value );\r\n\t}", "protected function verify_argument_of_type_alnum($arg) {\n if (is_string($arg) &&\n preg_match('/^[a-zA-Z0-9_]+$/', $arg)) {\n return TRUE;\n }\n return FALSE;\n }", "function ctype_alnum($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return ((int)preg_match('/^[[:alnum:]]+$/', chr($text)) > 0);\n } elseif (is_int($text) || is_string($text)) {\n return ((int)preg_match('/^[[:alnum:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "function kw_isalphanum($strIn) {\n\t$output = false;\n\tif(!preg_match('/[^a-zA-Z0-9_\\-]/i',$strIn)) {\n\t\t$output = true;\n\t}\t\n\treturn $output;\n}", "function validate_alphanum ( $sValue )\n{\n return !preg_match('/[^\\d\\w\\x80-\\xff]/', $sValue);\n}", "function alphanumeric($text) { return preg_replace('/[^\\da-z ]/i', '', $text); }", "function check_alphanumeric($string, $allowcaps = true){\n\t $allowed = 'abcdefghijklmnopqrstuvwxyz0123456789';\n\t if($allowcaps) $allowed .= \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t if(strspn($string, $allowed) < strlen($string)) return false;\n\t else return true;\n\t}", "function is_alphanumstr($value,$min=1,$max=1){\n\treturn form_regex_test('A-Za-z0-9',' ',$value,$min,$max);\n}", "public function alphaNumeric()\n {\n return !!preg_match('/^[a-zA-Z0-9]+$/', (string) $this->value);\n }", "public static function is_alphanumeric($string) {\n\t\t$regEx = '/^[a-zA-Z0-9àáâãäåèéêëìíîïòóôõöùúûüçýÿñæœþßÀÁÂÃÄÅÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÇÝŸÑÆŒÞ]*$/';\n\t\treturn preg_match($regEx, $string);\n\t}", "final public static function isAlphanumeric($value):bool\n {\n return self::regex('alphanumeric',$value);\n }", "private function alphanumericCheck($value){\n\t\t$isValid = true;\n\t\tif(preg_match('/^[0-9a-zA-Z]+$/m', $value) != 1 ){\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "private function isalnum ($c){ return ((($this->ctype__[( ord($c) )]&(01 | 02 | 04 )) != 0)?1:0);}", "function alphanum_check($str)\r\n {\r\n\tif($str!='')\r\n\t{\r\n \r\n\tif (!preg_match(\"/^[a-zA-Z0-9]{1,}[a-zA-Z0-9\\s.-_]+$/i\", $str))\r\n {\r\n $this->form_validation->set_message('alphanum_check', 'The %s field must contain only alphabets, numbers and characters like .-_');\r\n return FALSE;\r\n }\r\n\r\n else\r\n {\r\n return TRUE;\r\n }\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\t return TRUE;\r\n\t}\r\n }", "function isAlnum($value)\n\t{\n\t\treturn ctype_alnum($value);\n\t}", "private function checkCharAlphaNum($data, $field, $id)\n\t{\n\t\tglobal $herr;\n\n\t\t$regex = '/^[A-Za-z0-9\\ _-]+$/';\n\t\t$result = preg_match($regex, $data);\n\t\tif ($result != 1)\n\t\t{\n\t\t\t$herr->errorPutMessage($this->etype,\n\t\t\t\t'Invalid characters detected.<br>Only letters, numbers,' .\n\t\t\t\t' _- SP are allowed.', $this->estate, $field, $id);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function valid_alphabetic($srting)\n{\n if ( ereg('[^a-zA-Z0-9_-]{1,}', $srting) )\n return false;\n else\n return true;\n}", "function validUsername($username)\n {\n return ctype_alnum(str_replace(['_', '-'], '', $username));\n }", "public static function checkValidAlphanumeric($string,$activeTraceHack=true) {\r\n if (preg_match('/[^0-9a-zA-Z]/', $string) == true) {\r\n if($activeTraceHack) traceHack(\"invalid alpanumeric string value - $string\");\r\n $string=null;\r\n }\r\n return $string;\r\n }", "public function fieldAlphaNumeric();", "public function validateAlphanum($value) {\n\t\treturn preg_match('/^([a-z0-9])+$/i', $value);\n\t}", "public static function isAlphanumeric(string $character): bool\n {\n return self::isAlphabetic($character) || self::isDigit($character);\n }", "function checkAlphaNum($text){\n\t\t return preg_match (\"/^[A-z0-9\\._-]/\", $text);\n\t}", "protected function _validateAlphanumeric($input, $value)\n {\n return preg_match('#^([a-z0-9])+$#i', $value);\n }", "function only_alphanumeric($string)\n{\n return preg_replace('/[^a-zA-Z0-9]/', '', $string);\n}", "function letterStrict($input){\n $input = str_replace(' ','', $input);\n if(trim($input) === \"\" || ctype_alpha($input) === false || $input !== htmlspecialchars($input)){\n return false;\n }\n return true;\n}", "function is_digits($element){\n return !preg_match (\"/[^0-9]/\", $element);\n }", "public function isAlphaNumeric($field){\n\t\treturn $this->checkByRegex($field, '/[a-zA-Z0-9]/');\n\t}", "function field_has_only_letters_spaces($data)\n{\n\t/*\n\t\tThe regular expression matches 0 or more expressions containing a letter(upper-case and lower-case) and space.\n\t\t\n\t*/\n\tif(preg_match(\"/^[a-zA-Z ]*$/\", $data))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function matchesRangeOfAlphanumericCharacters(string $string) : bool\n{\n // matches a single character in the list [a-zA-Z0-9_]\n return preg_match('/[a-zA-Z0-9_]/', $string) === 1;\n}", "public function alpha_numeric_spaces($str)\n\t{\n\t\tif (preg_match('/^[0-9a-zA-Z{}=+!@#%*()_]+$/i', $str))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('clave', 'El campo {field} puede contener números, caracteres alfabéticos, y/o estos caracteres {}=+!@#%*()_');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function onlyAlphaNum($myString)\n{\n if(preg_match(\"/[^a-zA-Z0-9]/\",$myString))\n {return false;}else{return true;} //opposite logic from email?\n}", "function is_Char_Only($Invoer)\n{\n return (bool)(preg_match(\"/^[a-zA-Z ]*$/\", $Invoer)) ;\n}", "function alpha_only_space($str)\r\n {\r\n if (!preg_match(\"/^([-a-z ])+$/i\", $str))\r\n {\r\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\r\n return FALSE;\r\n }\r\n else\r\n {\r\n return TRUE;\r\n }\r\n }", "public function testAlphaNumeric()\n {\n $alnum = new AlphaNumeric;\n $valid = $alnum->validate('s0m3th1ng')->isValid()\n && $alnum->validate('000000000')->isValid()\n && $alnum->validate('something')->isValid()\n && !$alnum->validate('s o m e t h i n g')->isValid()\n && !$alnum->validate('s-o-m-e-t_h_i_n_g')->isValid();\n \n $this->assert($valid, 'Alpha-numeric validator not working.');\n }", "static function is_digits($element) {\n\t\treturn !preg_match (\"/[^0-9]/\", $element);\n\t}", "function alphanum_check($str)\r\n {\r\n\tif($str!='')\r\n\t{\r\n \r\n\tif (!preg_match(\"/^[a-zA-Z0-9]{1,}[a-zA-Z0-9\\,.()-\\/]+$/i\", $str))\r\n {\r\n $this->form_validation->set_message('alphanum_check', 'The %s field must contain only alphabets, numbers and characters like ,.()-\\/');\r\n return FALSE;\r\n }\r\n\r\n else\r\n {\r\n return TRUE;\r\n }\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\t return TRUE;\r\n\t}\r\n }", "function alpha_only_space($str)\r\n\t{\r\n\t\tif (!preg_match(\"/^([-a-z ])+$/i\", $str))\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}", "function alphanumeric_only($input){\n\n $string = preg_replace(\"/[^\\w]/i\", \"\", $input);\n return $string;\n}", "static function isValid_letters_whiteSpace_only($data){\r\n return (bool)preg_match(\"/^[a-zA-Z ]*$/\", $data);\r\n }", "function alpha_only_space($str)\n\t{\n\t\tif (!preg_match(\"/^([-a-z ])+$/i\", $str))\n\t\t{\n\t\t\t$this->form_validation->set_message('alpha_only_space', 'The %s field\n\t\t\t\tmust contain only alphabets or spaces');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "function validate_alpha ( $sValue )\n{\n return !preg_match('/[^\\w\\x80-\\xff]/', $sValue);\n}", "protected function _alnum(Result $result): bool\n {\n return (bool) preg_match('/^[[:alnum:]]+$/', $result->getValue());\n }", "function checkAlpha($text){\n\t\tif(trim($text)!='')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t\t//was:\n\t\t //return preg_match (\"/[A-z-]/\", $text);\n\t}", "public function alpha($str){\n\t\t\treturn !!preg_match('/^[a-z0-9]+$/i', $str);\n\t\t}", "public static function alphanumeric($str)\n {\n // Strips non-alphanumeric characters\n return $str = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $str);\n }", "function isJustLetters($str)\n{\n if (!preg_match(\"/^[a-zA-Z]+$/\", $str)) {\n return false;\n }\n return true;\n}", "function is_alpha_numeric($str){\n\tif ( empty($str) ||$str==\"\" ) {\n\t\t$this->ERROR = \"In Valid values Submited\";\n\t\treturn false;\n\t}\n\tif ( !preg_match(\"/^[A-Za-z0-9_ ]+$/\", $str ) ) {\n\t\t$this->ERROR = \"Please provide valid \";\n\t\treturn false;\n\t}\n\treturn true;\n}", "public function validateAlnum($field,$data,$message=null) {\n if (!ctype_alnum($data[$field])) {\n\t\t\t$this->addFieldError($field, $message);\n\t\t\treturn false;\n }\n\t\treturn true;\n }", "public function alphaNumeric($attribute){\n\t\t$pattern = '/^.*(?=.*[a-zA-Z])[a-zA-Z0-9]+$/';\n\t\tif ($this->$attribute) {\n\t\t\tif(!preg_match($pattern, $this->$attribute))\n\t\t\t\t$this->addError($attribute, Yii::t('', 'Kombinasi password yang diperbolehkan berupa karakter huruf dan angka'));\n\t\t}\n\t}", "public function alphaNumeric($attribute){\n\t\t$pattern = '/^.*(?=.*[a-zA-Z])[a-zA-Z0-9]+$/';\n\t\tif ($this->$attribute) {\n\t\t\tif(!preg_match($pattern, $this->$attribute))\n\t\t\t\t$this->addError($attribute, Yii::t('', 'Kombinasi password yang diperbolehkan berupa karakter huruf dan angka'));\n\t\t}\n\t}", "public function alphaNumeric($attribute){\n\t\t$pattern = '/^.*(?=.*[a-zA-Z])[a-zA-Z0-9]+$/';\n\t\tif ($this->$attribute) {\n\t\t\tif(!preg_match($pattern, $this->$attribute))\n\t\t\t\t$this->addError($attribute, Yii::t('', 'Kombinasi password yang diperbolehkan berupa karakter huruf dan angka'));\n\t\t}\n\t}", "final public static function isAlphanumericPlusSpace($value):bool\n {\n return self::regex('alphanumericPlusSpace',$value);\n }", "function containsNonAlphanumeric($variable)\n\t{\n\t\t\treturn preg_match('/[^a-zA-Z0-9]+/', $variable, $matches);\n\t}", "function validate_field_only_letters(string $field_value, array &$field): bool\n{\n if (!ctype_alpha($field_value)) {\n $field['error'] = 'Please only use letters, no symbols or numbers allowed';\n\n return false;\n }\n return true;\n}", "function alpha_only_space($str)\n {\n if (!preg_match(\"/^([-a-z ])+$/i\", $str)){\n $this->form_validation->set_message('alpha_only_space', 'Kolom %s harus mengandung huruh dan spasi saja');\n return FALSE;\n }else{\n return TRUE;\n }\n }", "public function isAlpha()\n {\n return $this->matchesPattern('^[[:alpha:]]*$');\n }", "function alpha_only_space($str)\n{\n if (!preg_match(\"/^([-a-z ])+$/i\", $str))\n {\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n}", "function ctype_alpha($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return ((int)preg_match('/^[[:alpha:]]+$/', chr($text)) > 0);\n } elseif (is_int($text) || is_string($text)) {\n return ((int)preg_match('/^[[:alpha:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "public function isAlphanumeric($value, $error)\n {\n $whiteSpace = '\\s';\n $pattern = '/[^a-zA-Z0-9' . $whiteSpace . ']/u';\n if (preg_replace($pattern, '', (string)$value) !== $value) {\n $this->setError($error);\n return false;\n }\n return true;\n }", "function hasOnlyLetters($str) {\n return preg_match('/^[a-zA-Z_]+$/i',$str);\n}", "public function testValidateAlphaNumeric(): void\n {\n $this->assertFalse($this->validate('some text', [1, 10]));\n }", "function fieldsHaveOnlyLetters($name)\n{\n //define an error variable\n global $nameErr;\n $regex = \"/^([a-zA-Z' ]+)$/\";//define a pattern with letters only\n if (!preg_match($regex, trim($name))) {//checking if the fields have only letters or not\n $nameErr = \"Please enter only letters\";\n return false;\n\n } else {\n return true;\n }\n}", "function is_alphastr($value,$min=1,$max=1){\n\treturn form_regex_test('A-Za-z',' ',$value,$min,$max);\n}", "function validateUsername()\n {\n if(!containsNonAlphanumeric(htmlspecialchars($_POST['f_newUsernameInput'])))#username contains purely alphanumeric characters\n {\n return true;\n }\n else #username contains invalid characters\n {\n return false;\n } \n }", "function mycheck_alphadash($str)\n{\n if (preg_match('/^[a-z0-9_-]+$/i', $str)) {\n return true;\n } else {\n return false;\n }\n}", "public function alphaNumericLine()\n {\n return !!preg_match('/^[a-zA-Z0-9-_]+$/', (string) $this->value);\n }", "private function alpha(string $str)\n {\n if (preg_match(\"/([^a-zA-Z0-9\\s]+)/\", $str))\n {\n return false;\n }\n else\n {\n if (preg_match('/([a-zA-Z\\s])/', $str) == true || preg_match('/([0-9])/', $str) == true)\n {\n return true;\n }\n }\n\n return false;\n }", "public function isAlphaNumeric() {\n return PortableStringProcesser::isAlphaNumeric($this->_s, $this->_encoding);\n }", "function verifyAlpha($testString) {\n // Check for letters, numbers and dash, period, space and single quote only.\n // added & ; and # as a single quote sanitized with html entities will have \n // this in it bob's will be come bob&#039;s\n return (preg_match (\"/^([[:alnum:]]|-|\\.| |\\'|&|;|#)+$/\", $testString));\n}", "function validName($name)\r\n {\r\n $name = str_replace(\" \", \"\", $name);\r\n\r\n return !empty($name) && ctype_alpha($name);\r\n }", "public function alphaNumericOnly($check)\r\n\t{\r\n\t\t// have to extract the value to make the function generic\r\n\t\t$value = array_values($check);\r\n\t\t$value = $value[0];\r\n\t\t//echo \"ss\";exit;\r\n\t\treturn preg_match('|^[a-zA-Z0-9 ]*$|', $value);\r\n\t}", "function is_alpha($var)\n{\n return CValidate::alpha($var);\n}", "function Es_string($string){\n\tif (preg_match('/[^a-zA-Z]/',$string)){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "public function alphaNumericHyphen()\n {\n return !!preg_match('/^[a-zA-Z0-9-]+$/', (string) $this->value);\n }", "protected function validateAlphaNum($attribute, $value)\n {\n if (! \\is_string($value) && ! is_numeric($value)) {\n return false;\n }\n\n return preg_match('/^[\\pL\\pM\\pN]+$/u', $value) > 0;\n }", "protected function validateAlpha($attribute, $value)\n {\n return \\is_string($value) && preg_match('/^[\\pL\\pM]+$/u', $value);\n }", "function _s_has_letters( $string ) {\n\treturn preg_match( '/[a-zA-Z]/', $string );\n}", "public function alpha($str)\n\t{\n\t\treturn ( ! preg_match(\"/^([-a-z\\s])+$/i\", $str)) ? FALSE : TRUE;\n\t}", "public function alphaNumericUnderScore()\n {\n return !!preg_match('/^[a-zA-Z0-9_]+$/', (string) $this->value);\n }", "function validateUsername($_uname){\r\n //Check the username is within the size range and only consists of alphanumeric characters\r\n if(!preg_match('/^[[:alnum:]]{1,50}$/',$_uname)){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n }", "public static function isAlphaNumeric($string)\r\n {\r\n\t\tif (!preg_match('/[^0-9A-Za-z]/', $string)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n return true; \r\n }", "function cleanName($dangerous) {\n $c = str_split($dangerous); // convert to array of characters\n for ($k = 0; $k < count($c); $k++) {\n $numValue = ord($c[$k]);\n if ( !($numValue >= 65 && $numValue <= 90) && // if not an uppercase letter\n !($numValue >= 97 && $numValue <= 122) && // if not a lowercase letter\n !($numValue >= 48 && $numValue <= 57) && // if not a numerical digit\n $numValue != 32 ) { // if not a space\n echo \"Evil character \" . $c[$k]; // !!DEBUG\n return false;\n }\n }\n return true;\n}", "function valider_firstname($firstname)\n{\n if(!preg_match(\"/^[a-zA-ZøæåØÆÅ.\\- ]{2,20}$/\", $firstname))\n {\n echo '<script type=\"text/javascript\">alert(\"Firstname can only have letters\");</script>';\n echo \"Firstname is wrong, use only letters. <br/>\";\n return false;\n }\n return $firstname;\n}", "function name_valid ($input){\n\t$isvalid = true;\n\t$input_as_array = str_split ($input);\n\tforeach ($input_as_array as $chara){\n\t\tif (!( (ord ($chara) >= ord('a') && ord ($chara) <= ord ('z'))\n\t\t\t|| (ord ($chara) >= ord('A') && ord ($chara) <= ord ('Z'))\n\t\t\t|| ord($chara) == ord(' ') )){\n\t\t\t$isvalid = false;\n\t\t}\n\t}\n\treturn $isvalid;\n}", "function is_alpha_numeric($var)\n{\n return CValidate::alpha_numeric($var);\n}", "public function testAlnum($key)\n {\n if (!$this->keyExists($key)) \n {\n return false;\n }\n if (ctype_alnum($this->_source[$key])) \n {\n return $this->_source[$key];\n }\n\n return false;\n }", "function check_contains_legal_char($stringa) {\n\tif (strspn(\t$stringa,\n\t\t\t\t\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.\"\n\t\t\t\t)!= strlen($stringa)) {\n\t return false;\n\t}\n\treturn true;\n}", "public static function alpha_numeric( $str )\r\n\t\t{\r\n\r\n\t\t\treturn (bool)preg_match( '/^[a-zA-Z\\d\\s\\t\\n\\r.-]+$/', $str );\r\n\r\n\t\t}", "function alphaCheck($string, $error, $name) {\n if (preg_match('~^[a-zA-Z]*$~', $string) === 0) {\n // Add error:\n $_SESSION[\"${error}\"][] = \"${name} must be letters only.\";\n return FALSE;\n } else {\n return TRUE;\n }\n}", "function alpha_dash_space($str_in){\n\t\tif (! preg_match(\"/^([-a-z_ ])+$/i\", $str_in)) {\n\t\t\t$this->form_validation->set_message('alpha_dash_space', '%s harap masukan huruf');\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "function alpha_dash_space($str_in){\n\t\tif (! preg_match(\"/^([-a-z_ ])+$/i\", $str_in)) {\n\t\t\t$this->form_validation->set_message('alpha_dash_space', '%s harap masukan huruf');\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function is_alphabet($value)\n\t{\n\t\tif($this->is_empty($value) || preg_match('/^[a-zA-Z]+$/', trim($value))) \n\t\t{\n\t\t \treturn true;\n\t\t}\n\t\t return false;\n\t}", "public function alpha_dash($str)\n\t{\n\t\tif (preg_match('/^[0-9-a-zA-Z]+$/i', $str))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('ci', 'El campo {field} puede contener números al empezar, y/0 guión y \n\t\t\tcaracteres alfabéticos.');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public static function hasLettersAndNumbersOnly($value) {\r\n if (preg_match(\"/^[A-Za-z0-9]+$/\", $value)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "function checkName ( $n )\n\t{\n\t\tif ( !preg_match ( '`^[[:alnum:]]{1,32}$`' , $n ) )\n\t\t{\n\t\t\treturn false ;\n\t\t} else {\n\t\t\treturn true ;\n\t\t}\n\t}", "function is_ascii($string)\n{\n\treturn!preg_match('/[^\\x00-\\x7F]/S',$string);\n}" ]
[ "0.7693149", "0.7456527", "0.73894894", "0.7356308", "0.72770643", "0.7276353", "0.72215104", "0.7129714", "0.7064156", "0.70183986", "0.69903743", "0.6974339", "0.6946827", "0.6933136", "0.69041973", "0.6862991", "0.6807178", "0.68060917", "0.6800555", "0.6799918", "0.67828786", "0.67704654", "0.676208", "0.6760351", "0.6735662", "0.6735194", "0.67175627", "0.67150134", "0.67065984", "0.6700255", "0.66881347", "0.6682958", "0.66779155", "0.66694933", "0.66572005", "0.66529703", "0.6646321", "0.6637702", "0.6620387", "0.6613432", "0.66121113", "0.66056484", "0.65798914", "0.65695703", "0.65622056", "0.6551493", "0.65285987", "0.6499193", "0.6479852", "0.64756614", "0.6470682", "0.64535636", "0.6445107", "0.6445107", "0.6445107", "0.64250034", "0.64106023", "0.64062047", "0.6398242", "0.6371075", "0.6323299", "0.6322726", "0.63216734", "0.6304155", "0.6296149", "0.6286226", "0.6272481", "0.6269891", "0.62654406", "0.6264231", "0.62585413", "0.6248884", "0.6248117", "0.62176424", "0.6217248", "0.6216384", "0.6207164", "0.6201694", "0.6194546", "0.61847806", "0.618463", "0.615885", "0.61391574", "0.6129294", "0.6123836", "0.6122966", "0.6119411", "0.61157215", "0.6115454", "0.61131155", "0.6096322", "0.6089331", "0.6077916", "0.6069844", "0.6069844", "0.6059574", "0.6057005", "0.60548556", "0.60499036", "0.60422075" ]
0.8121598
0
! Helpers Get the name of the "published at" column.
! Помощники Получите имя столбца "опубликовано".
public function getPublishedAtColumn() { return defined('static::PUBLISHED_AT') ? static::PUBLISHED_AT : 'published_at'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublishedAtColumn()\n {\n return defined('static::PUBLISHED_AT') ? static::PUBLISHED_AT : 'published_at';\n }", "public function getQualifiedPublishedAtColumn()\n\t{\n\t\treturn $this->getTable().'.'.$this->getPublishedAtColumn();\n\t}", "public function getQualifiedPublishedAtColumn()\n {\n return $this->qualifyColumn($this->getPublishedAtColumn());\n }", "public function getPublishedColumn()\n {\n return defined('static::PUBLISHED_COLUMN') ? static::PUBLISHED_COLUMN : 'published';\n }", "public function getQualifiedPublishedColumn()\n {\n return $this->getTable().'.'.$this->getPublishedColumn();\n }", "public function getArchivedAtColumn()\n {\n return defined('static::ARCHIVED_AT') ? static::ARCHIVED_AT : 'archived_at';\n }", "public function getQualifiedArchivedAtColumn()\n {\n return $this->qualifyColumn($this->getArchivedAtColumn());\n }", "public function getPublishedAt()\n {\n return $this->published_at;\n }", "public function getPublishedAt()\n {\n return $this->publishedAt;\n }", "public function getPublishedAttribute()\n {\n $published_date = Carbon::parse($this->published_at)->diffForHumans();\n return $published_date;\n }", "public function getPublished()\n {\n//\t\ti18n::get_date_format();\n//\t\t$locale = i18n::get_locale();\n//\t\t$date = new Zend_Date();\n//\t\t$date->set($this->PublishFrom, null, $locale);\n//\t\treturn substr($date->getDate($locale), 0, -9);\n }", "public function columnTitle() {\n\t\t?>\n\t\t<th scope=\"col\" class=\"manage-column column-slug\">Slug</th>\n\t\t<th scope=\"col\" class=\"manage-column column-type\">Type</th>\n\t\t<th scope=\"col\" class=\"manage-column column-notes\">Notes</th>\n\t\t<th scope=\"col\" class=\"manage-column column-date-created\">Date Created</th>\n\t\t<th scope=\"col\" class=\"manage-column column-date-modified\">Date Modified</th>\n\t\t<?php\n\t}", "public function getMergedAtColumn()\n {\n return defined('static::MERGED_AT') ? static::MERGED_AT : 'merged_at';\n }", "public function getPublishedAt(): Carbon\n {\n return $this->{self::ATTR_PUBLISHED_AT};\n }", "public function getPublishedDate()\n {\n $date = explode('-', explode(' ', $this->created_at)[0]);\n\n return $this->formatDate($date[0], $date[1], $date[2]);\n }", "function wprss_show_feed_item_custom_columns( $column, $post_id ) {\n\n switch ( $column ) {\n case \"permalink\":\n $url = get_post_meta( $post_id, 'wprss_item_permalink', true);\n echo '<a href=\"' . $url . '\">' . $url. '</a>';\n break;\n\n case \"publishdate\":\n $item_date = get_the_time( 'U', get_the_ID() );\n $item_date = ( $item_date === '' )? date('U') : $item_date;\n $publishdate = date( 'Y-m-d H:i:s', $item_date ) ;\n echo $publishdate;\n break;\n\n case \"source\":\n $query = new WP_Query();\n $source = '<a href=\"' . get_edit_post_link( get_post_meta( $post_id, 'wprss_feed_id', true ) ) . '\">' . get_the_title( get_post_meta( $post_id, 'wprss_feed_id', true ) ) . '</a>';\n echo $source;\n break;\n }\n }", "function column_name( $item ) {\r\n\t\t$row_actions = self::_build_rollover_actions( $item, 'name' );\r\n\t\t$slug = esc_attr( $item->slug );\r\n\t\treturn sprintf( '%1$s<br>%2$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ) );\r\n\t}", "public function getPublishedAsTime() { return strtotime($this->attributes['published']); }", "public function getPublishedTime()\n {\n return $this->get('date');\n }", "public function getDeletedAtColumn()\n {\n return defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at';\n }", "public function updatedAt(): string\n {\n return $this->updatedColumn;\n }", "public function getModificationDateColumnName() {}", "public function getDatePublished()\n {\n return $this->datePublished;\n }", "public function timeSincePublished()\n {\n return $this->created_at->diffForHumans();\n }", "public function createdAt(): string\n {\n return $this->createdColumn;\n }", "public function timeSincePublished()\n\t{\n\t\treturn $this->entity->created_at->diffForHumans();\n\t}", "protected function getCreatedAtColumn()\n {\n $model = $this->model;\n return ($model::CREATED_AT) ? $model::CREATED_AT : 'created_at';\n }", "public function get_created_at_column();", "public function generate_open_graph_article_published_time() {\n\t\treturn '';\n\t}", "public function getPublishedTime( );", "public function getDatePublished() {\n return $this->datePublished;\n }", "public function getPublication()\n\t\t{\n\t\t\treturn strftime('%d-%m-%Y',strtotime($this->_publication));\n\t\t}", "function column_SubmittedDate($item){\n if ( ! $item['SubmittedDate'] ) return;\n return sprintf('%1$s <br><span style=\"color:silver\">%2$s</span>',\n /*$1%s*/ $item['SubmittedDate'],\n /*$2%s*/ sprintf( __( '%s ago', 'wp-lister-for-amazon' ), human_time_diff( strtotime( $item['SubmittedDate'].' UTC' ) ) )\n );\n }", "public function getDatePublished()\n {\n return $this->datePublished;\n }", "public function getQualifiedMergedAtColumn()\n {\n return $this->getTable().'.'.$this->getMergedAtColumn();\n }", "public function column_blogname($blog)\n {\n }", "public function getPublished() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"published\");\n\t}", "public function getPublishedDate()\n {\n return $this->publishedDate;\n }", "function hm_events_register_admin_col( $columns ) { \n $columns[ 'event_date' ] = __( 'Event Date', 'hm-events' ); \n\n return $columns; \n}", "public function getCreationDateColumnName() {}", "function expub_custom_columns($column){\n\t\n\t$custom = get_post_custom();\n\n\tswitch ($column) {\n\t\tcase \"authors\":\n\t\t\techo $custom[\"expub_authors\"][0];\n\t\t\tbreak;\n\t\tcase \"category\":\n\t\t\techo $custom[\"expub_category\"][0];\n\t\t\tbreak;\n\t\tcase \"start\":\n\t\t\techo $custom['expub_startdate'][0];\n\t\t\tbreak;\n\t\tcase \"end\":\n\t\t\techo $custom['expub_enddate'][0];\n\t\t\tbreak;\n\t\tcase \"postids\":\n\t\t\techo $custom['expub_postids'][0];\n\t\t\tbreak;\n }\n}", "public function column_date($post)\n {\n }", "public function column_date($post)\n {\n }", "function custom_columns( $column ) {\n\tglobal $post;\n\n\tswitch ( $column ) {\n\t\tcase 'meta':\n\t\t\t$metaData = get_post_meta( $post->ID, 'twitter_url', true );\n\n\t\t\techo $metaData;\n\t\tbreak;\n\t}\n}", "function column_name( $designation ) {\n\n $actions = array();\n $delete_url = '';\n $actions['edit'] = sprintf( '<a href=\"%s\" data-id=\"%d\" title=\"%s\">%s</a>', $delete_url, $designation->id, __( 'Edit this item', 'wp-erp' ), __( 'Edit', 'wp-erp' ) );\n $actions['delete'] = sprintf( '<a href=\"%s\" class=\"submitdelete\" data-id=\"%d\" title=\"%s\">%s</a>', $delete_url, $designation->id, __( 'Delete this item', 'wp-erp' ), __( 'Delete', 'wp-erp' ) );\n\n return sprintf( '<a href=\"#\"><strong>%1$s</strong></a> %2$s', $designation->title, $this->row_actions( $actions ) );\n }", "public function getSuspendedAtColumn(): string\n\t{\n\t\treturn defined('static::SUSPENDED_AT') ? static::SUSPENDED_AT : CanBeSuspended::SUSPENDED_AT;\n\t}", "public function isPublished()\n {\n return ! is_null($this->{$this->getPublishedAtColumn()});\n }", "function wprss_feed_item_sortable_columns() {\n $sortable_columns = array(\n // meta column id => sortby value used in query\n 'publishdate' => 'publishdate',\n 'source' => 'source'\n );\n return apply_filters( 'wprss_feed_item_sortable_columns', $sortable_columns );\n }", "private function makePrettyArchivedOnText()\n {\n $dateText = $this->viewProperties['metadata'][DataTable::ARCHIVED_DATE_METADATA_NAME];\n $date = Date::factory($dateText);\n $today = mktime(0, 0, 0);\n if ($date->getTimestamp() > $today) {\n $elapsedSeconds = time() - $date->getTimestamp();\n $timeAgo = Piwik::getPrettyTimeFromSeconds($elapsedSeconds);\n\n return Piwik_Translate('CoreHome_ReportGeneratedXAgo', $timeAgo);\n }\n\n $prettyDate = $date->getLocalized(\"%longYear%, %longMonth% %day%\") . $date->toString('S');\n return Piwik_Translate('CoreHome_ReportGeneratedOn', $prettyDate);\n }", "public function getQualifiedDraftColumn()\n {\n return $this->getTable().'.is_draft';\n }", "public function getPublishedAtAttribute($date)\n {\n return Carbon::parse($date)->format('Y-m-d');\n }", "public function getPublishedAtAttribute($date)\n {\n return Carbon::parse($date)->format('Y-m-d');\n }", "function getDateAuthorUnderway() {\n\t\treturn $this->getData('dateAuthorUnderway');\n\t}", "function column_source( $item ) {\r\n\t\treturn esc_attr( $item->source );\r\n\t}", "public function getSlugSourceColumn()\n {\n return 'name';\n }", "public function getPublishedAtAttribute($value)\n {\n return \\Carbon\\Carbon::parse($value)->format('m/d/Y h:i A');\n }", "function column_name( $item ) {\r\n\t\tif ( MLATest::$wp_4dot3_plus ) {\r\n\t\t\t$content = \"<div class=\\\"upload_types-icon\\\">\\n\";\r\n\t\t\t$content .= self::column_icon( $item );\r\n\t\t\t$content .= \"\\n</div>\\n\";\r\n\t\t\t$content .= '<div class=\"upload_types-info\">' . esc_attr( $item->slug ) . \"</div>\\n\";\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t$row_actions = self::_build_rollover_actions( $item, 'name' );\r\n\t\t$slug = esc_attr( $item->slug );\r\n\t\treturn sprintf( '%1$s<br>%2$s%3$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ), /*%3$s*/ $this->_build_inline_data( $item ) );\r\n\t}", "function wpex_staff_archive_columns() {\n return get_theme_mod( 'staff_entry_columns', '3' );\n}", "public function published()\n {\n return $this->state(function (array $attributes) {\n return [\n 'published_at' => Carbon::parse('-1 week'),\n ];\n });\n }", "public function getPublishedTime( )\n {\n return $this->publishedTime;\n }", "public function getHowpublished()\n {\n return $this->howpublished;\n }", "public function column_default( $item, $column_name ) {\r\n \t$package_activation = $item['registered_at'];\r\n \t$package_expired = $item['expired_at'];\r\n switch( $column_name ) {\r\n case 'id':\r\n case 'username':\r\n case 'email':\r\n return $item[ $column_name ];\r\n \tbreak;\r\n case 'lastest_payment':\r\n return $item[$column_name] ? sprintf( '<a href=\"%s\">#%s<a/>', get_edit_post_link( $item[$column_name] ), $item[$column_name] ) : __( 'No Payment', 'opalmembership' );\r\n break;\r\n case 'registered_at':\r\n case 'expired_at':\r\n \treturn date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), strtotime( $item[$column_name] ) );\r\n \tbreak;\r\n case 'current_package':\r\n return sprintf( '<a href=\"%s\">%s<a/>', get_edit_post_link( $item['current_package'] ), get_the_title( $item['current_package'] ) );\r\n break;\r\n case 'status':\r\n \tif ( opalmembership_is_membership_valid( $item['id'] ) ) {\r\n \t\treturn '<span class=\"member-status activated\">'.__( 'Activated', 'opalmembership' ).'</span>';\r\n \t} else {\r\n \t\treturn '<span class=\"member-status expired\">'.__( 'Expired', 'opalmembership' ).'</span>';\r\n \t}\r\n \tbreak;\r\n default:\r\n return '';\r\n }\r\n }", "public function testColumn(): void\n {\n $column = PublishStatus::make();\n\n $this->assertEquals('published', $column->getKey());\n\n $this->assertEquals('', $column->renderCell($this->author));\n\n $this->author->published = true;\n $this->assertEquals('', $column->renderCell($this->author));\n }", "function column_default($item, $column_name){\n switch($column_name){\n case 'FeedSubmissionId':\n case 'FeedType':\n case 'FeedProcessingStatus':\n case 'SubmittedDate':\n case 'StartedProcessingDate':\n case 'CompletedProcessingDate':\n case 'status':\n return $item[$column_name];\n case 'total':\n return number_format( $item[$column_name], 2, ',', '.' );\n case 'date_created':\n case 'LastTimeModified':\n \t// use date format from wp\n //$date = mysql2date( get_option('date_format'), $item[$column_name] );\n //$time = mysql2date( 'H:i', $item[$column_name] );\n $date = get_date_from_gmt( $item[ $column_name ], get_option('date_format') );\n $time = get_date_from_gmt( $item[ $column_name ], 'H:i' );\n return sprintf('%1$s <br><span style=\"color:silver\">%2$s</span>', $date, $time );\n default:\n return print_r($item,true); //Show the whole array for troubleshooting purposes\n }\n }", "function column_name($item) {\n \t\n \t$paged \t\t= isset($_GET['paged']) ? $_GET['paged'] : false;\n \t$page_url\t= add_query_arg( array( 'page' => 'bdpp-templates', 'paged' => $paged ), admin_url('admin.php') );\n \t$view_link \t= add_query_arg( array('page' => 'bdpp-shrt-generator', 'shortcode' => $item['type'], 'tmpl_id' => $item['id'] ), admin_url('admin.php') );\n \t$del_link \t= add_query_arg( array('action' => 'delete', 'bdpp_tmpl[]' => $item['id'] ), $page_url );\n\n \t$actions['view'] \t= sprintf( '<a class=\"bdpp-shrt-tmpl-view\" href=\"%s\">'.__('View', 'blog-designer-pack').'</a>', $view_link );\n \t$actions['delete'] \t= sprintf( '<a class=\"bdpp-shrt-tmpl-delete bdpp-confirm\" href=\"%s\">'.__('Delete', 'blog-designer-pack').'</a>', $del_link );\n\n \t$actions = apply_filters( 'bdpp_shrt_tmpl_row_actions', $actions, $item ); // Filter to add row actions\n\n // Return title contents\t \n return sprintf('%1$s %2$s',\n /*$1%s*/ $item['name'],\n /*$2%s*/ $this->row_actions( $actions )\n );\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "private function sourceObjectDeletedAtColumnName()\n {\n if ($this->sourceModel && method_exists($this->sourceModel, 'getDeletedAtColumn')) {\n return $this->sourceModel->getDeletedAtColumn();\n }\n }", "public function getPublishedDate() {\n return $this->_dPublishedDate;\n }", "public function admin_column_title( $columns ) {\n \t$columns['visibility'] = __( 'Visibility', 'blox' );\n \treturn $columns;\n }", "function orderedByCreatedOn() {\n \treturn str_starts_with($this->getOrderBy(), 'created_on');\n }", "public function getConfirmedAtColumnName()\n {\n return $this->confirmedAtColumnName;\n }", "function wprss_feed_sortable_columns() {\n $sortable_columns = array(\n // meta column id => sortby value used in query\n 'title'\t\t\t=> 'title',\n\t\t\t'updates'\t\t=>\t'updates',\n\t\t\t'state'\t\t\t=>\t'state',\n\t\t\t'feed-count'\t=>\t'feed-count'\n );\n return apply_filters( 'wprss_feed_sortable_columns', $sortable_columns );\n }", "function columnAuthor(&$search, $conversation)\n{\n\treturn \"<a href='\" . makeLink(\"profile\", $conversation[\"startMemberId\"]) . \" '>{$conversation[\"startMember\"]}</a><br/><small>\" . relativeTime($conversation[\"startTime\"]) . \"</small>\";\n}", "public function column_title($post)\n {\n }", "public function column_title($post)\n {\n }", "public function getUpdatedAtColumn(): ?string\n {\n return $this->_meta[static::CONTEXT_FIELD_UPDATED_AT] ?? static::UPDATED_AT;\n }", "public function getColLabelName()\n {\n return 'title';\n }", "function gutenberg_render_template_list_table_column( $column_name, $post_id ) {\n\tif ( 'slug' !== $column_name ) {\n\t\treturn;\n\t}\n\t$post = get_post( $post_id );\n\techo esc_html( $post->post_name );\n}", "public function getPublishedOnAttribute($date)\n {\n return Carbon::createFromFormat('Y-n-j G:i:s', $date)->format('Y-m-d');\n }", "function cpt_histories_column_names( $columns ) {\r\n \r\n $columns['authora'] = 'Writer';\r\n \r\n return $columns ;\r\n}", "public function get_columns() {\n\t\treturn array(\n\t\t\t'name' => wp_strip_all_tags( __( 'Name' ) ),\n\t\t\t'added' => wp_strip_all_tags( __( 'Added' ) ),\n\t\t\t'last_used' => wp_strip_all_tags( __( 'Last Used' ) ),\n\t\t);\n\t}", "public function getPublished() {}", "public function getPublishedAtAttribute($value)\n {\n return $this->prepareGetDateAttribute($value);\n }", "function hm_events_render_admin_col( $column_name, $post_id ) { \n if ( 'event_date' != $column_name ) {\n return; \n }\n \n if( get_post_meta( $post_id, 'hm-events_date', true ) ) { \n $value = date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), get_post_meta( $post_id, 'hm-events_date', true ) ); \n echo $value;\n } else {\n _e( 'None', 'hm-events' );\n }\n\n}", "public function column_date($item)\n {\n return $item['date'];\n }", "public function get_updated_at_column();", "public function getSearchableColumnName () \t\t{ return entry::getSearchableColumnName(); }", "function gutenberg_filter_template_list_table_columns( array $columns ) {\n\t$columns['slug'] = __( 'Slug', 'gutenberg' );\n\tif ( isset( $columns['date'] ) ) {\n\t\tunset( $columns['date'] );\n\t}\n\treturn $columns;\n}", "function titleColumn(){\n\t\tif (!isset( $this->_atts['title'] ) ){\n\t\t\t$delegate =& $this->getDelegate();\n\t\t\tif ( $delegate !== null and method_exists($delegate, 'titleColumn') ){\n\t\t\t\t$this->_atts['title'] = $delegate->titleColumn();\n\t\t\t} else {\n\t\t\t\t$bestCandidate = null;\n\t\t\t\t$this->fields();\n\t\t\t\t$fieldnames = array_keys($this->_fields);\n\t\t\t\tforeach ($fieldnames as $fieldname){\n\t\t\t\t\t$field =& $this->_fields[$fieldname];\n\t\t\t\t\tif ( $bestCandidate === null and $this->isChar($fieldname) ){\n\t\t\t\t\t\t$bestCandidate = '`'.$fieldname.'`';\n\t\t\t\t\t}\n\t\t\t\t\t//if ( strpos(strtolower($fieldname),'title') !== false ){\n\t\t\t\t\t//\t$bestCandidate = $fieldname;\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t\tif ( $bestCandidate === null ){\n\t\t\t\t\t$keynames = array_keys($this->keys());\n\t\t\t\t\t$bestCandidate = \"CONCAT(\".implode(\",\", $keynames).\")\";\n\t\t\t\t}\n\t\t\t\t$this->_atts['title'] = $bestCandidate;\n\t\t\t}\n\t\t}\n\t\treturn $this->_atts['title'];\n\t\n\t}", "function iron_manage_album_custom_column ($column, $post_id)\n{\n\tswitch ($column)\n\t{\n\t\tcase 'alb_release_date':\n\t\t\tif ( get_field('alb_release_date', $post_id) )\n\t\t\t\tthe_field('alb_release_date', $post_id);\n\t\t\telse\n\t\t\t\techo __('N/A');\n\t\t\tbreak;\n\n\t\tcase 'alb_tracklist':\n\t\t\tif ( $list = get_field('alb_tracklist', $post_id) )\n\t\t\t\techo count($list);\n\t\t\telse\n\t\t\t\techo __('N/A');\n\t\t\tbreak;\n\n\t\tcase 'alb_store_list':\n\t\t\tif ( $list = get_field('alb_store_list', $post_id) )\n\t\t\t\techo count($list);\n\t\t\telse\n\t\t\t\techo __('N/A');\n\t\t\tbreak;\n\t}\n}", "function my_custom_taxonomy_columns( $columns ){\n\t$columns['status'] = __('Current Status');\n $columns['toggle_status'] = __('Toggle Status');\n\n\treturn $columns;\n}", "function iron_manage_event_custom_column ($column, $post_id)\n{\n\tswitch ($column)\n\t{\n\t\tcase 'event_date':\n\t\t\tglobal $mode;\n\n\t\t\t$post = get_post( $post_id );\n\t\t\tsetup_postdata( $post );\n\n\t\t\tif ( '0000-00-00 00:00:00' == $post->post_date ) {\n\t\t\t\t$t_time = $h_time = __('Unpublished');\n\t\t\t} else {\n\t\t\t\t$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );\n\t\t\t\t$h_time = date_i18n( get_option('date_format') . ' ' . get_option('time_format'), get_post_time('U', false, $post_id) );\n\t\t\t}\n\n\t\t\techo '<abbr title=\"' . $t_time . '\">' . apply_filters( 'post_date_column_time', $h_time, $post, 'event_date', $mode ) . '</abbr>';\n\t\tbreak;\n\n\t\tcase 'event_city':\n\t\t\tif ( get_field('event_city', $post_id) )\n\t\t\t\tthe_field('event_city', $post_id);\n\t\t\telse\n\t\t\t\techo __('N/A');\n\t\t\tbreak;\n\n\t\tcase 'event_venue':\n\t\t\tif ( get_field('event_venue', $post_id) )\n\t\t\t\tthe_field('event_venue', $post_id);\n\t\t\telse\n\t\t\t\techo __('N/A');\n\t\t\tbreak;\n\n\t}\n}", "function column_name( $item ) {\n\t\tglobal $edit_flow;\n\t\t$item_edit_link = esc_url( $edit_flow->editorial_metadata->get_link( array( 'action' => 'edit-term', 'term-id' => $item->term_id ) ) );\n\t\t$item_delete_link = esc_url( $edit_flow->editorial_metadata->get_link( array( 'action' => 'delete-term', 'term-id' => $item->term_id ) ) );\n\t\t\n\t\t$out = '<strong><a class=\"row-title\" href=\"' . $item_edit_link . '\">' . esc_html( $item->name ) . '</a></strong>';\n\t\t\n\t\t$actions = array();\n\t\t$actions['edit'] = \"<a href='$item_edit_link'>\" . __( 'Edit', 'edit-flow' ) . \"</a>\";\n\t\t$actions['inline hide-if-no-js'] = '<a href=\"#\" class=\"editinline\">' . __( 'Quick&nbsp;Edit' ) . '</a>';\n\t\tif ( $item->viewable )\n\t\t\t$actions['change-visibility make-hidden'] = '<a title=\"' . esc_attr( __( 'Hidden metadata can only be viewed on the edit post view.', 'edit-flow' ) ) . '\" href=\"' . esc_url( $edit_flow->editorial_metadata->get_link( array( 'action' => 'make-hidden', 'term-id' => $item->term_id ) ) ) . '\">' . __( 'Make Hidden', 'edit-flow' ) . '</a>';\n\t\telse\n\t\t\t$actions['change-visibility make-viewable'] = '<a title=\"' . esc_attr( __( 'When viewable, metadata can be seen on views other than the edit post view (e.g. calendar, manage posts, story budget, etc.)', 'edit-flow' ) ) . '\" href=\"' . esc_url( $edit_flow->editorial_metadata->get_link( array( 'action' => 'make-viewable', 'term-id' => $item->term_id ) ) ) . '\">' . __( 'Make Viewable', 'edit-flow' ) . '</a>';\n\t\t$actions['delete delete-status'] = \"<a href='$item_delete_link'>\" . __( 'Delete', 'edit-flow' ) . \"</a>\";\n\t\t\n\t\t$out .= $this->row_actions( $actions, false );\n\t\t$out .= '<div class=\"hidden\" id=\"inline_' . $item->term_id . '\">';\n\t\t$out .= '<div class=\"name\">' . $item->name . '</div>';\n\t\t$out .= '<div class=\"description\">' . $item->description . '</div>';\t\n\t\t$out .= '</div>';\n\t\t\n\t\treturn $out;\n\t}", "public function getQualifiedUpdatedByColumn()\n {\n return $this->getTable().'.'.$this->getUpdatedByColumn();\n }", "public function get_published()\n {\n return $this->get_default_property(self::PROPERTY_PUBLISHED);\n }", "public function getQualifiedSuspendedAtColumn(): string\n\t{\n\t\treturn $this->getTable() . '.' . $this->getSuspendedAtColumn();\n\t}", "function athen_staff_archive_columns() {\n return athen_get_mod( 'staff_entry_columns', '3' );\n}" ]
[ "0.89104635", "0.8629019", "0.8383704", "0.82326597", "0.78479326", "0.7382827", "0.68717605", "0.6790093", "0.6636546", "0.6550954", "0.64868104", "0.64559877", "0.6435699", "0.64010745", "0.631032", "0.6214445", "0.6188276", "0.61823386", "0.6092456", "0.60900337", "0.60829425", "0.6067912", "0.6050197", "0.6038142", "0.6031707", "0.60230774", "0.60092884", "0.59841084", "0.5981169", "0.5978805", "0.59778917", "0.59678966", "0.59637743", "0.5962733", "0.5961255", "0.59594464", "0.59563756", "0.5954091", "0.59069586", "0.58994496", "0.58991605", "0.58939826", "0.58939826", "0.58869433", "0.5881434", "0.58777905", "0.5874264", "0.58605635", "0.5858157", "0.58424973", "0.5840096", "0.5840096", "0.5796777", "0.5792693", "0.5779391", "0.5778469", "0.5777205", "0.5776786", "0.57694", "0.57602197", "0.5753673", "0.57532305", "0.57460743", "0.5745087", "0.57440484", "0.57422084", "0.57422084", "0.57422084", "0.57422084", "0.57344204", "0.57329124", "0.5726225", "0.56960654", "0.56958723", "0.56891483", "0.568813", "0.56801414", "0.56801414", "0.56757355", "0.56744784", "0.5668345", "0.56662846", "0.56579643", "0.565101", "0.56356835", "0.5634763", "0.5634609", "0.56343096", "0.56196666", "0.5615595", "0.5612708", "0.5604791", "0.56040317", "0.559554", "0.5595387", "0.5583547", "0.5577107", "0.55685055", "0.5567353", "0.555859" ]
0.8862062
1
Get the fully qualified "published at" column.
Получите полностью квалифицированную колонку "опубликовано в".
public function getQualifiedPublishedAtColumn() { return $this->getTable().'.'.$this->getPublishedAtColumn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQualifiedPublishedAtColumn()\n {\n return $this->qualifyColumn($this->getPublishedAtColumn());\n }", "public function getPublishedAtColumn()\n {\n return defined('static::PUBLISHED_AT') ? static::PUBLISHED_AT : 'published_at';\n }", "public function getPublishedAtColumn()\n\t{\n\t\treturn defined('static::PUBLISHED_AT') ? static::PUBLISHED_AT : 'published_at';\n\t}", "public function getPublishedColumn()\n {\n return defined('static::PUBLISHED_COLUMN') ? static::PUBLISHED_COLUMN : 'published';\n }", "public function getQualifiedPublishedColumn()\n {\n return $this->getTable().'.'.$this->getPublishedColumn();\n }", "public function getQualifiedArchivedAtColumn()\n {\n return $this->qualifyColumn($this->getArchivedAtColumn());\n }", "public function getArchivedAtColumn()\n {\n return defined('static::ARCHIVED_AT') ? static::ARCHIVED_AT : 'archived_at';\n }", "public function getPublishedAt()\n {\n return $this->published_at;\n }", "public function getPublishedAt(): Carbon\n {\n return $this->{self::ATTR_PUBLISHED_AT};\n }", "public function getPublishedAt()\n {\n return $this->publishedAt;\n }", "public function getPublishedAttribute()\n {\n $published_date = Carbon::parse($this->published_at)->diffForHumans();\n return $published_date;\n }", "public function getPublished()\n {\n//\t\ti18n::get_date_format();\n//\t\t$locale = i18n::get_locale();\n//\t\t$date = new Zend_Date();\n//\t\t$date->set($this->PublishFrom, null, $locale);\n//\t\treturn substr($date->getDate($locale), 0, -9);\n }", "public function getPublished() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"published\");\n\t}", "public function getPublishedDate()\n {\n $date = explode('-', explode(' ', $this->created_at)[0]);\n\n return $this->formatDate($date[0], $date[1], $date[2]);\n }", "public function getMergedAtColumn()\n {\n return defined('static::MERGED_AT') ? static::MERGED_AT : 'merged_at';\n }", "public function getQualifiedMergedAtColumn()\n {\n return $this->getTable().'.'.$this->getMergedAtColumn();\n }", "public function published()\n {\n return $this->state(function (array $attributes) {\n return [\n 'published_at' => Carbon::parse('-1 week'),\n ];\n });\n }", "public function getPublishedTime()\n {\n return $this->get('date');\n }", "public function getPublishedAsTime() { return strtotime($this->attributes['published']); }", "public function getDatePublished()\n {\n return $this->datePublished;\n }", "public function getDatePublished() {\n return $this->datePublished;\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "function get_published()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PUBLISHED);\r\n }", "public function getPublishedAtAttribute($value)\n {\n return $this->prepareGetDateAttribute($value);\n }", "public function getDatePublished()\n {\n return $this->datePublished;\n }", "public function getPublishedDate()\n {\n return $this->publishedDate;\n }", "public function getPublication()\n\t\t{\n\t\t\treturn strftime('%d-%m-%Y',strtotime($this->_publication));\n\t\t}", "public function getPublished()\n {\n return $this->published;\n }", "public function getPublished()\n {\n return $this->published;\n }", "public function get_published()\n {\n return $this->get_default_property(self::PROPERTY_PUBLISHED);\n }", "public function getPublishedAtAttribute($date)\n {\n return Carbon::parse($date)->format('Y-m-d');\n }", "public function getPublishedAtAttribute($date)\n {\n return Carbon::parse($date)->format('Y-m-d');\n }", "public function updatedAt(): string\n {\n return $this->updatedColumn;\n }", "public function getDefinedAt(): string;", "public function getPublishedTime( );", "public function isPublished()\n {\n return ! is_null($this->{$this->getPublishedAtColumn()});\n }", "public function getDeletedAtColumn()\n {\n return defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at';\n }", "public function getPublishedDate() {\n return $this->_dPublishedDate;\n }", "public function get_created_at_column();", "public function getNewsPostIndexActivePublished()\n {\n return $this->newsPost()->selectbrief()\n ->active()->published();\n }", "public function getPublishedTime( )\n {\n return $this->publishedTime;\n }", "public function getPublishedAtAttribute($value)\n {\n return \\Carbon\\Carbon::parse($value)->format('m/d/Y h:i A');\n }", "public function generate_open_graph_article_published_time() {\n\t\treturn '';\n\t}", "public function getPublished() {}", "public function getQualifiedDeletedAtColumn()\n {\n //Fix for non-deletable columns\n if ( !$this->hasSoftDeletes() ){\n return;\n }\n\n return $this->qualifyColumn($this->getDeletedAtColumn());\n }", "public function createdAt(): string\n {\n return $this->createdColumn;\n }", "public function getUpdatedAtColumn(): ?string\n {\n return $this->_meta[static::CONTEXT_FIELD_UPDATED_AT] ?? static::UPDATED_AT;\n }", "public function isPublished()\n\t{\n\t\treturn filled($this->published_at);\n\t}", "public function getHowpublished()\n {\n return $this->howpublished;\n }", "public function getPublished();", "public function getQualifiedDraftColumn()\n {\n return $this->getTable().'.is_draft';\n }", "public function get_updated_at_column();", "public function getPublishedOnAttribute($date)\n {\n return Carbon::createFromFormat('Y-n-j G:i:s', $date)->format('Y-m-d');\n }", "public function getQualifiedSuspendedAtColumn(): string\n\t{\n\t\treturn $this->getTable() . '.' . $this->getSuspendedAtColumn();\n\t}", "public function getQualifiedDeletedAtColumn()\n {\n return $this->getDeletedAtColumn();\n }", "public function timeSincePublished()\n\t{\n\t\treturn $this->entity->created_at->diffForHumans();\n\t}", "public function getQualifiedUpdatedByColumn()\n {\n return $this->getTable().'.'.$this->getUpdatedByColumn();\n }", "public function getSuspendedAtColumn(): string\n\t{\n\t\treturn defined('static::SUSPENDED_AT') ? static::SUSPENDED_AT : CanBeSuspended::SUSPENDED_AT;\n\t}", "public function isPublished()\n\t{\n\t\t$publishedAt = $this->{$this->getPublishedAtColumn()};\n\n\t\tif ( is_null($publishedAt) ) return false;\n\n\t\treturn $publishedAt->isPast();\n\t}", "public function timeSincePublished()\n {\n return $this->created_at->diffForHumans();\n }", "function getDateAuthorUnderway() {\n\t\treturn $this->getData('dateAuthorUnderway');\n\t}", "public function getQualifiedSiteIdColumn()\n {\n return $this->getTable().'.'.$this->getSiteIdColumn();\n }", "public function getPublishDate()\n {\n return $this->publishDate;\n }", "public function hasBeenPublished()\n {\n return boolval($this->published_at);\n }", "public function getUnpublished() {}", "protected function getLocalColumn()\n {\n $columns = $this->getI18nTable()->getBehavior('symfony_i18n_translation')->getForeignKey()->getForeignColumns();\n return $this->getTable()->getColumn($columns[0]);\n }", "function wprss_show_feed_item_custom_columns( $column, $post_id ) {\n\n switch ( $column ) {\n case \"permalink\":\n $url = get_post_meta( $post_id, 'wprss_item_permalink', true);\n echo '<a href=\"' . $url . '\">' . $url. '</a>';\n break;\n\n case \"publishdate\":\n $item_date = get_the_time( 'U', get_the_ID() );\n $item_date = ( $item_date === '' )? date('U') : $item_date;\n $publishdate = date( 'Y-m-d H:i:s', $item_date ) ;\n echo $publishdate;\n break;\n\n case \"source\":\n $query = new WP_Query();\n $source = '<a href=\"' . get_edit_post_link( get_post_meta( $post_id, 'wprss_feed_id', true ) ) . '\">' . get_the_title( get_post_meta( $post_id, 'wprss_feed_id', true ) ) . '</a>';\n echo $source;\n break;\n }\n }", "public function getQualifiedMergedToColumn()\n {\n return $this->getTable().'.'.$this->getMergedToColumn();\n }", "public function getPublishTime(): LocalTimestamp\n {\n return $this->publishTime;\n }", "public function getPublishedDescription()\r\n {\r\n return $this->publishedDescription;\r\n }", "public function getFeedPubDate()\n {\n return strtotime($this->_artwork->getCreatedAt());\n }", "public function getDate_publish()\n {\n return $this->date_publish;\n }", "public function getRelatedColumn()\n {\n // section -122-48--89-8--1e6caf83:13aa9af80f4:-8000:00000000000009F2 begin\n // section -122-48--89-8--1e6caf83:13aa9af80f4:-8000:00000000000009F2 end\n }", "public function getDatePublication()\n {\n return $this->datepublication;\n }", "private function makePrettyArchivedOnText()\n {\n $dateText = $this->viewProperties['metadata'][DataTable::ARCHIVED_DATE_METADATA_NAME];\n $date = Date::factory($dateText);\n $today = mktime(0, 0, 0);\n if ($date->getTimestamp() > $today) {\n $elapsedSeconds = time() - $date->getTimestamp();\n $timeAgo = Piwik::getPrettyTimeFromSeconds($elapsedSeconds);\n\n return Piwik_Translate('CoreHome_ReportGeneratedXAgo', $timeAgo);\n }\n\n $prettyDate = $date->getLocalized(\"%longYear%, %longMonth% %day%\") . $date->toString('S');\n return Piwik_Translate('CoreHome_ReportGeneratedOn', $prettyDate);\n }", "public function getNewsPostActivePublished()\n {\n return $this->newsPost()->active()->published();\n }", "public function getPubDate()\n {\n return $this->pubDate;\n }", "public function get_publication_date()\n {\n return $this->get_default_property(self::PROPERTY_PUBLICATION_DATE);\n }", "public function getQualifiedDeletedAtColumn();", "public function getArticlePublishTime()\n {\n return $this->article_publish_time;\n }", "public function getDate_pub()\n {\n return $this->date_pub;\n }", "function getDateAuthorNotified() {\n\t\treturn $this->getData('dateAuthorNotified');\n\t}", "public function getAllPublished();", "protected function getCreatedAtColumn()\n {\n $model = $this->model;\n return ($model::CREATED_AT) ? $model::CREATED_AT : 'created_at';\n }", "public function published()\n {\n return $this->status('publish');\n }", "function GetPubDate() {\n\t\treturn $this->pubDate;\n\t}", "public function getQualifiedTenantColumn()\n {\n return $this->getTable().'.'.$this->getTenantColumn();\n }", "public function published()\n {\n $published = array_get($this->originalData, 'published', true);\n\n if (is_string($published) && trim(mb_strtolower($published)) == 'true') {\n return true;\n } elseif (is_string($published) && trim(mb_strtolower($published)) == 'false') {\n return false;\n }\n\n return $published;\n }", "public function getDateUnpublished()\n {\n return $this->dateUnpublished;\n }", "public function getDisplayCreatedAtAttribute()\n {\n $data = \"\";\n if(!empty($this->created_at)) {\n $data = Carbon::parse($this->created_at)->setTimezone('America/New_York')->format('F d, Y');\n }\n return $data;\n }", "public function getPublishedAttribute()\n {\n return $this->isPublished();\n }", "private function sourceObjectDeletedAtColumnName()\n {\n if ($this->sourceModel && method_exists($this->sourceModel, 'getDeletedAtColumn')) {\n return $this->sourceModel->getDeletedAtColumn();\n }\n }", "function expub_custom_columns($column){\n\t\n\t$custom = get_post_custom();\n\n\tswitch ($column) {\n\t\tcase \"authors\":\n\t\t\techo $custom[\"expub_authors\"][0];\n\t\t\tbreak;\n\t\tcase \"category\":\n\t\t\techo $custom[\"expub_category\"][0];\n\t\t\tbreak;\n\t\tcase \"start\":\n\t\t\techo $custom['expub_startdate'][0];\n\t\t\tbreak;\n\t\tcase \"end\":\n\t\t\techo $custom['expub_enddate'][0];\n\t\t\tbreak;\n\t\tcase \"postids\":\n\t\t\techo $custom['expub_postids'][0];\n\t\t\tbreak;\n }\n}", "public function relatedUpdatedAt()\n {\n return $this->related->getUpdatedAtColumn();\n }", "public function relatedUpdatedAt()\n {\n return $this->related->getUpdatedAtColumn();\n }", "public function getConfirmedAtColumnName()\n {\n return $this->confirmedAtColumnName;\n }", "function custom_columns( $column ) {\n\tglobal $post;\n\n\tswitch ( $column ) {\n\t\tcase 'meta':\n\t\t\t$metaData = get_post_meta( $post->ID, 'twitter_url', true );\n\n\t\t\techo $metaData;\n\t\tbreak;\n\t}\n}", "public function isPublished()\n {\n return $this->published_at < Carbon::now() ? true : false;\n }" ]
[ "0.8709744", "0.8683397", "0.86726195", "0.7920348", "0.7901534", "0.70576376", "0.70397747", "0.68843436", "0.6775695", "0.67286724", "0.6721289", "0.6636728", "0.6263351", "0.62372655", "0.62246484", "0.61950517", "0.60647297", "0.60484946", "0.60377914", "0.5996302", "0.59610015", "0.59204376", "0.59204376", "0.59204376", "0.59204376", "0.58846134", "0.5882961", "0.58760434", "0.5869599", "0.58654636", "0.58654636", "0.5849009", "0.5826066", "0.5826066", "0.5810137", "0.5791648", "0.57795364", "0.5777634", "0.5745874", "0.57389635", "0.57251805", "0.57007176", "0.5700577", "0.56960195", "0.5690243", "0.56787694", "0.5641885", "0.56368816", "0.5626783", "0.56147474", "0.56005704", "0.5597225", "0.55714154", "0.5570163", "0.5569857", "0.55616355", "0.55598575", "0.5557128", "0.55417264", "0.5517013", "0.5463583", "0.5414922", "0.5407258", "0.5381728", "0.53753006", "0.53549486", "0.53482896", "0.53266186", "0.53224796", "0.5319311", "0.5315484", "0.5314587", "0.5314233", "0.5308914", "0.53067386", "0.53061527", "0.530516", "0.52995014", "0.5297046", "0.5267845", "0.5259385", "0.52588314", "0.52546537", "0.52501386", "0.5245218", "0.5245044", "0.5238107", "0.52330613", "0.52042586", "0.51953214", "0.51886344", "0.51792246", "0.5171593", "0.5165149", "0.51588625", "0.5141465", "0.5141465", "0.5138361", "0.51380396", "0.51294416" ]
0.86921006
1
/ Tests the Cookie File
Тестирование файла Cookie
function cookie($cookie_file) { if (file_exists($cookie_file)) { $this->cookie_file=$cookie_file; } else { @fopen($cookie_file,'w') or $this->error("The cookie file could not be opened. Make sure this directory has the correct permissions"); $this->cookie_file=$cookie_file; fclose($cookie_file); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetCookie()\n {\n $this->get('/unit_test/test_action/123');\n $this->assertEquals('test cookie data', $this->getCookie('functional_cookie'));\n }", "public function checkForCookie()\n\t{\n\t\t$cookie = isset($this->file->cookie) ? $this->file->cookie : \"\";\n\n\t\tif ($cookie) {\n\t\t\tif (isset($_COOKIE[$cookie])) {\n\t\t\t\tself::instance()->checkcreadentials($this->file->cookie);\n\t\t\t}\n\t\t}\n\t}", "public function testGetCookie() {\r\n $cookie = $this->_request->getCookie();\r\n\r\n $this->assertInstanceOf('PM\\Main\\Web\\Component\\Http\\Cookie', $cookie);\r\n $this->assertEmpty($cookie->toArray());\r\n }", "public function test_validate() {\n $cookies = new Noir\\Cookies(self::$site);\n\n $token = $cookies->create(\"test\");\n\n $this->assertNotNull($cookies->validate(\"test\", $token));\n }", "public function testGetFromCookie()\n\t{\n\t\t// Check the object type.\n\t\t$this->assertThat(\n\t\t\t$this->class->cookie instanceof JInputCookie,\n\t\t\t$this->isTrue(),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$_COOKIE['foo'] = 'bar';\n\n\t\t// Test the get method.\n\t\t$this->assertThat(\n\t\t\t$this->class->cookie->get('foo'),\n\t\t\t$this->equalTo('bar'),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\t}", "public function testCookieNotSet()\n {\n $this->assertFalse(isset($_COOKIE['lang']));\n }", "private function ct_cookies_test()\n {\n if( ! $this->params->get('ct_set_cookies') || headers_sent() ) {\n return null;\n }\n if ($this->params->get('ct_use_alternative_cookies') ) {\n return 1;\n }\n if (isset($_COOKIE['apbct_cookies_test'])) {\n $cookie_test = json_decode(stripslashes($this->ct_getcookie('apbct_cookies_test')), true);\n\n if (is_null($cookie_test)) {\n return null;\n }\n $check_string = trim($this->params->get('apikey'));\n foreach ($cookie_test['cookies_names'] as $cookie_name) {\n $check_string .= $this->ct_getcookie($cookie_name);\n }\n unset($cokie_name);\n\n if ($cookie_test['check_value'] == md5($check_string)) {\n return 1;\n } else {\n return 0;\n }\n } else {\n return null;\n }\n }", "private function _cookie() {\n\t\t$this->cookie = COOKIES . '/squarespace.cookie.txt';\n\n\t\tif ( ! file_exists( $this->cookie ) ) {\n\t\t\tfile_put_contents($this->cookie, '');\n\t\t}\n\t}", "function isCookieTimeOK() : bool {\n $content = file_get_contents('db/db.txt');\n //Find the line with the current session\n $posOfCurrentSession = strpos($content, $this->getSessionID());\n //Check if the current session exists in the text file\n if ($posOfCurrentSession === false) {\n return false;\n }\n else {\n //If it does, check if the time in the text file matches the time of the cookie\n $contentLine = $this->getLineFromString($this->dbFilePath, $this->getSessionID());\n\n //Get the last part of the line that contains the time\n $contents = explode(']', $contentLine);\n $timeText = end($contents);\n\n if ($timeText == $this->getSessionID) {\n return true;\n }\n else {\n return false;\n }\n }\n }", "public function testExists()\n {\n $this->assertFalse($this->cookies->exists($this->request, 'other_websites_cookie'));\n $this->assertTrue($this->cookies->exists($this->request, 'our_cookie'));\n }", "public function test6()\n\t{\n\t\t$this->get('/','www.google.com')\n\t\t\t->assertCookieIsSet('PREF_ID');\n\t}", "private function validateCookie()\n {\n if(isset($_COOKIE[GTShipping::COOKIE_NAME]))\n {\n //grab the value\n $zone_id = $_COOKIE[GTShipping::COOKIE_NAME];\n\n //try to get the zone and see if its null\n $zone = $this->getZone($zone_id);\n\n if(! is_null($zone))\n {\n $this->zone_cookie_set = true;\n $this->zone_id = $zone_id;\n $this->zone = $zone;\n\n //get the zone data and set it\n $data = $this->getZoneData($zone_id);\n\n $this->region_id = isset($data['region']) ? $data['region'] : '';\n $this->town_id = isset($data['town']) ? $data['town'] : '';\n $this->quarter_id = isset($data['quarter']) ? $data['quarter'] : '';\n $this->price = isset($data['price']) ? $data['price'] : '';\n }\n }\n }", "public function verifyCookie(string $cookie): bool\n {\n }", "public function testAssertAssignsCookieTrue()\n {\n $this->get('/unit_test/test_action/123');\n $this->assertAssignsCookie('functional_cookie', 'test cookie data');\n $this->assertAssignsCookie(array('functional_cookie' => 'test cookie data'));\n }", "public function testGet()\n {\n $this->assertEmpty($this->cookies->get($this->request, 'other_websites_cookie'));\n $this->assertSame('987', $this->cookies->get($this->request, 'our_cookie'));\n }", "public function set_cookie_file($cookie_file) {\n\n\t\ttry {\n\n\t\t\tif(file_exists($cookie_file)) {\n\t\t\t\t$this->cookie_file = $cookie_file;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\n\t\tcatch(Exception $e) {\n\t\t\techo 'Error: ', $e->getMessage();\n\t\t\treturn false;\n\t\t}\n\n\t}", "private function readCookie() {\n $cipher = new Cipher();\n $auth = $cipher->decrypt($_COOKIE['auth']);\n list($user, $pass) = explode('|', $auth);\n $this->authUser(base64_decode($user), base64_decode($pass));\n }", "public function isCookieSet() {}", "function checkCookie() \n{\n if ( isset($_COOKIE['user64cook']) && isset($_COOKIE['hash64cook']) && isset($_COOKIE['usid64cook']) ) { \n $_SESSION['id']\t\t= base64_decode($_COOKIE['usid64cook']);\n $_SESSION['username'] = base64_decode($_COOKIE['user64cook']);\n $_SESSION['password'] = base64_decode($_COOKIE['hash64cook']);\n }\n}", "function loadCookieHeader() {\n\tif (!file_exists(COOKIEHEADER_FILE)) {\n\t\tprintln('Create file ' . COOKIEHEADER_FILE . ' with Cookie header information');\n\t\texit(1);\n\t}\n\tdefine('COOKIEHEADER', file_get_contents(COOKIEHEADER_FILE));\n}", "function Cookie()\n\t{\n\t\t// for each cookie variable\n\t\tif(is_array($_COOKIE))\n\t\t{\n\t\t\tforeach($_COOKIE AS $strName=>$strValue)\n\t\t\t{\n\t\t\t\t// parse variable\n\t\t\t\t$this->_ParseData($strName, $strValue);\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function testDownloadBookWithCookie() {\n\t\t$this->assertNoCookie('glob_dl_access');\n\t\t$this->setCookie('glob_dl_access','def');\n\t\t$this->get($this->testhost.'titles/3/file/Der+seltzame+Springinsfeld+-+Hans+Jakob+Christoffel+von+Grimmelshausen.epub');\n\t\t$this->assertResponse(200);\n\t}", "function validateCookie($cookie) {\n $secretKey = Keys::getCookieSecretKey() ;\n\n $splitCookie = explode(\"|\", $cookie);\n $numElements = count($splitCookie);\n // Parse number of elements in cookie\n if ($numElements != 2) {\n return false;\n }\n\n require_once(\"db_operations.php\");\n $db = new DBOperator();\n\n // Check if user is in db\n if (!$db->isUserInDb($splitCookie[0])) {\n return false;\n }\n\n // Check if cookie hash is correct\n if (hash_hmac(\"sha256\", $splitCookie[0], $secretKey) === $splitCookie[1]) {\n if ($db->isAdmin($cookie)) {\n return \"admin\";\n }\n else return \"regular\";\n }\n else {\n return false;\n }\n}", "public function checkCookieCreadentials()\n\t{\n\n\t\tif ($this->IsPersistent()) {\n\t\t\tif (!isset($_SESSION[$this->sess_auth])) {\n\t\t\t\t$this->checkForCookie();\n\t\t\t}\n\t\t}\n\t}", "private function checkCookie()\n\t{\n\t\t$this->load->model('db_data'); \t\t\t\t\t\t// loading model\n\t\t$data = $this->db_data->selectFromDb(); \t\t\t// loading function exist in model\n\n\t\tforeach($data as $key) { \t\t\t\t\t\t\t// foreach to extraire data from admin table in ddb\n\t\t\t$username = $key->username; \t\t\t\t\t// username from database\n\t\t\t$password = $key->password; \t\t\t\t\t// password from database\n\t\t}\n\n\t\t$cookie = get_cookie('Cookie'); \t\t\t\t\t// get data from cookie file using get_cookie function\n\t\t$check \t= explode('^', $cookie); \t\t\t\t\t// separate words when you find '^'\n\t\t$user \t= $check[0];\n\t\t$pass \t= $check[1];\n\t\t\n\t\tif(!empty($user) || !empty($pass)) { \t\t\t\t// pass from cookie file\n\t\t\tif($user !== $username || $pass !== $password) {\n\t\t\t\tredirect('admin/login');\n\t\t\t} else {\n\t\t\t\t$newdata = array( \t\t\t\t\t\t\t// give a new session with username & password values\n\t\t\t\t\t'userAdmin'\t\t=> $username,\n\t\t\t\t\t'passAdmin'\t\t=> $password,\n\t\t\t\t\t'logged_in'\t\t=> TRUE\n\t\t\t\t);\n\t\t\t\t$this->session->set_userdata($newdata); \t// add data in session \n\t\t\t}\n\t\t} else {\n\t\t\tredirect('admin/login');\n\t\t}\n\t}", "public function testWriteCookie() {\n\t\t$cookie = new CookieDummy();\n\t\t$this->assertEmpty($cookie->setCookies);\n\n\t\t$cookie['foo'] = 'blah';\n\t\t$this->assertEquals($cookie->setCookies[0], array(\n\t\t\t'name' => 'foo',\n\t\t\t'content' => 'blah',\n\t\t\t'expire' => null,\n\t\t\t'path' => null,\n\t\t\t'domain' => null,\n\t\t\t'secure' => null,\n\t\t\t'httponly' => null,\n\t\t));\n\t}", "function getCookies() {}", "private function ct_cookie()\n {\n if( ! $this->params->get('ct_set_cookies') || headers_sent() )\n {\n return;\n }\n else\n {\n // Cookie names to validate\n $cookie_test_value = array(\n 'cookies_names' => array(),\n 'check_value' => $this->params->get('apikey'),\n );\n\n // Submit time\n $ct_timestamp = time();\n if( $this->params->get('ct_use_alternative_cookies') ){\n // by database\n $prev_time = $this->ct_getcookie('apbct_prev_timestamp');\n if(is_null($prev_time)){\n $this->ct_setcookie('apbct_timestamp', $ct_timestamp);\n $this->ct_setcookie('apbct_prev_timestamp', $ct_timestamp);\n $cookie_test_value['check_value'] .= $ct_timestamp;\n } else {\n $this->ct_setcookie('apbct_timestamp', $prev_time);\n $this->ct_setcookie('apbct_prev_timestamp', $ct_timestamp);\n $cookie_test_value['check_value'] .= $prev_time;\n }\n } else {\n // by cookies\n $this->ct_setcookie('apbct_timestamp', $ct_timestamp);\n $cookie_test_value['cookies_names'][] = 'apbct_timestamp';\n $cookie_test_value['check_value'] .= $ct_timestamp;\n }\n\n // Pervious referer\n if (!empty($_SERVER['HTTP_REFERER']))\n {\n $this->ct_setcookie('apbct_prev_referer', $_SERVER['HTTP_REFERER']);\n $cookie_test_value['cookies_names'][] = 'apbct_prev_referer';\n $cookie_test_value['check_value'] .= $_SERVER['HTTP_REFERER'];\n }\n // Cookies test\n $cookie_test_value['check_value'] = md5($cookie_test_value['check_value']);\n $this->ct_setcookie('apbct_cookies_test', json_encode($cookie_test_value));\n }\n\n }", "public static function validate_cookie()\n {\n\n if(isset($_COOKIE['cookieAuth']) && isset($_COOKIE['user']))\n {\n\n\n $givenCookie=$_COOKIE['cookieAuth'];\n $vals=DB::getInstance()->query(\"SELECT cookie,type FROM users WHERE id=?\",array($_COOKIE['user']));\n\n $cookieDbs=$vals->results();\n $cookieDb=$cookieDbs[0]->cookie;\n \n if ($cookieDb==$givenCookie)\n {\n \n $_SESSION['userID']=$_COOKIE['user'];\n \n \n \n if($cookieDbs[0]->type==\"tch\")\n {\n $_SESSION['type']=\"tch\";\n header('Location: '.ROOT_SITE_COMPLETE.\"tup.php\");\n die();\n }\n else\n {\n \n $_SESSION['type']=\"stud\";\n header('Location: '.ROOT_SITE_COMPLETE.\"Portals/index.php\");\n die(); \n }\n \n\n\n }\n else\n {\n\n unset($_COOKIE['cookieAuth']);\n unset($_COOKIE['user']);\n session_destroy();\n \n \n //Process Logout , Show him our level of Sophistication\n }\n\n }\n else\n {\n\n\n\n }\n\n\n }", "public function getCookie($cookiename);", "function test_auth_cookie_invalid() {\n\t\t// as an ajax test may have defined DOING_AJAX, failing the test.\n\n\t\t$cookie = wp_generate_auth_cookie( $this->user_id, time() - 7200, 'auth' );\n\t\t$this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'auth' ), 'expired cookie' );\n\n\t\t$cookie = wp_generate_auth_cookie( $this->user_id, time() + 3600, 'auth' );\n\t\t$this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'logged_in' ), 'wrong auth scheme' );\n\n\t\t$cookie = wp_generate_auth_cookie( $this->user_id, time() + 3600, 'auth' );\n\t\tlist($a, $b, $c) = explode('|', $cookie);\n\t\t$cookie = $a . '|' . ($b + 1) . '|' . $c;\n\t\t$this->assertEquals( false, wp_validate_auth_cookie( $this->user_id, 'auth' ), 'altered cookie' );\n\t}", "public function getCookieTimeFromFile(){\n return file_get_contents(\"expire.txt\");\n }", "public function testSetCookie()\n {\n $this->todo('stub');\n }", "function allowEmptyCookiePath()\r\n {\r\n return false;\r\n }", "public function testCookieSettingsInFrontend()\n {\n // Check if cookie option is off\n $this->clearCache();\n $this->openShop();\n $this->assertElementNotPresent(\"cookieNote\");\n\n // Enable cookienotes\n $this->callShopSC('oxConfig', null, null, array('blShowCookiesNotification' => array('type' => 'bool', 'value'=>true)));\n\n // Check cookie message in frontend\n $this->clearCache();\n $this->openShop();\n $this->assertElementPresent(\"cookieNote\");\n // navigate to link where all cookie is deleted\n $this->clickAndWait(\"link=%COOKIE_NOTE_DISAGREE%\");\n //CMS page not inherited, so for subshop we check just title\n if (!isSUBSHOP) {\n $this->assertTextPresent(\"You have decided to not accept cookies from our online shop. The cookies have been removed. You can deactivate the usage of cookies in the settings of your browser and visit the online shop with some functional limitations. You can also return to the shop without changing the browser settings and enjoy the full functionality.\");\n }\n $this->assertTextPresent(\"%INFO_ABOUT_COOKIES%\");\n // do not turn off browser cookie settings and check in frontend is the message still appears\n $this->clickAndWait(\"link=%HOME%\");\n $this->assertElementPresent(\"cookieNote\");\n // change language in DE and check cookie message\n $this->switchLanguage(\"Deutsch\");\n $this->assertTextNotPresent(\"%INFO_ABOUT_COOKIES%\");\n $this->assertElementNotPresent(\"cookieNote\");\n }", "function tor_get_cookie($filename){\r\n $cookie = file_get_contents($filename);\r\n //convert the cookie to hexadecimal\r\n $hex = '';\r\n for ($i=0;$i<strlen($cookie);$i++){\r\n $h = dechex(ord($cookie[$i]));\r\n $hex .= str_pad($h, 2, '0', STR_PAD_LEFT);\r\n }\r\n return strtoupper($hex);\r\n}", "public function testAssertAssignsCookieFalse()\n {\n $this->get('/unit_test/test_action/123');\n \n $e = null;\n try {\n $this->assertAssignsCookie('functional_cookie', 'wrong value');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n \n $e = null;\n try {\n $this->assertAssignsCookie('test_wrong_cookie', 'test cookie data');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "function checkByCookie($password) {\n // $data = json_decode($file);\n // $pathLog = 0;\n // global $pathLog;\n // $data = (array)$data;\n // $data[0] = (array)$data[0];\n // foreach ($data as $pathF) {\n // $pathF = (array)$pathF;\n // if ($login == md5($pathF['login'])) {\n // if ($login != md5($data[0]['login'])) {\n // $pathLog = 1;\n // }\n // else if ($login == md5($data[0]['login'])) {\n // $pathLog = 2;\n // }\n // }\n // }\n // return $pathLog;\n\n $checkCookie = $this->getList('password' => $password]);\n if ($checkCookie) return true;\n\n }", "public function testSetCookies()\n {\n $this->todo('stub');\n }", "public function cookies_set() {\n\t\treturn apply_filters( 'cn_is_cookie_set', isset( $_COOKIE['cookie_notice_accepted'] ) );\n\t}", "function user_has_valid_cookie_project(){\n\tif(isset($_COOKIE['user'])){\n\t\t$user=base64_decode($_COOKIE['user']);\n\t\tif(!db_user_exists($user)){\n\t\t\tsetcookie(\"user\", \"\", time()-3600);\n\t\t\techo '<script>window.location.replace(\"../index.php\");</script>';\n\t\t}\n\t}else{\n\t\techo '<script>window.location.replace(\"../index.php\");</script>';\n\t}\n}", "public function cookie();", "public function hasCookie($cookieName);", "private function is_session_cookie_valid()\n {\n }", "public function setCookieFile($file)\n {\n $this->cookiefile = $file;\n }", "private function _loadDataFromCookie()\n {\n if(!isset($_COOKIE[self::AUTH_COOKIE])) {\n return false;\n }\n\n //load cookie information\n list($username, $sha) = explode (';', $_COOKIE[self::AUTH_COOKIE]);\n $password = $this->_getUserPassword($username);\n\n //check data integrity\n if(sha1($username . $password) != $sha) {\n self::unsetAuthCookie();\n return false;\n }\n\n $this->getRequest()->setParam('login', array('username' => $username, 'password' => $password));\n return true;\n }", "public function test_create() {\n $cookies = new Noir\\Cookies(self::$site);\n\n $token = $cookies->create(\"test\");\n $this->assertNotNull($token);\n $this->assertEquals(32, strlen($token));\n }", "public function testManuallySetCookie($domain) {\n\t\t$cookie = new Cookie('requests-testcookie', 'testvalue');\n\n\t\t$this->assertTrue($cookie->domain_matches($domain));\n\t}", "public function test_auth_cookie_invalid() {\n\t\t// as an ajax test may have defined DOING_AJAX, failing the test.\n\n\t\t$cookie = wp_generate_auth_cookie( self::$user_id, time() - 7200, 'auth' );\n\t\t$this->assertFalse( wp_validate_auth_cookie( $cookie, 'auth' ), 'expired cookie' );\n\n\t\t$cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'auth' );\n\t\t$this->assertFalse( wp_validate_auth_cookie( $cookie, 'logged_in' ), 'wrong auth scheme' );\n\n\t\t$cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'auth' );\n\t\tlist($a, $b, $c) = explode( '|', $cookie );\n\t\t$cookie = $a . '|' . ( $b + 1 ) . '|' . $c;\n\t\t$this->assertFalse( wp_validate_auth_cookie( self::$user_id, 'auth' ), 'altered cookie' );\n\t}", "function getcookie()\r\n\t{\r\n\t\tforeach(explode(\"\\r\\n\",$this->getheader()) as $header)\r\n\t\t{\r\n\t\t\tif(preg_match('/set-cookie/i',$header))\r\n\t\t\t{\r\n\t\t\t\t$fequal = strpos($header,'=');\r\n\t\t\t\t$fvirgu = strpos($header,';');\r\n\t\t\t\t\r\n\t\t\t\t// 12=strlen('set-cookie: ')\r\n\t\t\t\t$cname = substr($header,12,$fequal-12);\r\n\t\t\t\t$cvalu = substr($header,$fequal+1,$fvirgu-(strlen($cname)+12+1));\r\n\t\t\t\t\r\n\t\t\t\t$this->cookie[trim($cname)] = trim($cvalu);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function extractCookies()\n {\n $string = @file_get_contents($this->cookieFilePath);\n $lines = explode(PHP_EOL, $string);\n $cookies = [];\n foreach ($lines as $line) {\n $cookie = [];\n // detect httponly cookies and remove #HttpOnly prefix\n if (substr($line, 0, 10) == '#HttpOnly_') {\n $line = substr($line, 10);\n $cookie['httponly'] = true;\n } else {\n $cookie['httponly'] = false;\n }\n // we only care for valid cookie def lines\n if (strlen($line) > 0 && $line[0] != '#'\n && substr_count(\n $line,\n \"\\t\"\n ) == 6\n ) {\n // get tokens in an array\n $tokens = explode(\"\\t\", $line);\n // trim the tokens\n $tokens = array_map('trim', $tokens);\n // Extract the data\n // The domain that created AND can read the variable.\n $cookie['domain'] = $tokens[0];\n // A TRUE/FALSE value indicating if all machines within a given domain can access the variable.\n $cookie['flag'] = $tokens[1];\n // The path within the domain that the variable is valid for.\n $cookie['path'] = $tokens[2];\n // A TRUE/FALSE value indicating if a secure connection with the domain is needed to access the variable.\n $cookie['secure'] = $tokens[3];\n // The UNIX time that the variable will expire on.\n $cookie['expiration-epoch'] = $tokens[4];\n // The name of the variable.\n $cookie['name'] = urldecode($tokens[5]);\n // The value of the variable.\n $cookie['value'] = urldecode($tokens[6]);\n // Convert date to a readable format\n $cookie['expiration'] = date('Y-m-d h:i:s', $tokens[4]);\n // Record the cookie.\n $cookies[] = $cookie;\n }\n }\n return $cookies;\n }", "private function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] <= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `$this->user_table` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "public function testZF2_169()\n {\n $cookie = 'Set-Cookie: leo_auth_token=\"example\"; Version=1; Max-Age=1799; Expires=Mon, 20-Feb-2012 02:49:57 GMT; Path=/';\n $setCookieHeader = Zend_Http_Header_SetCookie::fromString($cookie);\n $this->assertEquals($cookie, $setCookieHeader->toString());\n }", "public static function validCookieWithInfoProvider()\n {\n $now = time();\n $yesterday = $now - (3600 * 24);\n\n return [\n [\n 'Set-Cookie: justacookie=foo; domain=example.com',\n [\n 'name' => 'justacookie',\n 'value' => 'foo',\n 'domain' => 'example.com',\n 'path' => '/',\n 'expires' => null,\n 'secure' => false,\n 'httponly' => false\n ],\n 'justacookie=foo; Domain=example.com'\n ],\n [\n 'Set-Cookie: expires=tomorrow; secure; path=/Space Out/; expires=Tue, 21-Nov-2006 08:33:44 GMT; domain=.example.com',\n [\n 'name' => 'expires',\n 'value' => 'tomorrow',\n 'domain' => '.example.com',\n 'path' => '/Space Out/',\n 'expires' => strtotime('Tue, 21-Nov-2006 08:33:44 GMT'),\n 'secure' => true,\n 'httponly' => false\n ],\n 'expires=tomorrow; Expires=Tue, 21-Nov-2006 08:33:44 GMT; Domain=.example.com; Path=/Space Out/; Secure'\n ],\n [\n 'Set-Cookie: domain=unittests; expires=' . gmdate('D, d-M-Y H:i:s', $now) . ' GMT; domain=example.com; path=/some%20value/',\n [\n 'name' => 'domain',\n 'value' => 'unittests',\n 'domain' => 'example.com',\n 'path' => '/some%20value/',\n 'expires' => $now,\n 'secure' => false,\n 'httponly' => false\n ],\n 'domain=unittests; Expires=' . gmdate('D, d-M-Y H:i:s', $now) . ' GMT; Domain=example.com; Path=/some%20value/'\n ],\n [\n 'Set-Cookie: path=indexAction; path=/; domain=.foo.com; expires=' . gmdate('D, d-M-Y H:i:s', $yesterday) . ' GMT',\n [\n 'name' => 'path',\n 'value' => 'indexAction',\n 'domain' => '.foo.com',\n 'path' => '/',\n 'expires' => $yesterday,\n 'secure' => false,\n 'httponly' => false\n ],\n 'path=indexAction; Expires=' . gmdate('D, d-M-Y H:i:s', $yesterday) . ' GMT; Domain=.foo.com; Path=/'\n ],\n\n [\n 'Set-Cookie: secure=sha1; secure; SECURE; domain=some.really.deep.domain.com',\n [\n 'name' => 'secure',\n 'value' => 'sha1',\n 'domain' => 'some.really.deep.domain.com',\n 'path' => '/',\n 'expires' => null,\n 'secure' => true,\n 'httponly' => false\n ],\n 'secure=sha1; Domain=some.really.deep.domain.com; Secure'\n ],\n [\n 'Set-Cookie: justacookie=foo; domain=example.com; httpOnly',\n [\n 'name' => 'justacookie',\n 'value' => 'foo',\n 'domain' => 'example.com',\n 'path' => '/',\n 'expires' => null,\n 'secure' => false,\n 'httponly' => true\n ],\n 'justacookie=foo; Domain=example.com; HttpOnly'\n ],\n [\n 'Set-Cookie: PHPSESSID=123456789+abcd%2Cef; secure; domain=.localdomain; path=/foo/baz; expires=Tue, 21-Nov-2006 08:33:44 GMT;',\n [\n 'name' => 'PHPSESSID',\n 'value' => '123456789+abcd%2Cef',\n 'domain' => '.localdomain',\n 'path' => '/foo/baz',\n 'expires' => 'Tue, 21-Nov-2006 08:33:44 GMT',\n 'secure' => true,\n 'httponly' => false\n ],\n 'PHPSESSID=123456789%2Babcd%252Cef; Expires=Tue, 21-Nov-2006 08:33:44 GMT; Domain=.localdomain; Path=/foo/baz; Secure'\n ],\n [\n 'Set-Cookie: myname=myvalue; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly',\n [\n 'name' => 'myname',\n 'value' => 'myvalue',\n 'domain' => 'docs.foo.com',\n 'path' => '/accounts',\n 'expires' => 'Wed, 13-Jan-2021 22:23:01 GMT',\n 'secure' => true,\n 'httponly' => true\n ],\n 'myname=myvalue; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Domain=docs.foo.com; Path=/accounts; Secure; HttpOnly'\n ],\n [\n 'Set-Cookie: myname=myvalue; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly; SameSite=Strict',\n [\n 'name' => 'myname',\n 'value' => 'myvalue',\n 'domain' => 'docs.foo.com',\n 'path' => '/accounts',\n 'expires' => 'Wed, 13-Jan-2021 22:23:01 GMT',\n 'secure' => true,\n 'httponly' => true,\n 'samesite' => 'Strict',\n ],\n 'myname=myvalue; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Domain=docs.foo.com; Path=/accounts; Secure; HttpOnly; SameSite=Strict'\n ],\n ];\n }", "public function setCookiesFile( $file ) {\n\t\tcurl_setopt( $this->curl, CURLOPT_COOKIEFILE, $file );\n\t\tcurl_setopt( $this->curl, CURLOPT_COOKIEJAR, $file );\n\t}", "public function testDeleteCookieByName()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', 'bar');\n $r->setCookie('abc', '123');\n $r->deleteCookie('foo');\n $this->assertEquals(1, preg_match(\"@abc=123\\nfoo=; expires=@\", $r['Set-Cookie']));\n }", "public function test_delete() {\n $cookies = new Noir\\Cookies(self::$site);\n\n $token = $cookies->create(\"test\");\n $hash = $cookies->validate(\"test\", $token);\n $this->assertNotNull($hash);\n\n $cookies->delete($hash);\n $this->assertNull($cookies->validate(\"test\", $token));\n }", "function getETILoginCookie() {\r\n\t$cookieString = file_get_contents(COOKIE_STRING_FILE);\r\n\treturn $cookieString;\r\n}", "public function allowingCookies() {\n\t\t\treturn array_key_exists('acceptingCookies', $_COOKIE) && $_COOKIE['acceptingCookies'];\n\t\t}", "function login(){\n if($_SERVER['REQUEST_METHOD'] === 'POST'){ //Form has been posted\n if(isset($_POST[\"username\"])){\n $username = $_POST[\"username\"];\n $password = $_POST[\"password\"];\n\n\n $pw = fopen(\"passwd.txt\", \"r\");\n $users = Array();\n while(!feof($pw)){\n //Read Line\n $comb = fgets($pw);\n $un_pw = explode(\":\", $comb);\n $users[$un_pw[0]] = $un_pw[1];\n }\n fclose($pw);\n\n if(array_key_exists($username, $users) && strcmp($userlist[$username], $password)){\n setcookie(\"id\", $username, time()+120);\n setcookie(\"timeloggedin\", time(), time()+120);\n echo '<script language=\"javascript\">';\n echo 'alert(\"You are successfully logged in!\")';\n echo '</script>';\n\n }else{\n echo '<script language=\"javascript\">';\n echo 'alert(\"Wrong username and password combinations!\")';\n echo '</script>';\n }\n }\n }\n }", "public function get_cookies()\n {\n }", "public static function read() {\n // Empty the cache.\n self::$cache = [];\n\n // Cookie doesn't exist.\n if(!Util::exists($_COOKIE, self::COOKIE_KEY)) {\n return;\n }\n $ht = $_COOKIE[self::COOKIE_KEY];\n $pos = strpos($ht, self::SEP);\n\n // Cookie separator not found.\n if($pos === false) {\n return;\n }\n $hash = substr($ht, 0, $pos);\n $text = substr($ht, $pos + 1);\n\n // Cookie hmac incorrect.\n if(hash_hmac('sha256', $text, self::getKey()) !== $hash) {\n return;\n }\n $data = json_decode($text, true);\n\n // Invalid json data.\n if(is_null($data)) {\n return;\n }\n\n // Cookie timestamp expired.\n $expiry = (int) Util::get($data, '_', 0);\n if($_SERVER['REQUEST_TIME'] > $expiry + self::COOKIE_LIFETIME) {\n return;\n }\n\n self::$cache = is_null($data) ? []:$data;\n self::$dirty = false;\n }", "function is_a_cookie_set(){\n if (count($_COOKIE) > 0){\n return true;\n }\n else{\n return false;\n }\n }", "public function isCookieValid($name) {\n if ($this->fileStorage->getFileContent($name) > time()) {\n return true;\n }\n\n $this->fileStorage->removeFile($name);\n return false;\n }", "public function testSetCookieWithNameAndValue()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', 'bar');\n $this->assertEquals('foo=bar', $r['Set-Cookie']);\n }", "public static function browser_supports_cookies() {\n $browserInfo = self::php_browser_info();\n if ( isset( $browserInfo['Cookies'] ) ) {\n if ( $browserInfo['Cookies'] == 1 || $browserInfo['Cookies'] == \"true\" ) {\n return true;\n }\n }\n return false;\n }", "protected function getAlertCookie() {\n //Can't seem to access cookies from \"outside\" of Drupal, i.e. without \"Drupal.$cookie\" name\n //Also, dots (.) and spaces ( ) in cookie names are replaced with underscores (_). What?\n //http://php.net/manual/en/reserved.variables.cookies.php\n $cookie_key = 'Drupal_visitor_' . $this->cookie_name;\n return isset($_COOKIE[$cookie_key]) ? $_COOKIE[$cookie_key] : false;\n }", "private function tc_is_cookie_accepted() {\n\t\treturn isset($_COOKIE['tc_cookie_accept']);\n\t}", "public function validate()\n\t\t{\n\t\t\t\n\t\t\t// Unpackage the cookie.\n\t\t\tif ( Legato_Input::cookie( Legato_Settings::get( 'cookie', 'name' ) ) )\n\t\t\t\tlist( $this->_version, $this->_userid ) = $this->_cookie->unpackage( Legato_Input::cookie( Legato_Settings::get( 'cookie', 'name' ) ) );\n\t\t\telse\n\t\t\t\treturn Legato_Debug_Debugger::add_item( 'No cookie.' );\n\n\t\t\t// Is the cookie malformed?\n\t\t\t//if ( !$this->_version || !$this->_userid )\n\t\t\t\t//return Legato_Debug_Debugger::add_item( 'Malformed cookie.' );\n\n\t\t\t// Is the version the same as the current one?\n\t\t\tif ( $this->_version != Legato_Settings::get( 'cookie', 'version' ) )\n\t\t\t\treturn Legato_Debug_Debugger::add_item( 'Version mismatch.' );\n\n\t\t\t// Everything's good!\n\t\t\treturn true;\n\n\t\t}", "public static function checkCookie()\n {\n return Session::has('uzanto') ? true : false;\n }", "function cookie() {\n\t\t$cookieName = 'fe_typo_user';\n\t\tif (trim($GLOBALS['TYPO3_CONF_VARS']['FE']['cookieName']) !== '') {\n\t\t\t$cookieName = $GLOBALS['TYPO3_CONF_VARS']['FE']['cookieName'];\n\t\t}\n\n\t\tif (!$_COOKIE[$cookieName]) {\n\t\t \treturn TRUE; // spam\n\t\t}\n\n\t\treturn FALSE; // no spam\n\t}", "function has_cookies() // Will fail on users first visit, but then will catch on\n{\n\tglobal $HAS_COOKIES;\n\tif ($HAS_COOKIES!==NULL) return $HAS_COOKIES;\n\n\t/*if (($GLOBALS['DEBUG_MODE']) && (get_param_integer('keep_debug_has_cookies',0)==0) && (!running_script('occle')))\tWe know this works by now, was tested for years. Causes annoyance when developing\n\t{\n\t\t$_COOKIE=array();\n\t\treturn false;\n\t}*/\n\n\tif (isset($_COOKIE['has_cookies']))\n\t{\n\t\t$HAS_COOKIES=true;\n\t\treturn true;\n\t}\n\trequire_code('users_active_actions');\n\tocp_setcookie('has_cookies','1');\n\t$HAS_COOKIES=false;\n\treturn false;\n}", "function lookup_cookies(){\n\t\n\t\tif( empty($_COOKIE[COOKIE_NAME]) || empty($_COOKIE[COOKIE_KEY]) )\n\t\t\treturn 0;\n\treturn 1;\n}", "public function checkCookie()\n\t{\n\t\t$return = false;\n\t\t// if the db is null the cookie doesn't exist\n\t\tif($this->userID === null && isset($_COOKIE[$this->cookieName]))\n\t\t{\n\t\t\t//print_r($_COOKIE);\n\t\t\t$this->userID = $this->database->findCookie($_COOKIE[$this->cookieName]);\n\t\t}\n\t\t\n\t\tif($this->userID !== null)\n\t\t{\n\t\t\t//print_r($_COOKIE);\n\t\t\t$return = true;\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function checkAuthWithCookie()\n {\n $loadSession = R::findOne('authorization', 'token = ?', array($_COOKIE['auth']));\n\n if ($loadSession) {\n $loadUser = R::load('users', $loadSession['user_id']);\n\n $_SESSION['auth'] = [\n 'id' => $loadUser['id'],\n 'name' => $loadUser['name'],\n 'password' => $loadUser['password'],\n 'token' => $_COOKIE['auth']\n ];\n } else {\n $this->userExit();\n }\n }", "public function isCookies()\n {\n // If the cookies is not empty\n if($this->cookies->getCookie(self::$cookiePassword))\n {\n return true;\n }\n return false;\n }", "public function testSetCookieWithNameAndValueAndDomainAndPath()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', array(\n 'value' => 'bar',\n 'domain' => '.slimframework.com',\n 'path' => '/foo'\n ));\n $this->assertEquals($r['Set-Cookie'], 'foo=bar; domain=.slimframework.com; path=/foo');\n }", "public function testDeleteCookieByNameAndDomain1()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', 'bar'); //Note: This does not have domain associated with it\n $r->setCookie('abc', '123');\n $r->deleteCookie('foo', array('domain' => '.slimframework.com')); //This SHOULD NOT remove the `foo` cookie\n $this->assertEquals(1, preg_match(\"@foo=bar\\nabc=123\\nfoo=; domain=.slimframework.com; expires=@\", $r['Set-Cookie']));\n }", "function try_cookie_login()\n{\n\t$member=NULL;\n\n\t// Preprocess if this is a serialized cookie\n\t$member_cookie_name=get_member_cookie();\n\t$bar_pos=strpos($member_cookie_name,'|');\n\t$colon_pos=strpos($member_cookie_name,':');\n\tif ($colon_pos!==false)\n\t{\n\t\t$base=substr($member_cookie_name,0,$colon_pos);\n\t\tif ((array_key_exists($base,$_COOKIE)) && ($_COOKIE[$base]!=''))\n\t\t{\n\t\t\t$real_member_cookie=substr($member_cookie_name,$colon_pos+1);\n\t\t\t$real_pass_cookie=substr(get_pass_cookie(),$colon_pos+1);\n\n\t\t\t$the_cookie=$_COOKIE[$base];\n\t\t\tif (get_magic_quotes_gpc())\n\t\t\t{\n\t\t\t\t$the_cookie=stripslashes($_COOKIE[$base]);\n\t\t\t}\n\n\t\t\tsecure_serialized_data($the_cookie,array());\n\n\t\t\t$unserialize=@unserialize($the_cookie);\n\n\t\t\tif (is_array($unserialize))\n\t\t\t{\n\t\t\t\tif (array_key_exists($real_member_cookie,$unserialize))\n\t\t\t\t{\n\t\t\t\t\t$the_member=$unserialize[$real_member_cookie];\n\t\t\t\t\tif (get_magic_quotes_gpc()) $the_member=addslashes(@strval($the_member));\n\t\t\t\t\t$_COOKIE[get_member_cookie()]=$the_member;\n\t\t\t\t}\n\t\t\t\tif (array_key_exists($real_pass_cookie,$unserialize))\n\t\t\t\t{\n\t\t\t\t\t$the_pass=$unserialize[$real_pass_cookie];\n\t\t\t\t\tif (get_magic_quotes_gpc()) $the_pass=addslashes($the_pass);\n\t\t\t\t\t$_COOKIE[get_pass_cookie()]=$the_pass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telseif ($bar_pos!==false)\n\t{\n\t\t$base=substr($member_cookie_name,0,$bar_pos);\n\t\tif ((array_key_exists($base,$_COOKIE)) && ($_COOKIE[$base]!=''))\n\t\t{\n\t\t\t$real_member_cookie=substr($member_cookie_name,$bar_pos+1);\n\t\t\t$real_pass_cookie=substr(get_pass_cookie(),$bar_pos+1);\n\n\t\t\t$the_cookie=$_COOKIE[$base];\n\t\t\tif (get_magic_quotes_gpc())\n\t\t\t{\n\t\t\t\t$the_cookie=stripslashes($_COOKIE[$base]);\n\t\t\t}\n\n\t\t\t$cookie_contents=explode('||',$the_cookie);\n\n\t\t\t$the_member=$cookie_contents[intval($real_member_cookie)];\n\t\t\tif (get_magic_quotes_gpc()) $the_member=addslashes($the_member);\n\t\t\t$_COOKIE[get_member_cookie()]=$the_member;\n\n\t\t\t$the_pass=$cookie_contents[intval($real_pass_cookie)];\n\t\t\tif (get_magic_quotes_gpc()) $the_pass=addslashes($the_pass);\n\t\t\t$_COOKIE[get_pass_cookie()]=$the_pass;\n\t\t}\n\t}\n\n\tif ((array_key_exists(get_member_cookie(),$_COOKIE)) && (array_key_exists(get_pass_cookie(),$_COOKIE)))\n\t{\n\t\t$store=$_COOKIE[get_member_cookie()];\n\t\t$pass=$_COOKIE[get_pass_cookie()];\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t$store=stripslashes($store);\n\t\t\t$pass=stripslashes($pass);\n\t\t}\n\t\tif ($GLOBALS['FORUM_DRIVER']->is_cookie_login_name())\n\t\t{\n\t\t\t$username=$store;\n\t\t\t$store=strval($GLOBALS['FORUM_DRIVER']->get_member_from_username($store));\n\t\t} else $username=$GLOBALS['FORUM_DRIVER']->get_username(intval($store));\n\t\t$member=intval($store);\n\t\tif (!is_guest($member))\n\t\t{\n\t\t\tif ($GLOBALS['FORUM_DRIVER']->is_hashed())\n\t\t\t{\n\t\t\t\t// Test password hash\n\t\t\t\t$login_array=$GLOBALS['FORUM_DRIVER']->forum_authorise_login(NULL,$member,$pass,$pass,true);\n\t\t\t\t$member=$login_array['id'];\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// Test password plain\n\t\t\t\t$login_array=$GLOBALS['FORUM_DRIVER']->forum_authorise_login(NULL,$member,apply_forum_driver_md5_variant($pass,$username),$pass,true);\n\t\t\t\t$member=$login_array['id'];\n\t\t\t}\n\n\t\t\tif (!is_null($member))\n\t\t\t{\n\t\t\t\tglobal $IS_A_COOKIE_LOGIN;\n\t\t\t\t$IS_A_COOKIE_LOGIN=true;\n\n\t\t\t\tcreate_session($member,0,(isset($_COOKIE[get_member_cookie().'_invisible'])) && ($_COOKIE[get_member_cookie().'_invisible']=='1'));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $member;\n}", "public function getCookies();", "public function getCookies();", "public function getCookies();", "public function getCookies();", "public function getCookie($cookieName);", "public function loadCookieJar()\n {\n if ($this->parent->settingsAdapter['type'] == 'file') {\n // File-based cookie jar, which also persists temporary session cookies.\n // The FileCookieJar saves to disk whenever its object is destroyed,\n // such as at the end of script or when calling updateFromSettingsAdapter().\n $this->jar = new FileCookieJar($this->parent->settings->cookiesPath, true);\n } else {\n $restoredCookies = @json_decode($this->parent->settings->get('cookies'), true);\n if (!is_array($restoredCookies)) {\n $restoredCookies = []; // Create new, empty jar if restore failed.\n }\n $this->jar = new CookieJar(false, $restoredCookies);\n }\n\n // Verify that the jar contains a non-expired csrftoken for the API\n // domain. Instagram gives us a 1-year csrftoken whenever we log in.\n // If it's missing, we're definitely NOT logged in! But even if all of\n // these checks succeed, the cookie may still not be valid. It's just a\n // preliminary check to detect definitely-invalid session cookies!\n $foundCSRFToken = false;\n foreach ($this->jar->getIterator() as $cookie) {\n if ($cookie->getName() == 'csrftoken'\n && $cookie->getDomain() == 'i.instagram.com'\n && $cookie->getExpires() > time()) {\n $foundCSRFToken = true;\n break;\n }\n }\n if (!$foundCSRFToken) {\n $this->parent->isLoggedIn = false;\n }\n }", "public function set ($domain, $cookie)\n {\n $cparts = array_map (\"trim\", explode (\";\", $cookie));\n\n $c = array(\n // Note! If the domain is set in the raw cookie that will overwrite\n // this value.\n 'domain' => $domain,\n 'path' => '/',\n 'secure' => 'FALSE',\n 'expires' => null\n );\n\n $v = array();\n foreach ($cparts as $cpart) {\n if (!preg_match ('/(.*?)=(.*)/', $cpart, $m))\n continue;\n\n list (, $name, $val) = $m;\n\n if ($name) $name = strtolower ($name);\n\n if (array_key_exists ($name, $c))\n $c[$name] = $val;\n else {\n $v['name'] = $name;\n $v['value'] = $val;\n }\n }\n\n $cf = $this->cookiejar;\n\n if ($c['expires'])\n $c['expires'] = strtotime ($c['expires']);\n\n if (!file_exists ($cf))\n file_put_contents ($cf, \"\");\n\n $lines = file ($cf);\n\n $fh = fopen ($cf.\".t\", 'w');\n if (!is_resource ($fh))\n return false;\n\n $value = sprintf (\n \"%s\\t%s\\t%s\\t%s\\t%s\\t%s\\n\",\n $c['domain'], $c['path'], $c['expires'], $c['secure'],\n $v['name'], $v['value']\n );\n\n $wrote = false;\n\n foreach ($lines as $line) {\n list ($d, $p,,,$n,) = sscanf ($line, \"%s\\t%s\\t%s\\t%s\\t%s\\t%s\");\n if ($d == $c['domain'] && $p == $c['path'] && $n == $v['name']) {\n fwrite ($fh, $value);\n $wrote = true;\n }\n else\n fwrite ($fh, $line);\n }\n\n if (!$wrote)\n fwrite ($fh, $value);\n\n fclose ($fh);\n rename ($cf.\".t\", $cf);\n return true;\n }", "public function testDeleteCookieByNameAndDomain2()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', array(\n 'value' => 'bar',\n 'domain' => '.slimframework.com' //Note: This does have domain associated with it\n ));\n $r->setCookie('abc', '123');\n $r->deleteCookie('foo', array('domain' => '.slimframework.com')); //This SHOULD remove the `foo` cookie\n $this->assertEquals(1, preg_match(\"@abc=123\\nfoo=; domain=.slimframework.com; expires=@\", $r['Set-Cookie']));\n }", "public function testRemove()\n {\n $this->assertTrue($this->cookies->exists($this->request, 'our_cookie'));\n [\n $this->request,\n $this->response,\n ] = $this->cookies->remove($this->request, $this->response, 'our_cookie');\n\n $this->assertFalse($this->cookies->exists($this->request, 'our_cookie'));\n }", "public function testDeleteCookieByNameAndCustomProps()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', 'bar');\n $r->setCookie('abc', '123');\n $r->deleteCookie('foo', array(\n 'secure' => true,\n 'httponly' => true\n ));\n $this->assertEquals(1, preg_match(\"@abc=123\\nfoo=; expires=.*; secure; HttpOnly@\", $r['Set-Cookie']));\n }", "public function testModify()\n {\n $path = '/cookie/update';\n $client = $this->makeRequest($path);\n\n $cookies = $client->getCookieJar()->all();\n $this->assertCount(1, $cookies);\n $cookie = $cookies[0];\n $this->assertJsonStringEqualsJsonString('[\"bar\"]', $cookie->getValue());\n $this->assertSame(false, $cookie->isHttpOnly());\n $this->assertSame(2000000000, $cookie->getExpiresTime());\n }", "public function __construct()\n {\n /**\n * A file name and path to save all internal cookies\n */\n $this->cookieFile = getcwd().\"\\\\cookie.txt\";\n\n }", "function CookieCheck() {\n\n\tif (isset($_COOKIE[CC_COOKIE])) {\n\n\t\t// Cookies are enabled\n\t\tif (isset($_GET[CC_QUERY])) {\n\t\t\t// Reload the page using the initial query string\n\t\t\t// Get the initial query string and prepare it for appending\n\t\t\t$qstring = $_SESSION['_SERVER']['QUERY_STRING'];\n\t\t\t$qstring = ($qstring == '' ? '': '?') . $qstring;\n\t\t\t// Get needed $_SERVER variables\n\t\t\t$http_host = $_SESSION['_SERVER']['HTTP_HOST'];\n\t\t\t$php_self = $_SESSION['_SERVER']['PHP_SELF'];\n\t\t\t// Reload the page, the session id will be propogated in the cookie\n\t\t\theader('Location: ' . CC_PROTOCOL . '://' . $http_host . $php_self .\n\t\t\t\t$qstring);\n\t\t\texit();\n\t\t\t// Do not continue; rather exit and reload the page\n\t\t}\n\t\t// Restore any globals that are saved\n\t\t$old_session_settings = _cc_save_session_settings();\n\t\tif (!_cc_initialise_session_settings()) {\n\t\t\tthrow new Exception('CookieCheck Error: Unable to initialise ' .\n\t\t\t 'session settings');\n\t\t}\n\t\tsession_id(CC_SESSION_ID_STEM . strval($_COOKIE[CC_COOKIE]));\n\t\tsession_start();\n\t\t_cc_restore_globals();\n\t\tsession_destroy();\n\t\tif (!_cc_restore_session_settings($old_session_settings)) {\n\t\t\tthrow new Exception('CookieCheck Warning: Unable to restore ' .\n\t\t\t 'session settings');\n\t\t}\n\n\t\treturn TRUE;\n\n\t} else {\n\n\t\t// Cookies are either disabled or not yet tested for\n\t\tif (isset($_GET[CC_QUERY])) {\n\t\t\t// Continue on and return FALSE as cookies are disabled\n\t\t} else {\n\t\t\t// Append a flag to the end of the query string, indicating that a\n\t\t\t// test cookie has been sent.\n\t\t\t$qstring = $_SERVER['QUERY_STRING'] . \n\t\t\t\t($_SERVER['QUERY_STRING'] == '' ? '' : '&') . CC_QUERY . '=' .\n\t\t\t\t'test';\n\t\t\t// Send a test cookie\n\t\t\tsetcookie(CC_COOKIE, 'CookieCheck', \n\t\t\t\t(time() + CC_COOKIE_LIFE_DAYS * 24 * 60 * 60), CC_COOKIE_PATH);\n\t\t\theader('Location: ' . CC_PROTOCOL . '://' . $_SERVER['HTTP_HOST'] . \n\t\t\t\t$_SERVER['PHP_SELF'] . '?' . $qstring);\n\t\t\texit();\n\t\t\t// Do not continue; rather exit and reload the page\n\t\t}\n\t\t\n\t\treturn FALSE;\n\n\t}\n\n}", "public function testSetCookieWithNameAndValueAndDomain()\n {\n $r = new \\Slim\\Http\\Response();\n $r->setCookie('foo', array(\n 'value' => 'bar',\n 'domain' => '.slimframework.com'\n ));\n $this->assertEquals('foo=bar; domain=.slimframework.com', $r['Set-Cookie']);\n }", "function user_has_valid_cookie_index(){\n\tif(isset($_COOKIE['user'])){\n\t\t$user=base64_decode($_COOKIE['user']);\n\t\tif(db_user_exists($user)){\n\t\t\techo '<script>window.location.replace(\"home.php\");</script>';\n\t\t}else{\n\t\t\tsetcookie(\"user\", \"\", time()-3600);\n\t\t}\n\t}\n}", "public function checkCookieToken()\n\t{\n\t\t$context = Context::getInstance();\n\t\tif(isset($_COOKIE['frmauth']) && ($context->session->userID == User::GUEST)){\n\t\t\t$val = explode('_', $_COOKIE['frmauth']);\n\t\t\t$token = UserToken::getUserToken($val[0], $val[1], $val[2]);\n\t\t\tif($token){\n\t\t\t\t$context->session->userID = (int) $val[0];\n\t\t\t\t$context->user = User::getUserById($val[0]);\n\t\t\t\t$token->delete();\n\t\t\t\tUserToken::setCookieToken($context->user, $val[1]);\n\t\t\t}else{\n\t\t\t\t$token = UserToken::getByUidAndSid($val[0], $val[1]);\n\t\t\t\tif($token){\n\t\t\t\t\t//possible cookie theft\n\t\t\t\t\tUserToken::deleteByUidAndSid($val[0], $val[1]);\n\t\t\t\t\t$context->session->destroy();\n\t\t\t\t\techo 'cookie hijacked';\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getCookieFile()\n {\n $username = getenv('UPTOBOX_USERNAME');\n\n $file = base_path(\".cookies/{$username}.cookie\");\n\n if (!file_exists(dirname($file))) {\n mkdir(dirname($file));\n }\n\n return $file;\n }", "function cli_set_expire() { \n \n // First time visit and class exists.\n\tif ( class_exists( 'Cookie_Law_Info_Public' ) ) {\n\t?>\n\t<script type=\"text/javascript\">\n\n\t\tCLI_ACCEPT_COOKIE_EXPIRE = 182;\n\t\t\n\t</script>\n\t<?php\n\t}\n}", "public function testExample()\n {\n $this->call('GET', '/setlocale/ru')->assertCookie('locale', 'ru');\n $this->call('GET', '/setlocale/en')->assertCookie('locale', 'en');\n }", "public function is_cookie_set() {\n\t\treturn ! empty( $_COOKIE[ RECOVERY_MODE_COOKIE ] );\n\t}", "private function _isCookieExist($cookie_name){\n\t\tif($this->input->cookie($cookie_name)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.69548696", "0.69244957", "0.6901456", "0.6891342", "0.67465216", "0.67016876", "0.66701096", "0.65983176", "0.6541075", "0.6523928", "0.651467", "0.65140337", "0.6502596", "0.6497522", "0.64853644", "0.646569", "0.6441597", "0.64112836", "0.63568056", "0.63363147", "0.6328645", "0.6327673", "0.6306145", "0.6296682", "0.6288053", "0.62829393", "0.6264559", "0.6245008", "0.6239059", "0.6212314", "0.6204523", "0.6201741", "0.6194398", "0.6187025", "0.61843693", "0.61824894", "0.617519", "0.6168085", "0.6157326", "0.6138315", "0.61319757", "0.61028", "0.6090411", "0.60874665", "0.60750496", "0.6058951", "0.6049365", "0.6032487", "0.6022113", "0.602074", "0.6010659", "0.6006927", "0.6005493", "0.5992533", "0.59842825", "0.59789973", "0.5970889", "0.59634334", "0.5956779", "0.595561", "0.5952534", "0.5925077", "0.59243053", "0.5910227", "0.5908634", "0.5905295", "0.5899086", "0.58987796", "0.58918124", "0.5891735", "0.5889167", "0.586351", "0.58610916", "0.58555865", "0.5852302", "0.5850303", "0.58472717", "0.58421034", "0.5829694", "0.5828181", "0.5828181", "0.5828181", "0.5828181", "0.5823766", "0.5812647", "0.58125025", "0.58117735", "0.5798863", "0.57868844", "0.57798773", "0.577805", "0.5775753", "0.5763211", "0.57615334", "0.5748594", "0.57460016", "0.5738923", "0.57362324", "0.5735863", "0.57357156" ]
0.7308585
0
Sort C functions in the order of protosMap, unknown funcs last
Сортировать функции C в порядке protosMap, неизвестные функции в конце
private function getSortedCFuncs($cFuncs, $protosMap) { $sortedCFuncs = []; foreach ($protosMap as $name => $proto) { if (isset($cFuncs[$name])) { $sortedCFuncs[$name] = $cFuncs[$name]; } } foreach ($cFuncs as $name => $cFunc) { if (!isset($sortedCFuncs[$name])) { $sortedCFuncs[$name] = $cFunc; } } return $sortedCFuncs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userfunclist($file, $sort = FALSE) {\n\n $file = join(\"\\n\",file($file));\n preg_match_all('/function\\s+(\\w+)/', $file, $m);\n $functions = $m[1];\n if ($sort===TRUE) {\n asort($functions);\n }\n return $functions;\n}", "private function getUpdatedCFuncs($cFuncs, $namespace, $protosMap) {\n foreach ($protosMap as $name => $proto) {\n if (!isset($cFuncs[$name])) {\n $cFuncs[$name] = [\n 'comment' => \"TODO {$name}\",\n 'first' => $proto['line'],\n 'body' => ''\n ];\n } else {\n $cFuncs[$name]['first'] = $proto['line'];\n if (!isset($cFuncs[$name]['comment'])) {\n $cFuncs[$name]['comment'] = \"TODO {$name}\";\n }\n }\n }\n return $this->getSortedCFuncs($cFuncs, $protosMap);\n }", "function SortLCObject($right, $left)\n{\n $right = NormalizeLC($right[\"call_number\"]);\n $left = NormalizeLC($left[\"call_number\"]);\n return (strcmp($right, $left));\n}", "function sort() { }", "function usort_multi_level(&$array, array $callbacks)\n{\n //This is to prevent the bug https://bugs.php.net/bug.php?id=50688\n @usort($array, function($a, $b) use ($callbacks) {\n foreach ($callbacks as $callback) {\n $compareResult = call_user_func($callback, $a, $b);\n if ($compareResult !== 0) {\n return $compareResult;\n }\n }\n return 0;\n });\n}", "private function __order($controller)\n {\n foreach ($this->__callbacks as $var) {\n if (isset($controller->{$var})) {\n $callbacks = $lastCallbacks = $firstCallbacks = array();\n foreach ((array)$controller->{$var} as $k => $v) {\n if (is_array($v)) {\n if (isset($v['order']) && $v['order'] == 'last') {\n unset($v['order']);\n $lastCallbacks[$k] = $v;\n } elseif (isset($v['order']) && $v['order'] == 'first') {\n unset($v['order']);\n $firstCallbacks[$k] = $v;\n } else {\n $callbacks[$k] = $v;\n }\n } else {\n $callbacks[$v] = array();\n }\n }\n\n $i = count($firstCallbacks) + 1;\n foreach ($callbacks as $cb => $d) {\n if (!isset($callbacks[$cb]['order'])) {\n $callbacks[$cb]['order'] = $i;\n }\n $i++;\n }\n \n $i = count($firstCallbacks);\n foreach (array_reverse($firstCallbacks) as $cb => $d) {\n $d['order'] = $i;\n $callbacks = $callbacks + array($cb => $d);\n $i--;\n }\n \n $i = count($firstCallbacks) + count($callbacks);\n foreach ($lastCallbacks as $cb => $d) {\n $d['order'] = $i;\n $callbacks = $callbacks + array($cb => $d);\n $i++;\n }\n \n uasort($callbacks, array($this, '_cmp'));\n $controller->{$var} = $callbacks;\n }\n }\n }", "protected function _sort() {}", "public function doSort();", "function sort_cbk($a, $b)\n{\n global $sort_col;\n\n if ($sort_col == \"fn\") {\n\n // case insensitive ascending sort for function names\n $left = strtoupper($a[\"fn\"]);\n $right = strtoupper($b[\"fn\"]);\n\n if ($left == $right)\n return 0;\n return ($left < $right) ? -1 : 1;\n\n } else {\n\n // descending sort for all others\n $left = $a[$sort_col];\n $right = $b[$sort_col];\n\n if ($left == $right)\n return 0;\n return ($left > $right) ? -1 : 1;\n }\n}", "public function sort();", "public function sort();", "public function natcasesort()\n{\n\treturn natcasesort($this->registry);\n}", "public function sortByCallback($callback);", "function _sort_name_callback($a, $b)\n{\n}", "public function sort(callable $function): Sequence;", "function dst_sort($a, $b)\n{\n\n return strcasecmp(constant(\"_DST_OPTS\". $a['id'] .\"_\"), constant(\"_DST_OPTS\". $b['id'] .\"_\"));\n}", "function sort() {\n #in the future\n }", "public abstract function gdoSortObjects();", "public function asort() {}", "function _sort_uname_callback($a, $b)\n{\n}", "function awkwardfunction( $a ){\n natcasesort($a);\n $b = array();\n $i = 0;\n foreach ( $a as $c ){\n $b[$i] = $c;\n $i++;\n }\n \n unset( $a );\n unset( $i );\n \n //TODO: sort by member access level or something :x\n \n usort( $b , \"access_strcmp\" );\n return $b;\n}", "private function sort_callback($a, $b)\n {\n }", "protected function sortActivePackagesByDependencies() {}", "public function ksort()\n{\n\tksort($this->registry);\n}", "function uasort(&$array, $cmp_function)\n{\n}", "protected function sort_shortcodes_by_function($shortcodes) {\r\n foreach($shortcodes as $shortcode) {\r\n switch ($shortcode['type']) {\r\n case 'native':\r\n $shortcode_array['Native WordPress'][] = $shortcode;\r\n break;\r\n case 'plugin':\r\n case 'theme':\r\n $name = $shortcode['details']['Name'];\r\n \r\n //Sometimes details aren't provided\r\n if (!$name) {\r\n $name = $shortcode['name'];\r\n }\r\n\r\n $shortcode_array[$shortcode['details']['Name']][] = $shortcode;\r\n break;\r\n default:\r\n $shortcode_array['Misc'][] = $shortcode;\r\n break;\r\n }\r\n }\r\n return $shortcode_array;\r\n }", "function wf_sort_shipping_methods($available_shipping_methods, $package)\n{\n$sort_order\t= array(\n'BE_Table_Rate_Shipping' => array(),\n'click-and-pick_shipping_method' => array(),\n'local_pickup'\t\t=>\tarray(),\n'legacy_flat_rate'\t=>\tarray(),\t\t\n);\n\n// unsetting all methods that needs to be sorted\nforeach($available_shipping_methods as $carrier_id => $carrier){\n$carrier_name\t=\tcurrent(explode(\":\",$carrier_id));\nif(array_key_exists($carrier_name,$sort_order)){\n $sort_order[$carrier_name][$carrier_id]\t=\t\t$available_shipping_methods[$carrier_id];\n unset($available_shipping_methods[$carrier_id]);\n}\n}\n\n// adding methods again according to sort order array\nforeach($sort_order as $carriers){\n$available_shipping_methods\t=\tarray_merge($available_shipping_methods,$carriers);\n}\nreturn $available_shipping_methods;\n}", "function sort_by_freq_and_name(&$map) {\n array_walk($map, 'append_key');\n uasort($map, 'freq_name_comparator');\n array_walk($map, 'remove_key');\n}", "function update_type_sort($updates=array())\n{\n if(!is_array($updates) || count($updates) <= 2) return $updates;\n $updates_sort_update = array(); $updates_sort_hotfix = array();\n $updates_sort_bugfix = array(); $updates_sort_security = array();\n $updates_sort_apiupdate = array(); $updates_sort_enhancement = array();\n\n foreach($updates as $update)\n {\n switch($update['type'])\n {\n case '1': $updates_sort_hotfix[] = $update; break;\n case '2': $updates_sort_bugfix[] = $update; break;\n case '3': $updates_sort_security[] = $update; break;\n case '4': $updates_sort_enhancement[] = $update; break;\n case '5': $updates_sort_apiupdate[] = $update; break;\n default: $updates_sort_update[] = $update; break;\n }\n }\n\n return array_merge($updates_sort_hotfix,$updates_sort_bugfix,$updates_sort_security,$updates_sort_update,$updates_sort_apiupdate,$updates_sort_enhancement);\n}", "function sort_function($ext1,$ext2,$rootPath = '') {\n\t$dep1 = $ext1->isDepencies($ext2->Name,$rootPath);\n\t$dep2 = $ext2->isDepencies($ext1->Name,$rootPath);\n\tif($ext1->Name == 'applis')$res = +1;\n\telse if($ext2->Name == 'applis')$res = -1;\n\telse if($dep1 && !$dep2)$res = +1;\n\telse if($dep2 && !$dep1)$res = -1;\n\telse $res = 0;\n\treturn $res;\n}", "public function getSortingCallbacks(): array\n {\n return $this->sortingCallbacks;\n }", "public static function listOrderByKeys()\n {\n $classMethods = get_class_methods(get_class());\n $calledClassMethods = get_class_methods(get_called_class());\n\n $filteredMethods = array_filter(\n $calledClassMethods, function ($calledClassMethod) use ($classMethods) {\n return !in_array($calledClassMethod, $classMethods, true);\n }\n );\n\n $list = [];\n foreach ($filteredMethods as $k => $v) {\n $list[$v] = $v;\n }\n\n return $list;\n }", "public function getAllFunctions()\n {\n $ret = array_merge(\n $this->getFunctionsClass('CHAR'),\n $this->getFunctionsClass('NUMBER'),\n $this->getFunctionsClass('DATE'),\n $this->getFunctionsClass('UUID')\n );\n sort($ret);\n return $ret;\n }", "private function order_by_priority() {\n\t\t$order = array();\n\t\tforeach ( $this->controls as $key => $control_object ) {\n\t\t\t$order[ $key ] = $control_object->priority;\n\t\t}\n\t\tarray_multisort( $order, SORT_ASC, $this->controls );\n\t}", "function pegaFuncao($secao){\n\techo \"<br><br>\";\n\t$imports = split(\"#\", $secao);\n\t$funcoes = array();\n\tforeach($imports as $dll){\n\t\tif(strlen($dll) > 6){\n\t\t\tif(!strpos($dll, \".\") !== false){\n\t\t\t\tarray_push($funcoes, $dll);\n\t\t\t}\n\t\t}\n\t}\n\tsort($funcoes);\n\tforeach($funcoes as $dado){\n\t\techo $dado.\"<br>\";\n\t}\n}", "public static function getSortFunctionNames($include_saved_posts = false)\n {\n // base sort function names\n $sort_func_names = [\n 'sortByNewest',\n 'sortByOldest',\n ];\n\n // check whether to include sort function names for saved posts\n if ($include_saved_posts) {\n $sort_func_names[] = 'sortByRecentlySaved';\n }\n\n return $sort_func_names;\n }", "public function sort(Closure $callback);", "function uasort(&$array,$cmp_function)\n{\n}", "function messageIndexSort()\n{\n\t// Default sort methods for message index.\n\t$sort_methods = array(\n\t\t'subject' => 'mf.subject',\n\t\t'starter' => 'COALESCE(memf.real_name, mf.poster_name)',\n\t\t'last_poster' => 'COALESCE(meml.real_name, ml.poster_name)',\n\t\t'replies' => 't.num_replies',\n\t\t'views' => 't.num_views',\n\t\t'likes' => 't.num_likes',\n\t\t'first_post' => 't.id_topic',\n\t\t'last_post' => 't.id_last_msg'\n\t);\n\n\tcall_integration_hook('integrate_messageindex_sort', array(&$sort_methods));\n\n\treturn $sort_methods;\n}", "protected function sortAllInjections()\n {\n $this->getInjectionContainer()->sortInjections();\n }", "private function sort(array &$definitions) {\n usort($definitions, [$this, 'comparator']);\n }", "function _wp_object_name_sort_cb($a, $b)\n{\n}", "public function getSorting();", "public function sortImportChain()\r\n {\r\n // Sort keys\r\n ksort($this->importTypes);\r\n // Create empty array\r\n $array = array();\r\n // Loop through importTypes\r\n foreach ($this->importTypes as $name => $importType) {\r\n $array[$name] = $importType;\r\n }\r\n // Set importTypes property with consecutive keys\r\n $this->importTypes = $array;\r\n }", "function OrderBy();", "private static function getOrderModules(): array{\n $modules = array_values(self::$modules);\n uasort($modules, function (Module $a, Module $b){\n $a = $a->getPriority();\n $b = $b->getPriority();\n if ($a == $b) {\n return 0;\n }\n return ($a < $b) ? -1 : 1;\n });\n return $modules;\n }", "public function order();", "public function order();", "function sortNodes(&$nodes, $order) {\n\n usort($nodes, function($a, $b) use($order) {\n\n $result = '';\n if ($order == 'ASCE') {//ascending order\n $result = $a->f > $b->f;\n } else // $order == 'DESC' , descending order\n $result = $a->f < $b->f;\n return $result;\n });\n $nodes = array_values($nodes);\n //return $nodes;\n}", "function usort(&$array, $cmp_function)\n{\n}", "function sortHash2($array,$code){\n echo \"The code is $code and the input array is: ||\";\n foreach($array as $key => $value){\n echo \" $key => $value ||\";\n }\n echo\"<br/>\";\n switch($code){\n case 1: asort($array);\n echo \"||\";\n foreach($array as $key => $value){\n echo \" $key => $value ||\";\n }\n break;\n case 2: ksort($array);\n echo \"||\";\n foreach($array as $key => $value){\n echo \" $key => $value ||\";\n }\n break;\n case 3: arsort($array);\n echo \"||\";\n foreach($array as $key => $value){\n echo \" $key => $value ||\";\n }\n break;\n case 4: krsort($array);\n echo \"||\";\n foreach($array as $key => $value){\n echo \" $key => $value ||\";\n }\n break;\n default: echo \"Wrong Code\";\n break;\n }\n echo \"<br /><br />\";\n }", "function _sort_func($a, $b)\n {\n // each is actually a key/value pair, so that it can compare using both\n list($a_key, $a_value) = $a;\n list($b_key, $b_value) = $b;\n\n if ($a_value == $b_value) {\n // if the values are the same, break ties using the key\n return strcmp($a_key, $b_key);\n\n } else {\n // if not, just sort normally\n if ($a_value > $b_value) {\n return -1;\n } else {\n return 1;\n }\n }\n\n // 0 should not be possible because keys must be unique\n }", "private function get_sort(array $rules) {\n $sort = array();\n if (count($rules) > 0) {\n foreach ($rules as $key => $op) {\n $key = strtolower($key);\n\n if ($op == \"DESC\") $op = -1;\n else if ($op == \"ASC\") $op = 1;\n\n $sort[$key] = $op;\n }\n }\n return $sort;\n }", "function multi_sort($a,$b)\n{\n\tglobal $M_SORT_KEY;\n\t$keys=explode(',',is_string($M_SORT_KEY)?$M_SORT_KEY:strval($M_SORT_KEY));\n\t$first_key=$keys[0];\n\tif ($first_key[0]=='!') $first_key=substr($first_key,1);\n\n\tif ((is_string($a[$first_key])) || (is_object($a[$first_key])))\n\t{\n\t\t$ret=0;\n\t\tdo\n\t\t{\n\t\t\t$key=array_shift($keys);\n\t\t\t$av=$a[$key];\n\t\t\t$bv=$b[$key];\n\n\t\t\t// If calling, must put an \"@\" around the uasort call because of a PHP bug\n\t\t\tif (is_object($av)) $av=$av->evaluate();\n\t\t\tif (is_object($bv)) $bv=$bv->evaluate();\n\n\t\t\tif ($key[0]=='!') // Flip around\n\t\t\t{\n\t\t\t\t$key=substr($key,1);\n\t\t\t\t$ret=-strnatcasecmp($av,$bv);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$ret=strnatcasecmp($av,$bv);\n\t\t\t}\n\t\t}\n\t\twhile ((count($keys)!=0) && ($ret==0));\n\t\treturn $ret;\n\t}\n\n\tdo\n\t{\n\t\t$key=array_shift($keys);\n\t\tif ($key[0]=='!') // Flip around\n\t\t{\n\t\t\t$key=substr($key,1);\n\t\t\t$ret=($a[$key]>$b[$key])?-1:(($a[$key]==$b[$key])?0:1);\n\t\t} else\n\t\t{\n\t\t\t$ret=($a[$key]>$b[$key])?1:(($a[$key]==$b[$key])?0:-1);\n\t\t}\n\t}\n\twhile ((count($keys)!=0) && ($ret==0));\n\treturn $ret;\n}", "private function loadFunctionMap() {\n $this->_functionMap = [\n 'Conta' => [\n 'require' => 'TbConta.php',\n 'class' => 'TbConta',\n ],\n 'Conta-SoAtivas' => [\n 'require' => 'TbConta.php',\n 'class' => 'TbConta',\n 'method' => 'fSoAtivas',\n ],\n 'BaseDespesa' => [\n 'require' => 'TbBaseDespesa.php',\n 'class' => 'TbBaseDespesa',\n ],\n 'Menu' => [\n 'require' => 'TbMenu.php',\n 'class' => 'TbMenu',\n ],\n 'MetaDespesa' => [\n 'require' => 'TbMetaDespesa.php',\n 'class' => 'TbMetaDespesa',\n ],\n 'Usuario' => [\n 'require' => 'TbUsuario.php',\n 'class' => 'TbUsuario',\n ],\n 'Lancamento' => [\n 'require' => 'TbLancamento.php',\n 'class' => 'TbLancamento',\n ]\n ];\n }", "public static function getCallMap()\n {\n $codebase = ProjectAnalyzer::getInstance()->getCodebase();\n $analyzer_major_version = $codebase->php_major_version;\n $analyzer_minor_version = $codebase->php_minor_version;\n\n if (self::$call_map !== null\n && $analyzer_major_version === self::$loaded_php_major_version\n && $analyzer_minor_version === self::$loaded_php_minor_version\n ) {\n return self::$call_map;\n }\n\n /** @var array<string, array<int|string, string>> */\n $call_map = require(__DIR__ . '/../CallMap.php');\n\n self::$call_map = [];\n\n foreach ($call_map as $key => $value) {\n $cased_key = strtolower($key);\n self::$call_map[$cased_key] = $value;\n }\n\n if ($analyzer_minor_version < self::PHP_MINOR_VERSION) {\n for ($i = self::PHP_MINOR_VERSION; $i > $analyzer_minor_version; $i--) {\n /**\n * @var array{\n * old: array<string, array<int|string, string>>,\n * new: array<string, array<int|string, string>>\n * }\n * @psalm-suppress UnresolvableInclude\n */\n $diff_call_map = require(__DIR__ . '/../CallMap_7' . $i . '_delta.php');\n\n foreach ($diff_call_map['new'] as $key => $_) {\n $cased_key = strtolower($key);\n unset(self::$call_map[$cased_key]);\n }\n\n foreach ($diff_call_map['old'] as $key => $value) {\n $cased_key = strtolower($key);\n self::$call_map[$cased_key] = $value;\n }\n }\n }\n\n self::$loaded_php_major_version = $analyzer_major_version;\n self::$loaded_php_minor_version = $analyzer_minor_version;\n\n return self::$call_map;\n }", "function getSortPriority() : int ;", "protected function sortPipeline() : void\n {\n ksort($this->priorityList);\n $this->pipelineList = [];\n\n foreach ($this->priorityList as $middlewareList) {\n $this->pipelineList = array_merge($this->pipelineList, $middlewareList);\n }\n }", "function sortfunc($val1, $val2) {\n return ($val1[\"p\"] < $val2[\"p\"]);\n }", "abstract public function sorts(): array;", "function custom_sort($a,$b) \n\t\t{\n\t\t\tswitch($_GET['s'])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\treturn $a[2]>$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\treturn $a[2]<$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\treturn $a[3]>$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\treturn $a[3]<$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t}\n\t\t}", "function sort_roadmaps($a, $b) \n{\n return version_compare($a['roadmap_version'], $b['roadmap_version']);\n}", "function lgsl_sort_players_by_name($player_a, $player_b)\n {\n\n $string_a = preg_replace(\"/[^a-z\\d]/i\", \"\", $player_a['name']);\n $string_b = preg_replace(\"/[^a-z\\d]/i\", \"\", $player_b['name']);\n\n // IF ONE OF THE NAMES IS COMPLETELY NON ALPHA NUMERIC THEN PUT IT LAST\n\n if (!$string_a) { return 1; }\n if (!$string_b) { return -1; }\n\n // IF BOTH NAMES ARE COMPLETELY NON ALPHA NUMERIC THEN FALLBACK TO UNFILTERED\n\n if (!$string_a && !$string_b)\n {\n $string_a = $player_a['name'];\n $string_b = $player_b['name'];\n }\n\n // OTHERWISE MAKE THEM LOWERCASE\n\n else\n {\n $string_a = strtolower($string_a);\n $string_b = strtolower($string_b);\n }\n\n // COMPARE EACH CHARACTER SO ITS SORTED ASCENDING ( A TO Z )\n\n $string_length = strlen($string_a);\n\n for ($i=0; $i<$string_length; $i++)\n {\n $char_a = ord($string_a[$i]);\n $char_b = ord($string_b[$i]);\n\n if ($char_a < $char_b) { return -1; }\n if ($char_a > $char_b) { return 1; }\n }\n\n // AT THIS POINT THE TWO NAMES ARE EQUAL IN ORDER\n\n return 0;\n }", "protected function sortPackages()\n {\n $sortPriority = $this->sortPriority;\n $getPriorityValue = function (Entry $object) use ($sortPriority) {\n $result = 100;\n if (isset($sortPriority[$object->getPackageName()])) {\n $result = $sortPriority[$object->getPackageName()];\n } elseif ($object->getDeployStrategy() instanceof Copy || $object->getDeployStrategy() instanceof Move) {\n $result = 101;\n }\n return $result;\n };\n usort(\n $this->packages,\n function ($a, $b) use ($getPriorityValue) {\n /** @var Entry $a */\n /** @var Entry $b */\n $aVal = $getPriorityValue($a);\n $bVal = $getPriorityValue($b);\n if ($aVal == $bVal) {\n return 0;\n }\n return ($aVal > $bVal) ? -1 : 1;\n }\n );\n }", "public function sort($fields);", "public function getSort();", "private static function _name_sort($a, $b)\n {\n }", "function arrSortObjsByKey($key, $order = 'ASC') {\n\treturn function($a, $b) use ($key, $order) {\n\n\t\t// Swap order if necessary\n\t\tif ($order == 'DESC') {\n \t \t\tlist($a, $b) = array($b, $a);\n \t\t} \n\n \t\t// Check data type\n \t\tif (is_numeric($a->$key)) {\n \t\t\treturn $a->$key - $b->$key; // compare numeric\n \t\t} else {\n \t\t\treturn strnatcasecmp($a->$key, $b->$key); // compare string\n \t\t}\n\t};\n}", "protected function sortFilterBlocks( &$filterCtrlBlocks )\r\n\t{\r\n\t}", "public function getSorts();", "function uksort(&$array, $cmp_function)\n{\n}", "protected function _sortSmilies()\n\t{\n\t\t$emoticons = array();\n\t\t\n\t\tif ( ! count( $this->_sortedSmilies ) )\n\t\t{\n\t\t\t/* Sort them! */\n\t\t\t$this->_sortedSmilies = $this->cache->getCache('emoticons');\n\t\t\t\n\t\t\tusort( $this->_sortedSmilies, array( $this, '_thisUsort' ) );\n\t\t}\t\n\t}", "public function sort ($f) {\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/_std/Array.hx:181: characters 3-15\r\n\t\tusort($this->arr, $f);\r\n\t}", "private function sortListeners(string $eventName): void\n {\n krsort($this->listeners[$eventName]);\n $this->sorted[$eventName] = [];\n\n foreach ($this->listeners[$eventName] as &$listeners) {\n foreach ($listeners as &$listener) {\n if (\\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \\Closure && 2 >= \\count($listener)) {\n $listener[0] = $listener[0]();\n $listener[1] ??= '__invoke';\n }\n $this->sorted[$eventName][] = $listener;\n }\n }\n }", "function usort(&$array, $value_compare_func)\n{\n}", "private function runOrderBys()\n {\n foreach($this->fields as $field) {\n if($field->needs_order){\n $req = Request::input('ord_'.$field->field_id);\n $this->data['ord']['ord_asc_'.$field->field_id] = Request::fullUrlWithQuery(['ord_'.$field->field_id => 'asc']);\n $this->data['ord']['ord_desc_'.$field->field_id] = Request::fullUrlWithQuery(['ord_'.$field->field_id => 'desc']);\n if(!empty($req)) {\n if ($req == 'asc') {\n $this->query = $this->query->orderBy($field->field_id, 'asc');\n } else {\n $this->query = $this->query->orderBy($field->field_id, 'desc');\n }\n }\n }\n }\n }", "public function order(Closure|array|string $fields, bool $overwrite = false);", "public function getComparator();", "private function callMap(): array\n {\n return [\n 'api.test',\n 'auth.test',\n 'channels.archive',\n 'channels.create',\n 'channels.history',\n 'channels.info',\n 'channels.invite',\n 'channels.join',\n 'channels.kick',\n 'channels.leave',\n 'channels.list',\n 'channels.mark',\n 'channels.rename',\n 'channels.setPurpose',\n 'channels.setTopic',\n 'channels.unarchive',\n 'chat.delete',\n 'chat.postMessage',\n 'chat.update',\n 'dnd.endDnd',\n 'dnd.endSnooze',\n 'dnd.info',\n 'dnd.setSnooze',\n 'dnd.teamInfo',\n 'emoji.list',\n 'files.comments.add',\n 'files.comments.delete',\n 'files.comments.edit',\n 'files.delete',\n 'files.info',\n 'files.list',\n 'files.revokePublicURL',\n 'files.sharedPublicURL',\n 'files.upload',\n 'groups.archive',\n 'groups.close',\n 'groups.create',\n 'groups.createChild',\n 'groups.history',\n 'groups.info',\n 'groups.invite',\n 'groups.kick',\n 'groups.leave',\n 'groups.list',\n 'groups.mark',\n 'groups.open',\n 'groups.rename',\n 'groups.setPurpose',\n 'groups.setTopic',\n 'groups.unarchive',\n 'im.close',\n 'im.history',\n 'im.list',\n 'im.mark',\n 'im.open',\n 'mpim.close',\n 'mpim.history',\n 'mpim.list',\n 'mpim.mark',\n 'mpim.open',\n 'oauth.access',\n 'pins.add',\n 'pins.list',\n 'pins.remove',\n 'reactions.add',\n 'reactions.get',\n 'reactions.list',\n 'reactions.remove',\n 'rtm.start',\n 'search.all',\n 'search.files',\n 'search.messages',\n 'stars.list',\n 'stars.add',\n 'stars.remove',\n 'team.accessLogs',\n 'team.info',\n 'team.integrationLogs',\n 'usergroups.create',\n 'usergroups.disable',\n 'usergroups.enable',\n 'usergroups.list',\n 'usergroups.update',\n 'usergroups.users.list',\n 'usergroups.users.update',\n 'users.getPresence',\n 'users.info',\n 'users.list',\n 'users.setActive',\n 'users.setPresence',\n ];\n }", "public function thenByAscending(callable $function);", "function sort($arr, $keys, $descent = false) {\r\n $_REQUEST['_xpAS_sort'] = array('key' => $keys, 'descent' => $descent);\r\n function cmp($a, $b) {\r\n $va = xpAS::get($a, $_REQUEST['_xpAS_sort']['key']);\r\n $vb = xpAS::get($b, $_REQUEST['_xpAS_sort']['key']);\r\n if ($va == $vb) return 0;\r\n $sign = $_REQUEST['_xpAS_sort']['descent'] ? -1 : 1;\r\n return $va < $vb ? -1 : 1;\r\n };\r\n usort($arr, 'cmp');\r\n return $arr;\r\n }", "abstract static public function sortAsc($a, $b);", "public static function sortHooks(string $configFile){\n\n\n /**\n * Limitation of this technique:\n * it assumes that only the \"hooks\" section can make call to methods_collection.\n * See the Light_Developer_Wizard's \"Standard service configuration file section\" for more details about sections.\n *\n * So if some entry in the \"others\" section is defined like this:\n *\n * - $myKey.methods_collection:\n *\n * It would interfere with our algorithm below.\n * Although one could argue that such a key is a hook anyway.\n * But I just want you to be aware of it.\n *\n *\n */\n list($config, $nodeInfoMap) = BabyYamlUtil::parseNodeInfoByFile($configFile);\n\n $newConfig = [];\n $hooks = [];\n $hookOffset = null;\n $x = 0;\n foreach ($config as $key => $node) {\n $isHook = false;\n if (preg_match('!^\\$[^.]+\\.methods_collection$!', $key, $match)) {\n $isHook = true;\n $hooks[$key] = $node;\n }\n\n\n if (false === $isHook) {\n $newConfig[$key] = $node;\n } else {\n if (false === array_key_exists('insert_hooks_here', $newConfig)) {\n $newConfig['insert_hooks_here'] = 1;\n $hookOffset = $x;\n }\n }\n $x++;\n }\n ksort($hooks);\n ArrayTool::splice($newConfig, $hookOffset, 1, $hooks);\n\n\n BabyYamlUtil::writeFile($newConfig, $configFile, [\n \"nodeInfoMap\" => $nodeInfoMap,\n ]);\n\n\n ConfigHelper::repositionSectionComments($configFile);\n\n }", "function ReplGenSort($replacements)\n{\n global $ORDERS;\n foreach($replacements AS $colindex => $replacement)\n {\n if(is_numeric($colindex) && isset($ORDERS['COLUMN_'.intval($colindex)]))\n {\n $ORDERS['COLUMN_'.intval($colindex)] = $replacement;\n }\n elseif(isset($ORDERS[$colindex]))\n {\n $ORDERS[$colindex] = $replacement;\n }\n }\n return;\n}", "function usort(&$array,$cmp_function)\n{\n}", "function etbx_info_sort_by_dependencies(array $data) {\n // Sorting dependencies to avoid errors during build.\n $dependencies = array();\n $filtered = array_filter_by_value($data, TRUE, 'fieldable');\n foreach ($filtered as $type => $info) {\n if (!empty($info['dependencies'])) {\n foreach ($info['dependencies'] as $dependency) {\n $dependencies[$dependency][] = $type;\n }\n }\n }\n foreach ($dependencies as $dependency => $dependents) {\n $weight = count($dependencies[$dependency]) * -1;\n $filtered[$dependency]['weight'] = $weight;\n }\n uasort($filtered, 'drupal_sort_weight');\n $data_ = array();\n foreach ($filtered as $f => $i) {\n $data_[$f] = $i;\n $data_[$f . '_type'] = $data[$f . '_type'];\n }\n\n return $data_;\n}", "public function testSortCallback()\n {\n $iterator = $this->_getTestIterator();\n $callback = function($a, $b)\n {\n return strnatcasecmp($a->getValue('baz'), $b->getValue('baz'));\n };\n\n // ensure it requires a callback.\n try {\n $iterator->sortByCallback(null);\n $this->fail('Expected exception');\n } catch (InvalidArgumentException $e) {\n $this->assertTrue(true);\n }\n\n // ensure sort works.\n $iterator->sortByCallback($callback);\n\n $this->assertSame(\n array('test 1', 'test 3', 'test 6', 'test 10', 'test 40', 'test 500'),\n $iterator->invoke('getValue', array('baz'))\n );\n }", "function ssc_list_hooks( $hook = '' ) {\n global $wp_filter;\n\n if ( isset( $wp_filter[$hook]->callbacks ) ) {\n array_walk( $wp_filter[$hook]->callbacks, function( $callbacks, $priority ) use ( &$hooks ) {\n foreach ( $callbacks as $id => $callback )\n $hooks[] = array_merge( array( 'id' => $id, 'priority' => $priority ), $callback );\n });\n } else {\n return array();\n }\n\n foreach( $hooks as &$item ) {\n // skip if callback does not exist\n if ( !is_callable( $item['function'] ) ) continue;\n\n // function name as string or static class method eg. 'Foo::Bar'\n if ( is_string( $item['function'] ) ) {\n $ref = strpos( $item['function'], '::' ) ? new \\ReflectionClass( strstr( $item['function'], '::', true ) ) : new \\ReflectionFunction( $item['function'] );\n $item['file'] = $ref->getFileName();\n $item['line'] = get_class( $ref ) == 'ReflectionFunction'\n ? $ref->getStartLine()\n : $ref->getMethod( substr( $item['function'], strpos( $item['function'], '::' ) + 2 ) )->getStartLine();\n\n // array( object, method ), array( string object, method ), array( string object, string 'parent::method' )\n } elseif ( is_array( $item['function'] ) ) {\n\n $ref = new \\ReflectionClass( $item['function'][0] );\n\n // $item['function'][0] is a reference to existing object\n $item['function'] = array(\n is_object( $item['function'][0] ) ? get_class( $item['function'][0] ) : $item['function'][0],\n $item['function'][1]\n );\n $item['file'] = $ref->getFileName();\n $item['line'] = strpos( $item['function'][1], '::' )\n ? $ref->getParentClass()->getMethod( substr( $item['function'][1], strpos( $item['function'][1], '::' ) + 2 ) )->getStartLine()\n : $ref->getMethod( $item['function'][1] )->getStartLine();\n\n // closures\n } elseif ( is_callable( $item['function'] ) ) {\n $ref = new \\ReflectionFunction( $item['function'] );\n $item['function'] = get_class( $item['function'] );\n $item['file'] = $ref->getFileName();\n $item['line'] = $ref->getStartLine();\n\n }\n }\n\n return $hooks;\n}", "public static function getDefaultSorting();", "public function sortBy($callback, $options = SORT_REGULAR, $descending = false);", "function sortIT($itList)\n{\n\t$reptab = array();\n\n\tforeach($itList as $elem)\n\t{\n\t\t$separated = explode('-', pathinfo(withoutTag($elem), PATHINFO_FILENAME));\n\n\t\t$key;\n\n\t\tif ($separated[0]==='IT')\n\t\t{\n\t\t\t$key = $separated[1];\n\t\t}\n\t\telseif (isset($separated[1]) AND $separated[1]==='IT')\n\t\t{\n\t\t\t$key = $separated[2];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//it's a special/generic IT\n\t\t\t$key = 'GENERIC';\n\t\t}\n\n\t\tif (in_array($key, GENERIC))\n\t\t{\n\t\t\t$key = 'GENERIC';\n\t\t}\n\n\t\t$reptab[$key][] = $elem;\n\t\t\n\t}\n\n\tksort($reptab);\n\n\treturn $reptab;\n}", "public function sortRoutes();", "function uksort(&$array,$cmp_function)\n{\n}", "public static function sortCallbacks(\n BL_CustomGrid_Model_Grid_Editor_Callback $callbackA,\n BL_CustomGrid_Model_Grid_Editor_Callback $callbackB\n ) {\n return $callbackA->getPriority() - $callbackB->getPriority();\n }", "function callmap_depends()\n{\n return array_merge(\n driver_call('callmap', 'depends'),\n array('request')\n );\n}", "function cphsort($a, $b) {\n\t if ($a['column']!=$b['column'])\n\t\treturn ($a['column'] > $b['column']);\n\t return ($a['order'] > $b['order']);\n\t}", "function cphsort($a, $b) {\n\t if ($a['column']!=$b['column'])\n\t\treturn ($a['column'] > $b['column']);\n\t return ($a['order'] > $b['order']);\n\t}", "public function sortByDesc($callback, $options = SORT_REGULAR);", "protected function getSortedDefinitions() {\n // Sort the plugins first by category, then by label.\n $definitions = $this->getDefinitions();\n uasort($definitions, function ($a, $b) {\n if ($a['category'] != $b['category']) {\n return strnatcasecmp($a['category'], $b['category']);\n }\n return strnatcasecmp($a['label'], $b['label']);\n });\n\n return $definitions;\n }", "public function sorting($key=null);" ]
[ "0.63171166", "0.6117585", "0.5767525", "0.57076067", "0.5685004", "0.5586178", "0.5577647", "0.5557816", "0.5556671", "0.55301523", "0.55301523", "0.55144656", "0.5513778", "0.54754543", "0.54715073", "0.54674363", "0.54398745", "0.5414751", "0.54147494", "0.538431", "0.5379847", "0.53752995", "0.53748167", "0.5295237", "0.5294173", "0.529414", "0.52867347", "0.5275311", "0.52612543", "0.52453756", "0.52097183", "0.52079815", "0.52025896", "0.51928174", "0.51767176", "0.51629955", "0.5156025", "0.51488835", "0.5148209", "0.512662", "0.51055336", "0.51026094", "0.50948745", "0.50857794", "0.50857383", "0.5083864", "0.506891", "0.506891", "0.5062781", "0.5062483", "0.50596523", "0.5048433", "0.5046628", "0.503919", "0.5024459", "0.50239354", "0.5014915", "0.50145686", "0.5004568", "0.5004255", "0.4994836", "0.4986927", "0.49843657", "0.49817374", "0.497802", "0.49749172", "0.4970673", "0.49702033", "0.49643028", "0.49636444", "0.49626938", "0.49581328", "0.4957799", "0.49576518", "0.49564594", "0.49548453", "0.49486783", "0.49471354", "0.4943631", "0.49412766", "0.49164328", "0.49077347", "0.49073908", "0.4906361", "0.4900356", "0.48982933", "0.48975253", "0.488646", "0.48863885", "0.48634538", "0.48612309", "0.48568198", "0.48459527", "0.48400506", "0.48393607", "0.48376754", "0.48376754", "0.4832891", "0.48311785", "0.48302853" ]
0.78355867
0
Extract C functions from $cFile
Извлечь функции C из $cFile
private function extractCFuncs($cFile) { $cFuncs = []; $cLines = explode("\n", file_get_contents($cFile)); $sourceBefore = null; $sourceAfter = ''; $i = 0; $l = count($cLines); $lastFuncLine = $l - 1; while ($i < $l) { $cLine = $cLines[$i]; if ($cLine == self::DIVIDER) { $lastFuncLine = $i - 1; break; } if (preg_match($this->function_regex_impl, $cLine, $m)) { $name = $m[2] . '_' . $m[3]; $cFunc = [ 'comment' => "TODO {$name}", 'first' => $m[0], 'body' => null ]; $fi = $i; if ($i - 1 > 0 && substr($cLines[$i - 1], 0, 2) == '/*') { $cFunc['comment'] = preg_replace('@(/\*+\s*|\s*\*+/)@', '', $cLines[$i - 1]); $fi = $i - 1; } if ($sourceBefore === null) { $sourceBefore = implode("\n", array_slice($cLines, 0, $fi - 1)); } for ($j = $i + 1; $j < $l; $j++) { if ($cLines[$j] == '}') { $cFunc['body'] = implode("\n", array_slice($cLines, $i + 1, ($j - 1) - $i)); break; } } if ($cFunc['body'] === null) { break; } $cFuncs[$name] = $cFunc; $i = $j + 1; } else { $i += 1; } } $sourceAfter .= implode("\n", array_slice($cLines, $lastFuncLine)); return [$cFuncs, $sourceBefore, $sourceAfter]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFunctionsOfFile($file) {\n $source = file_get_contents($file);\n $tokens = token_get_all($source);\n\n $functions = array();\n $nextStringIsFunc = false;\n $inClass = false;\n $bracesCount = 0;\n\n foreach($tokens as $token) {\n switch($token[0]) {\n case T_CLASS:\n $inClass = true;\n break;\n case T_FUNCTION:\n if(!$inClass) $nextStringIsFunc = true;\n break;\n\n case T_STRING:\n if($nextStringIsFunc) {\n $nextStringIsFunc = false;\n $functions[] = $token[1];\n }\n break;\n\n // Anonymous functions\n case '(':\n case ';':\n $nextStringIsFunc = false;\n break;\n\n // Exclude Classes\n case '{':\n if($inClass) $bracesCount++;\n break;\n\n case '}':\n if($inClass) {\n $bracesCount--;\n if($bracesCount === 0) $inClass = false;\n }\n break;\n }\n }\n\n return $functions;\n}", "function get_fileActnList($file) {\n\t$arr = file($file);\n\tforeach($arr as $line) {\n\t\tif(preg_match('/function ([_A-Za-z0-9]+)/i', $line, $regs)) {\n\t\t\t$arr_methods[] = $regs[1];\n\t\t}\n\t}\n\treturn $arr_methods;\n}", "function testing_get_defined_functions_in_file($file)\n{\n\t$source = file_get_contents($file);\n\t$tokens = token_get_all($source);\n\n\t$functions = array();\n\t$nextStringIsFunc = false;\n\t$inClass = false;\n\t$bracesCount = 0;\n\n\tforeach ($tokens as $token)\n\t{\n\t\tswitch ($token[0])\n\t\t{\n\t\t\tcase T_CLASS:\n\t\t\t\t$inClass = true;\n\t\t\t\tbreak;\n\t\t\tcase T_FUNCTION:\n\t\t\t\tif (!$inClass)\n\t\t\t\t\t$nextStringIsFunc = true;\n\t\t\t\tbreak;\n\n\t\t\tcase T_STRING:\n\t\t\t\tif ($nextStringIsFunc)\n\t\t\t\t{\n\t\t\t\t\t$nextStringIsFunc = false;\n\t\t\t\t\t$functions[] = $token[1];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// Anonymous functions\n\t\t\tcase '(':\n\t\t\tcase ';':\n\t\t\t\t$nextStringIsFunc = false;\n\t\t\t\tbreak;\n\n\t\t\t// Exclude Classes\n\t\t\tcase '{':\n\t\t\t\tif ($inClass)\n\t\t\t\t\t$bracesCount++;\n\t\t\t\tbreak;\n\n\t\t\tcase '}':\n\t\t\t\tif ($inClass)\n\t\t\t\t{\n\t\t\t\t\t$bracesCount--;\n\t\t\t\t\tif ($bracesCount === 0)\n\t\t\t\t\t\t$inClass = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $functions;\n}", "function userfunclist($file, $sort = FALSE) {\n\n $file = join(\"\\n\",file($file));\n preg_match_all('/function\\s+(\\w+)/', $file, $m);\n $functions = $m[1];\n if ($sort===TRUE) {\n asort($functions);\n }\n return $functions;\n}", "static function parse($inFile, $outFile)\n\t{\n\t\t$in = @fopen($inFile, 'rb');\n\t\tif(!$in)\n\t\t\tthrow new Exception('Could not open '.$inFile.' for reading.');\n\t\t$out = @fopen($outFile, 'w+b');\n\t\tif(!$out)\n\t\t\tthrow new Exception('Could not open '.$outFile.' for writing.');\n\t\t\n\t\t$nextFuncNr = 0;\n\t\t$functions = array();\n\t\t$headers = array();\n\t\t$nameCompression = false;\n\t\t$fn = [];\n $fl = [];\n \n\t\t// Read information into memory\n\t\twhile(($line = fgets($in))){\n\t\t\tif(substr($line,0,3)==='fl='){\n\t\t\t\t// Found invocation of function. Read functionname\n\t\t\t\tlist($function) = fscanf($in,\"fn=%[^\\n\\r]s\");\n if($nameCompression) {\n $matches = [];\n preg_match('/^\\(([\\d]+)\\)\\s{0,1}(.*)/', $function, $matches);\n if(isset($fn[$matches[1]])) {\n $function = $fn[$matches[1]];\n }else{\n $function = $matches[2];\n $fn[$matches[1]] = $function;\n }\n }\n $filename = substr(trim($line),3);\n if($nameCompression) {\n $matches = [];\n preg_match('/^\\(([\\d]+)\\)\\s{0,1}(.*)/', $filename, $matches);\n if(isset($fl[$matches[1]])) {\n $filename = $fl[$matches[1]];\n }else{\n $filename = $matches[2];\n $fl[$matches[1]] = $filename;\n }\n }\n\t\t\t\tif(!isset($functions[$function])){\n\t\t\t\t\t$functions[$function] = array(\n 'filename' => $filename, \n 'invocationCount' => 0,\n 'nr' => $nextFuncNr++,\n 'count' => 0,\n 'summedSelfCost' => 0,\n 'summedInclusiveCost' => 0,\n 'calledFromInformation' => array(),\n 'subCallInformation' => array()\n\t\t\t\t\t);\n\t\t\t\t} \n\t\t\t\t$functions[$function]['invocationCount']++;\n\t\t\t\t// Special case for ENTRY_POINT - it contains summary header\n\t\t\t\tif(self::ENTRY_POINT == $function){\n\t\t\t\t\tfgets($in);\t\t\t\t\n\t\t\t\t\t$headers[] = fgets($in);\n\t\t\t\t\tfgets($in);\n\t\t\t\t}\n\t\t\t\t// Cost line\n\t\t\t\tlist($lnr, $cost) = fscanf($in,\"%d %d\");\n\t\t\t\t$functions[$function]['line'] = $lnr;\n\t\t\t\t$functions[$function]['summedSelfCost'] += $cost;\n\t\t\t\t$functions[$function]['summedInclusiveCost'] += $cost;\t\t\t\t\n\t\t\t} else if(substr($line,0,4)==='cfn=') {\n\t\t\t\t\n\t\t\t\t// Found call to function. ($function should contain function call originates from)\n\t\t\t\t$calledFunctionName = substr(trim($line),4);\n if($nameCompression) {\n $calledFunctionName = $fn[trim($calledFunctionName, '()')];\n }\n\n\t\t\t\t// Skip call line\n\t\t\t\tfgets($in);\n\t\t\t\t// Cost line\n\t\t\t\tlist($lnr, $cost) = fscanf($in,\"%d %d\");\n\t\t\t\t\n\t\t\t\t$functions[$function]['summedInclusiveCost'] += $cost;\n\t\t\t\t\n\t\t\t\tif(!isset($functions[$calledFunctionName]['calledFromInformation'][$function.':'.$lnr]))\n\t\t\t\t\t$functions[$calledFunctionName]['calledFromInformation'][$function.':'.$lnr] = array('functionNr'=>$functions[$function]['nr'],'line'=>$lnr,'callCount'=>0,'summedCallCost'=>0);\n\t\t\t\t\n\t\t\t\t$functions[$calledFunctionName]['calledFromInformation'][$function.':'.$lnr]['callCount']++;\n\t\t\t\t$functions[$calledFunctionName]['calledFromInformation'][$function.':'.$lnr]['summedCallCost'] += $cost;\n\n\t\t\t\tif(!isset($functions[$function]['subCallInformation'][$calledFunctionName.':'.$lnr])){\n\t\t\t\t\t$functions[$function]['subCallInformation'][$calledFunctionName.':'.$lnr] = array('functionNr'=>$functions[$calledFunctionName]['nr'],'line'=>$lnr,'callCount'=>0,'summedCallCost'=>0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$functions[$function]['subCallInformation'][$calledFunctionName.':'.$lnr]['callCount']++;\n\t\t\t\t$functions[$function]['subCallInformation'][$calledFunctionName.':'.$lnr]['summedCallCost'] += $cost;\n\t\t\t} else if(strpos($line,': ')!==false){\n\t\t\t\t// Found header\n\t\t\t\t$headers[] = $line;\n if (substr($line, 0, 8) == 'creator:') {\n $creatorVersion = preg_replace('/[^0-9\\.]/', '', substr($line, 9));\n $nameCompression = ($creatorVersion >= '2.3');\n }\n }\n\t\t}\n\t\t\t\n\t\t\t\t\n\t\t// Write output\n\t\t$functionCount = sizeof($functions);\n\t\tfwrite($out, pack(self::NR_FORMAT.'*', self::FILE_FORMAT_VERSION, 0, $functionCount));\n\t\t// Make room for function addresses\n\t\tfseek($out,self::NR_SIZE*$functionCount, SEEK_CUR);\n\t\t$functionAddresses = array();\n\t\tforeach($functions as $functionName => $function){\n\t\t\t$functionAddresses[] = ftell($out);\n\t\t\t$calledFromCount = sizeof($function['calledFromInformation']);\n\t\t\t$subCallCount = sizeof($function['subCallInformation']);\n\t\t\tfwrite($out, pack(self::NR_FORMAT.'*', $function['line'], $function['summedSelfCost'], $function['summedInclusiveCost'], $function['invocationCount'], $calledFromCount, $subCallCount));\n\t\t\t// Write called from information\n\t\t\tforeach((array)$function['calledFromInformation'] as $call){\n\t\t\t\tfwrite($out, pack(self::NR_FORMAT.'*', $call['functionNr'], $call['line'], $call['callCount'], $call['summedCallCost']));\n\t\t\t}\n\t\t\t// Write sub call information\n\t\t\tforeach((array)$function['subCallInformation'] as $call){\n\t\t\t\tfwrite($out, pack(self::NR_FORMAT.'*', $call['functionNr'], $call['line'], $call['callCount'], $call['summedCallCost']));\n\t\t\t}\n\t\t\t\n\t\t\tfwrite($out, $function['filename'].\"\\n\".$functionName.\"\\n\");\n\t\t}\n\t\t$headersPos = ftell($out);\n\t\t// Write headers\n\t\tforeach($headers as $header){\n\t\t\tfwrite($out,$header);\n\t\t}\n\t\t\n\t\t// Write addresses\n\t\tfseek($out,self::NR_SIZE, SEEK_SET);\n\t\tfwrite($out, pack(self::NR_FORMAT, $headersPos));\n\t\t// Skip function count\n\t\tfseek($out,self::NR_SIZE, SEEK_CUR);\n\t\t// Write function addresses\n\t\tforeach($functionAddresses as $address){\n\t\t\tfwrite($out, pack(self::NR_FORMAT, $address));\t\t\t\n\t\t}\n\t\t\n\t}", "public function extract($file)\n {\n $pInfo = pathinfo($file);\n $data = array();\n $tokens = token_get_all(file_get_contents($file));\n $next = false;\n foreach ($tokens as $c)\n {\n if(is_array($c)) {\n if ($c[0] != T_STRING && $c[0] != T_CONSTANT_ENCAPSED_STRING) continue;\n if ($c[0] == T_STRING && isset($this->functions[$c[1]])) {\n $next = $this->functions[$c[1]];\n continue;\n }\n if ($c[0] == T_CONSTANT_ENCAPSED_STRING && $next == 1) {\n $data[substr($c[1], 1, -1)][] = $file . ':' . $c[2];\n $next = false;\n }\n } else {\n if ($c == ')') $next = false;\n if ($c == ',' && $next != false) $next -= 1;\n }\n }\n return $data;\n }", "private function getUpdatedCFuncs($cFuncs, $namespace, $protosMap) {\n foreach ($protosMap as $name => $proto) {\n if (!isset($cFuncs[$name])) {\n $cFuncs[$name] = [\n 'comment' => \"TODO {$name}\",\n 'first' => $proto['line'],\n 'body' => ''\n ];\n } else {\n $cFuncs[$name]['first'] = $proto['line'];\n if (!isset($cFuncs[$name]['comment'])) {\n $cFuncs[$name]['comment'] = \"TODO {$name}\";\n }\n }\n }\n return $this->getSortedCFuncs($cFuncs, $protosMap);\n }", "function getFns()\n\t{\n\t\tforeach ($this->files as $file)\n\t\t{\n\t\t\t$contents = file_get_contents($file);\n\t\t\tif (!empty($contents))\n\t\t\t{\n\t\t\t\t$cmatches = $fmatches = $imatches = array();\n\t\t\t\t// We don't do interfaces yet, but we need to get them out of the way\n\t\t\t\t// so that functions aren't loaded from them\n\t\t\t\tif ($interfaces = preg_match_all(\"/interface ([a-zA-Z_]+([a-zA-Z0-9_]*)?)\\s*{/\", $contents, $imatches))\n\t\t\t\t{\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t\t// Classes\n\t\t\t\tif ($classes = preg_match_all(\"/(abstract )?class ([a-zA-Z_]+([a-zA-Z0-9_]*)?)( (extends|implements) ([a-zA-Z_]+([a-zA-Z0-9_]*)?(, ?([a-zA-Z_]+([a-zA-Z0-9_]*)?)*)?)*?)*?\\s*{/\", $contents, $cmatches))\n\t\t\t\t{\n\t\t\t\t\t// we use index 2 because index one matches whether or not there is an abstract keyword\n\t\t\t\t\t// index 2 isolates the class name\n\t\t\t\t\tforeach($cmatches[2] as $match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->classes[] = $match;\n\t\t\t\t\t}\n\t\t\t\t\t// we don't want to get all the class methods\n\t\t\t\t\t// the only functions we care about are the ones in global scope\n\t\t\t\t\t// continue;\n\t\t\t\t}\n\t\t\t\t// Functions\n\t\t\t\tif ($functions = preg_match_all(\"/function ([a-zA-Z_]+([a-zA-Z0-9_]*)?)\\s*\\(/\", $contents, $fmatches))\n\t\t\t\t{\n\t\t\t\t\t// index one isolates the function name\n\t\t\t\t\tforeach($fmatches[1] as $match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->functions[$match][] = $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "public abstract function processFunction(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $functionPtr);", "public function compileFromFile($fileName) {}", "public function compileFromFile($fileName) {}", "public function process(File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n\n $ignore = array(\n \\T_DOUBLE_COLON => true,\n \\T_OBJECT_OPERATOR => true,\n \\T_FUNCTION => true,\n \\T_CONST => true,\n );\n\n $prevToken = $phpcsFile->findPrevious(\\T_WHITESPACE, ($stackPtr - 1), null, true);\n if (isset($ignore[$tokens[$prevToken]['code']]) === true) {\n // Not a call to a PHP function.\n return;\n }\n\n $functionLc = strtolower($tokens[$stackPtr]['content']);\n if (isset($this->iniFunctions[$functionLc]) === false) {\n return;\n }\n\n $iniToken = $this->getFunctionCallParameter($phpcsFile, $stackPtr, $this->iniFunctions[$functionLc]);\n if ($iniToken === false) {\n return;\n }\n\n $filteredToken = $this->stripQuotes($iniToken['raw']);\n if (isset($this->newIniDirectives[$filteredToken]) === false) {\n return;\n }\n\n $itemInfo = array(\n 'name' => $filteredToken,\n 'functionLc' => $functionLc,\n );\n $this->handleFeature($phpcsFile, $iniToken['end'], $itemInfo);\n }", "public function visitFunctionName(FileFunction $file_function)\n {\n }", "public function visitFunctionName(FileFunction $file_function)\n {\n }", "public function getFileProcObj() {}", "abstract public function getFunctions();", "public function getFunctions();", "public function getFunctions();", "public function getFunctions();", "public function getFunctions();", "private function updateCFile($hFile, $cFile, $namespace, $protosMap) {\n list($cFuncs, $sourceBefore, $sourceAfter) = $this->extractCFuncs($cFile);\n $cFuncs = $this->getUpdatedCFuncs($cFuncs, $namespace, $protosMap);\n $this->writeCFile($cFile, $sourceBefore, $sourceAfter, $cFuncs);\n }", "protected function parse_file() {\n\n\t\t$class_reflector = new \\ReflectionClass( $this );\n\t\t$file = $class_reflector->getFileName();\n\t\t$file = rtrim( $file, 'php' ) . 'inc';\n\t\t$path = dirname( $file );\n\n\t\t$export_data = \\WP_Parser\\parse_files( array( $file ), $path );\n\n\t\t$this->export_data = $export_data[0];\n\t}", "function getSourceFile() ;", "function _cw_tool_parse_function_name($element) {\n return $element['function'] . ' >> ' . $element['file'];\n}", "public function process( File $phpcsFile, $stackPtr ) {\n\n\t\tif ( $this->onlyOptimizedFunctions === null ) {\n\t\t\t$this->onlyOptimizedFunctions = $this->get_ruleset_property( $phpcsFile, 'onlyOptimizedFunctions' );\n\t\t}\n\n\t\tif ( null !== $this->onlyOptimizedFunctions && false !== \\filter_var( $this->onlyOptimizedFunctions, FILTER_VALIDATE_BOOLEAN ) ) {\n\t\t\t$this->globalFunctions = $this->optimizedFunctions;\n\t\t}\n\n\t\t$this->stackPtr = $stackPtr;\n\t\t$this->fixer = $phpcsFile->fixer;\n\t\t$tokens = $phpcsFile->getTokens();\n\t\t$ignore = [\n\t\t\tT_DOUBLE_COLON => true,\n\t\t\tT_OBJECT_OPERATOR => true,\n\t\t\tT_FUNCTION => true,\n\t\t\tT_CONST => true,\n\t\t\tT_PUBLIC => true,\n\t\t\tT_PRIVATE => true,\n\t\t\tT_PROTECTED => true,\n\t\t\tT_AS => true,\n\t\t\tT_NEW => true,\n\t\t\tT_INSTEADOF => true,\n\t\t\tT_NS_SEPARATOR => true,\n\t\t\tT_IMPLEMENTS => true,\n\t\t];\n\t\t$prevToken = $phpcsFile->findPrevious( T_WHITESPACE, ( $stackPtr - 1 ), null, true );\n\n\t\t// If function call is directly preceded by a NS_SEPARATOR don't try to fix it.\n\t\tif ( $tokens[ $prevToken ]['code'] === T_NS_SEPARATOR && $tokens[ $stackPtr ]['code'] === T_STRING ) {\n\t\t\t\treturn;\n\t\t}\n\t\tif ( isset( $ignore[ $tokens[ $prevToken ]['code'] ] ) === true ) {\n\t\t\t// Not a call to a PHP function.\n\t\t\treturn;\n\t\t}\n\t\t$nextToken = $phpcsFile->findNext( T_WHITESPACE, ( $stackPtr + 1 ), null, true );\n\t\tif ( isset( $ignore[ $tokens[ $nextToken ]['code'] ] ) === true ) {\n\t\t\t// Not a call to a PHP function.\n\t\t\treturn;\n\t\t}\n\t\tif ( $tokens[ $stackPtr ]['code'] === T_STRING && $tokens[ $nextToken ]['code'] !== T_OPEN_PARENTHESIS ) {\n\t\t\t// Not a call to a PHP function.\n\t\t\treturn;\n\t\t}\n\t\t$function = \\strtolower( $tokens[ $stackPtr ]['content'] );\n\n\t\t// Is it an global PHP function?\n\t\tif ( false !== isset( $this->globalFunctions[ $function ] ) ) {\n\n\t\t\t$error = \\sprintf( 'Function %1$s() should be referenced via a fully qualified name, e.g.: \\%1$s()', $function );\n\t\t\t$fix = $phpcsFile->addFixableError( $error, $stackPtr, 'FullyQualifiedGlobalFunctions' );\n\n\t\t\tif ( true === $fix ) {\n\t\t\t\t$this->fix( $function );\n\t\t\t}\n\t\t}\n\n\t}", "public function process(File $phpcsFile, $stackPtr)\r\n {\r\n $tokens = $phpcsFile->getTokens();\r\n $find = Tokens::$methodPrefixes;\r\n $find[] = T_WHITESPACE;\r\n\r\n $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);\r\n if ($tokens[$commentEnd]['code'] === T_COMMENT) {\r\n // Inline comments might just be closing comments for\r\n // control structures or functions instead of function comments\r\n // using the wrong comment type. If there is other code on the line,\r\n // assume they relate to that code.\r\n $prev = $phpcsFile->findPrevious($find, ($commentEnd - 1), null, true);\r\n if ($prev !== false && $tokens[$prev]['line'] === $tokens[$commentEnd]['line']) {\r\n $commentEnd = $prev;\r\n }\r\n }\r\n\r\n if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG\r\n && $tokens[$commentEnd]['code'] !== T_COMMENT\r\n ) {\r\n $fct_name_ptr =$phpcsFile->findNext(T_STRING, $stackPtr);\r\n\r\n // ignore Action functions found in controllers\r\n if (!preg_match('/Action$/', $tokens[$fct_name_ptr]['content'])) {\r\n $phpcsFile->addError('Missing function doc comment', $stackPtr, 'Missing');\r\n $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'no');\r\n }\r\n return;\r\n } else {\r\n $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'yes');\r\n }\r\n\r\n if ($tokens[$commentEnd]['code'] === T_COMMENT) {\r\n $phpcsFile->addError('You must use \"/**\" style comments for a function comment', $stackPtr, 'WrongStyle');\r\n return;\r\n }\r\n\r\n if ($tokens[$commentEnd]['line'] !== ($tokens[$stackPtr]['line'] - 1)) {\r\n $error = 'There must be no blank lines after the function comment';\r\n $phpcsFile->addError($error, $commentEnd, 'SpacingAfter');\r\n }\r\n\r\n $commentStart = $tokens[$commentEnd]['comment_opener'];\r\n foreach ($tokens[$commentStart]['comment_tags'] as $tag) {\r\n if ($tokens[$tag]['content'] === '@see') {\r\n // Make sure the tag isn't empty.\r\n $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);\r\n if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) {\r\n $error = 'Content missing for @see tag in function comment';\r\n $phpcsFile->addError($error, $tag, 'EmptySees');\r\n }\r\n }\r\n }\r\n\r\n $commentString = $phpcsFile->getTokensAsString($commentStart, $commentEnd - $commentStart);\r\n\r\n if (!preg_match('/\\{\\@inheritdoc\\}/i', $commentString)) {\r\n // we ignore the rules if there is an \"inheritDoc\" tag\r\n $this->processReturn($phpcsFile, $stackPtr, $commentStart);\r\n $this->processThrows($phpcsFile, $stackPtr, $commentStart);\r\n $this->processParams($phpcsFile, $stackPtr, $commentStart);\r\n }\r\n\r\n }", "public function parse($inFile)\n\t{\n\t\t$in = @fopen($inFile, 'rb');\n\t\tif (!$in)\n\t\t\tthrow new Exception('Could not open ' . $inFile . ' for reading.');\n\n\t\t// Read information into memory\n\t\twhile (($line = fgets($in))) {\n\t\t\tif (substr($line, 0, 3) === 'fl=') {\n\t\t\t\t// Found invocation of function. Read functionname\n\t\t\t\tlist($function) = fscanf($in, \"fn=%s\");\n\t\t\t\tif (!isset($this->functions[$function])) {\n\t\t\t\t\t$this->functions[$function] = array(\n\t\t\t\t\t\t'filename' => substr(trim($line), 3),\n\t\t\t\t\t\t'invocationCount' => 0,\n\t\t\t\t\t\t'count' => 0,\n\t\t\t\t\t\t'summedSelfCost' => 0,\n\t\t\t\t\t\t'summedInclusiveCost' => 0\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$this->functions[$function]['invocationCount']++;\n\t\t\t\t// Special case for ENTRY_POINT - it contains summary header\n\t\t\t\tif (self::ENTRY_POINT == $function) {\n\t\t\t\t\tfgets($in);\n\t\t\t\t\tfgets($in);\n\t\t\t\t\tfgets($in);\n\t\t\t\t}\n\t\t\t\t// Cost line\n\t\t\t\tlist($lnr, $cost) = fscanf($in, \"%d %d\");\n\t\t\t\t$this->functions[$function]['summedSelfCost'] += $cost;\n\t\t\t\t$this->functions[$function]['summedInclusiveCost'] += $cost;\n\t\t\t} else if (substr($line, 0, 4) === 'cfn=') {\n\t\t\t\t// Skip call line\n\t\t\t\tfgets($in);\n\t\t\t\t// Cost line\n\t\t\t\tlist($lnr, $cost) = fscanf($in, \"%d %d\");\n\t\t\t\t$this->functions[$function]['summedInclusiveCost'] += $cost;\n\n\t\t\t}\n\t\t}\n\t}", "function testing_find_funcs($file, &$setup_func = '', &$teardown_func = '')\n{\n\t$funcs = array();\n\n\t$def_funcs = testing_get_defined_functions_in_file($file);\n\n\tforeach ($def_funcs as $func)\n\t{\n\t\tif (preg_match('#^test_#', $func))\n\t\t{\n\t\t\t$funcs[] = $func;\n\t\t}\n\t\telseif (preg_match('#^setup_#', $func))\n\t\t{\n\t\t\t$setup_func = $func;\n\t\t}\n\t\telseif (preg_match('#^teardown_#', $func))\n\t\t{\n\t\t\t$teardown_func = $func;\n\t\t}\n\t}\n\treturn $funcs;\n}", "public function getFunctions() : array\n {\n return [\n new Twig_SimpleFunction('parser_decode', [$this, 'decode']),\n new Twig_SimpleFunction('parser_encode', [$this, 'encode']),\n new Twig_SimpleFunction('parser_get_info', [$this, 'getParserInfo']),\n ];\n }", "function ms_file_constants()\n{\n}", "public function build_functions() {\n\t\t$reg_exp = '/(function\\s\\w*\\((.*)?\\))/';\n\t\t$file = file_get_contents( untrailingslashit( __DIR__ ) . '/functions.txt' );\n\t\t$results = preg_match_all( $reg_exp, $file, $matches );\n\t\t$fp = fopen( untrailingslashit( __DIR__ ) . '/formatted_files/functions.sublime-completions', 'w' );\n\n\t\tif ( $fp ) :\n\t\t\t// Start printing the file contents\n\t\t\tob_start(); ?>\n{\n\t\"scope\": \"source.php - variable.other.php\",\n\t\"completions\":\n\t[\n\t\t\"php\",\n\n\t\t{ \"trigger\": \"wc\", \"contents\": \"WC()\" },\n<?php\n\t\t\t$all_matches = array();\n\t\t\tforeach ( $matches as $match ) :\n\t\t\t\tif ( is_array( $match ) ) :\n\t\t\t\t\t// Ensures that the last line does not end with a comma\n\t\t\t\t\t$i = 1;\n\t\t\t\t\t$n_matches = count( $match );\n\t\t\t\t\tforeach ( $match as $the_match ) :\n\t\t\t\t\t\t// Skip constructors, private functions and everything that is not a function\n\t\t\t\t\t\tif ( strstr( $the_match, '__construct' ) || false === strstr( $the_match, 'function' ) || strstr( $the_match, 'function _' ) ) {\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$line = apply_filters( 'st2_wcac_builder_functions_the_match', $the_match, $i == $n_matches ? true : false );\n\n\t\t\t\t\t\tif ( ! in_array( $the_match, $all_matches ) ) :\n?>\n\t\t<?php echo $line; ?>\n<?php\n\t\t\t\t\t\t\t\t$all_matches[] = $the_match;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t$i++;\n\t\t\t\t\tendforeach;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\t?>\n\t]\n}\n<?php\n\t\t\t// File ready. Write it.\n\t\t\tfwrite( $fp, ob_get_clean() );\n\t\t\tfclose( $fp );\n\t\tendif;\n\t}", "private function findMagicMethods($phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n $class = $tokens[$stackPtr];\n\n $scopeCloser = $class['scope_closer'];\n $nextFunc = $class['scope_opener'];\n $foundMagicSerialize = false;\n $foundMagicUnserialize = false;\n\n while (($nextFunc = $phpcsFile->findNext([\\T_FUNCTION, \\T_DOC_COMMENT_OPEN_TAG], ($nextFunc + 1), $scopeCloser)) !== false) {\n // Skip over docblocks.\n if ($tokens[$nextFunc]['code'] === \\T_DOC_COMMENT_OPEN_TAG\n && isset($tokens[$nextFunc]['comment_closer'])\n ) {\n $nextFunc = $tokens[$nextFunc]['comment_closer'];\n continue;\n }\n\n $functionScopeCloser = $nextFunc;\n if (isset($tokens[$nextFunc]['scope_closer'])) {\n // Normal (non-abstract, non-interface) method.\n $functionScopeCloser = $tokens[$nextFunc]['scope_closer'];\n }\n\n $funcName = FunctionDeclarations::getName($phpcsFile, $nextFunc);\n if (empty($funcName) || \\is_string($funcName) === false) {\n $nextFunc = $functionScopeCloser;\n continue;\n }\n\n if (\\strtolower($funcName) === '__serialize') {\n $foundMagicSerialize = true;\n } elseif (\\strtolower($funcName) === '__unserialize') {\n $foundMagicUnserialize = true;\n }\n\n // If both have been found, no need to continue looping through the functions.\n if ($foundMagicSerialize === true && $foundMagicUnserialize === true) {\n break;\n }\n\n $nextFunc = $functionScopeCloser;\n }\n\n return [\n '__serialize' => $foundMagicSerialize,\n '__unserialize' => $foundMagicUnserialize,\n ];\n }", "public function process(File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n\n $ignore = [\n \\T_FUNCTION => true,\n \\T_CONST => true,\n ];\n $ignore += Collections::objectOperators();\n\n $prevToken = $phpcsFile->findPrevious(\\T_WHITESPACE, ($stackPtr - 1), null, true);\n if (isset($ignore[$tokens[$prevToken]['code']]) === true) {\n // Not a call to a PHP function.\n return;\n }\n\n $functionLc = \\strtolower($tokens[$stackPtr]['content']);\n if (isset($this->iniFunctions[$functionLc]) === false) {\n return;\n }\n\n $paramInfo = $this->iniFunctions[$functionLc];\n $iniToken = PassedParameters::getParameter($phpcsFile, $stackPtr, $paramInfo['position'], $paramInfo['name']);\n if ($iniToken === false) {\n return;\n }\n\n $filteredToken = TextStrings::stripQuotes($iniToken['raw']);\n if (isset($this->deprecatedIniDirectives[$filteredToken]) === false) {\n return;\n }\n\n $itemInfo = [\n 'name' => $filteredToken,\n 'functionLc' => $functionLc,\n ];\n $this->handleFeature($phpcsFile, $iniToken['end'], $itemInfo);\n }", "abstract public function compile($filename);", "private function getSortedCFuncs($cFuncs, $protosMap) {\n $sortedCFuncs = [];\n foreach ($protosMap as $name => $proto) {\n if (isset($cFuncs[$name])) {\n $sortedCFuncs[$name] = $cFuncs[$name];\n }\n }\n foreach ($cFuncs as $name => $cFunc) {\n if (!isset($sortedCFuncs[$name])) {\n $sortedCFuncs[$name] = $cFunc;\n }\n }\n return $sortedCFuncs;\n }", "private function createCFile($hFile, $cFile, $namespace, $protosMap) {\n $cFuncs = $this->getUpdatedCFuncs([], $namespace, $protosMap);\n $hFileShort = basename($hFile);\n $this->writeCFile($cFile, \"#include \\\"{$hFileShort}\\\"\", self::DIVIDER, $cFuncs);\n }", "private function getParsePregCallable(): callable\n {\n return function (string $file) : string {\n $fp = fopen($file, 'rb');\n\n //@codeCoverageIgnoreStart\n if (false === $fp) {\n throw new Exception\\InvalidFileException(\n \"Cannot read `{$file}`\"\n );\n }\n //@codeCoverageIgnoreEnd\n\n $inComment = $namespace = $class = null;\n while ((!$class || !$namespace) && ($line = fgets($fp)) !== false) {\n $line = (string) $line;\n $commentEnd = strpos($line, '*/') !== false;\n if ($inComment) {\n $inComment = !$commentEnd;\n continue;\n }\n\n if (!$namespace && preg_match(self::REGEX_NAMESPACE, $line, $nsMatch) === 1) {\n $namespace = $nsMatch['namespace'];\n }\n\n if (!$class && preg_match(self::REGEX_CLASS, $line, $cnMatch) === 1) {\n $class = $cnMatch['class'];\n }\n\n if (!$commentEnd && strpos($line, '/*') !== false) {\n $inComment = true;\n }\n }\n\n if (!$class) {\n throw new Exception\\InvalidFileException(\n \"Cannot determinate class name using file `{$file}` and method `preg`\"\n );\n }\n\n return \"$namespace\\\\$class\";\n };\n }", "public function extract(string $file): array;", "public function process(File $phpcsFile, $stackPtr)\n {\n if ($this->supportsBelow('5.6') !== true) {\n return;\n }\n\n $tokens = $phpcsFile->getTokens();\n\n $ignore = array(\n \\T_DOUBLE_COLON => true,\n \\T_OBJECT_OPERATOR => true,\n \\T_FUNCTION => true,\n \\T_CONST => true,\n );\n\n $prevToken = $phpcsFile->findPrevious(\\T_WHITESPACE, ($stackPtr - 1), null, true);\n if (isset($ignore[$tokens[$prevToken]['code']]) === true) {\n // Not a call to a PHP function.\n return;\n }\n\n $functionLc = strtolower($tokens[$stackPtr]['content']);\n if ($functionLc !== 'define') {\n return;\n }\n\n $secondParam = $this->getFunctionCallParameter($phpcsFile, $stackPtr, 2);\n if (isset($secondParam['start'], $secondParam['end']) === false) {\n return;\n }\n\n $targetNestingLevel = 0;\n if (isset($tokens[$secondParam['start']]['nested_parenthesis'])) {\n $targetNestingLevel = \\count($tokens[$secondParam['start']]['nested_parenthesis']);\n }\n\n $array = $phpcsFile->findNext(array(\\T_ARRAY, \\T_OPEN_SHORT_ARRAY), $secondParam['start'], ($secondParam['end'] + 1));\n if ($array !== false) {\n if ((isset($tokens[$array]['nested_parenthesis']) === false && $targetNestingLevel === 0) || \\count($tokens[$array]['nested_parenthesis']) === $targetNestingLevel) {\n $phpcsFile->addError(\n 'Constant arrays using define are not allowed in PHP 5.6 or earlier',\n $array,\n 'Found'\n );\n }\n }\n }", "function regCoreFile($files) {\n if (!is_array($files))\n $files = array($files);\n foreach ($files as $file)\n cs()->registerCoreScript($file);\n}", "private function provider(string $fnc): array\n {\n $output = [];\n $path = __DIR__ . DS . $fnc . DS;\n\n foreach (scandir($path) as $file) {\n $file_parts = pathinfo($file);\n switch ($file_parts['extension']) {\n case 'bin':\n $output[$file_parts['filename']][0] = file_get_contents($path . $file);\n break;\n case 'txt':\n $output[$file_parts['filename']][1] = trim(file_get_contents($path . $file));\n break;\n }\n }\n\n return $output;\n }", "private static function compile ( &$hostfile ) {\n\t\tself::$literals = array();\n\t\tself::$variables = array();\n\t\tself::$literalCount = 0;\n\t\t$regex = self::$regex;\n\n\t\t// Collate hostfile and imports\n\t\t$output = self::collateImports( $hostfile );\n\n\t\t// Extract literals\n\t\t$re = '#(\\'|\")(?:\\\\1|[^\\1])*?\\1#';\n\t\t$cb_extractStrings = self::createCallback( 'cb_extractStrings' );\n\t\t$output = preg_replace_callback( $re, $cb_extractStrings, $output );\n\n\t\t// Extract comments\n\t\t$cb_extractComments = self::createCallback( 'cb_extractComments' );\n\t\t$output = preg_replace_callback( $regex->comments, $cb_extractComments, $output );\n\n\t\t// Extract variables\n\t\t$cb_extractVariables = self::createCallback( 'cb_extractVariables' );\n\t\t$output = preg_replace_callback( $regex->variables, $cb_extractVariables, $output );\n\n\t\t// Search and replace variables\n\t\t$re = '#var\\(\\s*([A-Z0-9_-]+)\\s*\\)#i';\n\t\t$cb_placeVariables = self::createCallback( 'cb_placeVariables' );\n\t\t$output = preg_replace_callback( $re, $cb_placeVariables, $output);\n\n\t\t// Optionally apply macros\n\t\tif ( self::$options[ 'macros' ] !== false ) {\n\t\t\tself::applyMacros( $output );\n\t\t}\n\n\t\t// Optionally minify (after macros since macros may introduce un-wanted whitespace)\n\t\tif ( self::$options[ 'minify' ] !== false ) {\n\t\t\tself::minify( $output );\n\t\t}\n\n\t\t// Expand selectors\n\t\t$re = '#([^}{]+){#s';\n\t\t$cb_expandSelector = self::createCallback( 'cb_expandSelector' );\n\t\t$output = preg_replace_callback( $re, $cb_expandSelector, $output);\n\n\t\t// Restore all comments\n\t\t$cb_restoreLiteral = self::createCallback( 'cb_restoreLiteral' );\n\t\t$output = preg_replace_callback( '#(___c\\d+___)#', $cb_restoreLiteral, $output);\n\n\t\t// Restore all literals\n\t\t$cb_restoreLiteral = self::createCallback( 'cb_restoreLiteral' );\n\t\t$output = preg_replace_callback( '#(___\\d+___)#', $cb_restoreLiteral, $output);\n\n\t\t// Release un-needed memory\n\t\tself::$literals = self::$variables = null;\n\n\t\treturn $output;\n\t}", "function extractFunction($path)\n\t{\n\t\treturn is_int(strpos($path, '/'))?\n\t\t\n\t\t\tbasename ($path, \".php\"):\n\t\t\t$path;\n\t}", "private function writeCFile($cFile, $sourceBefore, $sourceAfter, $cFuncs) {\n $content = trim($sourceBefore) . \"\\n\\n\";\n foreach ($cFuncs as $cFunc) {\n $content .= \"/** {$cFunc['comment']} */\\n\" .\n rtrim($cFunc['first'], '; {') . \" {\\n\" .\n ($cFunc['body'] ? $cFunc['body'] . \"\\n\" : '') .\n \"}\\n\\n\";\n }\n $content .= trim($sourceAfter);\n $content = trim($content) . \"\\n\";\n if (file_exists($cFile)) {\n if (md5($content) == md5_file($cFile)) {\n return;\n } else if ($this->makeBackups) {\n copy($cFile, \"{$cFile}.bak\");\n }\n }\n $this->numUpdatedFiles += 1;\n file_put_contents($cFile, $content);\n }", "private function getCipherFunctions($script)\n {\n preg_match(\"/\\\"signature\\\",\\s?([a-zA-Z0-9$]+)\\(/\", $script, $out)\n or $this->throwLogicalException('Could not find primary decipher function');\n\n $pFunc = $out[1];\n\n // Get cipher transformation functions\n preg_match(\"/{$pFunc}=function\\(\\w\\){[a-z=\\.\\(\\\"\\)]*;(.*);(?:.+)}/\", $script, $out)\n or $this->throwLogicalException('Could not get transformation functions');\n\n $transformationFunctions = explode(';', $out[1]);\n\n return $transformationFunctions;\n }", "private function parseFunc()\n {\n $preg = '/\\{\\:(.*)\\}/isU';\n $status = \\preg_match_all($preg, $this->content, $info, PREG_SET_ORDER);\n if ($status) {\n foreach ($info as $v) {\n if (!empty($v[1])) {\n $replace = \"<?php echo {$v[1]}; ?>\";\n $this->content = \\str_replace($v[0], $replace, $this->content);\n }\n }\n }\n }", "protected function compileFile($file)\n {\n // Get the content of the file\n $rawContent = file_get_contents($file);\n\n // Run all the pre-compilers before doing anything\n foreach ($this->preCompilers as $preCompiler) {\n\n $rawContent = $preCompiler->compile($rawContent);\n }\n\n // Now let the actual compiler do its work\n $rawContent = $this->compiler->text($rawContent);\n\n // Let's also run all the post-compilers here\n foreach ($this->postCompilers as $postCompiler) {\n\n $rawContent = $postCompiler->compile($rawContent);\n }\n\n // Return what we got\n return $rawContent;\n }", "public function stdWrap_parseFunc() {}", "function _compileFile($filename) {\n $this->_buildSource($filename);\n //print_r($this->_classSource);\n //print_r($this->_requires);\n //print_r($this->_requireErrors);\n //print_r($this->_extends);\n \n foreach($this->_defines as $k => $v)\n bcompiler_write_constant($this->_fh,$k);\n \n print_r(array_keys($this->_classSource));\n foreach(array_keys($this->_classSource) as $class) {\n $this->_loadClass($class);\n \n }\n //bcompiler_parse_class( 'test','vending_deliver' );\n //bcompiler_write_class($this->_fh,'vending_deliver');\n \n //print_r(get_declared_classes());\n //print_r(get_loaded_extensions());\n \n }", "function fnc_de_la_page_D()\n{\n}", "function zen___carga_funciones($fichero){\n\t//Comprobar la extensión:\n\tif (substr(strtolower($fichero),-4,4)!=\".php\") $fichero = $fichero.\".php\";\n\tif (file_exists(ZF_DIR_FUNCIONES.$fichero)){ \n\t //Es un fichero de funciones de usuario colocado en el \n\t //directorio de zenphp/funciones/?\n\t include_once(ZF_DIR_FUNCIONES.$fichero);\n\t return true;\n\t} else {\n\t //Error: no existe el fichero\n\t return false;\n\t}\n}", "function get_defined_functions()\n{\n return array();\n}", "public function process(File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n $tokenType = $tokens[$stackPtr]['type'];\n\n $itemInfo = [\n 'name' => $tokenType,\n ];\n $this->handleFeature($phpcsFile, $stackPtr, $itemInfo);\n }", "private function isFunctionDeclaration($line){\n\t\treturn preg_match('~^[\\$a-zA-Z0-9_-]+\\s*\\(~', $line);\n\t}", "public function getAllFunctions()\n {\n $ret = array_merge(\n $this->getFunctionsClass('CHAR'),\n $this->getFunctionsClass('NUMBER'),\n $this->getFunctionsClass('DATE'),\n $this->getFunctionsClass('UUID')\n );\n sort($ret);\n return $ret;\n }", "public function getFunctions()\n {\n return [\n new \\Twig_Function('cmsBlocksById', [$this, 'getCmsBlocksById']),\n new \\Twig_Function('cmsPagesByTag', [$this, 'getCmsPagesByTag']),\n new \\Twig_Function('cmsBlocksByTag', [$this, 'getCmsBlocksByTag']),\n new \\Twig_Function('cmsPageByUrl', [$this, 'getCmsPageByUrl']),\n new \\Twig_Function('url', [$this, 'getUrl']),\n ];\n }", "public function process( PHP_CodeSniffer_File $phpcs_file, $stack_ptr ) {\n\t\t$tokens = $phpcs_file->getTokens();\n\t\t$token = $tokens[ $stack_ptr ];\n\n\t\tif ( ! empty( self::$text_domain_override ) ) {\n\t\t\t$this->text_domain = self::$text_domain_override;\n\t\t}\n\n\t\tif ( '_' === $token['content'] ) {\n\t\t\t$phpcs_file->addError( 'Found single-underscore \"_()\" function when double-underscore expected.', $stack_ptr, 'SingleUnderscoreGetTextFunction' );\n\t\t}\n\n\t\tif ( ! isset( $this->i18n_functions[ $token['content'] ] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$translation_function = $token['content'];\n\n\t\tif ( in_array( $translation_function, array( 'translate', 'translate_with_gettext_context' ), true ) ) {\n\t\t\t$phpcs_file->addWarning( 'Use of the \"%s()\" function is reserved for low-level API usage.', $stack_ptr, 'LowLevelTranslationFunction', array( $translation_function ) );\n\t\t}\n\n\t\t$func_open_paren_token = $phpcs_file->findNext( T_WHITESPACE, ( $stack_ptr + 1 ), null, true );\n\t\tif ( ! $func_open_paren_token || T_OPEN_PARENTHESIS !== $tokens[ $func_open_paren_token ]['code'] ) {\n\t\t\t return;\n\t\t}\n\n\t\t$arguments_tokens = array();\n\t\t$argument_tokens = array();\n\n\t\t// Look at arguments.\n\t\tfor ( $i = ( $func_open_paren_token + 1 ); $i < $tokens[ $func_open_paren_token ]['parenthesis_closer']; $i += 1 ) {\n\t\t\t$this_token = $tokens[ $i ];\n\t\t\t$this_token['token_index'] = $i;\n\t\t\tif ( in_array( $this_token['code'], PHP_CodeSniffer_Tokens::$emptyTokens, true ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( T_COMMA === $this_token['code'] ) {\n\t\t\t\t$arguments_tokens[] = $argument_tokens;\n\t\t\t\t$argument_tokens = array();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Merge consecutive single or double quoted strings (when they span multiple lines).\n\t\t\tif ( T_CONSTANT_ENCAPSED_STRING === $this_token['code'] || T_DOUBLE_QUOTED_STRING === $this_token['code'] ) {\n\t\t\t\tfor ( $j = ( $i + 1 ); $j < $tokens[ $func_open_paren_token ]['parenthesis_closer']; $j += 1 ) {\n\t\t\t\t\tif ( $this_token['code'] === $tokens[ $j ]['code'] ) {\n\t\t\t\t\t\t$this_token['content'] .= $tokens[ $j ]['content'];\n\t\t\t\t\t\t$i = $j;\n\t\t\t\t\t} else {\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\t$argument_tokens[] = $this_token;\n\n\t\t\t// Include everything up to and including the parenthesis_closer if this token has one.\n\t\t\tif ( ! empty( $this_token['parenthesis_closer'] ) ) {\n\t\t\t\tfor ( $j = ( $i + 1 ); $j <= $this_token['parenthesis_closer']; $j += 1 ) {\n\t\t\t\t\t$tokens[ $j ]['token_index'] = $j;\n\t\t\t\t\t$argument_tokens[] = $tokens[ $j ];\n\t\t\t\t}\n\t\t\t\t$i = $this_token['parenthesis_closer'];\n\t\t\t}\n\t\t}\n\t\tif ( ! empty( $argument_tokens ) ) {\n\t\t\t$arguments_tokens[] = $argument_tokens;\n\t\t}\n\t\tunset( $argument_tokens );\n\n\t\t$argument_assertions = array();\n\t\tif ( 'simple' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'text', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t} elseif ( 'context' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'text', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'context', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t} elseif ( 'number' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'single', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'plural', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\tarray_shift( $arguments_tokens );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t} elseif ( 'number_context' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'single', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'plural', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\tarray_shift( $arguments_tokens );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'context', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t} elseif ( 'noopnumber' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'single', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'plural', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t} elseif ( 'noopnumber_context' === $this->i18n_functions[ $translation_function ] ) {\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'single', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'plural', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'context', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t\t$argument_assertions[] = array( 'arg_name' => 'domain', 'tokens' => array_shift( $arguments_tokens ) );\n\t\t}\n\n\t\tif ( ! empty( $arguments_tokens ) ) {\n\t\t\t$phpcs_file->addError( 'Too many arguments for function \"%s\".', $func_open_paren_token, 'TooManyFunctionArgs', array( $translation_function ) );\n\t\t}\n\n\t\tforeach ( $argument_assertions as $argument_assertion_context ) {\n\t\t\tif ( empty( $argument_assertion_context['tokens'][0] ) ) {\n\t\t\t\t$argument_assertion_context['stack_ptr'] = $func_open_paren_token;\n\t\t\t} else {\n\t\t\t\t$argument_assertion_context['stack_ptr'] = $argument_assertion_context['tokens'][0]['token_index'];\n\t\t\t}\n\t\t\tcall_user_func( array( $this, 'check_argument_tokens' ), $phpcs_file, $argument_assertion_context );\n\t\t}\n\n\t\t// For _n*() calls, compare the singular and plural strings.\n\t\tif ( false !== strpos( $this->i18n_functions[ $translation_function ], 'number' ) ) {\n\t\t\t$single_context = $argument_assertions[0];\n\t\t\t$plural_context = $argument_assertions[1];\n\n\t\t\t$this->compare_single_and_plural_arguments( $phpcs_file, $stack_ptr, $single_context, $plural_context );\n\t\t}\n\t}", "function compile();", "public function onCompile() {}", "function find_method_filename($c)\n{\n\t\tglobal $tagfile_xml;\n\t\t$class_name = str_replace(\".\", \"::\", $c);\n\t\t$elem = $tagfile_xml->xpath(\"//compound[@kind='class'][name/text()=\\\"$class_name\\\"]\");\n\t\tif (empty($elem))\n\t\t{\n\t\t\t\treturn \"#\";\n\t\t}\n\t\t$e = $elem[0]->xpath(\"filename/text()\")[0]->__toString();\n\t\treturn $e;\n}", "public function getFunctions()\n {\n return [\n new \\Twig_Function('file_icon', [$this, 'getFileIcon']),\n ];\n }", "function atk14_find_file($file){\n\tpreg_match('/^(.*\\.)(inc|php)$/',$file,$matches);\n\t$fs = array();\n\t$fs[] = $file;\n\t$fs[] = $matches[1].\"inc\";\n\t$fs[] = $matches[1].\"php\";\n\tforeach($fs as $file){\n\t\tif(file_exists($file)){ return $file; }\n\t}\n}", "public function getPhpsassFunctions( );", "public function process(File $phpcsFile, $stackPtr)\n {\n $fileExtension = strtolower(substr($phpcsFile->getFilename(), -7));\n if ($fileExtension !== 'install') {\n return;\n }\n\n $tokens = $phpcsFile->getTokens();\n $functionName = $tokens[($stackPtr + 2)]['content'];\n $fileName = substr(basename($phpcsFile->getFilename()), 0, -8);\n if (empty(preg_match('/'.$fileName.'_update_(\\d000)/', $functionName, $match)) === false) {\n $phpcsFile->addError('Update schema '.$match[1].' is reserved for upgrading.', $stackPtr, \"Update\".$match[1].\"NotAllowed\");\n }\n\n }", "function A() {\n echo 'fn-A @ file-2';\n}", "private function analyzeCsi() {\n if($templateWrapper = TemplateFactory::create($this->file)) {\n $templateWrapper->initialize();\n $rf = $templateWrapper->render($this->file, $this->csi->params->toArray());\n } else {\n $rf = get_include_contents($this->file, $this->csi->params->toArray());\n }\n $dom=new \\DOMDocument();\n libxml_use_internal_errors(true);\n $dom->loadHTML($rf);\n libxml_clear_errors();\n $elements = JSON::decode(HTML::getElements($dom, $rf));\n $bindings = HTML::getBindings($dom);\n $this->processBindings($bindings, $elements, $dom);\n $dom->loadHTML($dom->saveHTML());\n $events = HTML::getEvents($dom);\n $groups = HTML::getGroups($dom);\n $this->processEvents($events);\n $requires=\"<?php\\n\";\n $gencsi=\"\\nclass \" . $this->eossClassName . \"GenCSI extends \\\\EOSS\\\\CSI {\\n\\n\";\n $gencsi.=\"\\n\\n\";\n $csivi=\"\";\n $csic = \"\\tpublic function __construct($\".\"eoss) {\\n\";\n $csic .= \"\\n\\tparent::__construct($\".\"eoss);\\n\";\n $csic .= \"\\t\\t$\".\"this->eoss=\".\"$\".\"eoss;\\n\";\n $csic .= \"\\t\\t$\".\"this->file='\".$this->file.\"';\\n\";\n foreach($groups as $group) {\n $requires .= \"require_once __DIR__ . '/genElements/\" . $group . \".php';\\n\";\n $csivi .= \"\\t/**\\n\\t * @var \" . $group . \"\\n\\t */\\n\";\n $csivi .= \"\\tpublic $\".$group.\";\\n\";\n $csic .= \"\\t\\t$\".\"this->\".$group.\"=new \".$group.\";\\n\";\n }\n foreach ($elements as $element) {\n if(key_exists('data_ignore', $element) && $element['data_ignore'] == 'true') {\n continue;\n }\n\n $file = \"<?php\\nclass {$element[\"id\"]} { \\n\\n\";\n $csivi .= \"\\t/**\\n\\t * @var {$element[\"id\"]}\\n\\t */\\n\";\n $csivi .= \"\\tpublic $\".$element[\"id\"].\";\\n\";\n $requires .= \"require_once __DIR__ . '/genElements/\".$element[\"id\"].\".php';\\n\";\n $csic .= \"\\t\\t$\".\"this->\".$element[\"id\"].\"=new \".$element[\"id\"].\";\\n\";\n foreach ($element as $key => $attribute) {\n if($this->isBounded($element[\"id\"], $key)) {\n $file .= \"\\t/**\\n\\t * @var \\\\Binding\\\\IBindedAttribute\\n\\t */\\n\";\n } else {\n $file .= \"\\t/**\\n\\t * @var string\\n\\t */\\n\";\n }\n $file .= \"\\tpublic $\" . $key. \";\\n\\n\";\n }\n $listOfEvents=json_decode(file_get_contents(DIR_LIBS.\"EOSS/eventList.json\"));\n foreach ($listOfEvents as $key => $value) {\n $file .= \"\\t/**\\n\\t * @var array\\n\\t */\\n\";\n $file .= \"\\tpublic $\" . $key . \" = array();\\n\\n\";\n }\n $file .= \"\\n\\tpublic function __construct() { \\n\";\n foreach ($element as $key => $attribute) {\n $attribute=str_replace('\"', '\\\"', $attribute);\n $file .= \"\\t\\t$\".\"this->\" . $key . '=\"'.$attribute.'\"'.\";\\n\";\n }\n $file .= \"\\t}\\n\\n\";\n $file .= \"}\\n\";\n CSIHelper::genElement($element[\"id\"], $file);\n }\n $gencsi = $requires.$gencsi;\n $gencsi .= $csivi.\"\\n\";\n $csic .= \"\\t}\\n\";\n $gencsi .= $csic;\n $gencsi .= \"\\tpublic function setFile($\".\"dir) {\\n\";\n $gencsi .= \"\\t\\t$\".\"this->file=\".\"$\".\"dir;\\n\";\n $gencsi .= \"\\t\\t$\".\"this->csiAnalyze=new \\\\EOSS\\\\CSIAnalyze($\".\"dir, $\".\"this->eoss, $\".\"this);\\n\";\n $gencsi .= \"\\t\\t$\".\"this->eoss->loadGeneratedCSI();\\n\";\n $gencsi .= \"\\t}\\n\";\n $gencsi .= \"}\\n\";\n\n foreach($groups as $groupName) {\n $this->generateGroup($groupName);\n }\n\n CSIHelper::genCSI($gencsi, $this->eossClassName);\n }", "private function parseFile($file){\n\t\t$globalInitInSameFile = \"false\"; // reset the flag.\n\t\t$inComment = false; // flag that let's us know if we are parsing comment lines.\n\t\t$braceCount = 0; \t// counter to keep track of brace levels in the code;\n\t\t$file_handle = fopen($file, \"r\");\n\t\t\n\t\t$class = \"\";\n\t\t$functions = array();\n\t\t$parent = \"\";\n\t\t$numberOfOpenComm = 0;\n\t\t$numberOfCloseComm = 0;\n\t\twhile (!feof($file_handle) ){\n\t \t\t$line = fgets($file_handle);\n\t\t\t\n\t\t\tif( preg_match(\"/\\/\\//\", $line ) && !$inComment ){ // This is a java script comment that is of form '//' - so ignore\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif( ( 0 < ( $numbOfOpenComm = preg_match_all(\"/\\/\\*/\", $line, $out, PREG_PATTERN_ORDER ) ) ) && !$inComment ){ // This is a javaScript comment \"START\" of type '/*' - so ignore till the end of comment!\n\t\t\t\t\tif( $numbOfOpenComm == 1 ){\t\t\n\t\t\t\t\t\t$inComment = true;\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"InCommnet<BR>\";\n\t\t\t\t}\n\t\t\t\tif ( ( 0 < ( $numberOfCloseComm = preg_match_all(\"/\\*\\//\", $line, $out, PREG_PATTERN_ORDER) ) ) && $inComment ){ // This is the \"END\" of the comment of type '*/' - so start processing again.\n\t\t\t\t\tif( $numberOfCloseComm == 1 ){\n\t\t\t\t\t\t$inComment = false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( $numberOfCloseComm == $numberOfOpenComm ){\n\t\t\t\t\t\t\t$inComment = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"NOT InComment<BR>\";\n\t\t\t\t} \n\t\t\t\t// If we are not parsing comment lines, then:\n\t\t\t\tif( !$inComment ){\n\t\t\t\t\n\t\t\t\t\t// Count parenthesis - so that we know where in the class structure we are.\n\t\t\t\t\tif( preg_match(\"/{/\", $line ) ){\n\t\t\t\t\t\t$braceCount++;\n\t\t\t\t\t}\n\t\t\t\t\tif( preg_match(\"/}/\", $line ) ){\n\t\t\t\t\t\t$braceCount--;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tif( preg_match(\"/\\bvar\\b/i\", $line) && $braceCount == 0 ){\n\t\t\t\t\t\t$gv = substr ( $line, strcmp(\"var\", $line), strlen($line) - strlen(\"var \") );\n\t\t\t\t\t\t$endLenght = strlen(strstr($gv, \"=\"));\n\t\t\t\t\t\tif( $endLenght <= 0){\n\t\t\t\t\t\t\t$endLenght = strlen(strstr($gv, \";\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$gv = substr ($gv, 0, strlen($gv) - $endLenght);\n\t\t\t\t\t\t$this->globalVars[$this->gvCount] = $gv;\n\t\t\t\t\t\t$this->gvCount++;\n\t\t\t\t\t\t$this->fileOfObject = $file;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if there are resources in this line\n\t\t\t\t\t//echo $line . \"<BR>\";\n\t\t\t\t\tif( strstr($line, \"src:\") ){\n\t\t\t\t\t\t$res = substr ( $line, strpos($line, \"src:\"), strlen($line) );\n\t\t\t\t\t\t$res = substr ( $res, strpos($res, \"'\")+1, strlen($res) );\n\t\t\t\t\t\t$res = substr ( $res, 0, strpos($res, \"'\") );\n\t\t\t\t\t\t$this->resourceList[$this->resourceCount] = $res;\n\t\t\t\t\t\t$this->resourceCount++;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Work on indentifying Classes and their functions, inheritance and composition.\t\t\t\t\t\n\t\t\t\t\t// Check if the function is a Constructor - This will give us the class name as well.\n\t\t\t\t\tif( preg_match(\"/\\bfunction\\b/i\", $line ) && $braceCount == 0 ){\n\t\t\t\t\t\t// echo \"<font color='#000099'><strong>Found a Constructor:</strong></font><BR>\";\n\t\t\t\t\t\t$class = substr ( $line, strcmp(\"function\", $line), strlen($line) - strlen(\"function \") );\n\t\t\t\t\t\tif( strstr( $class, \"()\" ) ){\n\t\t\t\t\t\t\t$class = substr ( $class, 0, strlen($class) - strlen(\"()\") );\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"<strong><font color='#009900'>Class : \" . $class . \"</font></strong><BR>\";\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( preg_match(\"/\\bfunction\\b/i\", $line ) && $braceCount == 1 ){\n\t\t\t\t\t\t$functionName = substr($line, strpos($line, \"this.\")+strlen(\"this.\"), strlen($line));\n\t\t\t\t\t\t$functionName = substr($functionName, 0, strpos($functionName, \"= function\") );\n\t\t\t\t\t\t$functions[count($functions)] = \"n-\" . $functionName;\n\t\t\t\t\t\t//echo \"<font color='#990000'>Found a function</font><BR>\";\t\t\t\t\t\t\n\t\t\t\t\t\t// $functionName = substr( $line, strspn(\"this.\", strlen($line) - 5 - strrchr( $line , '=') ) );\n\t\t\t\t\t\t//echo \"<font color='#006600'><strong>Function Name: \". $functionName . \"</strong></font><BR>\";\n\t\t\t\t\t\t//$functions[count($functionCount)] = $functionName;\n\t\t\t\t\t}// if\n\t\t\t\t\t\n\t\t\t\t\tif( preg_match(\"/\\b.prototype\\b/i\", $line ) && $braceCount == 0 ){\n\t\t\t\t\t\t$res = substr ( $line, 0, strpos($line, \".prototype\") );\n\t\t\t\t\t\t$class = trim($class, \" \");\n\t\t\t\t\t\tif( $class == $res ){\n\t\t\t\t\t\t\t$parent = substr ( $line, strpos($line, \"new \") + strlen(\"new \"), strlen($line));\n\t\t\t\t\t\t\t$endChar = ';';\n\t\t\t\t\t\t\tif( $parent != \"\" ){\n\t\t\t\t\t\t\t\tif( preg_match(\"/\\b\\(\\b/i\", $parent ) ){\n\t\t\t\t\t\t\t\t\t$endChar = '\\(';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$parent = substr ( $parent, 0, strpos($parent, $endChar) );\n\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// Problems here - make sure you save the function somehow .\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}// if\n\t\t\t\t\n\t\t\t\t// $fileContents .= $line . \"<BR>\";\n\t\t\t}// if\n\t\t}// while\n\t\t$cObj = new ClassObj($class, $file, $functions, $parent);\n\t\t$this->classes[$this->classCount] = $cObj;\n\t\t$this->classCount++;\n\t\t\n\t\tfclose($file_handle);\n\t}", "public function process( File $phpcsFile, $stackPtr ) {\n\t\t// Stripping potential quotes to ensure `stdin_path` passed by IDEs does not include quotes.\n\t\t$file = preg_replace( '`^([\\'\"])(.*)\\1$`Ds', '$2', $phpcsFile->getFileName() );\n\n\t\tif ( 'STDIN' === $file ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$path_info = pathinfo( $file );\n\n\t\t// Basename = filename + extension.\n\t\t$basename = '';\n\t\tif ( ! empty( $path_info['basename'] ) ) {\n\t\t\t$basename = $path_info['basename'];\n\t\t}\n\n\t\t$file_name = '';\n\t\tif ( ! empty( $path_info['filename'] ) ) {\n\t\t\t$file_name = $path_info['filename'];\n\t\t}\n\n\t\t$extension = '';\n\t\tif ( ! empty( $path_info['extension'] ) ) {\n\t\t\t$extension = $path_info['extension'];\n\t\t}\n\n\t\t$error = 'Filenames should be all lowercase with hyphens as word separators. Expected %s, but found %s.';\n\t\t$error_code = 'NotHyphenatedLowercase';\n\t\t$expected = strtolower( str_replace( '_', '-', $file_name ) );\n\n\t\tif ( $this->is_file_excluded( $phpcsFile, $file ) === false ) {\n\t\t\t$oo_structure = $phpcsFile->findNext( $this->oo_tokens, $stackPtr );\n\t\t\tif ( false !== $oo_structure ) {\n\n\t\t\t\t$tokens = $phpcsFile->getTokens();\n\t\t\t\t$name = $phpcsFile->getDeclarationName( $oo_structure );\n\n\t\t\t\t$prefixes = $this->clean_custom_array_property( $this->prefixes );\n\t\t\t\tif ( ! empty( $prefixes ) ) {\n\t\t\t\t\tforeach ( $prefixes as $prefix ) {\n\t\t\t\t\t\tif ( $name !== $prefix && stripos( $name, $prefix ) === 0 ) {\n\t\t\t\t\t\t\t$name = substr( $name, strlen( $prefix ) );\n\t\t\t\t\t\t\t$name = ltrim( $name, '_-' );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$expected = strtolower( str_replace( '_', '-', $name ) );\n\n\t\t\t\tswitch ( $tokens[ $oo_structure ]['code'] ) {\n\t\t\t\t\tcase T_CLASS:\n\t\t\t\t\t\t$error = 'Class file names should be based on the class name without the plugin prefix. Expected %s, but found %s.';\n\t\t\t\t\t\t$error_code = 'InvalidClassFileName';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase T_INTERFACE:\n\t\t\t\t\t\t$error = 'Interface file names should be based on the interface name without the plugin prefix and should have \"-interface\" as a suffix. Expected %s, but found %s.';\n\t\t\t\t\t\t$error_code = 'InvalidInterfaceFileName';\n\n\t\t\t\t\t\t// Don't duplicate \"interface\" in the filename.\n\t\t\t\t\t\tif ( substr( $expected, -10 ) !== '-interface' ) {\n\t\t\t\t\t\t\t$expected .= '-interface';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase T_TRAIT:\n\t\t\t\t\t\t$error = 'Trait file names should be based on the trait name without the plugin prefix and should have \"-trait\" as a suffix. Expected %s, but found %s.';\n\t\t\t\t\t\t$error_code = 'InvalidTraitFileName';\n\n\t\t\t\t\t\t// Don't duplicate \"trait\" in the filename.\n\t\t\t\t\t\tif ( substr( $expected, -6 ) !== '-trait' ) {\n\t\t\t\t\t\t\t$expected .= '-trait';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$has_function = $phpcsFile->findNext( T_FUNCTION, $stackPtr );\n\t\t\t\tif ( false !== $has_function ) {\n\t\t\t\t\t$error = 'Files containing function declarations should have \"-functions\" as a suffix. Expected %s, but found %s.';\n\t\t\t\t\t$error_code = 'InvalidFunctionsFileName';\n\n\t\t\t\t\tif ( substr( $expected, -10 ) !== '-functions' ) {\n\t\t\t\t\t\t$expected .= '-functions';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Throw the error.\n\t\tif ( $file_name !== $expected ) {\n\t\t\t$phpcsFile->addError(\n\t\t\t\t$error,\n\t\t\t\t0,\n\t\t\t\t$error_code,\n\t\t\t\tarray(\n\t\t\t\t\t$expected . '.' . $extension,\n\t\t\t\t\t$basename,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Only run this sniff once per file, no need to run it again.\n\t\treturn ( $phpcsFile->numTokens + 1 );\n\t}", "function ytGrabCipher($ytJs)\n{\n\n _logDebug(\"Parsing JS's functions...\");\n $pat = '[\\$a-zA-Z][a-zA-Z\\d]*';\n $pat = \"$pat(?:\\.$pat)?\";\n preg_match(\"/(?:\\b|[^a-zA-Z0-9$])([a-zA-Z0-9$]{2})\\s*=\\s*function\\(\\s*a\\s*\\)\\s*{\\s*a\\s*=\\s*a\\.split\\(\\s*\\\"\\\"\\s*\\)/\", $ytJs, $fun);\n if (empty($fun[1])) {\n _logError('Unparsable function! [id:001]');\n exit;\n }\n $fun = $fun[1];\n preg_match(\"/\\bfunction\\s+\\Q$fun\\E\\s*\\($pat\\)\\s*{(.*?)}/sx\", $ytJs, $fun2);\n $fun2 = preg_replace(\"/var\\s($pat)=($pat)\\[0\\];\\\\2\\[0\\]=\\\\2\\[(\\d+)%\\\\2\\.length\\];\\\\2\\[\\\\3\\]=\\\\1;/\", '$2=swap($2,$3);', $fun2[1]);\n if (empty($fun2)) {\n preg_match(\"/(?:\\bvar\\s+)?\\Q$fun\\E\\s*=\\s*function\\s*\\($pat\\)\\s*{(.*?)}/sx\", $ytJs, $fun);\n $fun = preg_replace(\"/var\\s($pat)=($pat)\\[0\\];\\\\2\\[0\\]=\\\\2\\[(\\d+)%\\\\2\\.length\\];\\\\2\\[\\\\3\\]=\\\\1;/\", '$2=swap($2,$3);', $fun[1]);\n } else {\n $fun = $fun2;\n }\n if (empty($fun)) {\n _logError('Unparsable function! [id:002]');\n exit;\n }\n $pieces = explode(';', $fun);\n $c = array();\n foreach ($pieces as $piece) {\n $piece = trim($piece);\n if (preg_match(\"/^($pat)=\\\\1\\.$pat\\(\\\"\\\"\\)$/\", $piece)) {\n } elseif (preg_match(\"/^($pat)=\\\\1\\.$pat\\(\\)$/\", $piece)) {\n $c[] = 'r';\n } elseif (preg_match(\"/^($pat)=\\\\1.$pat\\((\\d+)\\)$/\", $piece, $num)) {\n $c[] = 's' . $num[2];\n } elseif (preg_match(\"/^($pat)=($pat)\\(\\\\1,(\\d+)\\)$/\", $piece, $sw) || preg_match(\"@^()($pat)\\($pat,(\\d+)\\)$@s\", $piece, $sw)) {\n $n = $sw[3];\n $f = preg_replace('/^.*\\./s', '', $sw[2]);\n preg_match(\"/\\b\\Q$f\\E:\\s*function\\s*\\(.*?\\)\\s*({[^{}]+})/s\", $ytJs, $fn3);\n if (preg_match(\"/var\\s($pat)=($pat)\\[0\\];/s\", $fn3[1]) || preg_match(\"/void 0===($pat)\\[($pat)\\]/s\", $fn3[1])) {\n $c[] = \"w$n\";\n } elseif (preg_match(\"/\\b$pat\\.reverse\\(/s\", $fn3[1])) {\n $c[] = 'r';\n } elseif (preg_match(\"/return\\s*$pat\\.slice/s\", $fn3[1]) || preg_match(\"/\\b$pat\\.splice/s\", $fn3[1])) {\n $c[] = \"s$n\";\n }\n } elseif (preg_match(\"/^return\\s+$pat\\.$pat\\(\\\"\\\"\\)$/s\", $piece)) {\n }\n }\n $cipher = join(' ', $c);\n return $cipher;\n}", "function ssc_list_hooks( $hook = '' ) {\n global $wp_filter;\n\n if ( isset( $wp_filter[$hook]->callbacks ) ) {\n array_walk( $wp_filter[$hook]->callbacks, function( $callbacks, $priority ) use ( &$hooks ) {\n foreach ( $callbacks as $id => $callback )\n $hooks[] = array_merge( array( 'id' => $id, 'priority' => $priority ), $callback );\n });\n } else {\n return array();\n }\n\n foreach( $hooks as &$item ) {\n // skip if callback does not exist\n if ( !is_callable( $item['function'] ) ) continue;\n\n // function name as string or static class method eg. 'Foo::Bar'\n if ( is_string( $item['function'] ) ) {\n $ref = strpos( $item['function'], '::' ) ? new \\ReflectionClass( strstr( $item['function'], '::', true ) ) : new \\ReflectionFunction( $item['function'] );\n $item['file'] = $ref->getFileName();\n $item['line'] = get_class( $ref ) == 'ReflectionFunction'\n ? $ref->getStartLine()\n : $ref->getMethod( substr( $item['function'], strpos( $item['function'], '::' ) + 2 ) )->getStartLine();\n\n // array( object, method ), array( string object, method ), array( string object, string 'parent::method' )\n } elseif ( is_array( $item['function'] ) ) {\n\n $ref = new \\ReflectionClass( $item['function'][0] );\n\n // $item['function'][0] is a reference to existing object\n $item['function'] = array(\n is_object( $item['function'][0] ) ? get_class( $item['function'][0] ) : $item['function'][0],\n $item['function'][1]\n );\n $item['file'] = $ref->getFileName();\n $item['line'] = strpos( $item['function'][1], '::' )\n ? $ref->getParentClass()->getMethod( substr( $item['function'][1], strpos( $item['function'][1], '::' ) + 2 ) )->getStartLine()\n : $ref->getMethod( $item['function'][1] )->getStartLine();\n\n // closures\n } elseif ( is_callable( $item['function'] ) ) {\n $ref = new \\ReflectionFunction( $item['function'] );\n $item['function'] = get_class( $item['function'] );\n $item['file'] = $ref->getFileName();\n $item['line'] = $ref->getStartLine();\n\n }\n }\n\n return $hooks;\n}", "public function getFunctions()\r\n {\r\n return [\r\n\r\n new \\Twig_SimpleFunction('GetImageColor', [$this, 'imageColor']),\r\n new \\Twig_SimpleFunction('GetContrastYIQ', [$this, 'getContrastYIQ']),\r\n ];\r\n }", "function file_parse()\r\n\t{\r\n\t//aquí el código del método\r\n\t}", "protected function compile(&$meta){\n $scssc = $this->scssc();\n \n $content = $scssc->compile($this->source);\n \n foreach($scssc->getParsedFiles() as $file){\n $meta['files'][] = realpath($file);\n }\n \n return $content;\n }", "public function getFunctions() {\n return GessoExtensionLoader::getFunctions();\n }", "function get_defined_functions()\n{\n\treturn array();\n}", "public function foo()\n { \n echo \"Public function foo implemented in c class\";\n }", "function ccauto_sample($LAUNCH) {\n return <<< EOF\nvoid process(line)\n char line[];\n{\n printf(\"\\\\nString: %s\\\\n\",line);\n}\nEOF\n;\n}", "public function process(File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n $name = $tokens[$stackPtr]['content'];\n $ignoreCase = false;\n\n switch ($tokens[$stackPtr]['code']) {\n case T_FUNCTION:\n case T_CLASS:\n case T_INTERFACE:\n case T_TRAIT:\n $name = $phpcsFile->getDeclarationName($stackPtr);\n if ($tokens[$stackPtr]['code'] === T_FUNCTION\n && substr($name, 0, 2) == '__'\n && isset($this->magicMethods[substr($name, 2)])\n ) {\n // skip magic methods\n return;\n }\n break;\n\n case T_VARIABLE:\n $name = $tokens[$stackPtr]['content'];\n break;\n\n case T_STRING:\n $name = $this->parseConstant($phpcsFile, $stackPtr);\n $ignoreCase = true;\n break;\n\n default:\n var_dump($tokens[$stackPtr]);\n break;\n }//end switch\n\n if (!empty($name)) {\n $incorrectWords = $this->spellingCheck($name, $ignoreCase);\n $error = 'Bad spelling: \"%s\"';\n foreach ($incorrectWords as $word) {\n $phpcsFile->addWarning($error, $stackPtr, 'BadSpelling', [$word]);\n }\n }//end if\n\n }", "public function getFunctions()\n {\n return (array)$this->soapClientContent['functions'];\n }", "private function compile($file) {\n if(!file_exists($file)) {\n throw new \\Exception(\"Could not compile $file, file not found\");\n }\n\n if(!file_exists($this->views_cache) && !mkdir($this->views_cache)) {\n throw new \\Exception(\"Could no create cache directory.\" . \n \" Make sure you have write permissions.\");\n }\n\n $hash = md5($file);\n $compiled_file = $this->views_cache . '/' . $hash;\n $compiled = null;\n\n if( $this->debug || (!file_exists($compiled_file) \n || filemtime($compiled_file) < filemtime($file))) {\n // get the katar source code and compile it\n $source = file_get_contents($file);\n $compiled = $this->compileString($source);\n $compiled = \"<?php\\nfunction katar_\" . $hash .\n \"(\\$args) {\\nextract(\\$args);\\n\\$output = null;\\n\" . $compiled .\n \"\\nreturn \\$output;\\n}\\n\";\n\n file_put_contents($compiled_file, $compiled);\n } else {\n $compiled = file_get_contents($cache_file);\n }\n\n return $compiled;\n }", "public function process(PHP_CodeSniffer_File $phpcsfile, $stackptr) {\n global $CFG;\n\n if ($this->lastfile != $phpcsfile->getFilename()) {\n $this->lastfile = $phpcsfile->getFilename();\n tool_analysegetstring_new_file($this->lastfile);\n }\n\n $tokens = $phpcsfile->getTokens();\n\n // If this is not 'get_string' we can stop now.\n if ($tokens[$stackptr]['content'] !== 'get_string') {\n return;\n }\n\n // Skip tokens that are the names of functions or classes\n // within their definitions. For example: function myFunction...\n // \"myFunction\" is T_STRING but we should skip because it is not a\n // function or method *call*.\n $functionname = $stackptr;\n $findtokens = array_merge(PHP_CodeSniffer_Tokens::$emptyTokens, array(T_BITWISE_AND));\n\n $functionkeyword = $phpcsfile->findPrevious($findtokens, ($stackptr - 1), null, true);\n\n if (in_array($tokens[$functionkeyword]['code'], array(T_FUNCTION, T_CLASS))) {\n return;\n }\n\n // If the next non-whitespace token after the function or method call\n // is not an opening parenthesis then it cant really be a *call*.\n $openbracket = $phpcsfile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens,\n ($functionname + 1), null, true);\n\n if ($tokens[$openbracket]['code'] !== T_OPEN_PARENTHESIS) {\n return;\n }\n\n $closebracket = $tokens[$openbracket]['parenthesis_closer'];\n\n $arguments = array();\n $currentargument = '';\n $nestingdepth = 0;\n\n for ($i = ($openbracket + 1); $i <= $closebracket; $i++) {\n if ($tokens[$i]['code'] == T_OPEN_PARENTHESIS) {\n $nestingdepth += 1;\n $currentargument .= $tokens[$i]['content'];\n\n } else if ($nestingdepth == 0 &&\n in_array($tokens[$i]['code'], array(T_COMMA, T_CLOSE_PARENTHESIS))) {\n $arguments[] = trim($currentargument);\n $currentargument = '';\n\n } else if ($tokens[$i]['code'] == T_CLOSE_PARENTHESIS) {\n $nestingdepth -= 1;\n $currentargument .= $tokens[$i]['content'];\n\n } else {\n $currentargument .= $tokens[$i]['content'];\n }\n }\n\n tool_analysegetstring_record_call($phpcsfile->getFilename(),\n $tokens[$functionkeyword]['line'], $arguments);\n\n return;\n }", "public function getFunctions() \n\t{\n $functions = array();\n // Get config file //\n $config = \\Config::load('twig', true);\n\n // Loop through config results //\n foreach ($config as $name => $v) \n {\n // Loop through inner array consisting of class and function //\n foreach ($v as $class => $function) \n {\n // Single out this class //\n if ($class == 'Twig_Fuel_Extension') \n {\n $functions[$name] = new Twig_Function_Method($this, $function);\n } \n else \n {\n $functions[$name] = new Twig_Function_Function($class . '::' . $function);\n }\n }\n }\n \n // Return generated results //\n return $functions;\n }", "function published_functions()\n{\n $path = $_SERVER[\"DOCUMENT_ROOT\"]. \"/\". substr($_SERVER[\"PHP_SELF\"], 1);\n\n // try cache first\n\tglobal $mwsx_config;\n if (($mwsx_config[\"cache\"][\"mode\"] != \"none\") AND ($mwsx_config[\"cache\"][\"mode\"] != \"off\"))\n {\n $cache_key = md5($path. filesize($path). filemtime($path). \"mwsd\");\n $result = cache_load($cache_key);\n if ($result !== false) {\n return $result;\n }\n }\n\n // cache not found, we'll produce new list based on source\n $source = file_get_contents($path);\n\n // namespace\n $namespace = \"\";\n if (preg_match('/namespace[ \\t\\r\\n]*([^ \\t\\r\\n;]*)/i', $source, $matches)) {\n $namespace = $matches[1];\n }\n\n // list of published functions\n preg_match_all('/\\/\\* _EXPORT_ \\*\\/[ \\t\\r\\n]*function[ \\t\\r\\n]?(.+)[ \\t\\r\\n]*\\(([^\\)]*)\\)/', $source, $matches);\n $str_args = $matches[2];\n $str_fncs = $matches[1];\n\n // split arguments and format in mwsd\n $args = array_map(create_function('$str_args', 'return $str_args == \"\"? array(): explode(\",\", preg_replace(\\'/[\\$ \\n\\r\\t]/\\', \\'\\', $str_args));'), $str_args);\n $fncs = array_map(create_function('$a, $b', \"return array('name' => \\$a, 'args' => \\$b);\"), $str_fncs, $args);\n\n // save cache\n cache_save($cache_key, $fncs);\n\n // return list of functions (not in json form)\n return array(\"namespace\" => $namespace, \"fncs\" => $fncs);\n}", "public static function getFunctionList()\n {\n return [\n 'docFunction',\n ];\n }", "function ccauto_sample($LAUNCH) {\n return <<< EOF\nvoid list_add(lst, value)\n struct list *lst;\n int value;\n{\n /* Append the value to the end of the linked list. */\n}\n\nvoid list_remove(lst, value)\n struct list *lst;\n int value;\n{\n /* Remove the value from the linked list. */\n}\n\nEOF\n;\n}", "function ctools_plugin_test_magic_func_not_cached_test() {}", "public function getFunctions()\n {\n $names = array(\n 'start_timer' => 'startTimer',\n 'stop_timer' => 'stopTimer',\n 'get_timer_total' => 'getTimerTotal',\n );\n\n $funcs = array();\n foreach ($names as $twig => $local) {\n $funcs[$twig] = new \\Twig_Function_Method($this, $local, array('is_safe' => array('html')));\n }\n\n return $funcs;\n }", "public function getFunctions()\n {\n $functions = [];\n $functions[] = new TwigFunction('path', [$this, 'functionPath']);\n $functions[] = new TwigFunction('asset', [$this, 'functionAsset']);\n $functions[] = new TwigFunction('entrypoints', [$this, 'functionEntryPoints'], ['is_safe' => ['html']]);\n $functions[] = new TwigFunction('entrypoints_list', [$this, 'functionEntryPointsList']);\n $functions[] = new TwigFunction('preload', [$this, 'functionPreload']);\n\n return $functions;\n }", "public function ext_func_file() {\n\n\t\treturn $this->ext_path() . trim( $this->ext_func_path, '/' ) . '/' . $this->ext_domain . '.php';\n\n\t}", "private function findFunctions($expression) {\n\t\tpreg_match_all('/\\{([0-9]+)\\}/', $expression, $matches);\n\n\t\t$functions = array();\n\t\tforeach ($matches[1] as $i => $functionid) {\n\t\t\t$functions[$i + 1] = $functionid;\n\t\t}\n\n\t\t// macro without number is same as 1. but we need to distinguish them, so it's treated as 0\n\t\tif (isset($functions[1])) {\n\t\t\t$functions[0] = $functions[1];\n\t\t}\n\n\t\treturn $functions;\n\t}", "public function visitPhpFile(\\SplFileInfo $file, MessageCatalogue $catalogue, array $ast)\n {\n }", "public function compilers()\n {\n return array_slice($this->extensions, 1);\n }", "public function compile();", "public function compile();", "function ccauto_sample($LAUNCH) {\n return <<< EOF\nint bump()\n{\n // Do something :)\n}\nEOF\n;\n}", "public function getFunctions()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n\n return $this->functions;\n }", "public function process(File $phpcsFile, $stackPtr)\n {\n $functionPtr = $phpcsFile->findPrevious(T_FUNCTION, ($stackPtr - 1));\n\n if ($functionPtr !== false) {\n $doubleColonPtr = $phpcsFile->findNext(T_DOUBLE_COLON, ($stackPtr + 1));\n\n if ($doubleColonPtr !== false) {\n $tokens = $phpcsFile->getTokens();\n $functionName = $phpcsFile->getDeclarationName($functionPtr);\n $methodNamePtr = $phpcsFile->findNext(T_STRING, ($stackPtr + 1));\n\n if ($methodNamePtr !== false && $tokens[$methodNamePtr]['content'] !== $functionName) {\n $error = 'Method name mismatch in parent:: call';\n $phpcsFile->addError($error, $stackPtr, 'WrongName');\n }\n }\n }//end if\n }", "public function getFunctions()\n {\n return $this->data['functions'];\n }", "public function getCodepoints();", "public function getFunctions()\n\t{\n\t\treturn array(\n\t\t\t'sprockets_js' => new Twig_Function_Function('Sprockets::js'),\n\t\t\t'sprockets_css' => new Twig_Function_Function('Sprockets::css')\n\t\t);\n\t}" ]
[ "0.64806247", "0.6156399", "0.6017205", "0.58467567", "0.5618383", "0.5550291", "0.55083144", "0.55049634", "0.5443541", "0.5378412", "0.5378412", "0.537549", "0.53617907", "0.53617907", "0.5331509", "0.53196555", "0.5251245", "0.5251245", "0.5251245", "0.5251245", "0.5246564", "0.51981944", "0.5193791", "0.51822525", "0.5157213", "0.5116193", "0.5111569", "0.5101732", "0.5087847", "0.5079591", "0.50749713", "0.50675136", "0.50473183", "0.502507", "0.5014191", "0.5009011", "0.49884918", "0.4966946", "0.4950562", "0.49379024", "0.4933706", "0.49161202", "0.4897707", "0.48965198", "0.4891511", "0.48854238", "0.4875014", "0.4874581", "0.48714045", "0.4864446", "0.485918", "0.4857653", "0.48502854", "0.48490247", "0.48404524", "0.483646", "0.48304573", "0.48280996", "0.48244485", "0.4818383", "0.48178944", "0.4807382", "0.48047054", "0.480401", "0.47957736", "0.47942483", "0.47717437", "0.476595", "0.4754868", "0.47483435", "0.47342807", "0.4729907", "0.47253612", "0.4721104", "0.47179505", "0.47174275", "0.47107157", "0.47082782", "0.4707068", "0.47040367", "0.47019166", "0.46995828", "0.46986508", "0.46958113", "0.46933758", "0.4691262", "0.46784928", "0.46764213", "0.467265", "0.46701926", "0.4665673", "0.46616203", "0.46592396", "0.46592396", "0.4653826", "0.46457413", "0.4641522", "0.46241924", "0.46178976", "0.4617204" ]
0.7648693
0
Converts given distance from $sourceUnit to $destinationUnit.
Преобразует заданное расстояние из $sourceUnit в $destinationUnit.
public static function convertDistance($distance, $sourceUnit, $destinationUnit) { if (!isset(self::$unitConversion[$sourceUnit])) { throw new ConversionException('Cannot convert distance with unit: ' . $sourceUnit); } if (!isset(self::$unitConversion[$destinationUnit])) { throw new ConversionException('Cannot convert to distance with unit: ' . $destinationUnit); } if ($sourceUnit === $destinationUnit) { return $distance; } return $distance * self::$unitConversion[$sourceUnit] / self::$unitConversion[$destinationUnit]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function convert(float $distance, string $from, string $to): float\n {\n return UnitConverter::convert($distance, $from, $to);\n }", "function distance( $distance, $unit = 'metres') {\r\n //debug($distance);\r\n\t\t\r\n\t\t\r\n\t\tif ( Configure::read('Vcc.measurement_units') == 'miles' || $unit == 'miles') {\r\n\t\t\t$distance = floatval($distance) * 0.621371192; \r\n\t\t\treturn( round(floatval($distance), 2) . ' miles' ); // 1 km = 0.621371192 miles\r\n\t\t} else {\r\n\t\t\tif ( $distance >= 1) {\r\n\t\t\t\treturn( round(floatval($distance), 1) . 'km' );\r\n\t\t\t} else {\r\n\t\t\t\treturn( round(floatval($distance) * 1000, 0) . 'm' );\r\n\t\t\t}\r\n\t\t}\r\n }", "public function betweenAddresses($origin, $destination)\n {\n # Use Provider to resolve distnace\n $distance = $this->getProvider()->betweenAddresses($origin, $destination);\n\n # Fall back to ZipToZip if the Resolver returns 'false'\n if ($distance === false){\n $distance = $this->zipToZip( $origin, $destination );\n }\n\n return floatval($distance);\n }", "public function moveAssignments(\n StockUnitInterface $sourceUnit,\n StockUnitInterface $targetUnit,\n $quantity,\n $direction = SORT_DESC\n ): float;", "public function execute(\n \\Magento\\InventoryDistanceBasedSourceSelectionApi\\Api\\Data\\LatLngInterface $source,\n \\Magento\\InventoryDistanceBasedSourceSelectionApi\\Api\\Data\\LatLngInterface $destination\n ): float;", "protected function updateOrCrateUnitsForToKingdom(Kingdom $toKingdom, Kingdom $fromKingdom, array $unitMoving, ?KingdomUnit $foundUnit = null): void {\n if (is_null($foundUnit)) {\n $toKingdom->units()->create([\n 'kingdom_id' => $toKingdom->id,\n 'game_unit_id' => $fromKingdom->units()->find($unitMoving['unit_id'])->gameUnit->id,\n 'amount' => $unitMoving['amount'],\n ]);\n } else {\n $newAmount = $foundUnit->amount + $unitMoving['amount'];\n\n if ($newAmount > KingdomMaxValue::MAX_UNIT) {\n $newAmount = KingdomMaxValue::MAX_UNIT - $newAmount;\n }\n\n $foundUnit->update([\n 'amount' => $newAmount,\n ]);\n }\n }", "public function move($source, $destination);", "private function distanceToType($distance) {\n switch($this->type) {\n case 1:\n return round($distance, $this->round);\n break;\n case 2:\n return round(($distance / 1000), $this->round);\n break;\n case 3:\n return round(($distance * 0.00062137), $this->round);\n break;\n case 4:\n return round(($distance * 1.0936), $this->round);\n break;\n default:\n return ERROR;\n break;\n }\n }", "public function calculateDistance(LatLong $destination): float\n {\n if ($destination->getDatum() != $this->datum) {\n throw new InvalidArgumentException('Datums must match to calculate distance.');\n }\n\n // Note, we don't use a datum-specific radius here, as we are treating the Earth as a sphere, not an ellipsoid.\n $earthRadius = self::EARTH_MEAN_RADIUS_METRES;\n\n // Determine the distance using the spherical law of cosines.\n $latRad = $this->getLatitudeRadians();\n $longRad = $this->getLongitudeRadians();\n\n $cosLatRad = cos($latRad);\n $sinLatRad = sin($latRad);\n\n $destLatRad = $destination->getLatitudeRadians();\n $destLongRad = $destination->getLongitudeRadians();\n\n $destCostLatRad = cos($destLatRad);\n $destSinLatRad = sin($destLatRad);\n\n $cosLongRadDifference = cos($destLongRad - $longRad);\n\n return $earthRadius * acos($cosLatRad * $destCostLatRad * $cosLongRadDifference + $sinLatRad * $destSinLatRad);\n }", "public function convertToUnit(Unit $unit): Property;", "protected function returnUnitToKingdom(Kingdom $toKingdom, array $unitMoving): void {\n $unit = $toKingdom->units()->find($unitMoving['unit_id']);\n\n if (is_null($unit) || $unitMoving['amount'] === 0) {\n return;\n }\n\n $newAmount = $unit->amount + $unitMoving['amount'];\n\n if ($newAmount > KingdomMaxValue::MAX_UNIT) {\n $newAmount = KingdomMaxValue::MAX_UNIT;\n }\n\n $unit->update(['amount' => $newAmount]);\n }", "protected function findUnitToUpdate(Kingdom $toKingdom, Kingdom $fromKingdom, array $unitMoving): ?KingdomUnit {\n return $toKingdom->units->filter(function($unit) use($unitMoving, $fromKingdom) {\n\n $fromKingdomUnit = $fromKingdom->units()->find($unitMoving['unit_id']);\n\n if ($unit->gameUnit->name === $fromKingdomUnit->gameUnit->name) {\n return $unit;\n }\n })->first();\n }", "function destination($lat, $lon, $bearing, $distance, $units = \"mi\") {\n $radius = strcasecmp($units, \"km\") ? 3963.19 : 6378.137;\n $rLat = deg2rad($lat);\n $rLon = deg2rad($lon);\n $rBearing = deg2rad($bearing);\n $rAngDist = $distance / $radius;\n\n $rLatB = asin(sin($rLat) * cos($rAngDist) +\n cos($rLat) * sin($rAngDist) * cos($rBearing));\n $rLonB = $rLon + atan2(sin($rBearing) * sin($rAngDist) * cos($rLat), cos($rAngDist) - sin($rLat) * sin($rLatB));\n\n return array(\"lat\" => rad2deg($rLatB), \"lon\" => rad2deg($rLonB));\n }", "function convertmilestokilometers($dist)\n{\n return $dist * 1.60935;\n}", "private function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\t \n\t $theta = $lon1 - $lon2;\n\t $dist = (sin(deg2rad($lat1)) * sin(deg2rad($lat2))) + (cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)));\n\t $dist = acos($dist);\n\t $dist = rad2deg($dist);\n\t $miles = $dist * 60 * 1.1515;\n\t $unit = strtoupper($unit);\n\n\t switch($unit){\n\t \tcase 'K':\n\t \t\treturn ($miles * 1.609344);\n\t \tcase 'N':\n\t \t\treturn ($miles * 0.8684);\n\t \tdefault:\n\t \t\treturn $miles;\n\t }\n\t}", "public static function get_distance_between_points($latitude1, $longitude1, $latitude2, $longitude2, $unit = 'Mi')\n {\n $theta = $longitude1 - $longitude2;\n $distance = (sin(deg2rad($latitude1)) * sin(deg2rad($latitude2))) + (cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) * cos(deg2rad($theta)));\n $distance = acos($distance); $distance = rad2deg($distance);\n $distance = $distance * 60 * 1.1515;\n switch ( $unit ) {\n case 'Mi':\n break;\n case 'Km' :\n $distance = $distance * 1.609344;\n }\n return ( round( $distance, 2 ) );\n }", "public static function distance($origin, $dest, $radius = 3959) {\r\n\r\n if (!(isset($origin[0]) && isset($origin[1]))) return false;\r\n if (!(isset($dest[0]) && isset($dest[1]))) return false;\r\n\r\n $lat_orig = $origin[0];\r\n $lng_orig = $origin[1];\r\n\r\n $lat_dest = $dest[0];\r\n $lng_dest = $dest[1];\r\n\r\n $d_lat = deg2rad($lat_dest - $lat_orig);\r\n $d_lng = deg2rad($lng_dest - $lng_orig);\r\n\r\n $a = sin($d_lat/2) * sin($d_lat/2) + cos(deg2rad($lat_orig)) * cos(deg2rad($lat_dest)) * sin($d_lng/2) * sin($d_lng/2);\r\n $c = 2 * asin(sqrt($a));\r\n $d = $radius * $c;\r\n\r\n return $d;\r\n }", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n }\n else {\n //calculate distance between longitude and latitude in miles\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n\n //checks if system has to convert miles to another unit (Example -> KM, N)\n $unit = strtoupper($unit);\n \n //convert miles to kilometers\n if ($unit == \"KM\") {\n return number_format(($miles * 1.609344), 1);\n }\n }\n }", "abstract public function convertToUnit(string $unit): float;", "public function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\t $theta = $lon1 - $lon2;\n\t $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n\t $dist = acos($dist);\n\t $dist = rad2deg($dist);\n\t $miles = $dist * 60 * 1.1515;\n\t $unit = strtoupper($unit);\n\n\t if ($unit == \"K\") {\n\t return ($miles * 1.609344);\n\t } else if ($unit == \"N\") {\n\t return ($miles * 0.8684);\n\t } else {\n\t return $miles;\n\t }\n\t}", "public function move(string $source, string $target);", "protected function distance( $lat_1, $lng_1, $lat_2, $lng_2, $unit ) {\n\t\t$earth_radius = ('mi' == $unit) ? 3959 : 6371;\n\n\t\t$alpha = ($lat_2 - $lat_1)/2;\n\t\t$beta = ($lng_2 - $lng_1)/2;\n\n\t\t$a = sin(deg2rad($alpha)) * sin(deg2rad($alpha)) +\n\t\t cos(deg2rad($lat_1)) * cos(deg2rad($lat_2)) *\n\t\t sin(deg2rad($beta)) * sin(deg2rad($beta));\n\n\t\t$distance = 2 * $earth_radius * asin(min(1, sqrt($a)));\n\n\t\t$distance = round( $distance, 4 );\n\n\t\treturn $distance;\n\t}", "public function convert(string $destUnit): Quantity\n {\n if (!$this->unit || !$destUnit) {\n if ($this->value == 0) {\n return new Quantity($this->value, $destUnit);\n } else {\n throw new UndefinedOperationException('Conversion from/to dimensionless quantity is undefined.');\n }\n }\n if (!isset(self::CONVERSION[$this->unit])) {\n throw new UnsupportedException(\"Conversion from an unsupported unit '$this->unit'\");\n }\n if (!isset(self::CONVERSION[$destUnit])) {\n throw new UnsupportedException(\"Conversion to an unsupported unit '$destUnit'\");\n }\n\n [$thisBase, $thisMult] = self::CONVERSION[$this->unit];\n [$destBase, $destMult] = self::CONVERSION[$destUnit];\n if ($thisBase != $destBase) {\n throw new UndefinedOperationException(\"Conversion from '$this->unit' to '$destUnit' is not defined.\");\n }\n\n $destValue = $this->value * $thisMult / $destMult;\n if (abs($destValue - (int)$destValue) < self::EPSILON) {\n $destValue = (int)$destValue;\n }\n\n return new Quantity($destValue, $destUnit);\n }", "public function getDistance(\n IGpsCoords $origin,\n IGpsCoords $destination\n ): int {\n $latitudeA = deg2rad($origin->getLatitude());\n $longitudeA = deg2rad($origin->getLongitude());\n $latitudeB = deg2rad($destination->getLatitude());\n $longitudeB = deg2rad($destination->getLongitude());\n\n $latitudeDelta = $latitudeB - $latitudeA;\n $longitudeDelta = $longitudeB - $longitudeA;\n\n $angle = 2 * asin(sqrt(pow(sin($latitudeDelta / 2), 2) +\n cos($latitudeA) * cos($latitudeB) * pow(sin($longitudeDelta / 2), 2)));\n\n // result in metres\n return (int) round($angle * 6371000);\n }", "public static function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n \t//POST: returns the distance between the two points\n\t $theta = $lon1 - $lon2;\n\t $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n\t $dist = acos($dist);\n\t $dist = rad2deg($dist);\n\t $miles = $dist * 60 * 1.1515;\n\t $unit = strtoupper($unit);\n\n\t if ($unit == \"K\") {\n\t return ($miles * 1.609344);\n\t } else if ($unit == \"N\") {\n\t return ($miles * 0.8684);\n\t } else {\n\t return $miles;\n\t }\n\t}", "function distance($lat1, $lon1, $lat2 = null, $lon2 = null, $unit = 'M') {\n\t\t$m = 69.09 * rad2deg(acos(sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon1 - $lon2))));\n\t\tif (isset($this->units[up($unit)])) {\n\t\t\t$m *= $this->units[up($unit)];\n\t\t}\n\t\treturn $m;\n\t}", "protected function _convert( $nValue, $sUnit, $nDirection=1 )\n\t\t{\n\t\t\tswitch( $sUnit )\n\t\t\t{\n\t\t\t\tcase \"in\": case \"inch\":\n\t\t\t\t\treturn $nValue * pow( self::INCH, $nDirection );\n\t\t\t\tcase \"ft\": case \"foot\": case \"feet\":\n\t\t\t\t\treturn $nValue * pow( self::FOOT, $nDirection );\n\t\t\t\tcase \"yd\": case \"yard\":\n\t\t\t\t\treturn $nValue * pow( self::YARD, $nDirection );\n\t\t\t\tcase \"mi\": case \"mile\":\n\t\t\t\t\treturn $nValue * pow( self::MILE, $nDirection );\n\t\t\t\tcase \"nm\": case \"nmi\":\n\t\t\t\t\treturn $nValue * pow( self::NAUTICAL_MILE, $nDirection );\n\t\t\t\tcase \"klick\": case \"click\":\n\t\t\t\t\treturn $nValue * pow( self::KLICK, $nDirection );\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n }\n else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n\n if ($unit == \"K\") {\n return ($miles * 1.609344);\n } else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n }\n}", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n\n if ($unit == \"K\") {\n return ($miles * 1.609344);\n } else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n}", "protected function _convert( $nValue, $sUnit, $nDirection=1 )\n\t\t{\n\t\t\tswitch( $sUnit )\n\t\t\t{\n\t\t\t\tcase \"grain\": case \"gr\":\n\t\t\t\t\treturn $nValue * pow( self::GRAIN, $nDirection );\n\t\t\t\tcase \"dram\": case \"dr\":\n\t\t\t\t\treturn $nValue * pow( self::DRAM, $nDirection );\n\t\t\t\tcase \"ounce\": case \"oz\":\n\t\t\t\t\treturn $nValue * pow( self::OUNCE, $nDirection );\n\t\t\t\tcase \"pound\": case \"lb\":\n\t\t\t\t\treturn $nValue * pow( self::POUND, $nDirection );\n\t\t\t\tcase \"hundredweight\": case \"cwt\":\n\t\t\t\t\treturn $nValue * pow( self::HUNDREDWEIGHT, $nDirection );\n\t\t\t\tcase \"ton\": case \"shortton\":\n\t\t\t\t\treturn $nValue * pow( self::SHORTTON, $nDirection );\n\t\t\t\tcase \"pennyweight\": case \"dwt\":\n\t\t\t\t\treturn $nValue * pow( self::PENNYWEIGHT, $nDirection );\n\t\t\t\tcase \"troyounce\": case \"ozt\": case \"oz t\":\n\t\t\t\t\treturn $nValue * pow( self::TROYOUNCE, $nDirection );\n\t\t\t\tcase \"troypound\": case \"lbt\": case \"lb t\":\n\t\t\t\t\treturn $nValue * pow( self::TROYPOUND, $nDirection );\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\n\t$theta = $lon1 - $lon2;\n\t$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n\t$dist = acos($dist);\n\t$dist = rad2deg($dist);\n\t$miles = $dist * 60 * 1.1515;\n\t$unit = strtoupper($unit);\n\n\tif ($unit == \"K\") {\n\t\treturn ($miles * 1.609344);\n\t} else if ($unit == \"N\") {\n\t\treturn ($miles * 0.8684);\n\t} else {\n\t\treturn $miles;\n\t}\n}", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\n\t$theta = $lon1 - $lon2;\n\t$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n\t$dist = acos($dist);\n\t$dist = rad2deg($dist);\n\t$miles = $dist * 60 * 1.1515;\n\t$unit = strtoupper($unit);\n\n\tif ($unit == \"K\") {\n\t\treturn ($miles * 1.609344);\n\t} else if ($unit == \"N\") {\n\t\treturn ($miles * 0.8684);\n\t} else {\n\t\treturn $miles;\n\t}\n}", "function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n \n if ($unit == \"K\") {\n return ($miles * 1.609344);\n } else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n}", "private function convertDistanceString(string $distanceString)\n {\n $distance = intval($distanceString);\n $measurement = strtolower(str_replace($distance, '', $distanceString));\n\n if (!$measurement || !isset(self::MEASUREMENTS[$measurement])) {\n $measurements = implode(\",\", array_keys(self::MEASUREMENTS));\n throw new \\Exception(\"Incorrect or missing measurement, please use one of the following: $measurements\");\n }\n\n $this->measurement = $measurement;\n\n return $distance;\n }", "public function GetDistance($lat1, $lon1, $lat2, $lon2, $unit)\r\n {\r\n $theta = $lon1 - $lon2; \r\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); \r\n $dist = acos($dist); \r\n $dist = rad2deg($dist); \r\n $miles = $dist * 60 * 1.1515;\r\n $unit = strtoupper($unit);\r\n\r\n if ($unit == \"K\") {\r\n return ($miles * 1.609344); \r\n } else if ($unit == \"N\") {\r\n return ($miles * 0.8684);\r\n } else {\r\n return $miles;\r\n }\r\n }", "public function _distanceToLocation( $lat1, $lon1, $lat2, $lon2 ) {\n\t //function distance($lat1, $lon1, $lat2, $lon2, $unit) {\n //returns distance in miles by default\n\t $theta = $lon1 - $lon2;\n\t $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n\t $dist = acos($dist);\n\t $dist = rad2deg($dist);\n\t $miles = $dist * 60 * 1.1515;\n\t\t//$unit = strtoupper($unit);\n\t\t//remove these lines of you don't need kilometers/nautical miles\n\t\t\t\t//\t if ($unit == \"K\") {\n\t\t\t\t//\t\treturn ($miles * 1.609344);\n\t\t\t\t//\t } else if ($unit == \"N\") {\n\t\t\t\t//\t\t return ($miles * 0.8684);\n\t\t\t\t//\t\t} else\n\t\t\t return $miles;\n\t\t//\t\t }\n\t\t//\t}\n\t\t//test cases->\n\t\t\t//echo distance(32.9697, -96.80322, 29.46786, -98.53506, \"M\") . \" Miles<br>\";\n\t\t\t//\techo distance(32.9697, -96.80322, 29.46786, -98.53506, \"K\") . \" Kilometers<br>\";\n\t\t\t//echo distance(32.9697, -96.80322, 29.46786, -98.53506, \"N\") . \" Nautical Miles<br>\";\n\t}", "function convertTo($val, $from, $to, $solid) {\n\t\tglobal $SMObj, $LangUI, $DB_LINK, $g_rb_units;\n\t\t// If it is a unit type that cannot be converted then just return it (unit, pinch, clove...)\n\t\tif (in_array($to, $g_rb_units['static']) || in_array($from, $g_rb_units['static'])) return $val;\n\t\t// If it can be converted, try...\n\t\t$state = NULL;\n\t\tif ($solid == $DB_LINK->true) $state=\"dry\";\n\t\telse $state=\"wet\";\n\t\t$system = Units::getLocalSystem();\n\t\t$unitFrom = Units::getUnitInfo($from, $state, $system);\n\t\t$unitTo = Units::getUnitInfo($to, $state, $system);\n\t\tif ($unitFrom == NULL || $unitTo == NULL) {\n\t\t\techo $LangUI->_('Conversion failure') . ':<br />';\n\t\t\techo $LangUI->_('while trying to convert from unit') . \" '\". $from . \"' \"\n\t\t\t\t. $LangUI->_('to unit') . \" '\". $to . \"'<br />\";\n\t\t\treturn -1;\n\t\t} else\n\t\t\treturn (round($val*$unitFrom[0]/$unitTo[0]*10000)/10000);\n\t}", "function distance($lat1, $lon1, $lat2, $lon2, $unit=\"M\") { \n\t$theta = $lon1 - $lon2; \n\t$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); \n\t$dist = acos($dist); \n\t$dist = rad2deg($dist); \n\t$miles = $dist * 60 * 1.1515;\n\t$unit = strtoupper($unit);\n\n\tif ($unit == \"K\") {\n\t\treturn ($miles * 1.609344); \n\t} else {\n\t\treturn $miles;\n\t}\n}", "public static function getDistanceFromLatLon($latlon1, $latlon2, $unit = 'k') {\n list($lat1, $lon1) = explode(',', $latlon1);\n list($lat2, $lon2) = explode(',', $latlon2);\n\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n\n if ($unit == \"K\") {\n return ($miles * 1.609344);\n } else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n }", "public function calculateDistanceVincenty(LatLong $destination): float\n {\n if ($destination->getDatum() != $this->datum) {\n throw new InvalidArgumentException('Datums must match to calculate distance.');\n }\n\n $ellipsoid = $this->datum->getEllipsoid();\n $a = $ellipsoid->getSemiMajorAxisMetres();\n $b = $ellipsoid->getSemiMinorAxisMetres();\n $f = $ellipsoid->getInverseFlattening();\n\n $longDiffRad = deg2rad($destination->getLongitude() - $this->getLongitude());\n\n $reducedLat = atan((1 - $f) * tan($this->getLatitudeRadians()));\n $reducedLatDest = atan((1 - $f) * tan($destination->getLatitudeRadians()));\n\n $sinReducedLat = sin($reducedLat);\n $cosReducedLat = cos($reducedLat);\n\n $sinReducedLatDest = sin($reducedLatDest);\n $cosReducedLatDest = cos($reducedLatDest);\n\n $lambda = $longDiffRad;\n $maxIterations = 100;\n\n do {\n $sinLambda = sin($lambda);\n $cosLambda = cos($lambda);\n\n $sinSigma = sqrt(\n pow($cosReducedLatDest * $sinLambda, 2) +\n pow($cosReducedLat * $sinReducedLatDest - $sinReducedLat * $cosReducedLatDest * $cosLambda, 2)\n );\n\n // Return 0 if the points are coincident.\n if ($sinSigma === 0.0) {\n return 0.0;\n }\n\n $cosSigma = $sinReducedLat * $sinReducedLatDest + $cosReducedLat * $cosReducedLatDest * $cosLambda;\n\n $sigma = atan2($sinSigma, $cosSigma);\n $sinAlpha = $cosReducedLat * $cosReducedLatDest * $sinLambda / $sinSigma;\n $cosSqAlpha = 1 - pow($sinAlpha, 2);\n\n $cos2SigmaM = 0;\n\n // At the equator, $cosSqAlpha === 0.\n if ($cosSqAlpha !== 0) {\n $cos2SigmaM = $cosSigma - 2 * $sinReducedLat * $sinReducedLatDest / $cosSqAlpha;\n }\n\n $c = $f / 16 * $cosSqAlpha * (4 + $f * (4 - 3 * $cosSqAlpha));\n\n $lambdaP = $lambda;\n $lambda = $longDiffRad + (1 - $c) * $f * $sinAlpha *\n ($sigma + $c * $sinSigma * ($cos2SigmaM + $c * $cosSigma * (-1 + 2 * $cos2SigmaM * $cos2SigmaM)));\n } while (abs($lambda - $lambdaP) > '1e-12' && --$maxIterations > 0);\n\n if ($maxIterations === 0) {\n return null; // Formula failed to converge.\n }\n\n $uSq = $cosSqAlpha * ($a * $a - $b * $b) / ($b * $b);\n $A = 1 + $uSq / 16384 * (4096 + $uSq * (-768 + $uSq * (320 - 175 * $uSq)));\n $B = $uSq / 1024 * (256 + $uSq * (-128 + $uSq * (74 - 47 * $uSq)));\n\n $deltaSigma = $B * $sinSigma * ($cos2SigmaM + $B / 4 * ($cosSigma * (-1 + 2 * $cos2SigmaM * $cos2SigmaM) -\n $B / 6 * $cos2SigmaM * (-3 + 4 * $sinSigma * $sinSigma) * (-3 + 4 * $cos2SigmaM * $cos2SigmaM)));\n\n $s = $b * $A * ($sigma - $deltaSigma);\n\n return $s;\n }", "public function toUnit($units) {\r\n $originalUnit = $this->findUnitOfMeasureByNameOrAlias($this->originalUnit);\r\n $nativeUnitValue = $originalUnit->convertValueToNativeUnitOfMeasure($this->originalValue);\r\n\r\n $toUnit = $this->findUnitOfMeasureByNameOrAlias($units);\r\n $toUnitValue = $toUnit->convertValueFromNativeUnitOfMeasure($nativeUnitValue);\r\n\r\n if ( $units == 'mm' ) {\r\n\r\n $roundedValue = round($toUnitValue, 1);\r\n\r\n } else if ( $units == 'feet' ) {\r\n\r\n $roundedValue = round($toUnitValue, 2);\r\n\r\n }\r\n else {\r\n\r\n $roundedValue = round($toUnitValue, 3);\r\n\r\n }\r\n\r\n return $roundedValue;\r\n }", "private function _calculatePointDistance($lat1, $lon1, $lat2, $lon2, $unit) {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n\n if ($unit == \"K\") {\n return ($miles * 1.609344);\n }\n else if ($unit == \"M\") {\n return $this->_ceiling(($miles * 1.609344 * 1000), 50);\n }else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n }", "function distance($lat1, $lon1, $lat2, $lon2, $unit = \"K\"){\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n $unit = strtoupper($unit);\n if ($unit == \"K\") {\n return ($miles * 1.609344)*1000;\n } else if ($unit == \"N\") {\n return ($miles * 0.8684);\n } else {\n return $miles;\n }\n}", "function distance($lat1, $lon1, $lat2, $lon2, $unit = 'K') {\r\n\r\n\t$theta = $lon1 - $lon2;\r\n\t$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\r\n\t$dist = acos($dist);\r\n\t$dist = rad2deg($dist);\r\n\t$miles = $dist * 60 * 1.1515;\r\n\t$unit = strtoupper($unit);\r\n\r\n\tif ($unit == \"K\") {\r\n\t\treturn ($miles * 1.609344);\r\n\t} else if ($unit == \"N\") {\r\n\t\treturn ($miles * 0.8684);\r\n\t} else {\r\n\t\treturn $miles;\r\n\t}\r\n}", "public function setDestination($var)\n {\n GPBUtil::checkString($var, True);\n $this->destination = $var;\n\n return $this;\n }", "public function zipToZip($origin, $destination)\n {\n $originZip = $this->getPostalCode($origin);\n $destinationZip = $this->getPostalCode($destination);\n\n # Get data\n $data = PostalCode::zipToZip($originZip, $destinationZip)->first();\n\n return object_get($data, 'distance', 0);\n }", "function cast($destination, $sourceObject)\n {\n if (is_string($destination)) {\n $destination = new $destination();\n }\n $sourceReflection = new ReflectionObject($sourceObject);\n $destinationReflection = new ReflectionObject($destination);\n $sourceProperties = $sourceReflection->getProperties();\n foreach ($sourceProperties as $sourceProperty) {\n $sourceProperty->setAccessible(true);\n $name = $sourceProperty->getName();\n $value = $sourceProperty->getValue($sourceObject);\n if ($destinationReflection->hasProperty($name)) {\n $propDest = $destinationReflection->getProperty($name);\n $propDest->setAccessible(true);\n $propDest->setValue($destination, $value);\n } else {\n $destination->$name = $value;\n }\n }\n return $destination;\n }", "function distance($distance){\n \treturn round($distance, 1) . \" miles\";\n }", "static function distanceToDegrees( $distanceNumber, $distanceUnit, $latString ) {\n\t\tif ( in_array( $distanceUnit, array( 'kilometers', 'kilometres', 'km' ) ) ) {\n\t\t\t$distanceInKM = $distanceNumber;\n\t\t} elseif ( in_array( $distanceUnit, array( 'miles', 'mi' ) ) ) {\n\t\t\t$distanceInKM = $distanceNumber * 1.60934;\n\t\t} else {\n\t\t\tthrow new MWException( \"Error: distance for 'NEAR' operator must be in either miles or kilometers (\\\"$distanceUnit\\\" specified).\" );\n\t\t}\n\t\t// The calculation of distance to degrees latitude is\n\t\t// essentially the same wherever you are on the globe, although\n\t\t// the longitude calculation is more complicated.\n\t\t$latDistance = $distanceInKM / 111;\n\n\t\t// Convert the latitude string to a latitude number - code is\n\t\t// copied from CargoStore::parseCoordinatesString().\n\t\t$latIsNegative = false;\n\t\tif ( strpos( $latString, 'S' ) > 0 ) {\n\t\t\t$latIsNegative = true;\n\t\t}\n\t\t$latString = str_replace( array( 'N', 'S' ), '', $latString );\n\t\tif ( is_numeric( $latString ) ) {\n\t\t\t$latNum = floatval( $latString );\n\t\t} else {\n\t\t\t$latNum = CargoStore::coordinatePartToNumber( $latString );\n\t\t}\n\t\tif ( $latIsNegative ) $latNum *= -1;\n\n\t\t$lengthOfOneDegreeLongitude = cos( deg2rad( $latNum ) ) * 111.321;\n\t\t$longDistance = $distanceInKM / $lengthOfOneDegreeLongitude;\n\n\t\treturn array( $latDistance, $longDistance );\n\t}", "public function getDistanceMatrix($origin, $destination)\n {\n $googleApiKey = env('GOOGLE_API_KEY');\n \n $queryString = env('GOOGLE_API_URL') . \"?units=imperial&origins=\" . $origin . \"&destinations=\" . $destination . \"&key=\" . $googleApiKey;\n \n \n $data = file_get_contents($queryString);\n \n $data = json_decode($data);\n \n \n if ( !$data || $data->status == 'REQUEST_DENIED' || $data->status == 'OVER_QUERY_LIMIT' || $data->status == 'NOT_FOUND' || $data->status == 'ZERO_RESULTS' ) {\n return (isset($data->status)) ? $data->status : 'GOOGLE_API_NULL_RESPONSE';\n }\n $distanceValue = (int)$data->rows[0]->elements[0]->distance->value;\n \n return $distanceValue;\n }", "public function distance_calculate($lat1, $lon1, $lat2, $lon2, $unit)\r\n {\r\n $data_str = file_get_contents(\"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$lat1,$lon1&destinations=$lat2,$lon2\");\r\n $data_arr = json_decode($data_str);\r\n $zero_result = $data_arr->rows[0]->elements[0]->status;//meters\r\n if($zero_result == 'ZERO_RESULTS'){\r\n return 'flag';\r\n\r\n }else if($zero_result == 'OK'){\r\n $distance_meter = $data_arr->rows[0]->elements[0]->distance->value; //meters\r\n $dis_miles = ($distance_meter / 1609.344);\r\n return $dis_miles;\r\n }\r\n }", "function get_distance($lat1, $long1, $lat2, $long2, $unit = 'metres') {\n\t$point1 = new LatLong(new Coordinate($lat1), new Coordinate($long1));\n\t$point2 = new LatLong(new Coordinate($lat2), new Coordinate($long2));\n\t$distance = new Distance($point1, $point2);\n\treturn $distance->get(new GreatCircle());\n}", "public function distance()\n {\n return $this->buildUnit('distance', Measures\\Distance::class);\n }", "public function copy($strSource, $strDestination) {}", "function get_distance($latitude, $longitude, $store_latitude, $store_longitude, $unit = 'mi') {\n\n // Conversion multiples => Unit to multiple\n $unit_multiples = array(\n 'km' => 1.60934,\n 'ft' => 5280,\n );\n\n $earthRadius = 3959; // Miles\n $latFrom = deg2rad($latitude);\n $lonFrom = deg2rad($longitude);\n $latTo = deg2rad($store_latitude);\n $lonTo = deg2rad($store_longitude);\n\n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n $miles = number_format((float)$angle * $earthRadius, 1, '.', '');\n\n // Convert?\n if( $unit && $unit_multiples[$unit] ){\n $distance = $miles * $unit_multiples[$unit];\n } else {\n $distance = $miles;\n }\n\n return round($distance, 1);\n}", "public function move($dest)\n {\n }", "private function getDistanceLocal($lat1,$lon1,$lat2,$lon2,$unit) {\r\n\t\t\r\n\t\t$theta = $lon1 - $lon2;\r\n\t\t$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\r\n\t\t$dist = acos($dist);\r\n\t\t$dist = rad2deg($dist);\r\n\t\t$miles = $dist * 60 * 1.1515;\r\n\t\t$unit = strtoupper($unit);\r\n\t\r\n\t\tif ($unit == \"K\") {\r\n\t\t\t$miles = $miles * 1.609344;\r\n\t\t} else if ($unit == \"N\") {\r\n\t\t\t$miles = $miles * 0.8684;\r\n\t\t} else {\r\n\t\t\t$miles = $miles;\r\n\t\t}\r\n\t\r\n\t\treturn $miles;\r\n\t\t\r\n\t}", "public static function distance($lat1, $lng1, $lat2, $lng2, $unit = 'k')\n\t{\n\t\t$earth_radius = 6378137;\t// Terre = sphère de 6378km de rayon\n\t\t$rlo1 = deg2rad($lng1);\n\t\t$rla1 = deg2rad($lat1);\n\t\t$rlo2 = deg2rad($lng2);\n\t\t$rla2 = deg2rad($lat2);\n\t\t$dlo = ($rlo2 - $rlo1) / 2;\n\t\t$dla = ($rla2 - $rla1) / 2;\n\t\t$a = (sin($dla) * sin($dla)) + cos($rla1) * cos($rla2) * (sin($dlo) * sin($dlo));\n\t\t$d = 2 * atan2(sqrt($a), sqrt(1 - $a));\n\t\treturn round(($earth_radius * $d) / 1000);\n\t}", "public function getTravelTime(Locations $destination) {\n $key = Locations::getGoogleApiKey('directions');\n\n // If google api key is not set up\n if (!$key) {\n $distance = $this->getDistance($destination->lat, $destination->lon);\n $duration = $distance / 40;\n return intval($duration) . 'minutes';\n }\n\n // If google api key is set up\n else if (!empty($this->lat) && !empty($this->lon) && !empty($destination->lat) && !empty($destination->lon)) {\n $cacheKey = 'd' . $this->lat . ',' . $this->lon . ',' . $destination->lat . ',' . $destination->lon;\n $duration = Yii::app()->cache->get($cacheKey);\n if ($duration) {\n return $duration;\n }\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json' .\n '?origin=' . $this->lat . ',' . $this->lon .\n '&destination=' . $destination->lat . ',' . $destination->lon .\n '&key=' . $key;\n $result = RequestUtil::request(array('url' => $url));\n $data = CJSON::decode($result, true);\n if ($data && isset($data['status']) && $data['status'] === 'OK' &&\n array_key_exists('routes', $data) &&\n array_key_exists(0, $data['routes']) &&\n array_key_exists('legs', $data['routes'][0]) &&\n array_key_exists(0, $data['routes'][0]['legs'])\n ) {\n $leg = $data['routes'][0]['legs'][0];\n $duration = $leg['duration']['text'];\n Yii::app()->cache->set($cacheKey, $duration, 60 * 60);\n return $duration;\n }\n }\n }", "public function get_distance($from, $to) {\n $retval = $this->get_info_between_points($from, $to);\n\n if ($retval === ERROR) {\n return \"<strong>An error has shown up</strong>\";\n } else if ($retval->Status->code == 602) {\n return \"<strong>Wrong address</strong>\";\n }\n\n return $this->distanceToType($retval->Directions->Distance->meters);\n }", "public function convert($from, $to);", "public function distance($value) {\n return $this->setProperty('distance', $value);\n }", "function distance(\n $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000)\n {\n var_dump($latitudeFrom);\n var_dump($longitudeFrom);\n var_dump($latitudeTo);\n var_dump($longitudeTo);\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n echo \"to degree:\";\n var_dump($latFrom);\n var_dump($lonFrom);\n var_dump($latTo);\n var_dump($lonTo);\n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n echo \"after sub:\";\n var_dump($latFrom);\n var_dump($lonFrom);\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n echo \"a:\";\n var_dump($angle);\n return $angle * $earthRadius;\n }", "protected function copyDirectory($source, $destination)\n {\n if (is_dir($source)) {\n $handle = opendir($source);\n while (($file = readdir($handle)) !== false) {\n if (strpos($file, '.') !== 0) {\n $sourcePath = $source . '/' . $file;\n $destinationPath = $destination . '/' . $file;\n if (is_dir($sourcePath)) {\n $this->createDirectory($destinationPath);\n $this->copyDirectory($sourcePath, $destinationPath);\n } else {\n copy($sourcePath, $destinationPath);\n }\n }\n }\n closedir($handle);\n } else {\n copy($source, $destination);\n }\n }", "function geoGetDistance($lat1, $lon1, $lat2, $lon2, $unit='miles') {\n $miles = 69.09 * rad2deg(acos(sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon1 - $lon2))));\n\n switch(strtoupper($unit)) {\n case 'kilometers':\n return $miles * 1.609344;\n break;\n case 'nautical':\n return $miles * 0.868976242;\n break;\n case 'feet':\n return $miles * 5280;\n break;\n case 'inches':\n return $miles * 63360;\n break;\n case 'miles':\n default:\n return $miles;\n break;\n }\n }", "public static function getDistance(float $latitudeFrom, float $longitudeFrom, float $latitudeTo, float $longitudeTo): float\n {\n $d2r = M_PI / 180; // degrees to radians\n $radius = 6371; // average earth radius in km\n\n $latFrom = $latitudeFrom * $d2r;\n $latTo = $latitudeTo * $d2r;\n $longFrom = $longitudeFrom * $d2r;\n $longTo = $longitudeTo * $d2r;\n\n $diffLat = $latTo - $latFrom;\n $diffLong = $longTo - $longFrom;\n\n $a = pow(sin($diffLat / 2), 2) + cos($latFrom) * cos($latTo) * pow(sin($diffLong / 2), 2);\n $distance = 2 * $radius * asin(sqrt($a));\n\n $distance = round($distance, 3);\n\n return $distance;\n }", "function distance($lat1, $lng1, $lat2, $lng2, $unit = 'k') {\n $earth_radius = 6378137; // Terre = sphère de 6378km de rayon\n\n $rlo1 = deg2rad($lng1);\n $rla1 = deg2rad($lat1);\n\n $rlo2 = deg2rad($lng2);\n $rla2 = deg2rad($lat2);\n $dlo = ($rlo2 - $rlo1) / 2;\n $dla = ($rla2 - $rla1) / 2;\n $a = (sin($dla) * sin($dla)) + cos($rla1) * cos($rla2) * (sin($dlo) * sin($dlo));\n $d = 2 * atan2(sqrt($a), sqrt(1 - $a));\n //\n $meter = ($earth_radius * $d);\n if ($unit == 'k') {\n return $meter / 1000;\n }\n return $meter;\n }", "private function _computeDistanceFromDriverToPassenger($driverLongitude,$driverLatitude,OrderBoss $orderTable)\n {\n if(empty($driverLatitude) || empty($driverLongitude) || empty($orderTable)){\n throw new UserException('Params error',2001);\n }\n $passengerLongitude = $orderTable->start_longitude;\n $passengerLatitude = $orderTable->start_latitude;\n\n $server = ArrayHelper::getValue(\\Yii::$app->params,'api.map');\n $httpClient = new YesinCarHttpClient(['serverURI'=>$server['serverName']]);\n $method = $server['method']['computeDistance'];\n /*** originLongitude originLatitude destinationLongitude\t destinationLatitude */\n $clientData = [\n 'originLongitude'=>$driverLongitude,\n 'originLatitude'=>$driverLatitude,\n 'destinationLongitude'=>$passengerLongitude,\n 'destinationLatitude'=>$passengerLatitude\n ];\n $response = $httpClient->get($method,$clientData,2);\n if(isset($response['code']) && $response['code'] == 0){\n $distance = $response['data']['distance'];\n }else {\n \\Yii::info($response);\n $distance = 0;\n }\n return (string)$distance;\n }", "public function copy(string $source, string $destination): void;", "public static function moveFile($pathSource, $pathDestination){\n\t\t\t$log = Log::getLog();\n\t\t\t$ret = exec(\"mv \\\"\" .$pathSource. \"\\\" \\\"\" .$pathDestination.\"\\\"\", $out, $err);\n\t\t\tif($err == 0)\n\t\t\t\t$log->info(\"Le dossier \".$pathSource.\" a ete deplace vers \".$pathDestination.\"!\");\n\t\t\telse\n\t\t\t\t$log->error(\"Le dossier \".$pathSource.\" n'a pas ete deplace vers \".$pathDestination.\"!\");\n\t\t}", "protected function move($source, $destination, Array $exclusions = [], $copy = FALSE)\n\t{\n\t\tif ( ! $this->filesystem->exists($destination))\n\t\t{\n\t\t\t$this->filesystem->mkDir($destination, FALSE);\n\t\t}\n\t\telseif ( ! $this->filesystem->isDir($destination))\n\t\t{\n\t\t\tthrow new UpdaterException('Destination path not a directory: '.$destination, 18);\n\t\t}\n\t\telseif ( ! $this->filesystem->isWritable($destination))\n\t\t{\n\t\t\tthrow new UpdaterException('Destination path not writable: '.$destination, 21);\n\t\t}\n\n\t\t$contents = $this->filesystem->getDirectoryContents($source);\n\n\t\tforeach ($contents as $path)\n\t\t{\n\t\t\t// Skip exclusions and .DS_Store\n\t\t\tif (in_array($path, $exclusions) OR strpos($path, '.DS_Store') !== FALSE)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$new_path = str_replace($source, $destination, $path);\n\n\t\t\t// Try to catch permissions errors before PHP's file I/O functions do\n\t\t\tif ( ! $this->filesystem->isWritable($path))\n\t\t\t{\n\t\t\t\tthrow new UpdaterException(\"Cannot move ${path} to ${new_path}, path is not writable: ${path}\", 19);\n\t\t\t}\n\n\t\t\t$this->logger->log('Moving '.$path.' to '.$new_path);\n\n\t\t\t$method = $copy ? 'copy' : 'rename';\n\t\t\t$this->filesystem->$method($path, $new_path);\n\t\t}\n\t}", "public static function copy(string $source, string $destination)\n {\n if (is_dir($source)) {\n @mkdir($destination);\n\n $directory = dir($source);\n\n while (false !== ($readdirectory = $directory->read())) {\n if ($readdirectory == '.' || $readdirectory == '..') {\n continue;\n }\n\n $PathDir = $source . '/' . $readdirectory;\n\n if (is_dir($PathDir)) {\n Filesystem::copy($PathDir, $destination . '/' . $readdirectory);\n continue;\n }\n copy($PathDir, $destination . '/' . $readdirectory);\n }\n\n $directory->close();\n } else {\n copy($source, $destination);\n }\n }", "public function calculateDestinationForBearingAndDistance(float $bearing, float $distance): LatLong\n {\n // Note, we don't use a datum-specific radius here, as we are treating the Earth as a sphere, not an ellipsoid.\n $distRad = $distance / self::EARTH_MEAN_RADIUS_METRES;\n\n $bearing = deg2rad($bearing);\n $latRad = $this->getLatitudeRadians();\n $longRad = $this->getLongitudeRadians();\n\n $sinLatRad = sin($latRad);\n $cosLatRad = cos($latRad);\n $sinDistRad = sin($distRad);\n $cosDistRad = cos($distRad);\n\n $destLat = asin($sinLatRad * $cosDistRad + $cosLatRad * $sinDistRad * cos($bearing));\n\n $destLong = $longRad + atan2(\n sin($bearing) * $sinDistRad * $cosLatRad,\n $cosDistRad - $sinLatRad * sin($destLat)\n );\n\n $destLong = fmod(($destLong + 3 * pi()), (2 * pi())) - pi(); // Normalise to +/-180 degrees.\n\n return new LatLong(\n rad2deg($destLat),\n rad2deg($destLong),\n $this->height,\n $this->datum\n );\n }", "public function placeNewOrder($origin, $destination)\n {\n $returnData = false;\n\n $this->distanceModel = $this->createDistanceModel();\n\n // check if origin and destination already exit in our system\n $this->distanceModel = $this->distanceModel->getFirstStoredDistanceObject($origin, $destination);\n $flagToSaveOrder = false;\n\n if (null === $this->distanceModel) {\n // if the distance doesn't existing in system, then evaluate the distance using map api and update the same in system\n $this->distanceModel = $this->distanceHelper->evaluateDistance($origin, $destination);\n\n // if any error in api then raise issue\n if (!($this->distanceModel instanceof \\App\\Http\\Models\\Distance)) {\n $this->error = $this->distanceModel;\n $this->errorCode = JsonResponse::HTTP_INTERNAL_SERVER_ERROR;\n } else {\n $flagToSaveOrder = true;\n }\n } else {\n $flagToSaveOrder = true;\n }\n\n if ($flagToSaveOrder) {\n // if the distance has been calculated and saved in system, then create a new order\n $orderModel = new \\App\\Http\\Models\\Order();\n $orderModel->saveOrder($this->distanceModel->id, $this->distanceModel->total_distance);\n\n $returnData = $orderModel;\n }\n\n return $returnData;\n }", "protected function GetDrivingDistance($location_ori, $location_dest) {\n\t\t\t$location1 = urlencode($location_ori);\n\t\t\t$location2 = urlencode($location_dest);\n\t\t\t\n\t\t\t//~ $url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$location1&destinations=$location2&waypoints=optimize:true|Providence,+RI|Hartford,+CT&key=AIzaSyBsZPuC5cca9gr4qPZ-p1O9hPzp3serepk\";\n\t\t\t//~ $url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$location1&destinations=$location2&key=AIzaSyDiojAPmOWusjvasUhm5wKswtCRtkEKyi8\";\n\t\t\t$googleKeys = array(\"AIzaSyCUrQy4amWsY8cxSPaYCMNX6aY9CWWcAtk\",\"AIzaSyBWhHYF6lq4yQ6Jt5DaAo9yS6Bn7-YuDrE\",\"AIzaSyCVxoQq3PxPYechPY9tDyx6vhI8ty27tKk\",\"AIzaSyDWrNBqjp0Ntb66QPa1CZe3UlGyofJDXJY\",\"AIzaSyA1DxFGAg6k6YLw0B9o28cNPL77wHyxvDM\",\"AIzaSyBmxRpO-qdJN5X8fG4_1jrkF_xwcWTKHw0\",\"AIzaSyA-b6uwprb6K9i0SM8ehNapE0ETBEub1xQ\", \"AIzaSyAFnTukWwp_aQiSbJRaWmTv4k_6Kd3_O9M\",\"AIzaSyBSDP3t4gPmtO-Tm-0bmDj73V3BrgRdJwo\",\"AIzaSyBdFIw8EICyOqA0XNvv1rrMd1B2Int80FI\",\"AIzaSyAc_zfJ9tOrU84jMxkl2QaUznVOOfRZ97M\",\"AIzaSyAUi8ISK2bJ-5QClFr9ECvmE_Ypco4fK0U\",\"AIzaSyAXlFcRW94HggsO8oTWLhO8GYpG1Wy60vg\",\"AIzaSyBLiUcHYsofoyQEj3Z-YbNg_O10-bl1MAU\",\"AIzaSyB8TGBHB7KUtxaMEarzZ39pwnX7evG9Fcc\",\"AIzaSyBsZPuC5cca9gr4qPZ-p1O9hPzp3serepk\", \"AIzaSyBYpjbCLWTZGK-8Am7Z39_UIUiN88nz7EQ\", \"AIzaSyCJ04xh3kIVPFSO-MICsJELeab0AMoYWdM\",\"AIzaSyAf-nolNNfcP2QbW0nqSRxSzxg8ZT8DFhA\",\"AIzaSyAV33vT4p-ex6POT5KlTSYFZYDCeZ8AqbE\",\"AIzaSyD0Rn-ITyvVPqPJH9_C6zLKU1lk2zfgYMc\",\"AIzaSyD2UIvZUfmLpb3OouQumUfmxiI7pyjJXdo\",\"AIzaSyCH_hXZ6fpC-asjw4RXFnO1X2F5GMXydKQ\",\"AIzaSyA3Yn_qjQDIMREiEVJ-xztzKvsco7UZtx4\",\"AIzaSyCt6Nw_SyLVPUzpiQtzz2Rt_Km6RtU5fZg\",\"AIzaSyDhQCeg-WFv_QU0GScdV5B9WvsPYV3e5Xs\",\"AIzaSyBBIriqcaYH2wmBAUOlb2erD9G3n3LQMzs\",\"AIzaSyB5Z7trBjXlsE1MzeCvz-82a99gwB-1TpE\",\"AIzaSyDXjSWzoY6Vsgxs-tArv9TAxsRd-DX4Qwk\",\"AIzaSyAQ7XALh70CVmKBpTzMFrecwSCqGi7f1qg\",\"AIzaSyDKYddg0yDXbotlc2iUJPxJM9itcsLFCVM\",\"AIzaSyDgUqLkFw9-YkOkP4j6V0OHoi2rshQfopA\",\"AIzaSyBBf3NWL_Ivggk-MgcwlgFYpRGrFT7dVws\",\"AIzaSyDA-tNbR44Dtq1ukemtKnzsD_TdSxc6UP8\",\"AIzaSyCPdJzixa65dLqkzkyF3r0WHHv0rSqkSq4\",\"AIzaSyBYiKrhju6OepPOkK-5ajWnadQM4v45Uxg\",\"AIzaSyAk3igHg3UnurlxVj5BcXb93TyTGsc1crw\",\"AIzaSyCYMDoubNXna36JIgM1QJ0bpyND0mVQARc\",\"AIzaSyAFtYHko7L8ZogNbDr07HP8k6II-KwSopA\",\"AIzaSyB2ozJqc56BaJk08L-UcHocHHHaxmqoRFA\",\"AIzaSyCpvjAi8GK0qsShnIYAVveqHoBAetnxkPw\",\"AIzaSyATZ4rPq1kG-G5GahgUX9i9yfkM3YMmg98\",\"AIzaSyB1WA3PnqvBCOAhtv4gLjJiV5p1OD90iQM\",\"AIzaSyBCznY99iUKp1IL5Za5JinXu2zDb3qXb28\",\"AIzaSyA9HvBaDZIndpEITAuhNk4Q9Bk2m67zmyw\",\"AIzaSyCFJ_ZxBfyUhhk4jJZacj4cLgesoN7WebA\",\"AIzaSyCjY70mqsz4dUaze4HH654wdxnNvyO_Scw\",\"AIzaSyB-udUmxOkCnKFD4L1Mz4zHdpUXZ2-cLpM\",\"AIzaSyCf4IqT0w0jAzA7wRmnevjckZPdrJ4Mo9U\",\"AIzaSyDoQOfYGkRbTbKt8Vvc-Unr9JIaBqe_QCg\",\"AIzaSyA-MyT4jrFnHTkx1smFMlKCls-H_yVd-r8\",\"AIzaSyDbs8aA8VtindRM7GItDxmMJxUfBSGB1Fw\",\"AIzaSyAN9UKnA29-I6TA96_1Ula59demLpWtAA8\",\"AIzaSyDADcRuXhwjAy215VK9vWy8FXx3cOfD0wU\",\"AIzaSyAPsZ3_S-AQzH8_kTOE8fZdEOsAsaBWnRs\",\"AIzaSyBovZhGB-rPs0IY8zG7Q2pwqWmX9D-ROQo\",\"AIzaSyBYeR6BqB0wVgSPT4VCaIISVf1S77rJ2fI\",\"AIzaSyDN6UeECJ2uCT77PmE8udQJcvwtoOds_kY\",\"AIzaSyDnMvl_GyxMHHYzkYQW2YYJKV6gblaCf88\",\"AIzaSyDf6uF8q4SJqN0FSKH6vSTb2hR9f91pA_w\",\"AIzaSyBo9OIkVyl22q8PARAss9Xd4RGe-QOlcIk\",\"AIzaSyDDIic_ejhUYMZuhCOLnhp-xp8atVOmuVU\",\"AIzaSyARub453GGMsCTip-a9vLVa4G8i2EtYmv0\",\"AIzaSyAOWWoDN16XStpvJm0A0W-njCc_8eY-daM\",\"AIzaSyCqtm1r2lmdguWApeW04AShtR-sA_mpS-w\",\"AIzaSyBtXEnCqjWATgD00HF0__DExRXWzdms_fY\",\"AIzaSyC8BTgvRXddNsph2FrpC_2DVCFh9zAxh-Y\",\"AIzaSyAyWIS7AMabDwaHi8ls05McHQLIphzLTCk\",\"AIzaSyBATfnQADZ-uIXF5qh3fN0iX87LyFnIfVw\",\"AIzaSyCmX_k5zNozIy5bHdGxSHXlH7JiOddG3tY\",\"AIzaSyCh4sux3pZ-YHcD8OW7fsVAe96I8rlvjR4\",\"AIzaSyCS_DiFn3-61mc7vdEduKJc3HlADXsysOw\",\"AIzaSyBmdb9SRTEpAzsGS2sQ9WvLMtfEmzGOkco\",\"AIzaSyA4XkMOLhnQFeOMLfqhihtedvysOHb0Jf0\",\"AIzaSyB6bob6ZGuoDSUJ9Xi24KtO7zDlur6c5Jo\",\"AIzaSyAN2m7ItdRFZWFwddirhRKWpTkkIv3nDH0\",\"AIzaSyD4DVRUGp8_p1oRn_cRN0wSQKPbCgngLmo\",\"AIzaSyAEA3YQ4pry1llnSCD3H9t0d9GO58jU39Q\",\"AIzaSyDy774lFyUWCHShcd9uJJAW3OW4RCO6b2s\",\"AIzaSyDyQUdz-bfASCXLUOLFXSqdFuOTvbq3lgc\",\"AIzaSyAI69oqx7V9R93dj5PwgcR0TJOEBxdCFk8\",\"AIzaSyDfni2hIj4tKCN6M_lRKtosRixfJixh0qk\",\"AIzaSyAJOEUjycXVbrAxqkR2fA3zoVSgBCGjIbc\",\"AIzaSyCmsNGcTZO_9YN1bB_vShkljhdzNxVRLM0\",\"AIzaSyCc-uMoZDTaRRiFujnPKTPw5shw67no8Bs\",\"AIzaSyCeVH2NtXwK666XZqgqsnoY_D9zitTgEnw\",\"AIzaSyAwwRcMri9xjk92aB-MCgODRDdHVXt5Uow\",\"AIzaSyABeanBK7oEMA5thcUMUm3ZTOA9Kro4rCk\",\"AIzaSyCPI4FazfbVChbHRJu0jDxFh1beqWft97I\",\"AIzaSyC8LjnBcHEYe0QckaMOUNf_gK6sJQGSqKM\",\"AIzaSyDQQ6OphDYbjse1DWAp9h_GF9boBjNHtlg\",\"AIzaSyCKovWEDHm-A2KRzcKsJordD2vSN9qAi0k\",\"AIzaSyDIAReLLr0hloOMKMIIJINfqcf7XL-BmXQ\",\"AIzaSyAyC1TOgdoyC9PK7ZD-vvJ5wwTfIf0temA\",\"AIzaSyCglNprL7mjE2mieS6L3bIHcs7WTkNAlNU\",\"AIzaSyAdMGnJcdhPhKGrYKeFK-u-GBlYwM_QTr8\",\"AIzaSyD2GBxarJ57LerNqbByJkS1-dYIMll682k\",\"AIzaSyB9nmyFk_fu1hUw1TCuYHopjd7hiMMaoWk\",\"AIzaSyDVWDjhX8o4wVbeC_Lr2wY063q3HnzMeIA\",\"AIzaSyCaFxYa2HgbVQ1z_DbXZFSofqQu_mRbnbk\",\"AIzaSyDLXZVN--G-Iaq7PTO-29YRjlaGXQ1knpQ\",\"AIzaSyDALWTREvxIpevQewlFXcID9PYsJACSGFM\",\"AIzaSyB68P2LCd5fGzV-QjNKwKY022njOLv8nv4\",\"AIzaSyCg6f3oYvSlG2eT0s9_GxsPDz5jXdrXHj0\",\"AIzaSyAWBvCAHs2k8VwW7RAqrMv9H8HE6IVtJuM\",\"AIzaSyC85i8Q4BLHbOSvITGs9bwcOFpOaG8xzgg\",\"AIzaSyDs_HSPo_XFnYzlbNNW4Ansi0tOzK8cTQY\",\"AIzaSyAY4g3lNsfjkAGuykiKaaPZuyAFsi8vIV8\",\"AIzaSyAmle0YpqHOMm-akJIBj8vNI-zHuB5zLzg\",\"AIzaSyDUgpAY8K2GdRJPfOefQPvY1oj4mQ9kG4g\",\"AIzaSyBwzhjcQGXyGl1kEr1xl9xiSVaHxegOQ64\",\"AIzaSyBdLLN1MCh_SRmbWYYqNMhqo5pO6oA_ymM\",\"AIzaSyAFF7a5nwlXjPiGREn4CnTyf44UeULJQRg\",\"AIzaSyCveKUCd30tO4_eFSe-tuMbSpDxXowJtSU\",\"AIzaSyADXM1hDaj9ZRorOWgZIxCVHNEcbx6aRT4\",\"AIzaSyDbHCgQm-0j2emQGEc1xohSoJhFOjYWMc8\",\"AIzaSyAWzN7TNL--UUAlVM09MsebMKqYplWtklE\",\"AIzaSyBheYvUJl7zN3icKHDM5Ufq-S4DVzlzhZU\",\"AIzaSyAxxVDJBxeUNOEUhsxuP5S9350ykwzvtnI\",\"AIzaSyC7NlINL6yFO7VjzXS8PVa-jAFXkJ891zI\",\"AIzaSyDwQ7TnDMWdS7QIJRpcQfpPiNGYBaWC1BE\",\"AIzaSyDs-exopJx7ZXhFdZKyET923p6rA_FYrBw\",\"AIzaSyB0Xgvgsr8DzkuqMY0SxtYMEMgQHyw-phQ\",\"AIzaSyBaJXO9Flro3f3SFw--Wsdq0gagZRq3c20\",\"AIzaSyAfWxTJ3ar7Gbr_VOrCOqoX3GtvzVyHflI\",\"AIzaSyA1u4RFmRvPjiOlmoQVA-an0M3s5C_2LW4\");\n\t\t\t$keyIndex = -1;\n\t\t\tif(!$this->session->has_userdata('validGoogleKey')){\n\t\t\t\t$this->session->set_userdata('validGoogleKey', $googleKeys[0]);\n\t\t\t}\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\t$url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$location1&destinations=$location2&key=\".$this->session->validGoogleKey;\n\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\t$response = curl_exec($ch);\n\t\t\t\tcurl_close($ch);\n\t\t\t\t$response_a = json_decode($response, true);\t\n\t\t\t\tif(in_array($response_a[\"status\"], array(\"OVER_QUERY_LIMIT\",\"REQUEST_DENIED\"))){\n\t\t\t\t\tif($googleKeys[++$keyIndex] != $this->session->validGoogleKey){\n\t\t\t\t\t\t$this->session->set_userdata('validGoogleKey', $googleKeys[$keyIndex]);\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->session->set_userdata('validGoogleKey', $googleKeys[++$keyIndex]);\t\n\t\t\t\t\t}\n\t\t\t\t}else if($response_a[\"status\"] == \"OK\"){\n\t\t\t\t\tbreak;\n\t\t\t\t}else if($response_a[\"status\"] == \"INVALID_REQUEST\"){\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$keyIndex++;\n\t\t\t\t}\n\n\t\t\t\tif($keyIndex >= count($googleKeys)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset($response_a['rows'][0]['elements'][0]['distance']['text']) && $response_a['status'] == 'OK' && !isset($response_a['error_message']) ) {\n\t\t\t\t$distance = explode('mi',$response_a['rows'][0]['elements'][0]['distance']['text']);\n\t\t\t\t$estimatedTime = $response_a['rows'][0]['elements'][0]['duration']['text'];\n\n\t\t\t\t$distanceMile = trim(str_replace(',','',$distance[0]));\n\t\t\t\t$dataArray = array('origin'=>str_replace(' ','~',$location_ori),'destination'=>str_replace(' ','~',$location_dest),\t'miles'=>ceil($distanceMile), 'estimated_time' => $estimatedTime);\n\n\t\t\t\t$this->User->saveData($dataArray);\n\t\t\t} else {\n\t\t\t\t$distanceMile = 0;\n\t\t\t\t$estimatedTime = '';\n\t\t\t}\n\n\t\t\treturn array('distance' => trim($distanceMile),'time' => $estimatedTime);\n\t\t}", "function copyDirectory($source, $destination) {\n if (is_dir($source)) {\n @mkdir($destination);\n\n $directory = dir($source);\n\n while (FALSE !== ($read_directory = $directory->read())) {\n if ($read_directory == '.' || $read_directory == '..') {\n continue;\n }\n\n $path_dir = $source . '/' . $read_directory;\n\n if (is_dir( $path_dir)) {\n $this->copyDirectory($path_dir, $destination . '/' . $read_directory);\n continue;\n }\n\n copy($path_dir, $destination . '/' . $read_directory);\n }\n\n $directory->close();\n } else {\n copy($source, $destination);\n }\n }", "public function calculateDistance($fromIcao, $toIcao)\n {\n $from = $this->airportRepo->find($fromIcao, ['lat', 'lon']);\n $to = $this->airportRepo->find($toIcao, ['lat', 'lon']);\n\n if (!$from) {\n throw new AirportNotFound($fromIcao);\n }\n\n if (!$to) {\n throw new AirportNotFound($toIcao);\n }\n\n // Calculate the distance\n $geotools = new Geotools();\n $start = new Coordinate([$from->lat, $from->lon]);\n $end = new Coordinate([$to->lat, $to->lon]);\n $dist = $geotools->distance()->setFrom($start)->setTo($end);\n\n // Convert into a Distance object\n try {\n $distance = new Distance($dist->in('mi')->greatCircle(), 'mi');\n return $distance;\n } catch (NonNumericValue $e) {\n return;\n } catch (NonStringUnitName $e) {\n return;\n }\n }", "public function distance_to(midgardmvc_helper_location_spot $to, $unit = 'K', $round = true)\n {\n $theta = $this->longitude - $to->longitude;\n $dist = sin(deg2rad($this->latitude)) * sin(deg2rad($to->latitude)) + cos(deg2rad($this->latitude)) * cos(deg2rad($to->latitude)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $dist = $dist * 60 * 1.1515;\n\n if ($unit == 'K')\n {\n $dist *= 1.609344;\n }\n else if ($unit == 'N')\n {\n $dist *= 0.8684;\n }\n\n if ($round)\n {\n $dist = round($dist, 1);\n }\n return $dist;\n }", "private static function createDestinationObject($destination,$duration,$distance,$userRequest){\n if($userRequest===true){\n $destinationObject=[\n //\"description\"=>$description,\n \"latitude\"=>$destination[\"lat\"],\n \"longitude\"=>$destination[\"long\"],\n \"duration\"=>$duration,\n \"distance\"=>$distance\n ];\n }else{\n $destinationObject=[\n //\"description\"=>$description,\n \"latitude\"=>$destination->lat,\n \"longitude\"=>$destination->long,\n \"duration\"=>$duration,\n \"distance\"=>$distance\n ];\n }\n\n return $destinationObject;\n }", "public function unit(string $unit): SearchSortGeoDistance\n {\n $this->unit = $unit;\n return $this;\n }", "public function rename($source, $destination) {\n $this->log(\"Переименовываю $source -> $destination\");\n $this->checkPathSafety($source, $destination);\n\n if (is_dir($source)) {\n $this->copy($source, $destination);\n $this->remove($source);\n } else {\n $this->checkPaths($source);\n $this->checkPaths(dirname($destination), array('is_dir', 'is_executable', 'is_writable'));\n rename($source, $destination);\n }\n }", "public function nearest($from, $attribute, $radius = 100, $unit = 'km')\n {\n $lenPerDegree = 111.045; // km per degree latitude; for miles, use 69.0\n if ($unit == 'mil') {\n $lenPerDegree = 69.0;\n }\n\n $from = explode(',', $from);\n if (!is_array($from)) {\n return $this;\n }\n\n $lat = trim($from[0]);\n $lng = trim($from[1]);\n\n /** @var \\yii\\db\\ActiveRecord $modelCls */\n $modelCls = $this->modelClass;\n\n if ($modelCls::getDb()->driverName === 'mysql') {\n $subQuery = $this->create($this)\n ->addSelect([\n '_d' => \"($lenPerDegree * ST_Distance($attribute, ST_PointFromText(:point)))\"\n ])\n ->params([':point' => \"POINT($lat $lng)\"]);\n } else {\n if ($modelCls::getDb()->driverName === 'pgsql') {\n $subQuery = $this->create($this)\n ->addSelect([\n '_d' => \"($lenPerDegree * ($attribute <-> POINT(:lt,:lg)))\"\n ])\n ->params([':lg' => $lng, ':lt' => $lat]);\n } else {\n throw new Exception('Only MqSQL and PostgreSQL are supported by ' . self::className());\n }\n }\n\n $this->select(['*'])\n ->from(['distance' => $subQuery])\n ->where(['<', '_d', $radius])\n ->orderBy([\n '_d' => SORT_ASC\n ]);\n\n $this->limit = null;\n $this->offset = null;\n $this->distinct = null;\n $this->groupBy = null;\n $this->join = null;\n $this->union = null;\n\n return $this;\n }", "function geo_destination($start,$dist,$brng){\n $lat1 = toRad($start[0]);\n $lon1 = toRad($start[1]);\n $dist = $dist/6371.01; //Earth's radius in km\n $brng = toRad($brng); \n\n $lat2 = asin( sin($lat1)*cos($dist) +\n cos($lat1)*sin($dist)*cos($brng) );\n $lon2 = $lon1 + atan2(sin($brng)*sin($dist)*cos($lat1),\n cos($dist)-sin($lat1)*sin($lat2));\n $lon2 = fmod(($lon2+3*pi()),(2*pi())) - pi(); \n\n return array(toDeg($lat2),toDeg($lon2));\n}", "public function convertValue($value, $from, $to);", "public function create($startLatitude, $startLongitude, $endLatitude, $endLongitude)\n {\n //no existing distance found so get distance from google maps api\n $source = $startLatitude.','.$startLongitude;\n $destination = $endLatitude.','.$endLongitude;\n $distanceBetween = $this->distanceHelper->getDistance($source, $destination);\n\n if (!is_int($distanceBetween)) {\n return $distanceBetween;\n }\n\n return $this->distanceModel->saveDistance(\n $startLatitude,\n $startLongitude,\n $endLatitude,\n $endLongitude,\n $distanceBetween\n );\n }", "private function getDistanceUnit($units) {\n return strpos($units, 'mile') !== FALSE\n ? self::DISTANCE_PER_DEG_MILES\n : self::DISTANCE_PER_DEG_KM;\n }", "public static function fDistance ( $distance, $unit = 'm', $bounds = [ 1000, 10 ] ) {\n\t\t$distance = round( $distance );\n\t\tif ( $distance < ($bounds[ 0 ] ?? 1000) and $unit === 'm' ) {\n\t\t\t$formatted = self::fNumber( $distance, 0 ) . \" m\";\n\t\t}\n\t\telse {\n\t\t\tif ( $unit === 'm' ) {\n\t\t\t\t$distance /= 1000;\n\t\t\t}\n\t\t\tif ( $distance < ($bounds[ 1 ] ?? 10) ) {\n\t\t\t\t$formatted = self::fNumber( $distance, 1 ) . \" km\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$formatted = self::fNumber( $distance, 0 ) . \" km\";\n\t\t\t}\n\t\t}\n\n\t\treturn $formatted;\n\t}", "public function convert($value, $from, $to)\n {\n }", "public function testUnitConverter(string $class, float $value, string $unit, float $target, string $tUnit)\n {\n //====================================================================//\n // Ensure DOL_VERSION is Defined\n if (!defined(\"DOL_VERSION\")) {\n define(\"DOL_VERSION\", \"8.0.0\");\n }\n //====================================================================//\n // Convert Source to Base Unit\n $baseValue = $class::convert($value, $unit);\n $this->assertSame(round($target, 6), round($baseValue, 6));\n //====================================================================//\n // Normalize Units\n $normalized = $class::normalize($baseValue);\n $this->assertInstanceOf(Metric::class, $normalized);\n $this->assertEquals($tUnit, $normalized->getUnit());\n //====================================================================//\n // Revert Normalized Value to Base Unit\n $reverted = $class::convert($normalized->getValue(), $normalized->getUnit());\n $this->assertSame(round($target, 6), round($reverted, 6));\n $this->assertSame(round($baseValue, 6), round($reverted, 6));\n }", "public function convert(string $fromCurrency, string $toCurrency, float $amount);", "public function getDistanceUnit()\n {\n return $this->attributes->mustHave('distance_unit')->asString(function ($distanceUnit) {\n return in_array($distanceUnit, ['cm', 'in', 'ft', 'mm', 'm', 'yd'], true);\n });\n }", "public function copy($source, $destination) \n {\n Argument::i()\n\t\t\t//argument 1 must be a string\n ->test(1, 'string') \n\t\t\t//argument 2 must be a string\n ->test(2, 'string'); \n\n $this->data[$destination] = $this->data[$source];\n return $this;\n }", "protected function saveCost($originCity, $destinationCity)\n {\n $cost = $this->getCost($originCity->city_id, $destinationCity->city_id);\n\n $country = Country::remember(1440)->whereName('Indonesia')->first();\n $originState = State::updateOrCreate(['name' => $originCity->province], ['code' => $originCity->province_id, 'country_id' => $country->id]);\n $destinationState = State::updateOrCreate(['name' => $destinationCity->province], ['code' => $destinationCity->province_id, 'country_id' => $country->id]);\n\n $originCityDb = City::firstOrCreate([\n 'name' => $originCity->city_name,\n 'code' => $originCity->postal_code,\n 'state_id' => $originState->id\n ]);\n\n $destinationCityDb = City::firstOrCreate([\n 'name' => $destinationCity->city_name,\n 'code' => $destinationCity->postal_code,\n 'state_id' => $destinationState->id\n ]);\n\n foreach($cost[0]->costs as $cost) {\n if (! $cost)\n continue;\n\n $package = Package::firstOrCreate([\n 'courier_id' => $this->courier->id,\n 'name' => $cost->service,\n 'description' => $cost->description,\n ]);\n\n $costDb = Cost::updateOrCreate([\n 'city_origin_id' => $originCityDb->id,\n 'city_destination_id' => $destinationCityDb->id,\n 'package_id' => $package->id,\n 'is_per_kg' => 1\n ],\n [\n 'amount' => $cost->cost[0]->value\n ]);\n }\n }", "public function mv($src, $dest);", "function geoGetDistance($lat1,$lon1,$lat2,$lon2,$unit='M') {\n \n // calculate miles\n $M = 69.09 * rad2deg(acos(sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon1 - $lon2)))); \n\n switch(strtoupper($unit))\n {\n case 'K':\n // kilometers\n return $M * 1.609344;\n break;\n case 'N':\n // nautical miles\n return $M * 0.868976242;\n break;\n case 'F':\n // feet\n return $M * 5280;\n break; \n case 'I':\n // inches\n return $M * 63360;\n break; \n case 'M':\n default:\n // miles\n return $M;\n break;\n }\n \n }", "private function distance($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000){\r\n $latFrom = deg2rad($latitudeFrom);\r\n $lonFrom = deg2rad($longitudeFrom);\r\n $latTo = deg2rad($latitudeTo);\r\n $lonTo = deg2rad($longitudeTo);\r\n\r\n $latDelta = $latTo - $latFrom;\r\n $lonDelta = $lonTo - $lonFrom;\r\n\r\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\r\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\r\n return $angle * $earthRadius;\r\n }", "protected function distanceExists($from, $to)\n {\n // Seperate the address first\n $from_data = explode('?&', $from);\n $to_data = explode('?&', $to);\n\n // Check if distance already exist if not then create\n $distance = $this->distance->distanceExists($from_data[0], $to_data[0]);\n if ($distance->count() == 0) {\n // Create the guzzle client to connect to google map and get the distance\n $client = new Client(['base_uri' => 'https://maps.googleapis.com/']);\n $parameters = ['origins' => $from_data[0], 'destinations' => $to_data[0]];\n\n // Send the request and get the response\n $request = $client->get('maps/api/distancematrix/json', ['query' => $parameters]);\n $result = json_decode($request->getBody()->getContents());\n $distance = 0;\n $time = '';\n\n // Status of the result\n $status = $result->rows[0]->elements[0]->status;\n\n // Check if result exists\n if ($status != 'NOT_FOUND' && $status != 'ZERO_RESULTS') {\n $distance = $result->rows[0]->elements[0]->distance->value;\n $time = $result->rows[0]->elements[0]->duration->text;\n } else {\n // Search with address\n $parameters = ['origins' => $from_data[0] . '+' . $from_data[1], 'destinations' => $to_data[0] . '+' . $to_data[1]];\n $request = $client->get('maps/api/distancematrix/json', ['query' => $parameters]);\n $result = json_decode($request->getBody()->getContents());\n\n // Status of the result\n $status = $result->rows[0]->elements[0]->status;\n\n // Check if result exists\n if ($status != 'NOT_FOUND' && $status != 'ZERO_RESULTS') {\n $distance = $result->rows[0]->elements[0]->distance->value;\n $time = $result->rows[0]->elements[0]->duration->text;\n }\n }\n\n $attributes = [];\n\n $attributes['from'] = $from_data[0];\n $attributes['to'] = $to_data[0];\n $attributes['distance'] = $distance;\n $attributes['time'] = $time;\n\n $distance = $this->distance->create($attributes);\n }\n\n return $distance;\n }", "function distance($a, $b)\n{\n list($lat1, $lon1) = $a;\n list($lat2, $lon2) = $b;\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n return $miles;\n}", "public function convert( $source, $destination, $amount, $format=false, $decimal=0 )\n\t{\n\t\tif( array_key_exists( $source, $this->_currency ) && array_key_exists( $destination, $this->_currency ) )\n\t\t{\n\t\t\t$dAmount\t= $amount / (float)$this->_currency[ $source ][ \"rate\" ];\n\t\t\t$dAmount\t= (float)$this->_currency[ $destination ][ \"rate\" ] * $dAmount;\n\t\t\t\n\t\t\tif( $format )\n\t\t\t{\n\t\t\t\t$sTmp\t= number_format( $dAmount, $decimal, \".\", \",\" ); \n\t\t\t\n\t\t\t\tif( !$this->_currency[ $destination ][ \"rank\" ] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$sTmp\t= $this->_currency[ $destination ][ \"symbol\" ] . $sTmp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sTmp\t= $sTmp . $this->_currency[ $destination ][ \"symbol\" ];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $sTmp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $dAmount;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "function mv($from, $to)\n {\n }" ]
[ "0.6257955", "0.57811964", "0.5655082", "0.54536206", "0.54287237", "0.53791267", "0.5362439", "0.5343395", "0.52929354", "0.52006054", "0.5195562", "0.51511455", "0.51494807", "0.5141358", "0.50655055", "0.5061959", "0.5040879", "0.5029252", "0.49953398", "0.49652678", "0.49344096", "0.4930908", "0.49299413", "0.49245164", "0.49072465", "0.48846954", "0.48781037", "0.48752692", "0.48653755", "0.48602024", "0.48591435", "0.4851041", "0.48473382", "0.4835431", "0.48200133", "0.48146486", "0.48108384", "0.48047224", "0.47958133", "0.47886536", "0.47869068", "0.47864974", "0.476524", "0.4735778", "0.47304407", "0.47187728", "0.4708953", "0.47071612", "0.4701505", "0.4670835", "0.4633268", "0.4625171", "0.4615138", "0.46139285", "0.46129376", "0.45972395", "0.4596284", "0.4594206", "0.45803073", "0.45757097", "0.45732132", "0.45384735", "0.45352772", "0.45347077", "0.45277056", "0.4526874", "0.45179382", "0.45084694", "0.44964746", "0.44956028", "0.44936353", "0.4491899", "0.44842097", "0.4481382", "0.44804597", "0.44780493", "0.44754338", "0.44745046", "0.44690847", "0.44578764", "0.44567785", "0.44521043", "0.4441346", "0.44379112", "0.44351056", "0.4433418", "0.4431005", "0.44305387", "0.44279388", "0.44202065", "0.4419342", "0.44176146", "0.44166037", "0.43909034", "0.43889794", "0.4388597", "0.43881506", "0.43864462", "0.4385084", "0.43810326" ]
0.7246302
0
If the parser is successful, call the $receiver function with the output of the parser. The resulting parser behaves identical to the original one. This combinator is useful for expressing side effects during the parsing process. It can be hooked into existing event publishing libraries by using $receiver as an adapter for those. Other use cases are logging, caching, performing an action whenever a value is matched in a long running input stream, ...
Если парсер успешно завершает работу, вызовите функцию $receiver с результатом парсинга. Получающийся парсер ведет себя идентично оригинальному. Этот комбинатор полезен для выражения побочных эффектов в процессе парсинга. Он может быть использован для интеграции с существующими библиотеками публикации событий, используя $receiver в качестве адаптера для них. Другие сценарии применения включают ведение журнала, кэширование, выполнение действия при совпадении значения в длительном потоке входных данных, ...
function emit(Parser $parser, callable $receiver): Parser { return Parser::make("emit", static function (Stream $input) use ($receiver, $parser): ParseResult { $result = $parser->run($input); if ($result->isSuccess()) { $receiver($result->output()); } return $result; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse($val)\n {\n if (is_callable($val)) {\n $this->answerParse = $val;\n return;\n }\n\n if (!is_array($pVal = json_decode($val, true))) {\n $this->outSystem->stdout(\"Wrong data: '$val'\", OutSystem::LEVEL_IMPORTANT);\n return;\n }\n\n if (isset($pVal['data'])) {\n if ($this->answerParse !== null) {\n ($this->answerParse)($pVal['data'], null);\n //$this->answerParse = null;\n } else {\n $this->outSystem->stdout('Answer CMD: ' . $pVal['data'], OutSystem::LEVEL_NOTICE);\n }\n } else if (isset($pVal['result'])) {\n if ($this->answerParse !== null) {\n ($this->answerParse)($pVal['result'], intval($pVal['result']));\n //$this->answerParse = null;\n } else {\n $this->outSystem->stdout('Result CMD: ' . $pVal['result'], OutSystem::LEVEL_NOTICE);\n }\n\n //$this->queue->resume(); // Just resume after command result\n }\n }", "protected function _invoke_receiver($sender, $receiver, $params){\n\n // Closures/lambda functions and array($object, 'method') callables\n if (is_callable($receiver))\n {\n is_array($receiver)\n ? $receiver[0]->{$receiver[1]}($sender, $params)\n : $receiver($sender, $params);\n\n return TRUE;\n }\n\n // if its not an array dont process further,\n // we need this to be array with all the registration details of a receiver see config/signals.php\n if ( ! is_array($receiver))\n {\n return FALSE;\n }\n\n // -----------------------------------\n // Safety - Prevents run-away loops\n // -----------------------------------\n\n // If the script being called happens to have the same\n // hook call within it a loop can happen\n if ($this->_in_progress === TRUE)\n {\n return;\n }\n\n // -----------------------------------\n // Set file path\n // -----------------------------------\n\n if ( ! isset($receiver['filepath'], $receiver['filename']))\n {\n return FALSE;\n }\n\n $filepath = APPPATH.$receiver['filepath'].'/'.$receiver['filename'];\n\n\n if ( ! file_exists($filepath))\n {\n return FALSE;\n }\n\n // Determine and class and/or function names\n $class\t= empty($receiver['class']) ? FALSE : $receiver['class'];\n $function = empty($receiver['function']) ? FALSE : $receiver['function'];\n $sender_to_listen_for = isset($data['sender']) ? $receiver['sender'] : '';\n\n // if dont have a function stop processing\n if (empty($function))\n {\n return FALSE;\n }\n\n // if receiver only wants to listen for a particular sender\n if(!empty($sender_to_listen_for)){\n // get sender name\n $sender_name = $sender;\n if(is_object($sender)){\n $sender_name = get_class($sender);\n }\n\n\n // if this sender is not the sender the receiver was hoping for just exist\n if($sender_name !== $sender_to_listen_for){\n return FALSE;\n }\n }\n\n // Set the _in_progress flag\n $this->_in_progress = TRUE;\n\n // If receiver is a class method\n if ($class !== FALSE)\n {\n // The object is stored?\n if (isset($this->_objects[$class]))\n {\n if (method_exists($this->_objects[$class], $function))\n {\n // invoke the class method\n $this->_objects[$class]->$function($sender, $params);\n }\n else\n {\n return $this->_in_progress = FALSE;\n }\n }\n else\n {\n // load the class\n class_exists($class, FALSE) OR require_once($filepath);\n\n // if still the class does not exist or it does not have the requested method\n if ( ! class_exists($class, FALSE) OR ! method_exists($class, $function))\n {\n return $this->_in_progress = FALSE;\n }\n\n // create instance of the class\n // Store the object and execute the method\n $this->_objects[$class] = new $class();\n $this->_objects[$class]->$function($sender, $params);\n }\n }\n else\n { // if receiver is a normal PHP function\n function_exists($function) OR require_once($filepath);\n\n if ( ! function_exists($function))\n {\n return $this->_in_progress = FALSE;\n }\n\n // invoke it\n call_user_func($function, $params);\n// $function($sender, $params);\n }\n\n $this->_in_progress = FALSE;\n return TRUE;\n }", "public function setReceiver(callable $receiver)\r\n {\r\n $this->receiver = $receiver;\r\n return $this;\r\n }", "abstract public function parse($parser);", "public function __invoke()\n\t{\n\t\t$return = null;\n\n\t\tswitch($this->type) {\n\t\t\tcase \"value\":\n\t\t\t\t$return = $this->callback;\n\t\t\t\tbreak;\n\t\t\tcase \"callable\":\n\t\t\t\t$return = call_user_func_array($this->callback, func_get_args());\n\t\t\t\tbreak;\n\t\t\tcase \"queue\":\n\t\t\t\t$originalArgs = func_get_args();\n\t\t\t\tforeach ($this->callback as $callback) {\n\t\t\t\t\t$args = $originalArgs;\n\t\t\t\t\tif ($this->includeReturnValue === true) {\n\t\t\t\t\t\tarray_unshift($args, $return);\n\t\t\t\t\t}\n\t\t\t\t\t$return = call_user_func_array($callback, $args);\n\t\t\t\t\tif ($this->includeReturnValue === false && $return === false) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $return;\n\t}", "protected function parse()\n {\n $this->output = '';\n # drop tags\n $this->parser->html = preg_replace('#<(' . implode('|', $this->drop) . ')[^>]*>.*</\\\\1>#sU', '', $this->parser->html);\n while ($this->parser->nextNode()) {\n switch ($this->parser->nodeType) {\n case 'doctype':\n break;\n case 'pi':\n case 'comment':\n if ($this->keepHTML) {\n $this->flushLinebreaks();\n $this->out($this->parser->node);\n $this->setLineBreaks(2);\n }\n # else drop\n break;\n case 'text':\n $this->handleText();\n break;\n case 'tag':\n if (in_array($this->parser->tagName, $this->ignore)) {\n break;\n }\n if ($this->parser->isStartTag) {\n $this->flushLinebreaks();\n }\n if ($this->skipConversion) {\n $this->isMarkdownable(); # update notConverted\n $this->handleTagToText();\n continue;\n }\n if (!$this->parser->keepWhitespace && $this->parser->isBlockElement && $this->parser->isStartTag) {\n $this->parser->html = ltrim($this->parser->html);\n }\n if ($this->isMarkdownable()) {\n if ($this->parser->isBlockElement && $this->parser->isStartTag && !$this->lastWasBlockTag && !empty($this->output)) {\n if (!empty($this->buffer)) {\n $str =& $this->buffer[count($this->buffer) - 1];\n } else {\n $str =& $this->output;\n }\n if (substr($str, -strlen($this->indent) - 1) != \"\\n\" . $this->indent) {\n $str .= \"\\n\" . $this->indent;\n }\n }\n $func = 'handleTag_' . $this->parser->tagName;\n $this->$func();\n if ($this->linkPosition == self::LINK_AFTER_PARAGRAPH && $this->parser->isBlockElement && !$this->parser->isStartTag && empty($this->parser->openTags)) {\n $this->flushFootnotes();\n }\n if (!$this->parser->isStartTag) {\n $this->lastClosedTag = $this->parser->tagName;\n }\n } else {\n $this->handleTagToText();\n $this->lastClosedTag = '';\n }\n break;\n default:\n trigger_error('invalid node type', E_USER_ERROR);\n break;\n }\n $this->lastWasBlockTag = $this->parser->nodeType == 'tag' && $this->parser->isStartTag && $this->parser->isBlockElement;\n }\n if (!empty($this->buffer)) {\n // trigger_error('buffer was not flushed, this is a bug. please report!', E_USER_WARNING);\n while (!empty($this->buffer)) {\n $this->out($this->unbuffer());\n }\n }\n ### cleanup\n $this->output = rtrim(str_replace('&amp;', '&', str_replace('&lt;', '<', str_replace('&gt;', '>', $this->output))));\n # end parsing, flush stacked tags\n $this->flushFootnotes();\n $this->stack = array();\n }", "public function parse()\n {\n $this->handler->parse($this->input);\n\n $output = $this->handler->getOptions();\n\n if (false === isset($output['from'])) {\n throw new \\BadMethodCallException('The --from argument is required.');\n }\n\n if (false === isset($output['release'])) {\n throw new \\BadMethodCallException('The --release argument is required.');\n }\n \n return $this->handler;\n }", "public function parse(mixed $source): mixed;", "function process($payload);", "public function parse()\n {\n try {\n list($this->_options, $this->_arguments) = $this->_parser->parseArgs();\n } catch (InvalidArgumentException $e) {\n throw new Horde_Kolab_Filter_Exception_Usage(\n $e->getMessage() . \"\\n\\n\" . $this->_parser->getUsage()\n );\n }\n\n if (empty($this->_options['recipient'])) {\n throw new Horde_Kolab_Filter_Exception_Usage(\n sprintf(\n \"Please provide one or more recipients.\\n\\n%s\",\n $this->_parser->getUsage()\n )\n );\n }\n }", "public function onStopParser();", "public function __invoke()\n {\n return call_user_func($this->callback, $this->next() ?: function(){});\n }", "public function invoke()\n {\n $argList = func_get_args();\n $param1 = array_shift($argList);\n // first one is element:eventhandler\n list ($elementName, $eventHandlerName) = explode(\":\", $param1);\n $element = $this->getElement($elementName);\n $eventHandler = $element->eventHandlers->get($eventHandlerName);\n $this->invokingElement = array($element, $eventHandler);\n // find the matching function\n list($funcName, $funcParams) = $eventHandler->parseFunction($eventHandler->origFunction);\n // call the function with rest parameters\n return call_user_func_array(array($this, $funcName), $argList);\n }", "public function handle(XmlParser $parser);", "public function parse(): void;", "private function process_inner_parser(array &$_t, $_stop, $_name) {\n\t\t$this->debug_announce(\"starting inner parser for code '\".$_name.\"'\");\n\t\t$inner_parser=new Parser($_stop, $_name, $this->debug_depth+1);\n\t\t$inner_parser->debug_active=$this->debug_active;\n\t\treturn $inner_parser->process($_t); //Process, not parse: parse won't remove elements from the array!.\n\t}", "protected abstract function _parse();", "public function stdWrap_parseFunc() {}", "abstract protected function parse();", "public function process($payload);", "function parse() {\n }", "public function parse();", "public function testAfterParse() {\n // Create two items and add these to the parser result.\n $item1 = new DynamicItem();\n $item1->set('title', 'Foo');\n $item2 = new DynamicItem();\n $item2->set('title', 'Bar');\n $this->parserResult->addItems([$item1, $item2]);\n\n // Implement AfterParseBase::alterItem() by adding a '1' to each item's\n // title.\n $this->subscriber->expects($this->exactly(2))\n ->method('alterItem')\n ->will($this->returnCallback(function (ItemInterface $item, ParseEvent $event) {\n $item->set('title', $item->get('title') . '1');\n }));\n\n // Run subscriber.\n $this->subscriber->afterParse($this->event);\n // Assert that each item got a '1' added.\n $this->assertEquals('Foo1', $item1->get('title'));\n $this->assertEquals('Bar1', $item2->get('title'));\n }", "public function call()\n {\n if(is_callable($this->callback))\n {\n return call_user_func_array($this->callback, $this->matches);\n }\n }", "abstract public function getParser();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "function receive($handler)\n {\n $this->handlers['receive'] = $handler;\n return($this);\n }", "public function addParser(ParserContract $parser, ParserContract $to, bool $pipe = false): self\n {\n if ($pipe) {\n $this->elements[] = [self::TYPE_PARSER_PIPE, $parser, $to];\n } else {\n $this->elements[] = [self::TYPE_PARSER, $parser, $to];\n }\n\n return $this;\n }", "public static function execute ( $parser, $frame, $args ) {\n\n\t\t$params = func_get_args();\n\t\tarray_shift( $params ); // We already know the $parser ...\n\t\t\n\t\tself::parseInput( $parser, $params );\n\n\t\t$endval = self::makeLink();\n\t\t\n\t\treturn array( $endval, 'noparse' => true, 'isHTML' => true );\n\n\t}", "public function parse()\n {\n $this->logger->LogDebug(\"Start parsing ...\");\n $this->xml_result_array = $this->parseXml();\n $this->end_time = microtime();\n $this->logger->LogDebug(\"Parsing completed\" . (($this->error) ? \" with errors \" : \" without errors \") . \"and took \" . $this->getTime() . \" sec..\");\n }", "public function parse()\n {\n $out = call_user_func_array(array($this->_queryBuilder, 'parse'), func_get_args());\n return $out;\n }", "public function parse($source=false, $parse_collections=false, $_internal_loop=false)\n {\n// increment the parse count so it has unique identifiers\n self::$_instance += 1;\n// capture the source from the buffer\n if($source === false)\n {\n $source = ob_get_clean();\n $this->_buffer_in_use = true;\n $parse_collections = true;\n }\n \n// collect the tags for processing\n $tags = $this->collectTags($source);\n if(count($tags) > 0)\n {\n// there are tags so process them\n $output = $this->_parseTags($tags);\n if($output && $parse_collections === true)\n {\n// parse any collected tags if required\n $output = $this->_processCollectedTags($output);\n }\n if($this->_options['echo_output'] === true)\n {\n echo $output;\n }\n return $output;\n }\n return $source;\n }", "public function parse()\n {\n\n $type = Gitlab\\DetectType::detect($this->source);\n\n switch ($type) {\n case 'issue':\n $call = Gitlab\\Issue::parse($this);\n break;\n\n case 'merge_request':\n $call = Gitlab\\MergeRequest::parse($this);\n break;\n\n case 'push':\n $call = Gitlab\\Push::parse($this);\n break;\n\n default:\n throw new Exception\\MethodNotImplemented(\"The call to '\" . $type . \"' has not been implemented.\");\n break;\n }\n\n return $call;\n }", "public function getParser();", "public function getParser();", "public function call()\n {\n return call_user_func($this->callable, $this->matches);\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function dataProviderParseCommandEmitsEvent()\n {\n $data = array();\n\n $commands = array(\n 'PRIVMSG' => 'receivers',\n 'NOTICE' => 'nickname',\n );\n\n $message = 'foo bar \"two words\" baz';\n\n $prefixConfig = array('prefix' => '!');\n $patternConfig = array('pattern' => '/^~/');\n $nickConfig = array('nick' => true);\n\n $configs = array(\n 'foo' => array(),\n '!' . $message => $prefixConfig,\n '~' . $message => $patternConfig,\n 'nickname ' . $message => $nickConfig,\n 'nickname: ' . $message => $nickConfig,\n ' nickname, ' . $message => $nickConfig,\n );\n\n $expectedParams = array('bar', 'two words', 'baz');\n\n $targets = array('#channel', 'user');\n\n $getEvent = function($command, $targetField, $text, $config, $target) {\n $event = Phake::mock('\\Phergie\\Irc\\Event\\UserEventInterface');\n $connection = Phake::mock('\\Phergie\\Irc\\ConnectionInterface');\n $params = array('text' => $text, $targetField => $target);\n Phake::when($connection)->getNickname()->thenReturn('nickname');\n Phake::when($event)->getConnection()->thenReturn($connection);\n Phake::when($event)->getCommand()->thenReturn($command);\n Phake::when($event)->getParams()->thenReturn($params);\n Phake::when($event)->getTargets()->thenReturn(array());\n return $event;\n };\n\n foreach ($commands as $command => $targetField) {\n foreach ($configs as $text => $config) {\n foreach ($targets as $target) {\n $event = $getEvent($command, $targetField, $text, $config, $target);\n $data[] = array($config, $event, $text == 'foo' ? array() : $expectedParams);\n }\n }\n }\n\n // Events sent directly to the bot should always be interpreted as\n // potential commands\n $data[] = array(\n $prefixConfig,\n $getEvent('PRIVMSG', $commands['PRIVMSG'], $message, $prefixConfig, 'user'),\n $expectedParams\n );\n $data[] = array(\n $patternConfig,\n $getEvent('PRIVMSG', $commands['PRIVMSG'], $message, $patternConfig, 'user'),\n $expectedParams\n );\n $data[] = array(\n $patternConfig,\n $getEvent('PRIVMSG', $commands['PRIVMSG'], $message, $nickConfig, 'user'),\n $expectedParams\n );\n\n return $data;\n }", "public function apply(Parser $parser, $input = array())\n {\n return $parser->parse($input, array(1, 1));\n }", "public function invokeWithResult($sender, $eventArgs) {\n $ret = null;\n foreach($this->eventHandlers as $eventHandler) {\n $ret = $eventHandler->invoke($sender, $eventArgs);\n }\n return $ret;\n }", "public function endElementHandler($parser, $name) {\r\n $this->logger->debug($this->indentLogger . ' match=\"'\r\n . $this->match . '\"');\r\n $this->logger->debug($this->indentLogger . ' bodyText=\"'\r\n . $this->bodyText . '\"');\r\n\r\n // Fire 'body' events for all relevant rules\r\n $rules = $this->getRules()->match($this->match);\r\n if (count($rules) > 0) {\r\n foreach($rules as $rule) {\r\n $this->logger->debug($this->indentLogger . ' Fire body() for '\r\n . $rule->toString());\r\n\r\n try {\r\n $rule->body($this->bodyText);\r\n } catch (Exception $exception) {\r\n $this->logger->error('Body event threw exception'\r\n , $exception->getMessage());\r\n throw $exception;\r\n }\r\n }\r\n } else {\r\n $this->logger->debug($this->indentLogger . ' No rules found matching \"'\r\n . $this->match . '\"');\r\n }\r\n \r\n $this->logger->debug($this->indentLogger . 'endElement(' . $name . ')');\r\n\r\n // Recover the body text from the surrounding element\r\n $this->bodyText = array_pop($this->bodyTexts);\r\n $this->logger->debug($this->indentLogger . ' Popping body text \"'\r\n . $this->bodyText . '\"');\r\n\r\n // Fire 'end' events for all relevant rules in reverse order\r\n if (count($rules) > 0) {\r\n $rulesReverse = array_reverse($rules, true);\r\n\r\n foreach ($rulesReverse as $rule) {\r\n $this->logger->debug($this->indentLogger . ' Fire end() for '\r\n . $rule->toString());\r\n\r\n try {\r\n $rule->end();\r\n } catch (Exception $exception) {\r\n $this->logger->error('End event threw exception'\r\n . $exception->getMessage());\r\n throw $exception;\r\n }\r\n }\r\n }\r\n\r\n // Recover the previous match expression\r\n $slash = strrpos($this->match, '/');\r\n if ($slash === false) {\r\n $this->match = '';\r\n } else {\r\n $this->match = substr($this->match, 0, $slash);\r\n }\r\n \r\n if ($this->indentLogger != '') $this->indentLogger\r\n = substr($this->indentLogger, 4);\r\n }", "abstract protected function getParsedOutput();", "public function parse(\\App\\Interfaces\\DataParser $data);", "public function parse(): void\n {\n }", "public function process($opt, $value, $values, $parser)\n {\n // value(s) are bogus.\n $value = $this->convertValue($opt, $value);\n\n // And then take whatever action is expected of us.\n // This is a separate method to make life easier for\n // subclasses to add new actions.\n return $this->takeAction(\n $this->action, $this->dest, $opt, $value, $values, $parser);\n }", "public function __invoke()\n {\n\n if (!$this->source instanceof Bus) {\n throw new LogicException('You need a source bus to call an EventForward');\n }\n\n if (!$this->sourcePatterns) {\n throw new LogicException('You cannot call an EventFilter without source events');\n }\n\n $lastResult = null;\n\n foreach ($this->sourcePatterns as $event) {\n\n if ($this->isPattern($event)) {\n throw new LogicException('You cannot call an EventFilter with patterns');\n }\n\n $lastResult = $this->source->fire($event, func_get_args());\n }\n\n return $lastResult;\n\n }", "function parse()\n\t {\n\t\t $final = false;\n\t\t \n\t\t if(! $this->registered)\n\t\t\t $this->register();\n\t\t \n\t\t if(! $this->string && ! $this->fp) {\n\t\t\t $this->log('nothing to read', E_USER_WARNING, 'parse');\n\t\t\t return null;\n\t\t }\n\t\t \n\t\t while(! $final ) {\n\t\t\t \n\t\t\t if( $this->string ) {\n\t\t\t\t $final = true;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t $this->xml = fread($this->fp, $this->bufsize);\n\t\t\t\t $final = feof($this->fp);\n\t\t\t }\n\t\t\t \n\t\t\t if(! xml_parse($this->parser, $this->xml, $final) ) {\n\t\t\t\t $err = xml_error_string( xml_get_error_code( $this->parser ));\n\t\t\t\t $this->log('expat: '.$err.' ['.(implode('/',$this->locate())).']', E_USER_WARNING, 'parse');\n\t\t\t\t return null;\n\t\t\t }\n\t\t }\n\t\t xml_parser_free($this->parser);\n\t\t return $final;\n\t }", "abstract public function parse( & $variable );", "public function result()\n\t{\n\t\tif( $this->shouldParse() )\n\t\t{\n\t\t\t$this->parse();\n\t\t}\n\t\treturn $this->_parsed;\n\t}", "public function run()\r\n {\r\n // The token is invalid\r\n if (!$this->valid) {\r\n return false;\r\n }\r\n\r\n // Output 'echostr' for fist time authentication\r\n if (isset($this->query['echostr'])) {\r\n return htmlspecialchars($this->query['echostr'], ENT_QUOTES, 'UTF-8');\r\n }\r\n\r\n switch ($this->getMsgType()) {\r\n case 'text':\r\n if ($result = $this->handleText()) {\r\n return $result;\r\n }\r\n break;\r\n\r\n case 'event':\r\n $event = strtolower($this->getEvent());\r\n switch ($event) {\r\n case 'subscribe':\r\n $result = $this->handleEvent('subscribe');\r\n if ($this->getTicket()) {\r\n $result = $this->handleEvent('scan');\r\n }\r\n if ($result) {\r\n return $result;\r\n }\r\n break;\r\n\r\n case 'scan':\r\n if ($result = $this->handleEvent('scan')) {\r\n return $result;\r\n }\r\n break;\r\n\r\n default:\r\n if ($result = $this->handleEvent($event, $this->getEventKey())) {\r\n return $result;\r\n }\r\n break;\r\n }\r\n break;\r\n\r\n // Including location, image, voice, video and link\r\n default:\r\n if (isset($this->rules[$this->getMsgType()])) {\r\n return $this->handle($this->rules[$this->getMsgType()]);\r\n }\r\n }\r\n\r\n // Fallback to the default rule\r\n if (!$this->handled && $this->defaults) {\r\n return $this->handle($this->defaults);\r\n }\r\n\r\n return false;\r\n }", "public function __invoke()\n\t{\n\t\treturn ($this->value)(...func_get_args());\n\t}", "public function run(Job $job, RequestResponse $requestResponse) : ParserResult;", "abstract public static function getParser();", "protected function parse()\n {\n\n }", "function endHandler($parser, $element)\r\n {\r\n $value = array_pop($this->_valStack);\r\n $data = trim($this->_dataStack[$this->_depth]);\r\n\r\n // adjust type of the value\r\n switch(strtolower($value['type'])) {\r\n /*\r\n * unserialize an object\r\n */\r\n case 'object':\r\n if(isset($value['class'])) {\r\n $classname = $value['class'];\r\n } else {\r\n $classname = '';\r\n }\r\n if (is_array($this->options['tagMap']) && isset($this->options['tagMap'][$classname])) {\r\n $classname = $this->options['tagMap'][$classname];\r\n }\r\n\r\n // instantiate the class\r\n if ($this->options['tagAsClass'] === true && class_exists($classname)) {\r\n $value['value'] = &new $classname;\r\n } else {\r\n $value['value'] = &new $this->options['defaultClass'];\r\n }\r\n if ($data !== '') {\r\n $value['children'][$this->options['contentName']] = $data;\r\n }\r\n\r\n // set properties\r\n foreach($value['children'] as $prop => $propVal) {\r\n // check whether there is a special method to set this property\r\n $setMethod = 'set'.$prop;\r\n if (method_exists($value['value'], $setMethod)) {\r\n call_user_func(array(&$value['value'], $setMethod), $propVal);\r\n } else {\r\n $value['value']->$prop = $propVal;\r\n }\r\n }\r\n // check for magic function\r\n if (method_exists($value['value'], '__wakeup')) {\r\n $value['value']->__wakeup();\r\n }\r\n break;\r\n\r\n /*\r\n * unserialize an array\r\n */\r\n case 'array':\r\n if ($data !== '') {\r\n $value['children'][$this->options['contentName']] = $data;\r\n }\r\n if (isset($value['children'])) {\r\n $value['value'] = $value['children'];\r\n } else {\r\n $value['value'] = array();\r\n }\r\n break;\r\n\r\n /*\r\n * unserialize a null value\r\n */\r\n case 'null':\r\n $data = null;\r\n break;\r\n\r\n /*\r\n * unserialize a resource => this is not possible :-(\r\n */\r\n case 'resource':\r\n $value['value'] = $data;\r\n break;\r\n\r\n /*\r\n * unserialize any scalar value\r\n */\r\n default:\r\n settype($data, $value['type']);\r\n $value['value'] = $data;\r\n break;\r\n }\r\n $parent = array_pop($this->_valStack);\r\n if ($parent === null) {\r\n $this->_unserializedData = &$value['value'];\r\n $this->_root = &$value['name'];\r\n return true;\r\n } else {\r\n // parent has to be an array\r\n if (!isset($parent['children']) || !is_array($parent['children'])) {\r\n $parent['children'] = array();\r\n if (!in_array($parent['type'], array('array', 'object'))) {\r\n $parent['type'] = $this->options['complexType'];\r\n if ($this->options['complexType'] == 'object') {\r\n $parent['class'] = $parent['name'];\r\n }\r\n }\r\n }\r\n\r\n if (!empty($value['name'])) {\r\n // there already has been a tag with this name\r\n if (in_array($value['name'], $parent['childrenKeys']) || in_array($value['name'], $this->options['forceEnum'])) {\r\n // no aggregate has been created for this tag\r\n if (!in_array($value['name'], $parent['aggregKeys'])) {\r\n if (isset($parent['children'][$value['name']])) {\r\n $parent['children'][$value['name']] = array($parent['children'][$value['name']]);\r\n } else {\r\n $parent['children'][$value['name']] = array();\r\n }\r\n array_push($parent['aggregKeys'], $value['name']);\r\n }\r\n array_push($parent['children'][$value['name']], $value['value']);\r\n } else {\r\n $parent['children'][$value['name']] = &$value['value'];\r\n array_push($parent['childrenKeys'], $value['name']);\r\n }\r\n } else {\r\n array_push($parent['children'],$value['value']);\r\n }\r\n array_push($this->_valStack, $parent);\r\n }\r\n\r\n $this->_depth--;\r\n }", "public function then(callable $destination)\n {\n $this->destination = $destination;\n $this->real_pipes = [];\n $this->pipeline = array_reduce(\n array_reverse($this->pipes),\n $this->carry(),\n $this->prepareDestination($destination)\n );\n return $this;\n }", "public function addScriptParsedListener(callable $listener): SubscriptionInterface;", "public function call_filter() {\n $numargs = func_num_args();\n if ( $numargs >= 1 ) {\n $handler = func_get_arg( 0 );\n }\n $arg_list = func_get_args();\n unset( $arg_list[0] );\n if ( function_exists( $handler ) ) {\n return call_user_func_array( $handler, $arg_list );\n } else\n if ( method_exists( $this, $handler ) ) {\n return call_user_func_array( [ $this, $handler ], $arg_list );\n } else {\n return func_get_arg( 1 );\n }\n }", "public function parse($token, $value);", "public function __invoke()\n {\n return call_user_func($this->callback);\n }", "public function onReceive(string $str, ...$args)\n {\n var_dump('process rec'.$str);\n }", "public function parse($data)\n {\n self::$current_parser = $this->parser;\n\n ob_start();\n $bound = str_replace('$this', '\\Spackle\\Plugins\\CodeBlockParser::$current_parser', $data);\n if (\n !is_null(\n self::$current_parser->currently_bound_object\n )\n ) {\n $bound = str_replace(\n '$this',\n '\\Spackle\\Plugins\\CodeBlockParser::$current_parser->currently_bound_object',\n $data\n );\n }\n @eval($bound);\n $result = ob_get_contents();\n ob_end_clean();\n\n self::$current_parser = null;\n\n return $result;\n }", "function processNext(Dispatcher $dispatcher);", "public function map(callable $transform): ParseResult;", "function parse()\n {\n // described wiki links\n $tmp_regex = '/\\[' . $this->regex . ' (.+?)\\]/';\n $this->_wiki->_source = preg_replace_callback(\n $tmp_regex,\n array(&$this, 'processDescr'),\n $this->_wiki->_source\n );\n\n // standalone wiki links\n $tmp_regex = '/(^|[^A-Za-z0-9\\-_])' . $this->regex . '/';\n $this->_wiki->_source = preg_replace_callback(\n $tmp_regex,\n array(&$this, 'process'),\n $this->_wiki->_source\n );\n }", "public function setReceiver($receiver)\n {\n $this->receiver = $receiver;\n\n return $this;\n }", "private function parser(string $data, callable $cast = null, string $delimiter = ','): Generator\n {\n if ($data === '') {\n throw new ParseException(\"Unexpected end of data\");\n }\n\n if ($data[0] !== '{') {\n throw new ParseException(\"Missing opening bracket\");\n }\n\n $data = ltrim(substr($data, 1));\n\n do {\n if ($data === '') {\n throw new ParseException(\"Unexpected end of data\");\n }\n\n if ($data[0] === '}') { // Empty array\n return ltrim(substr($data, 1));\n }\n\n if ($data[0] === '{') { // Array\n $parser = $this->parser($data, $cast, $delimiter);\n yield iterator_to_array($parser);\n $data = $parser->getReturn();\n $end = $this->trim($data, 0, $delimiter);\n continue;\n }\n\n if ($data[0] === '\"') { // Quoted value\n for ($position = 1; isset($data[$position]); ++$position) {\n if ($data[$position] === '\\\\') {\n ++$position; // Skip next character\n continue;\n }\n\n if ($data[$position] === '\"') {\n break;\n }\n }\n\n if (!isset($data[$position])) {\n throw new ParseException(\"Could not find matching quote in quoted value\");\n }\n\n $yield = stripslashes(substr($data, 1, $position - 1));\n\n $end = $this->trim($data, $position + 1, $delimiter);\n } else { // Unquoted value\n $position = 0;\n while (isset($data[$position]) && $data[$position] !== $delimiter && $data[$position] !== '}') {\n ++$position;\n }\n\n $yield = trim(substr($data, 0, $position));\n\n $end = $this->trim($data, $position, $delimiter);\n\n if (strcasecmp($yield, \"NULL\") === 0) { // Literal NULL is always unquoted.\n yield null;\n continue;\n }\n }\n\n yield $cast ? $cast($yield) : $yield;\n } while ($end !== '}');\n\n return $data;\n }", "public function setReceiver(?string $receiver): self\n {\n $this->receiver = $receiver;\n\n return $this;\n }", "public function __invoke()\n {\n\n // copied/modified from: http://drupal.org/node/353494 ... this is ugly.\n // hopefully the future will bring a more elegant solution.\n $stack = debug_backtrace();\n $args = array();\n $eval_args = array();\n \n // make sure our method name is specified. determine our method name.\n if(!isset($stack[0]['args']) || count($stack[0]['args'])<1) return;\n $method = $stack[0]['args'][0];\n\n // make sure method exists.\n if(!method_exists($this,$method)) return;\n\n // get our args by reference.\n if(count($stack[0]['args'])>1){\n for($i=1; $i < count($stack[0][\"args\"]); $i++){\n $args[] = &$stack[0][\"args\"][$i];\n $eval_args[] = '$args['.($i-1).']';\n }\n } \n\n $eval_args = implode(',',$eval_args);\n \n // call our 'init' callbacks.\n $retval = null;\n $cb_name = get_class($this).'.'.$method;\n $cb_return = $this->callback_handler->fire($cb_name,'init',$args);\n \n // a callback is forcing an early return.\n if(!empty($cb_return->r)) return $cb_return->v;\n\n // call our requested method\n eval('$retval = $this->$method('.$eval_args.');');\n $this->callback_handler->store_retval($cb_name,$cb_name,$retval);\n\n // call our 'return' callbacks;\n $cb_return = $this->callback_handler->fire($cb_name,'return',$args);\n \n // reset our return value list for this process chain\n $this->callback_handler->reset_retvals($cb_name);\n \n // a callback is forcing an early return (taking over return value)\n if(!empty($cb_return->r)) return $cb_return->v;\n\n return $retval;\n\n }", "function contents($parser, $data){\n}", "private function parse()\n {\n $eventPhraseData = array();\n\n if($this->hasValidPhrase()) {\n // Parse the data, EventName will be index 1, HandlerName will be index 3 (if it exists)\n preg_match(self::EVENT_PHRASE_PATTERN, $this->eventPhrase, $eventPhraseData);\n\n if(array_key_exists(1, $eventPhraseData)) {\n $this->eventName = $eventPhraseData[1];\n }\n\n if(array_key_exists(3, $eventPhraseData)) {\n $this->handlerName = $eventPhraseData[3];\n }\n\n } else {\n throw new InvalidEventPhraseException();\n }\n\n return $this;\n }", "public abstract function processParsedData(): void;", "public function parseWith(\\Closure $callback)\r\n {\r\n $this->parse_callback = $callback;\r\n return $this;\r\n }", "public function incoming(): Generator;", "public function parse($callable): void\n {\n foreach ($this->current as $node) {\n $callable(new XmlNode($node));\n }\n }", "protected static function parse_callback($params){\n\t\t$result\t= self::convert_asp(trim($params[1]));\n\t\t\n\t\treturn '<?php'.PHP_EOL.$result.PHP_EOL.'?>';\n\t}", "public function parse()\n {\n return $this;\n }", "function stop($parser,$element_name) {\n echo \"<br>\";\n}", "public function process($data) \r\n\t{\r\n if ($this->chainInput) $data = $this->chainInput->process($data);\r\n\t\t\r\n if (!is_string($data) && !($data instanceof Fs_Node)) throw new Transform_Exception(\"Wrong parameter type : \" . gettype($data) . \" given when string should be pass\");\r\n \t\r\n\t\t$this->startErrorHandler();\r\n\r\n\t\ttry {\r\n ob_start ();\r\n\t if ($data instanceof Fs_Node) {\r\n\t $return = include (string)$data;\r\n\t if ($return === true || $return === 1) {\r\n\t \t$data = ob_get_contents();\r\n\t \t$return = eval('return ' . $data . ';');\r\n\t }\r\n\t } else {\r\n\t \t$return = eval('return ' . $data . ';');\r\n\t }\r\n } catch (Exception $exception) {\r\n ob_end_clean ();\r\n $this->stopErrorHandler ();\r\n \r\n throw new Transform_Exception ( \"Could not unserialize data\", $exception->getMessage());\r\n }\r\n \r\n ob_end_clean ();\r\n $this->stopErrorHandler ();\r\n\r\n return $return;\r\n\t}", "public function handleCall() {\n $code = '';\n if ($this->assign) $code .= $this->parseEntity($this->assign).' = ';\n if (substr($this->method, 0, 5) == 'this.') {\n $code .= '$'.str_replace('.', '->', $this->method).'('; \n } else {\n $code .= $this->adapterLink.'->'.$this->method.'('; \n }\n if (isset($this->params) && isset($this->params->param)) {\n foreach($this->params->param as $p) {\n if (isset($p->name)) {\n $code .= $this->parseEntity($p->name);\n } else {\n $code .= $this->getFieldValue($p->value);\n }\n $code .= ', ';\n }\n $code = rtrim($code, ', ');\n }\n $code .= ');';\n if (isset($this->return)) {\n $this->writeLine($this->parseEntity($this->return).' = '); \n }\n $this->writeLine($code); \n }", "public function parse()\n {\n if ($this->checkSignature()) {\n $this->valid = true;\n $this->parsePostData();\n } else {\n $this->valid = false;\n }\n }", "public function parse($source)\n {\n foreach ($this->parsers as $parser) {\n if ($parser->accepts($source)) {\n return $parser->parse($source);\n }\n }\n throw new \\InvalidArgumentException(\"No parses registered which can handle source\");\n }", "public static function run_hook($target, $parameters = array(), $modifier = '')\n\t{\n\t\tif(!isset(static::$_hooks[$target]) && $modifier == 'simple')\n\t\t{\n\t\t\treturn end($parameters);\n\t\t}\n\n\n\t\tif(!isset(static::$_hooks[$target]))\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t\t$hook_array = static::$_hooks[$target];\n\n\t\tusort($hook_array, function($a, $b){ return $a['priority'] - $b['priority']; });\n\n\t\t// default return if nothing happens\n\t\t$return = array('parameters' => $parameters, 'return' => NULL);\n\n\t\tforeach($hook_array as $hook)\n\t\t{\n\t\t\t// if this is 'after', we might already have an extra parameter in the array that is the previous result\n\n\t\t\t// this works whether it's a closure or \\Some\\method::calling\n\t\t\t$return_temp = call_user_func_array($hook['method'], $parameters);\n\n\t\t\tif(is_null($return_temp))\n\t\t\t{\n\t\t\t\t// if NULL, the plugin creator didn't want to send a message outside\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(!is_array($return_temp))\n\t\t\t{\n\t\t\t\t// if not an array, it's a plain result to stack in\n\t\t\t\t// the plugin creator can't do this if the result set is an array, and must use the complex solution\n\t\t\t\t$return['return'] = $return_temp;\n\t\t\t\t// but the return as last parameter\n\t\t\t\tarray_push($parameters, $return['return']);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// in the most complex situation, we have array('parameters'=>array(...), 'return'=>'value')\n\t\t\tif($modifier == 'simple' && !is_null($return_temp['return']))\n\t\t\t{\n\t\t\t\t// if simple we just stack the single parameter over and over\n\t\t\t\t$parameters = array($return_temp['return']);\n\t\t\t}\n\t\t\telse if(isset($return_temp['parameters']))\n\t\t\t{\n\t\t\t\t$parameters = $return_temp['parameters'];\n\t\t\t\t$return['parameters'] = $return_temp['parameters'];\n\t\t\t}\n\t\t\tif(isset($return_temp['return']))\n\t\t\t{\n\t\t\t\t$return['return'] = $return_temp['return'];\n\t\t\t\t// but the return as last parameter\n\t\t\t\tarray_push($parameters, $return['return']);\n\t\t\t}\n\t\t}\n\n\t\tif($modifier == 'simple')\n\t\t\treturn $return['return'];\n\n\t\treturn $return;\n\t}", "public function process_matched_token( $stack_ptr, $group_name, $matched_content ) {\n\n\t\t$func_open_paren_token = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $stack_ptr + 1 ), null, true );\n\t\tif ( false === $func_open_paren_token\n\t\t\t|| \\T_OPEN_PARENTHESIS !== $this->tokens[ $func_open_paren_token ]['code']\n\t\t\t|| ! isset( $this->tokens[ $func_open_paren_token ]['parenthesis_closer'] )\n\t\t) {\n\t\t\t// Live coding, parse error or not a function call.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'typos' === $group_name && '_' === $matched_content ) {\n\t\t\t$this->phpcsFile->addError( 'Found single-underscore \"_()\" function when double-underscore expected.', $stack_ptr, 'SingleUnderscoreGetTextFunction' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( \\in_array( $matched_content, array( 'translate', 'translate_with_gettext_context' ), true ) ) {\n\t\t\t$this->phpcsFile->addWarning( 'Use of the \"%s()\" function is reserved for low-level API usage.', $stack_ptr, 'LowLevelTranslationFunction', array( $matched_content ) );\n\t\t}\n\n\t\t$arguments_tokens = array();\n\t\t$argument_tokens = array();\n\t\t$tokens = $this->tokens;\n\n\t\t// Look at arguments.\n\t\tfor ( $i = ( $func_open_paren_token + 1 ); $i < $this->tokens[ $func_open_paren_token ]['parenthesis_closer']; $i++ ) {\n\t\t\t$this_token = $this->tokens[ $i ];\n\t\t\t$this_token['token_index'] = $i;\n\t\t\tif ( isset( Tokens::$emptyTokens[ $this_token['code'] ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( \\T_COMMA === $this_token['code'] ) {\n\t\t\t\t$arguments_tokens[] = $argument_tokens;\n\t\t\t\t$argument_tokens = array();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Merge consecutive single or double quoted strings (when they span multiple lines).\n\t\t\tif ( isset( Tokens::$textStringTokens[ $this_token['code'] ] ) ) {\n\t\t\t\tfor ( $j = ( $i + 1 ); $j < $this->tokens[ $func_open_paren_token ]['parenthesis_closer']; $j++ ) {\n\t\t\t\t\tif ( $this_token['code'] === $this->tokens[ $j ]['code'] ) {\n\t\t\t\t\t\t$this_token['content'] .= $this->tokens[ $j ]['content'];\n\t\t\t\t\t\t$i = $j;\n\t\t\t\t\t} else {\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\t$argument_tokens[] = $this_token;\n\n\t\t\t// Include everything up to and including the parenthesis_closer if this token has one.\n\t\t\tif ( ! empty( $this_token['parenthesis_closer'] ) ) {\n\t\t\t\tfor ( $j = ( $i + 1 ); $j <= $this_token['parenthesis_closer']; $j++ ) {\n\t\t\t\t\t$tokens[ $j ]['token_index'] = $j;\n\t\t\t\t\t$argument_tokens[] = $tokens[ $j ];\n\t\t\t\t}\n\t\t\t\t$i = $this_token['parenthesis_closer'];\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $argument_tokens ) ) {\n\t\t\t$arguments_tokens[] = $argument_tokens;\n\t\t}\n\t\tunset( $argument_tokens );\n\n\t\t$argument_assertions = array();\n\t\tif ( 'simple' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'text',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t} elseif ( 'context' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'text',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'context',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t} elseif ( 'number' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'single',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'plural',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\tarray_shift( $arguments_tokens );\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t} elseif ( 'number_context' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'single',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'plural',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\tarray_shift( $arguments_tokens );\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'context',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t} elseif ( 'noopnumber' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'single',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'plural',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t} elseif ( 'noopnumber_context' === $this->i18n_functions[ $matched_content ] ) {\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'single',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'plural',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'context',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t\t$argument_assertions[] = array(\n\t\t\t\t'arg_name' => 'domain',\n\t\t\t\t'tokens' => array_shift( $arguments_tokens ),\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $arguments_tokens ) ) {\n\t\t\t$this->phpcsFile->addError( 'Too many arguments for function \"%s\".', $func_open_paren_token, 'TooManyFunctionArgs', array( $matched_content ) );\n\t\t}\n\n\t\tforeach ( $argument_assertions as $argument_assertion_context ) {\n\t\t\tif ( empty( $argument_assertion_context['tokens'][0] ) ) {\n\t\t\t\t$argument_assertion_context['stack_ptr'] = $func_open_paren_token;\n\t\t\t} else {\n\t\t\t\t$argument_assertion_context['stack_ptr'] = $argument_assertion_context['tokens'][0]['token_index'];\n\t\t\t}\n\t\t\t$this->check_argument_tokens( $argument_assertion_context );\n\t\t}\n\n\t\t// For _n*() calls, compare the singular and plural strings.\n\t\tif ( false !== strpos( $this->i18n_functions[ $matched_content ], 'number' ) ) {\n\t\t\t$single_context = $argument_assertions[0];\n\t\t\t$plural_context = $argument_assertions[1];\n\n\t\t\t$this->compare_single_and_plural_arguments( $stack_ptr, $single_context, $plural_context );\n\t\t}\n\n\t\tif ( true === $this->check_translator_comments ) {\n\t\t\t$this->check_for_translator_comment( $stack_ptr, $argument_assertions );\n\t\t}\n\t}", "public function processNext(EventDispatcher $dispatcher);", "public function parse(Reader $reader): void;", "public function parser()\n {\n return new Parser($this->current(), $this->all());\n }", "public function executeHandler($handler, $params, $prevOutput = null)\n {\n // a function(-ish) thing which can be called\n if (is_callable($handler)) {\n return $handler($this, $params, $prevOutput);\n }\n\n // aliased handler\n if ($actualHandler = @$this->handlerAlias[$handler]) {\n return $this->executeHandler($actualHandler, $params, $prevOutput);\n }\n\n // only callable and controller/method pair (`:` seprated string) can be accepted\n if (!is_string($handler)) {\n $type = gettype($handler);\n throw new \\Exception(\"'{$type}' can not be used as handler, should be a callable or controller/method pair!\");\n }\n\n if (false === $pos = strpos($handler, ':')) {\n throw new \\Exception(\"Can not parse '{$handler}' for corresponding controller/method!\");\n }\n\n // controller/method pair\n list($class, $method) = explode(':', $handler, 2);\n $class = $this->handlerClassPrefix ? \"{$this->handlerClassPrefix}{$class}\" : $class;\n $controller = new $class;\n return $controller->$method($this, $params, $prevOutput);\n }", "public function parse($type, $body) {\n return array_key_exists($type, $this->handlers) \n ? $this->handlers[$type]($body)\n : $body;\n }", "public function consume(\n callable $callback,\n ConsumerOptions $options = null,\n $tag = '',\n Channel $channel = null\n ) {\n throw new \\LogicException('Not implemented.');\n }", "private function validate( $reader ) {\n\t\t// handle any processing instructions with the callback\n\t\tdo {\n\t\t\tif( !$this->readNext( $reader ) ) {\n\t\t\t\t// Hit the end of the document before any elements\n\t\t\t\t$this->wellFormed = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $reader->nodeType === XMLReader::PI ) {\n\t\t\t\t$this->processingInstructionHandler( $reader->name, $reader->value );\n\t\t\t}\n\t\t} while ( $reader->nodeType != XMLReader::ELEMENT );\n\n\t\t// Process the rest of the document\n\t\tdo {\n\t\t\tswitch ( $reader->nodeType ) {\n\t\t\t\tcase XMLReader::ELEMENT:\n\t\t\t\t\t$name = $this->expandNS(\n\t\t\t\t\t\t$reader->name,\n\t\t\t\t\t\t$reader->namespaceURI\n\t\t\t\t\t);\n\t\t\t\t\tif ( $this->rootElement === '' ) {\n\t\t\t\t\t\t$this->rootElement = $name;\n\t\t\t\t\t}\n\t\t\t\t\t$empty = $reader->isEmptyElement;\n\t\t\t\t\t$attrs = $this->getAttributesArray( $reader );\n\t\t\t\t\t$this->elementOpen( $name, $attrs );\n\t\t\t\t\tif ( $empty ) {\n\t\t\t\t\t\t$this->elementClose();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase XMLReader::END_ELEMENT:\n\t\t\t\t\t$this->elementClose();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase XMLReader::WHITESPACE:\n\t\t\t\tcase XMLReader::SIGNIFICANT_WHITESPACE:\n\t\t\t\tcase XMLReader::CDATA:\n\t\t\t\tcase XMLReader::TEXT:\n\t\t\t\t\t$this->elementData( $reader->value );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase XMLReader::ENTITY_REF:\n\t\t\t\t\t// Unexpanded entity (maybe external?),\n\t\t\t\t\t// don't send to the filter (xml_parse didn't)\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase XMLReader::COMMENT:\n\t\t\t\t\t// Don't send to the filter (xml_parse didn't)\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase XMLReader::PI:\n\t\t\t\t\t// Processing instructions can happen after the header too\n\t\t\t\t\t$this->processingInstructionHandler(\n\t\t\t\t\t\t$reader->name,\n\t\t\t\t\t\t$reader->value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// One of DOC, DOC_TYPE, ENTITY, END_ENTITY,\n\t\t\t\t\t// NOTATION, or XML_DECLARATION\n\t\t\t\t\t// xml_parse didn't send these to the filter, so we won't.\n\t\t\t}\n\n\t\t} while ( $this->readNext( $reader ) );\n\n\t\tif ( $this->stackDepth !== 0 ) {\n\t\t\t$this->wellFormed = false;\n\t\t} elseif ( $this->wellFormed === null ) {\n\t\t\t$this->wellFormed = true;\n\t\t}\n\n\t}", "public function parser()\n {\n return $this->parser;\n }", "public function parser()\n {\n return $this->parser;\n }" ]
[ "0.5464215", "0.5301189", "0.515997", "0.50794154", "0.50782186", "0.49404836", "0.48944512", "0.4718603", "0.46885362", "0.4683059", "0.4674766", "0.46669388", "0.46580613", "0.46556345", "0.46475184", "0.4639089", "0.4601938", "0.45676437", "0.4556105", "0.45428145", "0.45402142", "0.45284602", "0.4527197", "0.44467208", "0.44456887", "0.4445617", "0.4445617", "0.4445617", "0.4445617", "0.4445617", "0.44415525", "0.44225055", "0.4417966", "0.44175962", "0.43757504", "0.43737763", "0.43730497", "0.43725306", "0.43725306", "0.43692917", "0.43680552", "0.43680552", "0.43680552", "0.43673083", "0.43580878", "0.43516275", "0.43472368", "0.43471226", "0.43274203", "0.43223435", "0.43182284", "0.4311985", "0.4308231", "0.42927286", "0.4290495", "0.4288239", "0.42706987", "0.42706877", "0.4269351", "0.4261663", "0.42609388", "0.42566508", "0.42527986", "0.42520672", "0.42464057", "0.42388338", "0.42312235", "0.42276916", "0.42266658", "0.42265058", "0.4225737", "0.4224028", "0.42221397", "0.42075112", "0.4202736", "0.41977888", "0.41959217", "0.4186289", "0.4179723", "0.41791216", "0.4177246", "0.41613278", "0.41533312", "0.4153007", "0.41529545", "0.41308558", "0.41264167", "0.41246724", "0.41241542", "0.41213822", "0.4121337", "0.4120784", "0.41117597", "0.41041252", "0.4103542", "0.4101931", "0.4096607", "0.4095974", "0.4094895", "0.4094895" ]
0.7367169
0
Pop the value of a params parameter in the request. I.e. get the value and then remove the value from the params.
Извлеките значение параметра params из запроса. То есть получите значение и затем удалите его из params.
public function popParam($name) { $v = NULL; if(isset($this->payload['params'][$name])) { $v = $this->payload['params'][$name]; } unset($this->payload['params'][$name]); return $v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function popParams() {\r\n $object = array_pop($this->params);\r\n if (is_null($object))\r\n $this->logger->warn('Empty stack (returning null)');\r\n\r\n return $object;\r\n }", "public function pop():string\n\t{\n\t\treturn array_pop( $this->params );\n\t}", "private function removeFirstParameter() {\n array_shift($this->urlParameters);\n }", "public function RemoveParam($Param){\n if(isset($this->QueryStringParam[$Param])){\n unset($this->QueryStringParam[$Param]);\n }\n }", "public function removeParameter($param){\n if(isset($this->parameters[$param])){\n unset($this->parameters[$param]);\n }\n }", "public function removeParam($name);", "public function removeParameters(){\n $this->parameters = array();\n }", "public function unsetParam($key)\n {\n $this->request->unsetParam($key);\n }", "public function Reset()\n {\n while (count($this->params) > 0) \t\t// Still some left?\n array_pop($this->params);\t\t\t// Remove last element\n }", "protected function __getPostRemoveEmpty(){\r\n if($this->request->isPost()){\r\n foreach($this->request->getPost() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_POST[$key]);\r\n }\r\n }\r\n }\r\n else{\r\n foreach($this->request->getQuery() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_GET[$key]);\r\n }\r\n }\r\n }\r\n }", "function offsetUnset($key)\n\t{\n\t\tif (array_key_exists($key, $this->params))\n\t\t{\n\t\t\tunset($this->params[$key]);\n\t\t}\n\t}", "public function removeParam($sKey);", "public function remove($params);", "public function removeUrlParam($route, $key, $value = null)\r\n {\r\n $get = Yii::$app->request->get();\r\n if (isset($get[$key])) {\r\n if ($value === null)\r\n unset($get[$key]);\r\n else {\r\n $get[$key] = explode(',', $get[$key]);\r\n $pos = array_search($value, $get[$key]);\r\n // Delete value\r\n if (isset($get[$key][$pos]))\r\n unset($get[$key][$pos]);\r\n // Save changes\r\n if (!empty($get[$key])) {\r\n $get[$key] = implode(',', $get[$key]);\r\n } // Delete key if empty\r\n else\r\n unset($get[$key]);\r\n }\r\n }\r\n return $this->createUrl(array_merge([$route], $get));\r\n }", "public function remove($param, $value = null)\n {\n if (!$this->IsPresent($param)) {\n return true;\n }\n\n if (is_null($value) || !is_array($this->_params[$param])) {\n unset($this->_params[$param]);\n\n return true;\n }\n\n if (is_array($this->_params[$param])) {\n foreach ($this->_params[$param] as $key => $setValue) {\n if ($setValue == $value) {\n unset($this->_params[$param][$key]);\n // make sure indices are renumbered\n $this->_params[$param] = array_values($this->_params[$param]);\n\n return true;\n }\n }\n }\n\n return false;\n }", "private function cleanParams() :void\n {\n if(is_array($this->params['params'])) {\n if(isset($this->params['params'][0])) {\n unset($this->params['params'][0]);\n }\n }\n }", "public function __unset($key)\n\t{\n\t\tunset($this->_params[$key]);\n\t}", "public static function remove_params_from_url($url) {\n if (strpos($url, \"?\") !== false) {\n $url = substr($url, 0, strpos($url, \"?\"));\n }\n return $url;\n }", "public function unsetValue(){\n $required = $this->getParamValue('required');\n if(!$required){\n unset($this->value);\n return true;\n }\n return false;\n }", "function retain_params($key, $val, $blacklist=null) {\n $getCopy = $_GET;\n $getCopy[$key] = $val;\n \n if (is_null($blacklist)) {\n global $one_time_params;\n $blacklist = $one_time_params;\n }\n \n foreach($blacklist as $bk) {\n unset($getCopy[$bk]);\n }\n \n return http_build_query($getCopy);\n }", "public function removeParam(string $name): self\n {\n $this->parsedUri->queryString()->removeParam($name);\n return $this;\n }", "protected function removeUrlQueryParam($url,$remove) \n\t{\n\t\t// parse the url\n\t \t$urlInfo=parse_url($url);\n\t \t\n\t \t// if no query string, just return the existing url\n\t \tif ( ! isset($urlInfo[\"query\"]) ) return $url;\n\n\t \t// set the url string\n\t \t$str=$urlInfo[\"query\"];\n\t \n\t \t// initialize parameters array\n\t \t$parameters = [];\n\n\t \t// get the key value pairs\n\t \t$pairs = explode(\"&\", $str);\n\n\t \t// loop through pairs\n\t\tforeach ($pairs as $pair) \n\t\t{\n\t\t\t// set the parameters array\n\t\t\tlist($k, $v) = array_map(\"urldecode\", explode(\"=\", $pair));\n\t\t\t$parameters[$k] = $v;\n\t\t}\n\n\t\t// remove the parameter we wanted to remove\n\t\tif(isset($parameters[$remove]))\n\t\t{\n\t\t \tunset($parameters[$remove]);\n\t\t}\n\n\t\t// build back the url string and return it\n\t \treturn str_replace($str,http_build_query($parameters),$url);\n\n\t}", "public function offsetUnset($offset)\n {\n unset($this->params[$offset]);\n }", "public function offsetUnset($name)\n {\n unset($this->parameters[$name]);\n }", "public function Clear($key)\n {\n if (array_key_exists($key, $this->params))\t// Does it exist?\n unset($this->params[$key]);\t\t// Clear it\n }", "function resetParameter($link)\n{\n $_GET[$link] = '';\n}", "public static function stripParam($url, $param)\n\t{\n\t\tif(!is_array($param))\n\t\t\t$param = array($param);\n\t\treturn self::update($url, $param);\n\t}", "function removeOptionValueFromProduct($get) {\n\t\t\n\t\t$this->getAndPrepare('option_id',$get,$optionId);\n\t\t$this->getAndPrepare('option_value_id',$get,$optionValueId);\n\t\t\n\t\tforeach($this->arrSessionVar as $id => $res) \n\t\t\tif(($res['options_id'] == $optionId) && ($res['options_values_id'] == $optionValueId)) \n\t\t\t\tunset($this->arrSessionVar[$id]);\n\t}", "public function removeParameter(string $name) {\n if ($this->hasParameter($name)) {\n unset($this->query[$name]);\n }\n return $this;\n }", "public function remove_query_var( $name ) {\n\t\t$this->public_query_vars = array_diff( $this->public_query_vars, array( $name ) );\n\t}", "public function removeUrlParam($url, $param)\n {\n if (isset($_GET[$param]))\n {\n $parseUri = parse_url($url);\n $arrayUri = array();\n parse_str($parseUri['query'], $arrayUri);\n unset($arrayUri[$param]);\n $newUri = http_build_query($arrayUri);\n $url = $parseUri['path'].'?'.$newUri;\n }\n return $url;\n }", "public function removeUrlParam($url, $param)\n {\n if (isset($_GET[$param]))\n {\n $parseUri = parse_url($url);\n $arrayUri = array();\n parse_str($parseUri['query'], $arrayUri);\n unset($arrayUri[$param]);\n $newUri = http_build_query($arrayUri);\n $url = $parseUri['path'].'?'.$newUri;\n }\n return $url;\n }", "public function remove_page_parameter($url){\n\t\tif($_url = strstr($url, \"&page=\"));\n\t\telse return $url; //url did not contain page parameter so return it\n\t\t//return $page_pair;\n\t\treturn str_replace($_url, \"\", $url);\n\t}", "public function pop()\n\t{\n\t\treturn array_pop($this->segments);\n\t}", "static function urlRemove($url, $type, $value){\n\t\t$filter = $_GET;\n\n\t\t$operation = isset($filter[$type]['and']) ? 'and' : 'or';\n\n\t\tif(isset($filter[$type][$operation])){\n\t\t\t$index = array_search($value, $filter[$type][$operation]);\n\n\t\t\tif($index !== false){\n\t\t\t\tunset($filter[$type][$operation][$index]);\n\n\t\t\t\tif(count($filter[$type][$operation]) == 0){\n\t\t\t\t\tunset($filter[$type][$operation]);\n\t\t\t\t}\n\n\t\t\t\tif(count($filter[$type]) == 0){\n\t\t\t\t\tunset($filter[$type]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$url = new \\Purl\\Url($url);\n\t\t$url->query->setData($filter);\n\n\t\treturn $url->getUrl();\n\t}", "public function remove_query_var($name)\n {\n }", "public function resetParams()\n {\n $this->params = array();\n }", "function fn_url_remove_service_params($url)\n{\n $params = array(\n 'is_ajax',\n 'callback',\n 'full_render',\n 'result_ids',\n 'init_context',\n 'skip_result_ids_check',\n 'anchor',\n Tygh::$app['session']->getName()\n );\n\n array_unshift($params, $url);\n\n return call_user_func_array('fn_query_remove', $params);\n}", "public function removeSessionParam($key) {\n unset($this->params[$key]);\n return $this;\n }", "function remove_query_arg($key, $query)\n{\t\n\t$regex = '|([\\?\\&])('.$key.'[\\=][^\\&\\#]*)|';\n\tif (preg_match($regex, $query, $matches) == 0)\n\t{\n\t\treturn $query;\n\t}\n\t\n\t$param = $matches[2];\n\tif ($matches[1] == '?')\n\t{\n\t\t$query = str_replace($matches[0], '?', $query);\n\t\t$query = str_replace('?&', '?', $query);\n\t}\n\telse\n\t{\n\t\t$query = str_replace($matches[0], '', $query);\n\t}\n\t\n\treturn $query;\n}", "static function pop()\n\t{\n\t\t$data = array_pop(self::$stack);\n\t\tself::$method = $data['method'];\n\t\tself::$uri = $data['uri'];\n\t\tself::$get_vars = $data['get_vars'];\n\t\tself::$post_vars = $data['post_vars'];\n\t\tself::$uri_vars = $data['uri_vars'];\n\t\tself::$vars = $data['vars'];\n\t\tself::$route = $data['route'];\n\t}", "public function unsetX(): void\n {\n unset($this->params[self::PARAMETER_FPX]);\n }", "private function handle_request_stack__pop(){\n\t\tif ( !array_key_exists('stack_pop', $_REQUEST) ){ \n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t//\tRemove last element from stack:\t\n\t\t\t$this->stack_pop();\n\t\t\t\n\t\t//\tRemove 'stack_pop':\n\t\t unset($_REQUEST['stack_pop']);\n\t\t \n\t\t//\tRe-build url without parmeter 'id' in case was part of request: \n\t\t\t$url = HOME.URL;\n\t\t\t$glue = '?';\n\t\t\tif ( array_key_exists('id', $_REQUEST) ) {\n\t\t\t\t$url .=$glue.'id='.$_REQUEST['id'];\n\t\t\t\t$glue = '&';\n\t\t\t}\n\t\t\tif ( array_key_exists('pos', $_REQUEST) ) {\n\t\t\t\t$url .=$glue.'pos='.$_REQUEST['pos'];\n\t\t\t}\n\t\t \n\t\t //\tRe-direct:\n\t\t header('Location: '.$url);\n\t\t exit;\n\t\t\t\n\t\t\n\t}", "public static function removeParameters($params)\r\r\n {\r\r\n // only filter\r\r\n $module = FSInput::get('module');\r\r\n $view = FSInput::get('view');\r\r\n $ccode = FSInput::get('ccode');\r\r\n $filter = FSInput::get('filter');\r\r\n $manu = FSInput::get('manu');\r\r\n $pmodel = FSInput::get('pmodel');\r\r\n $Itemid = FSInput::get('Itemid');\r\r\n $url = 'index.php?module=' . $module . '&view=' . $view;\r\r\n if ($ccode)\r\r\n {\r\r\n $url .= '&ccode=' . $ccode;\r\r\n }\r\r\n if ($manu)\r\r\n {\r\r\n $url .= '&manu=' . $manu;\r\r\n }\r\r\n if ($pmodel && ($params != 'manu'))\r\r\n {\r\r\n $url .= '&pmodel=' . $pmodel;\r\r\n }\r\r\n if ($filter)\r\r\n {\r\r\n $url .= '&filter=' . $filter;\r\r\n }\r\r\n $url .= '&Itemid=' . $Itemid;\r\r\n $url = trim(preg_replace('/&' . $params . '=[0-9a-zA-Z_-]+/i', '', $url));\r\r\n return FSRoute::_($url);\r\r\n }", "private function removeGetParams($url){\r\n\t\treturn strtok($url, \"?\");\r\n\t}", "protected function removeGetParams($strURL)\n {\n\t\t$getPos = strpos($strURL, '?');\t\n\t\t\t\t\n\t\tif ($getPos !== false)\n\t\t{\n\t\t\t$strGet = substr($strURL, $getPos);\n\t\t\t$strURL = str_replace($strGet, '', $strURL);\n\t\t}\n\t\t\n \treturn $strURL;\n }", "protected function removeGetParams($strURL)\n {\n\t\t$getPos = strpos($strURL, '?');\t\n\t\t\t\t\n\t\tif ($getPos !== false)\n\t\t{\n\t\t\t$strGet = substr($strURL, $getPos);\n\t\t\t$strURL = str_replace($strGet, '', $strURL);\n\t\t}\n\t\t\n \treturn $strURL;\n }", "public function deleteParameter($key)\n {\n unset($this->parameters[$key]);\n }", "function fetch_param ( $name, $default = null ) {\r\n\t\t# Prepare\r\n\t\thydrate_request_init();\r\n\t\t\r\n\t\t# Fetch\r\n\t\t$value = delve($_REQUEST, $name, $default);\r\n\t\t\r\n\t\t# Return value\r\n\t\treturn $value;\r\n\t}", "public function pop($key) {\n\t\t$val = $this->get($key);\n\t\tif($val!==null) {\n\t\t\t$this->remove($key);\n\t\t}\n\t\treturn $val;\n\t}", "public function offsetUnset($offset)\n {\n if (isset($this->rawParams[$offset])) {\n unset($this->rawParams[$offset]);\n }\n }", "public function getParamOrRequest($value)\n\t{\n if(key_exists($value,$this->_params)) {\n return $this->_params[$value];\n }\n return $this->getRequestParam($value);\n\t}", "public function remove($value) {}", "function remove_query_arg($key, $query = \\false)\n{\n}", "public function remove($value='')\r\n {\r\n \t\r\n }", "public function del()\n {\n // id/1 方式 不可以通过 get 获取到 id 的方法 但是可以通过 param()方式获取\n //获取请求参数\n $request = request();\n echo '请求参数:';\n dump($request->param());\n }", "private function traitParamDetach($request, $id){\n\n $subcategory = Subcategory::find($id);\n\n $subcategory->params()->detach($request->param_id);\n $param = Param::find($request->param_id);\n\n self::removeParamFromGroupProducts($subcategory, $param);\n\n return response()->json([\n 'status' => 'success',\n 'msg' => 'Параметр успешно отключен!',\n 'render' => view('administration.admin.settings.subcategories.show.layouts.pram_ralation_change_block', compact('param','subcategory'))->render()\n ]);\n }", "public function offsetUnset($name) {\n\n if (is_int($name)) parent::offsetUnset($name);\n $name = strtoupper($name);\n\n foreach($this->parameters as $key=>$parameter) {\n if ($parameter->name == $name) {\n $parameter->parent = null;\n unset($this->parameters[$key]);\n }\n\n }\n\n }", "public function remove($value);", "public function clearParameters() {}", "public function clearParameters() {}", "public function clearParameters() {}", "public function clearParameters() {}", "public function clearParameters() {}", "private function _getParamHolder() {\n return '?';\n }", "public function __unset($name) {\n unset($this->requestData[$name]);\n }", "function pop() {\n $a = func_get_args();\n if (! is_array($a[1]) && ! isset($a[2]))\n $a[2]=1;\n return $this->op('$pop', $a);\n }", "public function pop()\n {\n if (count($this->assigns) == 1) {\n throw new LiquidException('No elements to pop');\n }\n\n array_shift($this->assigns);\n $this->push = false;\n }", "public function removeParameterFromData($name)\n\t{\n\t\tunset($this->data[$name]);\n\t}", "public function unsetOption($key){\n\t\t\tif(array_key_exists($key, $this->params))\n\t\t\t\tunset($this->params[$key]);\n\t\t}", "public function removeValue($name) {\n\t\tif(!is_array($name)) {\n\t\t\tunset($this->inputValues[$name]);\n\t\t} else {\n\t\t\tforeach($name as $key) {\n\t\t\t\tunset($this->inputValues[$name]);\n\t\t\t}\n\t\t}\n\t}", "public function __unset($parameter)\n\t{\n\t\tunset($this->_data[$parameter]);\n\t}", "public function skipValue(): void\n {\n $this->stack->pop();\n }", "public function offsetUnset(mixed $name):void {\n $this->removeParameter((string) $name); \n }", "function removeQSVar($url, $key)\r\n\t{\r\n\t\t$pair = explode('?', $url);\r\n\t\tif (count($pair) === 2) {\r\n\t\t\t$url = $pair[0];\r\n\t\t\t$bits = JArrayHelper::getValue($pair, 1);\r\n\t\t} else {\r\n\t\t\t$url = '';\r\n\t\t\t$bits = JArrayHelper::getValue($pair, 0);\r\n\t\t}\r\n\t\t$glue = strstr($bits, '&amp;') ? '&amp;' : '&';\r\n\t\t$bits = explode($glue, $bits);\r\n\t\t$a = array();\r\n\t\tforeach ($bits as $bit) {\r\n\t\t\tif (strstr($bit, '=')) {\r\n\t\t\t\tlist($thisKey, $val) = explode('=', $bit);\r\n\t\t\t\tif ($thisKey !== $key) {\r\n\t\t\t\t\t$a[] = $bit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!empty($a)) {\r\n\t\t\t$url .= '?' . implode($glue, $a);\r\n\t\t}\r\n\t return $url;\r\n\t}", "public function clearQueryParams()\n {\n // empty query strings\n if (isset($this->env['QUERY_STRING'])) {\n $this->env['QUERY_STRING'] = '';\n }\n if (isset($this->env['REDIRECT_QUERY_STRING'])) {\n $this->env['REDIRECT_QUERY_STRING'] = '';\n }\n if (isset($this->env['REQUEST_URI'])) {\n $this->env['REQUEST_URI'] = preg_replace('/\\?.*$/', '', $this->env['REQUEST_URI']);\n }\n\n // unset all keys in the $_GET array\n foreach ($_GET as $key => $val) {\n unset($_GET[$key]);\n }\n }", "public function pop()\n {\n $this->prepare();\n\n $data = array_pop($this->_data);\n return $this->makeResult($data);\n }", "public function remove($key, $value = null) \n {\n if ($this->isAllowedKey($key) && isset($this->filter[$key])) {\n if(is_array($this->filter[$key])){\n unset($this->filter[$key][$value]);\n unset($this->entityfilter[$key][$value]);\n \n if(count($this->filter[$key]) == 0){\n unset($this->filter[$key]);\n unset($this->entityfilter[$key]);\n }\n }\n else {\n unset($this->filter[$key]);\n unset($this->entityfilter[$key]);\n }\n }\n }", "public function deRegisterParameter(string $id)\n {\n unset($this->parameters[$id]);\n }", "public function removeValue($value) : void;", "function zRem( $value, $key = '' ){\n $key = $key ? $key : $this->key;\n return $this->handler->zRem($key, $value );\n }", "public function offsetUnset($name): void\n {\n $this->removeParam($name);\n }", "public function pop()\n {\n return array_shift($this->parts);\n }", "private function getParams($obj){\n\t\tif(isset($obj[\"p\"])){\n\t\t\t//remove p from $obj\n\t\t\tarray_splice($obj, array_search(\"p\", array_keys($obj)), 1);\n\t\t}\n\t\t\n\t\t//return obj\n\t\treturn $obj;\n\t}", "function UnsetRequest()\n {\n \n unset($_REQUEST[\"mco_productos__PDU_ID\"]);\n unset($_REQUEST[\"mco_productos__PDU_NOMBRE\"]);\n unset($_REQUEST[\"mco_productos__PDU_DESCRIPCION\"]);\n unset($_REQUEST[\"mco_productos__PDU_IMAGENPRODU\"]);\n unset($_REQUEST[\"mco_productos__PDU_STOCKMINIMO\"]);\n unset($_REQUEST[\"mco_productos__SUB_NOMBRECAT\"]);\n unset($_REQUEST[\"mco_productos__SUB_UNIMEDIDA\"]);\n unset($_REQUEST[\"mco_productos__SUB_TALLA\"]);\n unset($_REQUEST[\"mco_productos__SUB_GENERO\"]);\n unset($_REQUEST[\"mco_productos__SUB_ESTADO\"]);\n }", "public function withoutParam($paramName = null)\n {\n $object = clone $this;\n if (is_null($paramName)) {\n unset($object->configs[$this->currentParamType]);\n } else {\n if (isset($object->configs[$this->currentParamType])) {\n if (!is_array($object->configs[$this->currentParamType])) {\n unset($object->configs[$this->currentParamType]);\n } else {\n if (is_array($paramName)) {\n $paramName = [$paramName];\n }\n foreach ($paramName as $paramKey) {\n if (is_string($paramKey) || is_numeric($paramKey)) {\n unset($object->configs[$this->currentParamType][$paramName]);\n }\n }\n }\n }\n }\n\n return $object->buildConfigClient();\n }", "public function remove($param)\n {\n unset($this->_data[$param]);\n return TRUE;\n }", "public function removeSubmitVar() {\n $submitVar = $this->getProperty('submitVar','logcp-submit');\n if (!empty($submitVar)) {\n $this->dictionary->remove($submitVar);\n }\n }", "public function remove($k){\n switch($this->workingDataType){\n case 'PUT':\n unset($this->putData[$k]);\n break;\n case 'DELETE':\n unset($this->deleteData[$k]);\n break;\n case 'POST':\n unset($_POST[$k]);\n break;\n case 'GET':\n unset($_GET[$k]);\n break;\n }//switch\n }", "private function url_last_param($url) {\n $url_parts = explode(\"/\", $url);\n $prospect = end($url_parts);\n $params = preg_split(\"/(\\?|\\=|\\&)/\", $prospect);\n\n if ($params) return $params[0];\n else return $prospect;\n }", "protected function removeParamFromArray(&$builder, $name)\n {\n unset($builder[$name]);\n }", "public function unsetY(): void\n {\n unset($this->params[self::PARAMETER_FPY]);\n }", "public function removeGetVar($var)\r\n {\r\n // remove variable\r\n $newGetStr = '';\r\n foreach ($_GET as $key => $value) {\r\n if ($key !== $var) {\r\n $newGetStr .= $key . '=' . $value . '&';\r\n }\r\n }\r\n // cut last &\r\n $newGetStr = substr($newGetStr, 0, -1);\r\n\r\n $arrRequestUri = explode('?', $this->getCacheSiteId());\r\n if (!$newGetStr) {\r\n return $arrRequestUri[0];\r\n } else {\r\n return $arrRequestUri[0] . '?' . $newGetStr;\r\n }\r\n }", "public function unSetValIfEmpty();", "public function pop()\n {\n $value = array_pop($this->content);\n $this->decrement();\n return $this->return($value);\n }", "protected function unsetRequestVar($var)\n {\n unset($_REQUEST[$var]);\n }", "protected function unsetGetVar($var)\n {\n unset($_GET[$var]);\n }", "function remove($key) \r\n\t{\r\n\t unset($this->vars[$key]);\r\n\t}", "public function remove($name)\n {\n if (isset($this->vars[$name])) {\n unset($this->vars[$name]);\n }\n }", "private function _getParams() {\n $this->_params = $this->_params ? array_values($this->_params) : [];\n }" ]
[ "0.6743773", "0.6548695", "0.65338796", "0.6407457", "0.6282886", "0.6245411", "0.62150526", "0.6197519", "0.6162953", "0.6072655", "0.6072012", "0.60032624", "0.59432805", "0.5911469", "0.5876065", "0.5866705", "0.5854599", "0.5828399", "0.57361346", "0.5729886", "0.57282645", "0.567005", "0.5618514", "0.56011504", "0.55908334", "0.5574255", "0.5542851", "0.55407137", "0.55078596", "0.5505898", "0.5478198", "0.5478198", "0.5471715", "0.5466934", "0.5463786", "0.54465306", "0.5426436", "0.54227316", "0.54206216", "0.5398856", "0.53975177", "0.5385322", "0.53693014", "0.5346021", "0.53139395", "0.5301547", "0.5301547", "0.52919483", "0.5287928", "0.5282117", "0.52665764", "0.5257253", "0.5256842", "0.5256379", "0.5254583", "0.5250491", "0.52355736", "0.5235282", "0.5233415", "0.52286327", "0.52286327", "0.52286327", "0.52286327", "0.52286327", "0.52248156", "0.5224799", "0.5197685", "0.51824164", "0.518002", "0.5167688", "0.516218", "0.5151919", "0.51489186", "0.5121776", "0.5120131", "0.5111979", "0.5109451", "0.51060826", "0.5102433", "0.51023424", "0.50778395", "0.5039428", "0.5029381", "0.5021876", "0.50212157", "0.50188935", "0.50150436", "0.50033957", "0.5002482", "0.49986017", "0.498522", "0.49833125", "0.49818832", "0.49775442", "0.49726275", "0.49651113", "0.49523154", "0.49487635", "0.49483657", "0.4944944" ]
0.72078884
0
Get the UUID value from the outgoing call.
Получите значение UUID из исходящего вызова.
public function getUUID() { if(isset($this->payload['params']['UUID'])) { return $this->payload['params']['UUID']; } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uuid(){\n return $this->getValue(\"uuid\");\n }", "public function getUuid() {\n\t\t$this->getData();\n\t\treturn $this->uuid;\n\t}", "public function getUuid() {\n\t\t$this->getData();\n\t\treturn $this->uuid;\n\t}", "public function getUuid();", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid(){\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid(): string\n {\n return $this->uuid;\n }", "public function getUuid()\n\t{\n\t\treturn $this->uuid;\n\t}", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUuid()\n\t{\n\t\treturn $this->get_uuid();\n\t}", "public function getUuid(): string;", "abstract protected function get_uuid();", "public function getUuid() : ?string ;", "public function getUuid($data);", "public function getUuid()\n {\n return $this->source->uuid;\n }", "public function uuid() {\n return $this->decorated->uuid();\n }", "public function getKnownUuid(): string\n {\n return $this->knownUuid;\n }", "protected function getUuidString()\n {\n return $this->uuidString ?: '';\n }", "private static function getUuid()\n\t{\n\t\t$uuid = Uuid::generate(4);\n\t\treturn $uuid->string;\n\t}", "public function getUuid() {\n return $this->getUuidFromStore();\n }", "public function asString(): string\n {\n return $this->uuid;\n }", "abstract protected function getUuidFromStore();", "public function getUuidAttribute() {\n return $this->attributes['uuid'] ?? [];\n }", "public function getId() {\n\t\treturn $this->uuid;\n\t}", "public function getId()\n {\n return $this->get('uuid');\n }", "function upnp_uuid() {\n\t\t$uuid = md5(get_interface_mac(get_real_interface(\"wan\")));\n\t\t/* put uuid in correct format 8-4-4-4-12 */\n\t\treturn substr($uuid, 0, 8) . '-' . substr($uuid, 9, 4) . '-' . substr($uuid, 13, 4) . '-' . substr($uuid, 17, 4) . '-' . substr($uuid, 21, 12);\n\t}", "public function getUuid(): ?UuidInterface\n {\n return $this->getValue();\n }", "public function resolveUuid()\n {\n if (($version = $this->resolveUuidVersion()) == 'ordered') {\n return Str::orderedUuid();\n }\n\n return call_user_func([Uuid::class, $version]);\n }", "function _gbif_participant_get_uuid($participantID, $mode = 'UUID') {\n\t$api_call = _gbif_participant_api_registry_node() . '?identifier=' . $participantID . '&identifierType=GBIF_PARTICIPANT';\n\t$json = json_decode(file_get_contents($api_call));\n\t$uuid = (!empty($json->results)) ? $json->results[0]->key : NULL;\n\n switch ($mode) {\n case 'UUID':\n return $uuid;\n case 'WEB_URL':\n return gbif_portal_base_url() . '/node/' . $uuid;\n case 'API_URL':\n return _gbif_participant_api_registry_node() . '/' . $uuid;\n }\n}", "public function uuid();", "public function uuid();", "public function getUuidPropertyName() {}", "protected function getUuid()\n {\n $cookie = !empty($this->laravel['cookie']) ? $this->laravel['cookie'] : null;\n $uuid = $this->request->cookie($this->cookieName);\n if ($cookie && empty($uuid)) {\n $uuid = (string)UUID::uuid4();\n $cookie->queue($this->cookieName, $uuid, 60*24*7); //1 semana\n }\n return $uuid;\n }", "public static function getRequestUUID()\n {\n return self::$requestUUID;\n }", "public function __toString()\n {\n return $this->uuid;\n }", "public function __toString()\n {\n return $this->uuid;\n }", "public function uuid() {}", "public function uuid() {}", "static function uuid();", "public function uuid(): string;", "public function getUuid(): string\n {\n return $this->getUsername();\n }", "public function getGuid()\n {\n $value = $this->get(self::GUID);\n return $value === null ? (string)$value : $value;\n }", "public function getUuid() {\n return $this->getCdf()->getUuid();\n }", "public function queryUUID()\n {\n // TODO: check if the database platform supports UUID generator\n $write = $this->dataSourceManager->getWriteConnection($this->id);\n $query = new UUIDQuery;\n $driver = $write->getQueryDriver();\n $sql = $query->toSql($driver, new ArgumentArray);\n return $write->query($sql)->fetchColumn(0);\n }", "public function getUserLoggedInUuid() : string\n {\n return flextype('session')->has('user_uuid') ? flextype('session')->get('user_uuid') : '';\n }", "public static function generateUUID()\n {\n try {\n return \\Ramsey\\Uuid\\Uuid::uuid4()->toString();\n } catch (\\Exception $e) {\n return nullValue();\n }\n }", "function uuid()\n {\n return (string)\\Ramsey\\Uuid\\Uuid::uuid4();\n }", "public function getGuid()\n {\n return $this->object->FiatWithdrawalRequestGuid;\n }", "public function getUsername()\n {\n return (string) $this->uuid;\n }", "public function getUid() {\n return $this->get(self::UID);\n }", "public function getUid() {\n return $this->get(self::UID);\n }", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "function uuid() {\n return \\App\\Core\\Utility\\Uuid::generate();\n }", "public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}", "public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}", "public static function uuid()\n {\n do {\n\n $uuid = uuidv4();\n $exists = User::where('uuid', $uuid)->first();\n\n } while($exists);\n\n return $uuid;\n }", "public static function get_uuid() {\n\t\t$data = openssl_random_pseudo_bytes( 16 );\n\t\t$data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100.\n\t\t$data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10.\n\n\t\treturn vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $data ), 4 ) );\n\t}", "public function getGuid()\n {\n return $this->guid;\n }", "public static function getGUIDProperty()\n {\n return 'PaystubID';\n }", "function uuid() {\n if (System::is64Bits()) {\n return Uuid::uuid1();\n }\n return Uuid::uuid4();\n }", "public function getEventAttendanceProfileId(): Uuid {\n\t\treturn ($this->eventAttendanceProfileId);\n\t}", "public function getGuid()\n {\n $this->_server->getGuid();\n }", "public function getAccountGuid()\n {\n return $this->object->AccountGuid;\n }", "static private function getUUID() {\n\n\t\t$data = random_bytes(16);\n\t $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n\t $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n\t return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "public static function generateUUID(){\n $idSql = \"SELECT uuid_generate_v4()\";\n $id = \\Phalcon\\DI::getDefault()->getDb()->fetchOne($idSql);\n $id = $id[0];\n\n return $id;\n }", "public function getUsername() {\n return $this->uuid;\n }", "function getUid()\n {\n return $this->getEmail();\n }", "public function generateUuid()\n {\n $this->uuid = $this->uuid ?: Uuid::uuid();\n }", "public function getUid(): string\n {\n return $this->uid;\n }", "public function getUid(): string\n {\n return $this->uid;\n }", "public function getGUID()\n {\n return isset($this->GUID) ? $this->GUID : null;\n }", "public function getReadableGuid() {\n return array_shift(unpack(\"H*\", $this->getGuid()));\n }", "public function getUid(): string\n {\n return $this->getId();\n }", "public function getLedgerCardId(): Uuid {\n\t\treturn ($this->ledgerCardId);\n\t}", "protected function gen_uuid() {\n\t\treturn rtrim(shell_exec(\"uuidgen\"));\n\t}", "public function getUid() {\r\n return $this->getHeader('uid');\r\n }", "protected function getVOPropertyName()\n {\n return 'uuid';\n }", "public function getDeviceId(): string\n {\n return $this->deviceId;\n }", "public function createUuid();", "public function getGuidAsBytes() : string;", "public function getGuidAsBytes() : string;", "function getUUID(){\n $data = random_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "public function getGuid()\n {\n $this->getUserDbUser();\n return $this->_guid;\n }", "public function getCallNumber()\n {\n return (string) $this->json()->call_number;\n }", "public static function get(): string\n {\n self::$randomNumberString = self::generateRandomNumber();\n return self::transformToUuid(self::$v4Segments);\n }", "public function getTransferUserId() : string\n {\n return $this->transferUserId;\n }", "protected function generateUuid(): string\n {\n $strategy = $this->uuidOptions->strategy;\n\n if (in_array($strategy, ['uuid3', 'uuid5'])) {\n return Uuid::{$strategy}(\n $this->uuidOptions->namespace,\n $this->uuidOptions->name\n );\n }\n\n return Uuid::{$strategy}();\n }", "public function getLedgerProfileId(): Uuid {\n\t\treturn ($this->ledgerProfileId);\n\t}" ]
[ "0.7031863", "0.7005515", "0.7005515", "0.69660074", "0.69078225", "0.69078225", "0.69078225", "0.69078225", "0.6885082", "0.6837989", "0.6826535", "0.6774635", "0.67529047", "0.67529047", "0.67529047", "0.67529047", "0.66634166", "0.66310436", "0.6499257", "0.64776367", "0.6353783", "0.6352696", "0.6349405", "0.631498", "0.63101065", "0.6255813", "0.6255436", "0.6246411", "0.610534", "0.6060419", "0.60376143", "0.59902936", "0.59477717", "0.5937815", "0.59121674", "0.591062", "0.5906911", "0.5906911", "0.5891164", "0.58720684", "0.5836689", "0.58360183", "0.58360183", "0.5822415", "0.5822415", "0.58163154", "0.58065665", "0.57498324", "0.57141745", "0.5663743", "0.5659684", "0.5644987", "0.5625746", "0.5621246", "0.56071424", "0.56026995", "0.55594456", "0.55594456", "0.5556038", "0.55559486", "0.5555314", "0.5555314", "0.5555314", "0.5555314", "0.55289", "0.54962146", "0.54962146", "0.5466067", "0.5455812", "0.54293674", "0.5423738", "0.5405708", "0.5394444", "0.5387438", "0.5383526", "0.5375484", "0.53682804", "0.5368219", "0.536376", "0.5362378", "0.5356537", "0.5356537", "0.5347451", "0.53472114", "0.5326718", "0.53045374", "0.5303637", "0.52992", "0.52848774", "0.5278099", "0.52668506", "0.5265948", "0.5265948", "0.5250835", "0.52491367", "0.52441067", "0.5241957", "0.5239545", "0.5234478", "0.52259415" ]
0.71131724
0
Get the Method value from the outgoing call.
Получите значение Method из исходящего вызова.
public function getMethod() { return $this->get('method'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function method() {\n return $GLOBALS['_input']->method();\n }", "public function method() {\n\t\treturn $this->getMethod();\n\t}", "function GetMethod()\n {\n return $this->_method;\n }", "public function getMethod()\n {\n return $this->_currentMethod;\n }", "public function getMethod()\n {\n return $this->get(self::METHOD);\n }", "protected function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n\t\t{ return $this->method; }", "public function getMethod()\r\n {\r\n return $this->_method;\r\n }", "public function getMethod()\n {\n return $this->getParameter('method');\n }", "public function getMethod()\r\n {\r\n return $this->method;\r\n }", "public function getMethod()\n {\n\n return $this->method;\n }", "public function getMethod() {\n return $this->method;\n }", "public function method()\n {\n return $this->method;\n }", "public function method()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->m;\n }", "public function method()\n {\n if(!isset($this->cache['method']))\n {\n $this->cache['method'] = $this->resolveMethod();\n }\n \n return $this->cache['method'];\n }", "public function getMethod() {\n return $this->_method;\n }", "public function getMethod()\n {\n return $this->_method;\n }", "public function getMethod()\n {\n return $this->_method;\n }", "public function getMethod()\n {\n return $this->_method;\n }", "public function getMethod() {\r\n\t\treturn $this->method;\r\n\t}", "public function getMethod ()\n {\n return $this->_method;\n }", "public function getMethod() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"method\");\n\t}", "public function getMethod() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"method\");\n\t}", "public function getMethod()\n {\n return $this->wrapped->getMethod();\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->realMethod;\n }", "public function getMethod() {\n return $this->methodname;\n }", "public function getMethod() {\n return $this->method;\n }", "public function getMethod() {\n return $this->method;\n }", "public function getMethod() {\n return $this->method;\n }", "public function method()\n\t{\n\t\treturn $this->method;\n\t}", "public function getMethod()\n {\n return $this->message->getMethod();\n }", "public function getMethod(){\n return $this->methodname;\n }", "public function get_method() {\n\n\t\treturn $this->method;\n\t}", "public function getMethod()\n {/*{{{*/\n return $this->method;\n }", "function method() {\n\t\treturn $this->method;\n\t}", "public static function getMethod()\n {\n return self::$requestedType;\n }", "function getMethod()\n {\n return $this->method;\n }", "public function getMethod()\n\t{\n\t\treturn $this->_method;\n\t}", "public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "function get_method()\n {\n return $this->method;\n }", "public function getMethod() {\n\t\t\treturn $this->method;\n\t\t}", "public static function getMethod(): string\n {\n return self::proxy()->getMethod();\n }", "function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "public function getMethod()\n\t\t{\n\t\t\treturn $this->method;\n\t\t}", "public function getMethod() {\n return @$this->attributes['method'];\n }", "public function getMethod() : string {\n return $this->_method;\n }", "protected function getTargetMethod()\n {\n return $this->targetMethod;\n }", "public function getMethod() : string {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "protected function method()\n {\n return $this->event['httpMethod'] ?? 'GET';\n }", "public function getMethod(): string\n\t{\n\t\treturn $this->method;\n\t}", "public function getMethod()\n {\n if (isset($this->method)) {\n $this->realMethod = $this->method;\n }\n\n if (isset($this->method) && ($this->method == 'GET' || $this->method == 'POST')) {\n return $this->method;\n }\n\n return $this->getFieldDefaultValue('method');\n }", "public function getMethod():string\n\t{\n\t\treturn $this->method;\n\t}", "public static function getMethod(): ?string\n {\n return self::$__method;\n }", "public function getMethod()\n {\n $method = $this->_method;\n if (!$method) {\n $method = parent::getMethod();\n }\n return $method;\n }", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();" ]
[ "0.7088238", "0.7021103", "0.70144314", "0.70059997", "0.69802725", "0.6978632", "0.6972939", "0.69689906", "0.69687724", "0.69412166", "0.6936075", "0.6919347", "0.6914772", "0.6914772", "0.69142425", "0.69126517", "0.6912448", "0.6887199", "0.6886376", "0.6886376", "0.6886376", "0.6884245", "0.6873334", "0.6860216", "0.6860216", "0.6851374", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68513095", "0.68435043", "0.68390346", "0.6837366", "0.6837366", "0.6837366", "0.68320733", "0.6825122", "0.68193257", "0.68089056", "0.68077844", "0.680547", "0.67942697", "0.6792398", "0.6773775", "0.6765192", "0.6765192", "0.6765192", "0.6759908", "0.6757797", "0.67495024", "0.67458767", "0.6743634", "0.671801", "0.67022794", "0.6677644", "0.6676285", "0.66689456", "0.66689456", "0.66689456", "0.66689456", "0.66689456", "0.66689456", "0.66689456", "0.66222006", "0.6619123", "0.66085064", "0.65865093", "0.65814495", "0.657422", "0.65667343", "0.6547195", "0.6547195", "0.6547195", "0.6547195", "0.6547195" ]
0.7131341
0
Get the value of one parameter in the params>Data section of the request. Or the entire Data section if no name is given.
Получите значение одного параметра в разделе params>Data запроса. Или весь раздел Data, если не указано имя.
public function getData($name=NULL) { if(isset($name)) { if(isset($this->payload['params']['Data'][$name])) { return $this->payload['params']['Data'][$name]; } } else { if(isset($this->payload['params']['Data'])) { return $this->payload['params']['Data']; } } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParameter(string $name): mixed {\n $val = null;\n if ($this->hasParameter($name)) {\n $val = $this->query[$name];\n }\n return $val;\n }", "public function getParameter($name) {\n if (!array_key_exists($name, $this->parameters))\n return null;\n else\n return $this->parameters[$name];\n }", "function getParam() {\n\t\treturn $this->getData('param');\n\t}", "public function getParameter($name)\n {\n if (isset($_REQUEST[$name])) {\n return $_REQUEST[$name];\n } else {\n return null;\n }\n }", "public function getParam($name) {\n\t\tif(isset($this->payload['params'][$name])) {\n\t\t\treturn $this->payload['params'][$name];\n\t\t}\n\t\treturn NULL;\n\t}", "public function getParameter($name);", "public function getParameter($name);", "public function getParameter($name) {\n\t\treturn TRUE === isset($this->parameters[$name]) ? $this->parameters[$name] : NULL;\n\t}", "public function getParameter($param_name, $default = null) {\n return \\Yii::$app->request->get($param_name, $default);\n }", "protected function getParam($name)\n {\n return $this->getSlim()->request->params($name, null);\n }", "function getData ($data, $default='') {\n\t\n\tif (isset($_GET[$data])) {\n\t\t$value = $_GET[$data];\n\t} elseif (isset($_POST[$data])) {\n\t\t$value = $_POST[$data];\n\t} else {\n\t\t$value = $default;\n\t}\n\n\treturn $value;\n}", "function _getRequestArgument($name)\n {\n $value = null;\n if (is_array($this->_mapperMatch)) {\n if (isset($this->_mapperMatch[$name])) {\n return $this->_mapperMatch[$name];\n }\n }\n\n $prefix = $this->_requestPrefix;\n if (isset($_REQUEST[\"$prefix$name\"])) {\n if (isset($_POST[\"$prefix$name\"])) {\n $value = $_POST[\"$prefix$name\"];\n } elseif (isset($_GET[\"$prefix$name\"])) {\n $value = $_GET[\"$prefix$name\"];\n } elseif (isset($_COOKIE[\"$prefix$name\"])) {\n $value = $_COOKIE[\"$prefix$name\"];\n } \n }\n return $value;\n }", "protected function getParam($name = '') {\n if (!empty($name) && isset($_POST[$name])) {\n return $_POST[$name];\n } else if (!empty($name) && isset($_GET[$name])) {\n return $_GET[$name];\n }\n\n return '';\n }", "function getParameter($name, $default=null) {\n\t\treturn isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default;\n\t}", "public function getParameter($name)\n {\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n }", "public static function input(string $name)\n {\n return (new static)->requestData[$name] ?? null;\n }", "public function getParam($key = '')\n {\n $formData = (array) json_decode($this->request->getRawBody());\n\n if (strlen($key) > 0 && array_key_exists($key, $formData)) {\n return $formData[$key];\n } else {\n return $formData;\n }\n }", "public function getParameter($name){\n $app = $this->app;\n $value = $app['request']->get($name);\n\n return $app->escape($value);\n\n }", "public function getParameter($name)\n {\n // init\n $this->getParameters();\n \n return $this->_response->getParameter($name);\n }", "public function getParameter(string $name)\n {\n return $this->parameters->get($name);\n }", "public function getRequestParameter($name)\r\n {\r\n if ($this->hasRequestParameter($name)) {\r\n /*return mysql_real_escape_string($_POST[$name]);*/\r\n return $_POST[$name];\r\n }\r\n\r\n return null;\r\n }", "public function getParam($name) {\n return $this->params[$name];\n }", "function getParam($name)\n {\n if (isset($_GET[$name])) {\n return $_GET[$name];\n } elseif (isset($_POST[$name])) {\n return $_POST[$name];\n } elseif (($profile = Search_Profile::getProfile(Auth::getUserID(), Auth::getCurrentProject(), 'email')) && (isset($profile[$name]))) {\n return $profile[$name];\n } else {\n return \"\";\n }\n }", "public function param($name)\n {\n return ($this->get($name) !== null)? $this->get($name) : $this->post($name);\n }", "public function getParam($name = null) {\r\t\t\tif ($name != null) \r\t\t\t\tif (array_key_exists($name, $this->_params))\r\t\t\t\t\treturn $this->_params[$name]; \r\t\t\t\telse\r\t\t\t\t\treturn false;\r\t\t\telse\r\t\t\t\treturn $this->_params;\r\t\t}", "protected function _getField($name)\n {\n return array_key_exists($name, $this->_requestData) ? $this->_requestData[$name] : null;\n }", "public function getData($param = null)\n\t{\n\t\tif(is_null($param))\n\t\t{\n\t\t\treturn $this->data;\n\t\t}\n\t\treturn (isset($this->data[$param])) ? $this->data[$param] : false;\n\t}", "protected function get_query_data( $name ) {\n\n\t\treturn $this->get_request( 'get' )->get( $name );\n\t}", "public function offsetGet(mixed $name): mixed {\n return $this->getParameter((string) $name);\n }", "public function getParam(string $name);", "public function getParam($name);", "public function getParam($name);", "protected function dataFromRequest()\n {\n return $this->httpRequest()->getParams($this->acceptedRequestData());\n }", "function getRequestParameter($name) {\n\t\t$var = $_REQUEST[$name];\n\t\tif (isset($var)) {\n\t\t\treturn $var;\n\t\t}\n\t\tglobal $HTTP_GET_VARS;\n\t\t$var = $HTTP_GET_VARS[$name];\n\t\tif (isset($var)) {\n\t\t\treturn $var;\n\t\t}\n\t\tglobal $HTTP_POST_VARS;\n\t\t$var = $HTTP_POST_VARS[$name];\n\t\tif (isset($var)) {\n\t\t\treturn $var;\n\t\t}\n\t\tglobal $HTTP_POST_FILES;\n\t\t$var = $HTTP_POST_FILES[$name];\n\t\treturn $var;\n\t}", "public function getData() {\n\t\treturn $this->params;\n\t}", "function value_from_datadict($data,$name){\n\t\tglobal $HTTP_REQUEST;\n\t\t$out = parent::value_from_datadict($data,$name);\n\t\tif(!$out){\n\t\t\t$out = PupiqAttachmentInput::_UnpackValue($HTTP_REQUEST->getPostVar(\"_{$name}_initial_\"));\n\t\t}\n\n\t\tif($HTTP_REQUEST->getPostVar(\"_{$name}_remove_\")){\n\t\t\t$out = null;\n\t\t}\n\n\t\treturn $out;\n\t}", "public function getParameter($name)\n {\n if (array_key_exists(strtolower($name), $this->parameters)) {\n return $this->parameters[strtolower($name)];\n }\n\n return $this->parentContainer->getParameter($name);\n }", "function get_parameter($name, $default=array()) {\n return !empty($this->request[$name]) ? $this->request[$name] : $default;\n }", "public function param($name) {\n\t\tif(is_array($this->params) && array_key_exists($name, $this->params)) {\n\t\t\treturn $this->params[$name];\n\t\t}\n\t}", "public function getParam($name)\n {\n return Arr::get($this->params, $name);\n }", "public static function getValue($name, $params=null){ }", "protected function getParam($name)\n {\n return isset($this->params[$name]) ? $this->params[$name] : null;\n }", "public function dataFromRequest()\n {\n return $this->httpRequest()->getParams($this->acceptedRequestData());\n }", "public function offsetGet($name)\n {\n return $this->getParam($name);\n }", "public function getData()\n {\n return $this->getRequestParams();\n }", "public function getParam();", "protected function getParam($name)\n {\n $request = $this->getRequest();\n $method = $request->getMethod();\n\n return $request->getParam(strtolower($method) . '/' . $name);\n }", "public function getParameter( $name , $default=NULL )\n {\n $name = strtolower( $name );\n return ( isset( $this->_param[ $name ] )\n ? $this->_param[ $name ]\n : $default\n );\n }", "public function offsetGet($name)\n {\n return $this->getParameter($name);\n }", "public function dataGet($name = null, $defaultValue = null) {\n\t\tif (empty($name)) {\n\t\t\treturn $this->dataGet;\n\t\t}\n\n\t\tif (isset($this->dataGet[$name])) {\n\t\t\treturn $this->dataGet[$name];\n\t\t}\n\n\t\treturn $defaultValue;\n\t}", "public function getFormParam($name)\n {\n return Arr::get($this->formParams, $name);\n }", "public function getParamByName($name)\n {\n return (array_key_exists($name, $this->params) == true) ? $this->params[$name] : null;\n }", "public function getRequestData()\n {\n return $this->getParameter('request_data') ?? $this->httpRequest->request->all();\n }", "public function getParamValue($name, $default=''){\n\t\treturn $this->_params->get( $name, $default );\t\n\t}", "public function getParamValue($name, $default=''){\n\t\treturn $this->_params->get( $name, $default );\t\n\t}", "public function getParamValue($name, $default=''){\n\t\treturn $this->_params->get( $name, $default );\t\n\t}", "public function getParam($name,$defaultValue=null)\r\n\t{\r\n\t\treturn isset($_GET[$name]) ? $_GET[$name] : (isset($_POST[$name]) ? $_POST[$name] : $defaultValue);\r\n\t}", "public function get_get_data_value($name) {\n\t\tif (isset($this->get_data[$name])) {\n\t\t\treturn $this->get_data[$name];\n\t\t}\n\t\treturn null;\n\t\t}", "function value_from_data($data, $files, $name) {\n if( array_key_exists($name,$data) )\n return $data[$name];\n return null;\n }", "public function getValue()\r\n {\r\n return leo()->getRequest()->getParam($this->getName(), parent::getValue());\r\n }", "public function getParameter($param) {\n return $this->params[$param] ?? null;\n }", "public function data()\n {\n return $_REQUEST;\n }", "public function parameter($name)\n {\n if (array_key_exists($name, $this->parameters)) {\n return $this->parameters[$name];\n } else {\n return null;\n }\n }", "public function getParam($name,$defaultValue=null)\n\t{\n\t\treturn isset($_GET[$name]) ? $_GET[$name] : (isset($_POST[$name]) ? $_POST[$name] : $defaultValue);\n\t}", "public function getParameter($param){\n\t\tif(self::$fileUpload != null ){\n\t\t\tif(array_key_exists($param,self::$fileUpload)){\n\t\t\t\treturn self::$fileUpload[$param];\n\t\t\t}\n\t\t}\n\t\t//se as verificações acima falharem, faz uma busca na\n\t\t//classe ancestral\n\t\treturn $this->request->getParameter($param);\n\t}", "public static function getData($name)\r\n\t{\r\n\t\tif(KalturaGlobalData::$dataFile == null)\r\n\t\t{\r\n\t\t\t$isInit = KalturaGlobalData::initDataFile();\r\n\t\t\tif(!$isInit)\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t\t\t\r\n\t\t$value = null; \r\n\t\t \r\n\t\tif(is_string($name) || is_integer($name))\r\n\t\t{\r\n\t\t\t$value = KalturaGlobalData::$dataFile->get($name);\r\n\t\t}\r\n\t\t\t\r\n\t\tif(empty($value)) //Empty value equals null\r\n\t\t\t$value = null;\r\n\t\t\t\t\t\t\r\n\t\treturn $value;\r\n\t}", "public function getParameter($name)\r\n {\r\n if (!$this->parameters_read)\r\n $this->_read_parameters();\r\n \r\n if (array_key_exists($name, $this->parameters))\r\n {\r\n return $this->parameters[$name];\r\n }\r\n else\r\n {\r\n throw new Exception(\"Parameter '$name' is not declared or read\", self::ERROR_MISC);\r\n }\r\n }", "public function get($name)\r\n {\r\n if (array_key_exists($name, $this->params)) {\r\n return $this->params[$name];\r\n } else {\r\n return false;\r\n }\r\n }", "protected function getParam($name, $defaultValue = null)\n {\n if ($this->request->isPost) {\n return $this->request->post($name, $defaultValue);\n } else {\n return $this->request->get($name, $defaultValue);\n }\n }", "public function getParameter()\n {\n return $this->parameter;\n }", "protected function getParameter($name, $default = null)\r\n {\r\n return ($this->hasParameter($name)) ? $this->params[$name] : $default;\r\n }", "public function getData($param = null, $default = null)\n\t{\n\t\tif(!is_array($this->get(\"data\")))\n\t\t{\n\t\t\t$this->set(\"data\", unserialize($this->get(\"data\")));\n\t\t}\n\t\tif(is_null($param))\n\t\t{\n\t\t\treturn $this->get(\"data\");\n\t\t}\n\t\treturn (isset($this->_data[\"data\"][$param])) ? $this->_data[\"data\"][$param] : $default;\n\t}", "public function getParameter($param) {\n return isset($this->params[$param]) ? $this->params[$param] : null;\n }", "public function getParam ($name, $defaultValue = null) {\r\n return isset( $_GET[$name] ) ? $_GET[$name] : (isset( \r\n $_POST[$name] ) ? $_POST[$name] : $defaultValue);\r\n }", "function getParam($name, $default = '')\n\t{\n\t\t$params = self::getParams();\n\t\treturn $params->get($name, $default);\n\t}", "public static function param($param) {\r\n\t\treturn val(self::$data, $param);\r\n\t}", "function getParameter($name) {\r\n if(isset($_POST)){\r\n return $_POST[$name];\r\n }else{\r\n return $_GET[$name];\r\n }\r\n}", "public function get($name) {\n if (isset($this->request->get[$name])) {\n return $this->request->get[$name];\n } else {\n return null;\n }\n }", "public function getParam($name)\n\t{\n\n\t\treturn $this->_params[$name];\n\n\t}", "function fetch_param ( $name, $default = null ) {\r\n\t\t# Prepare\r\n\t\thydrate_request_init();\r\n\t\t\r\n\t\t# Fetch\r\n\t\t$value = delve($_REQUEST, $name, $default);\r\n\t\t\r\n\t\t# Return value\r\n\t\treturn $value;\r\n\t}", "public function getRequestData();", "protected function getParameter($name) {\n return $this->container->getParameter($name);\n }", "public static function getParam($name)\n {\n return self::getInstance()->getParameter($name);\n }", "public function getParam($param){\n return $this->params[$param];\n }", "public function getParam($param = null);", "public static function getParam($name, $default=null)\n {\n $method = strtoupper($_SERVER['REQUEST_METHOD']);\n\n if($method == 'GET'){\n if(isset($_GET[$name])){\n return $_GET[$name];\n }\n } elseif ($method == 'POST') {\n if(isset($_POST[$name])){\n return $_POST[$name];\n }\n }\n\n return $default;\n }", "public function getByParam($data) {\n return $this->repository->getByParam($data);\n }", "public function __get($name) {\r\n return $this->params[$name];\r\n }", "public function getParameter($key)\n {\n return isset($this->params[$key]) ? $this->params[$key] : null;\n }", "function getRequestedData()\n\t\t {\n\t\t\t if($_GET && empty($_POST))\n\t\t\t\t $GetVar = $_GET ;\n\t\t\t\telse\n\t\t\t\t $GetVar = $_POST ;\n\n\t\t\t\t$GetVar = $GetVar ;\n\n\t\t\t\treturn $GetVar ;\n\t\t }", "public function getData($name = null)\r\r\n {\r\r\n if (!$name) {\r\r\n return $this->data;\r\r\n }\r\r\n\r\r\n if (isset($this->data[$name])) {\r\r\n return $this->data[$name];\r\r\n } elseif (isset($this->{$name})) {\r\r\n return $this->{$name};\r\r\n }\r\r\n\r\r\n return null;\r\r\n }", "public function getData($name);", "public function getParameter(String $parameterName) {\n\n\t\t$parameterData = $this->parameters[$parameterName] ?? '';\n\n\t\tif(is_array($parameterData) === true && count($parameterData) === 1) {\n\n\t\t\treturn $parameterData[0];\n\n\t\t}\n\n\t\treturn $parameterData;\n\n\t}", "public function getParam($name)\n {\n return $this->getParamByName($name);\n }", "function param($name) {\n return isset($_POST[$name]) ? $_POST[$name] : (isset($_GET[$name]) ? $_GET[$name] : null);\n}", "public function __get($name)\n {\n return $this->_params[$name];\n }", "protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }", "protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }", "public function getParam($name)\n {\n if(isset($this->_invokeParams[$name])) {\n return $this->_invokeParams[$name];\n }\n\n return null;\n }", "function getParams($data = 1)\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }" ]
[ "0.6745732", "0.67114", "0.6666945", "0.665019", "0.66354585", "0.6547727", "0.6547727", "0.6512533", "0.6471807", "0.646996", "0.646111", "0.63898444", "0.63864523", "0.6363745", "0.63628596", "0.6346946", "0.6316015", "0.63084084", "0.63000005", "0.62666434", "0.6253803", "0.6252449", "0.6244181", "0.6229313", "0.6220733", "0.62203306", "0.6198117", "0.61790395", "0.6173905", "0.61722803", "0.6169747", "0.6169747", "0.6166567", "0.61447084", "0.6142719", "0.614174", "0.61125726", "0.61105007", "0.60982853", "0.60965294", "0.6083819", "0.60835654", "0.6075863", "0.60725087", "0.6052671", "0.60400397", "0.603407", "0.6032529", "0.60320127", "0.6000754", "0.59992623", "0.5998256", "0.5984894", "0.59789455", "0.59789455", "0.59789455", "0.5978023", "0.5975975", "0.59699756", "0.5967372", "0.596605", "0.5962909", "0.5957949", "0.59569895", "0.5955922", "0.5955316", "0.5948002", "0.59473383", "0.59411025", "0.59391636", "0.59336", "0.5928482", "0.5925701", "0.5925497", "0.5924996", "0.59207225", "0.59136456", "0.59077793", "0.58909106", "0.5890001", "0.58843523", "0.58800924", "0.5879512", "0.58761865", "0.58716285", "0.5867345", "0.5860748", "0.58591026", "0.58501536", "0.58479625", "0.58475155", "0.58462524", "0.5843444", "0.5843052", "0.5842802", "0.5841939", "0.58362895", "0.58362895", "0.58339626", "0.5833483" ]
0.73800594
0
Get the value of one parameter in the params>Data>Attributes section of the request. Or the entire Attributes section if no name is given.
Получите значение одного параметра в разделе params>Data>Attributes запроса. Или весь раздел Attributes, если не указано имя.
public function getAttribute($name) { if(isset($this->payload['params']['Data']['Attributes'][$name])) { return $this->payload['params']['Data']['Attributes'][$name]; } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAttr($name) {\n return isset($_REQUEST[$name]) ? $_REQUEST[$name] : null;\n }", "public function get_attr($name)\r\n {\r\n return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : null;\r\n }", "public function getAttribute( $name ) {\r\n if( key_exists( $name, $this->attrs ) ) {\r\n return $this->attrs[$name];\r\n } else {\r\n return null;\r\n }\r\n }", "public function getAttribute($name) {\n return isset($this->_attrs[$name]) ? $this->_attrs[$name] : NULL;\n }", "public function getAttribute($name) {\n return ( isset($this->attributes[$name]) ? $this->attributes[$name] : null );\n }", "public function getAttribute($name)\n {\n if (!array_key_exists($name, $this->attributes)) {\n return null;\n }\n return $this->attributes[$name];\n }", "public function getAttributes()\n {\n return $this->getParameter('attributes');\n }", "public function getAttributes()\n {\n return $this->getParameter('attributes');\n }", "public function getAttribute($name) {\n\t\tif (isset($this->attributes[$name])) {\n\t\t\treturn $this->attributes[$name];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getAttribute($name)\n {\n $name = strtolower($name);\n return $this->attributes[$name] ?? null;\n }", "protected function getAttribute($name = null) \n\t\t{\n\t\t\t$returnAttr = null;\n\n\t\t\tif ($this->isEmpty($name))\n\t\t\t{\n\t\t\t\tthrow new HTML5Error(HTML5Error::EMPTY_ATTRIBUTE_NAME);\n\t\t\t}\n\t\t\tforeach($this->_attributes as $attribute) \n\t\t\t{\n\t\t\t\tif ($attribute->name === $name)\n\t\t\t\t{\n\t\t\t\t\t$returnAttr = $attribute->value;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $returnAttr;\n\t\t}", "public function getAttribute( $name ) {\n\t\t\treturn $this->attributes[strtolower((string)$name)];\n\t\t}", "function getAttributes($name) {}", "public function __get($name) {\n\t\t\tif (isset($this->param[$name])) {\n\t\t\t\treturn $this->param[$name];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new AttributeNotAllowedException(\"the attribute \" . $name . \" doesn't exist\");\n\t\t\t}\n\t\t}", "public function getAttribute($name)\n {\n if (isset($this->user['principal']['attributes'][$name])) {\n return $this->user['principal']['attributes'][$name];\n }\n throw new \\InvalidArgumentException(\"$name is not a valid attribute name\");\n }", "public function getAttribute($name)\n\t{\n\t\treturn (isset($this->attributes[(string) $name])) ? $this->attributes[(string) $name] : null;\n\t}", "public function getAttribute($name)\n\t{\n\t\tif (isset($this->_attributes[$name]))\n\t\t{\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t}", "public function getAttribute( $name ){\n\t\tif ( $this->hasAttribute( $name ) ) {\n\t\t\treturn $this->attributes[$name];\n\t\t} else\n\t\t\treturn null;\n\t}", "public function getAttribute(string $name);", "public function getAttr($name)\r\n {\r\n return isset($this->attrs[$name]) ? $this->attrs[$name] : null;\r\n }", "public function getAttribute($name)\n {\n return isset($this->attributes[$name]) ? $this->attributes[$name] : null;\n }", "protected function getAttribute($name)\n {\n $name = self::sanitizeAttributeName($name);\n if (array_key_exists($name, $this->attributes)) {\n return $this->attributes[$name];\n }\n return null;\n }", "function getAttribute($name){\n\t\tif($this->attributes[$name]) return $this->attributes[$name];\n\t\telse return false;\n\t}", "public function getAttribute ( $name = NULL ) {\n\n\t\t$returnAttr = NULL;\n\n\t\tif(GagawaUtil::gagawaIsEmpty($name)){\n\t\t\tthrow new Exception(\"Attribute name cannot \" .\n\t\t\t\t\t\t\"be empty!\");\n\t\t}\n\n\t\tforeach ( $this->attributes_ as $attribute ) {\n\t\t\tif($attribute->getName()===$name){\n\t\t\t\t$returnAttr = $attribute->getValue();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $returnAttr;\n\n\t}", "public function getAttribute(string $name)\n {\n return $this->attributes[$name] ?? null;\n }", "public function getAttr(string $name)\n\t{\n\t\tif (array_key_exists($name, $this->attrs))\n\t\t\treturn $this->attrs[$name];\n\t\telse\n\t\t\treturn null;\n\t}", "public function getAttribute($name);", "public function getAttribute($name)\n {\n return isset($this->_attributes[$name]) ? $this->_attributes[$name] : null;\n }", "public function getAttribute($name)\n {\n return isset($this->_attributes[$name]) ? $this->_attributes[$name] : null;\n }", "function getAttribute($attrib_name){\n\t\treturn $this->attribs[$attrib_name];\n\t}", "public function getAttribute($name){\n\t\tif(array_key_exists($name, $this->attribute)){\n\t\t\treturn $this->attribute[$name];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "public function getAttribute($name) {}", "function getAttribute($name){\n\t\treturn (isset($this->attributes[$name])) ? $this->attributes[$name] : FALSE;\n\t}", "public function getAttribute($name)\n {\n $attributes = $this->getAttributes();\n\n if (isset($attributes[$name])) {\n return $attributes[$name];\n }\n\n return null;\n }", "final public function getAttribute($name) {\n\t\tif ($this->attributes === null) {\n\t\t\t$this->attributes = array();\n\t\t}\n\t\tif (isset($this->attributes[$name])) {\n\t\t\treturn $this->attributes[$name];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public static function getAttrs() {\n return $_REQUEST;\n }", "function getAttribute($name, $default = null) {\n\t\treturn $this->_attributes->key($name, $default, true);\n\t}", "function getAttribute($name, $default = null) {\n return array_var($this->attributes, $name, $default);\n }", "public function getAttribute($name, $default = null)\n {\n return $this->attributes->get($name, $default);\n }", "public function getAttribute($name, $default = null)\n {\n return $this->attributes->get($name, $default);\n }", "function ideaGetValueAttribute($name, $value = null)\n{\n if (is_null($name)) {\n return $value;\n }\n\n $request = request($name);\n if (!is_null($request)) {\n return $request;\n }\n if (!is_null($value)) {\n return $value;\n }\n}", "public function __get($name)\n {\n if (array_key_exists($name, $this->_attribs)) {\n return $this->_attribs[$name];\n }\n }", "function getAttribute($element=null, $aname=null) {\r\n if ($element == null || $aname == null) { return false; }\r\n if (is_array($element) == false) { return false; }\r\n if (isset($element['ATTR']) == false) { return false; }\r\n // Loop through and find the attribute\r\n foreach($element['ATTR'] as $atts) {\r\n // If the key is found return the value\r\n if ($atts['key'] == $aname) { return $atts['val']; }\r\n }\r\n return false;\r\n}", "public function get_attr() {\n\n\t\t$defaults = array();\n\n\t\tif ( isset( $this->settings[ $this->setting ] ) )\n\t\t\t$defaults['name'] = $this->get_field_name( $this->setting );\n\n\t\treturn wp_parse_args( $this->attr, $defaults );\n\t}", "function _getRequestArgument($name)\n {\n $value = null;\n if (is_array($this->_mapperMatch)) {\n if (isset($this->_mapperMatch[$name])) {\n return $this->_mapperMatch[$name];\n }\n }\n\n $prefix = $this->_requestPrefix;\n if (isset($_REQUEST[\"$prefix$name\"])) {\n if (isset($_POST[\"$prefix$name\"])) {\n $value = $_POST[\"$prefix$name\"];\n } elseif (isset($_GET[\"$prefix$name\"])) {\n $value = $_GET[\"$prefix$name\"];\n } elseif (isset($_COOKIE[\"$prefix$name\"])) {\n $value = $_COOKIE[\"$prefix$name\"];\n } \n }\n return $value;\n }", "public function getAttribute();", "public function getAttribute($name, $default = null)\n {\n return (isset($this->attributes[$name])) ? $this->attributes[$name] : $default;\n }", "public function __get($name)\n {\n if (isset($this->attributes[$name])) {\n \n return $this->attributes[$name];\n }\n \n return null;\n }", "public function getAttribute ( $name )\n {\n if ( property_exists ( $this,$name ) )\n return $this -> $name;\n else if ( isset ( $this -> _attributes[ $name ] ) )\n return $this -> _attributes[ $name ];\n }", "public function getParameter($name)\n {\n if (isset($_REQUEST[$name])) {\n return $_REQUEST[$name];\n } else {\n return null;\n }\n }", "function __get($name)\n\t{\n\t\tif (isset($this->_attributes[$name]))\n\t\t{\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t\telse if (in_array($name, $this->attributeNames()))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn parent::__get($name);\n\t\t}\n\t}", "public function readAttribute ( $name ) {\n\n $attributes = $this->readAttributes();\n\n if(false === array_key_exists($name, $attributes))\n return null;\n\n return $attributes[$name];\n }", "function getAttribute($name);", "function getAttribute($name);", "public function __get($name)\n {\n // @TODO: Return the value from attributes with a matching $name, if it exists\n return (array_key_exists($name,$this->attributes) ? $this->attributes[$name] : \"\");\n }", "public function getAttrib($name)\n {\n if (array_key_exists($name, $this->_attribs)) {\n return $this->_attribs[$name];\n } elseif (property_exists($this, $name)) {\n return $this->$name;\n }\n }", "public function __get($name)\n {\n if (isset($this->_attributes[$name]) || array_key_exists($name, $this->_attributes)) {\n return $this->_attributes[$name];\n }\n\n if ($this->hasAttribute($name)) {\n return null;\n }\n\n return parent::__get($name);\n }", "public function __get($name)\n {\n if (array_key_exists($name, $this->attributes)) {\n return $this->attributes[$name];\n }\n\n return null;\n }", "public function readAttribute ( $name ) {\n\n if(false === $this->attributeExists($name))\n return null;\n\n return $this->_attributes[$name];\n }", "protected function getParam($name)\n {\n return $this->getSlim()->request->params($name, null);\n }", "public function getAttribute(string $name, string|RawText $default = null): string|RawText\n {\n return $this->attributes->get($name, $default);\n }", "function getAttributeValue($name)\n {\n return\n (isset($this->attributes[$name])\n ? $this->attributes[$name] : '');\n }", "public function getAttribute($name, $default = null)\n {\n return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;\n }", "public function getAttribute($name, $default = null)\n {\n return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;\n }", "public function getAttributes($nombre){\n if(isset($this->attributes[$nombre])){ \n return $this->attributes[$nombre];\n }\n else{\n return NULL;\n }\n }", "public function getAttribute ();", "public function __get($name)\n\t{\n\tif(array_key_exists($name,$this->attributes)){\n\t\treturn $this->attributes[$name];\n\t\t}\n\t\treturn null;\n\t}", "public function getAttribute($name, $default = null)\n {\n if (isset($this->attributes[$name])) {\n return $this->attributes[$name];\n }\n return $default;\n }", "private function _getAttribute( $name )\n {\n return substr( $name, 3 );\n }", "public function getParameter($name);", "public function getParameter($name);", "public function getAttr($name, $default = null)\n {\n return isset($this->attrs[$name]) ? $this->attrs[$name] : $default;\n }", "function getAttribute($name, $default = null);", "public function getAttribute($name){\n\tif(!is_string($this->__attributes[$name])){\n\t\t\tthrow new exception(\"This widget does not have an attribute of name '$name'\");\n\t\t}\n\t\treturn $this->__attributes[$name];\n\t}", "public function getParameter($name){\n $app = $this->app;\n $value = $app['request']->get($name);\n\n return $app->escape($value);\n\n }", "public function __get($name) {\n return $this->attributes[$name];\n }", "public function get_attribute( $name ) {\n\t\treturn isset( $this->attributes[ $name ] ) ? $this->attributes[ $name ] : '';\n\t}", "public function getAttribute($name, $default = null)\n {\n return $this->attributes[$name] ?? $default;\n }", "public function getAttribute($name, $default = null)\n {\n return $this->attributes[$name] ?? $default;\n }", "public function getAttribute ($name, $default = null)\n\t{\n\t\treturn ($this->hasAttribute($name)) ? $this->attributes[$name] : $default;\n\t}", "public function getAttribute($name, $default = null);", "public function getParameter($name) {\n if (!array_key_exists($name, $this->parameters))\n return null;\n else\n return $this->parameters[$name];\n }", "public function getAttribute($key)\n {\n $inAttributes = array_key_exists($key, $this->attributes);\n\n if ($inAttributes) {\n return $this->attributes[$key];\n } elseif ($key == 'attributes') {\n return $this->attributes;\n } else {\n return null;\n }\n }", "public function getAttribute(string $name, $default = null);", "public function getAttribute(string $name, $default = null);", "public function getAttribute(string $name, $default = null);", "public function getAttribute($name, $default = null)\n {\n return isset($this->data[$name]) ? $this->data[$name] : $default;\n }", "public function getAttribute(string $name, mixed $default = null)\n {\n return $this->attributes[$name] ?? $default;\n }", "public function __get( $name ) {\n\t\treturn $this->attributes[$name];\n\t}", "function PayloadAttr($attr=null){\n\t\t$data = json_decode($this->Payload);\n\t\tif( $attr && isset($data->$attr) ){\n\t\t\treturn $data->$attr;\n\t\t}\n\t}", "public function getAttribute($name)\n {\n if (isset($this->htmlAttributes[$name])) {\n return $this->htmlAttributes[$name];\n }\n\n return '';\n }", "function getAttributes() {}", "public function __get($name) {\n if (strpos($name, '_') === 0 || $name == 'attributes') {\n return $this->$name;\n }\n if (isset($this->attributes[$name])) {\n return $this->attributes[$name];\n }\n return null;\n }", "public function getAttribute($name, $function = 'plain', $type = null)\n\t{\n\t\t$values = array();\n\n\t\tforeach ($this->parameters as $parameter)\n\t\t{\n\t\t\tif ( ! $type or $type == $parameter['type'])\n\t\t\t{\n\t\t\t\tif ($name == $parameter['name'])\n\t\t\t\t{\n\t\t\t\t\t// If hadn't a type before, now it has and we will enforce it\n\t\t\t\t\t$type = $parameter['type'];\n\n\t\t\t\t\t$values[] = isset($parameter['value']) ? $parameter['value'] : null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->makeValue($name, $values, $function, $type);\n\t}", "public function getFormParam($name)\n {\n return Arr::get($this->formParams, $name);\n }", "function getParam() {\n\t\treturn $this->getData('param');\n\t}", "public function getAttribute($name, $default='')\n {\n $attrs = (array) $this->attributes();\n if (isset($attrs[$name]))\n {\n return (string) $attrs[$name];\n }\n return (string) $default;\n }", "protected function getBParamDataAttributes() {}", "public function __get($name)\n {\n return $this->attributes[$name] ?? null;\n }", "function get_atribute_by_name($name,$name_attr)\n {\n return $this->get_attribute_by_name($name,$name_attr);\n }" ]
[ "0.73048633", "0.6550146", "0.6479063", "0.6426437", "0.64106745", "0.6401654", "0.6379345", "0.6379345", "0.63743603", "0.635582", "0.6346136", "0.63444126", "0.6342159", "0.6331441", "0.6320784", "0.6300853", "0.62943536", "0.6289744", "0.6270912", "0.6268764", "0.62673914", "0.62576175", "0.6254801", "0.6238642", "0.6234263", "0.6226133", "0.6225387", "0.62162644", "0.62162644", "0.61843425", "0.61698437", "0.6160763", "0.6157502", "0.6140231", "0.6134983", "0.60961044", "0.6075939", "0.60751575", "0.6047997", "0.6047997", "0.6047414", "0.601886", "0.60169965", "0.59749293", "0.5949204", "0.5944299", "0.5937061", "0.59174496", "0.5916954", "0.59070253", "0.5887281", "0.58814526", "0.587761", "0.587761", "0.58756596", "0.5874575", "0.58697116", "0.5858423", "0.585636", "0.58525676", "0.5852482", "0.58468765", "0.58375216", "0.58375216", "0.5833805", "0.58333474", "0.5820473", "0.58087766", "0.5793921", "0.5783364", "0.5783364", "0.57799613", "0.577002", "0.5763741", "0.5762688", "0.5762236", "0.5760299", "0.5755717", "0.5755717", "0.57523257", "0.57465863", "0.57459176", "0.5737885", "0.5732823", "0.5732823", "0.5732823", "0.5728832", "0.5726574", "0.5722754", "0.5716423", "0.5709025", "0.5706936", "0.5706204", "0.5703267", "0.56929624", "0.568433", "0.56817716", "0.56815463", "0.5669179", "0.5665632" ]
0.71932155
1
Retrieve number of replies to display
Получить количество ответов для отображения
public function getNumberOfReplies() { return $this->_scopeConfig->getValue( 'comments/general/number_of_replies', ScopeInterface::SCOPE_STORE ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReplyCount() : int {\n\t\tif ( isset( $this->reply_count ) ) {\n\t\t\treturn $this->reply_count;\n\t\t}\n\t\treturn $this->getTotal( self::COUNT_SQL );\n\t}", "function forum_reply_number() {\n\n $db = SokialDB::getInstance();\n\n $number = $db->query(\"SELECT id_reply FROM forum_topics_reply\");\n $number->execute();\n $total_reply = $number->rowCount();\n\n return $total_reply;\n}", "function replyCount($topic_id){\n\t$db = new Database;\n\t$db->query('SELECT * FROM replies WHERE topic_id = :topic_id');\n\t$db->bind(':topic_id', $topic_id);\n\t//Assign Rows\n\t$rows = $db->resultset();\n\t//Get Count\n\treturn $db->rowCount();\n}", "public function Count(){\n\t\t\treturn $this->pdh->get('comment', 'count', array($this->page, $this->attach_id));\n\t\t}", "static function total_replies($query = \"\"){\n\t\t\t$total_replies = 0;\n\t\t\tif($query != \"\"){\n\t\t\t\t$result = @mysql_query($query);\n\t\t\t\twhile ($row = @mysql_fetch_array($result)) {\n\t\t\t\t\t$total_replies += $row['replies'];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $total_replies;\n\t\t}", "function lze_count_postings() {\r\n global $wpdb;\r\n $counter = 0;\r\n\t$lze_data = $wpdb->get_results(\"SELECT ID FROM wp_posts WHERE post_type = 'reply' OR post_type = 'topic'\");\r\n\t$counter = count($lze_data);\r\n return $counter;\r\n}", "public function reply_count_unread_message()\n {\n $activeUser = loggedin_role_id() . '-' . get_loggedin_user_id();\n $query = $this->db->select('id')->where(array(\n 'sender' => $activeUser,\n 'reply_status' => 1,\n 'trash_sent' => 0,\n ))->get('message');\n return $query->num_rows();\n }", "public function getMessageCount();", "public function count_mynotes()\n {\n if (empty($_SESSION['IdMember'])) return (0) ;\n $rr=$this->singleLookup(\"select SQL_CACHE count(*) as cnt from mycontacts where IdMember=\".$_SESSION[\"IdMember\"].\" and IdContact=\".$this->id);\n return($rr->cnt) ;\n }", "Public function getReplies()\n { \n return $this->replies;\n }", "public function getNbReponse()\n {\n return $this->nbReponse;\n }", "public function getCommentCount();", "public function dashboard_total_replies_for_graph() {\n\n // Load all replies for graph\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Replies)->dashboard_total_replies_for_graph();\n\n }", "public function getReplyCount($status): int\n\t{\n\t\treturn\n\t\t\t$status->reply_count ?? 0;\n\t}", "public function getReplies()\n {\n if (array_key_exists(\"replies\", $this->_propDict)) {\n return $this->_propDict[\"replies\"];\n } else {\n return null;\n }\n }", "function get_num_forum_posts()\n\t{\n\t\treturn $this->connection->query_value('messages','COUNT(*)');\n\t}", "public function replies()\n {\n return $this->hasMany('App\\Post')\n ->withCount('likes')\n ->orderBy('likes_count', 'desc')\n ->with('user')\n ->withConversations(4)\n ->withLikes();\n }", "function getResponseCount()\r\n {\r\n $hResponses =& xhelpGetHandler('responses');\r\n $crit = new Criteria('ticketid', $this->getVar('id'));\r\n return $hResponses->getCount($crit);\r\n }", "public function getMessageCount()\n {\n return count($this->request('GET'));\n }", "function chat_messages_count($lastrequest = false)\n{\n $user_guid = elgg_get_logged_in_user_guid();\n\n\t$options = array(\n 'type' => 'object',\n 'subtype' => 'chat_message',\n 'count' => true,\n 'relationship' => 'unread',\n 'relationship_guid' => $user_guid,\n 'inverse_relationship' => true);\n \n if($lastrequest != false){\n\t\t$options['created_time_lower'] = $lastrequest;\n\t\t$options['created_time_upper'] = time();\n }\n\n return elgg_get_entities_from_relationship($options);\n\n}", "public function repliedTicketsCount(){\n\t\treturn $this->repliedTickets()->count('a.id');\n\t}", "public function getCount()\n\t{\n\t\treturn (int) get_option( 'gs_messages_per_page' );\n\t}", "public function getReplies()\n {\n return $this->replies;\n }", "function we_rest_total_constacts_count() {\n global $wpdb;\n\n return (int) $wpdb->get_var( \"SELECT count(id) FROM {$wpdb->prefix}wcfn_contact\" );\n}", "public function getFollowerCount();", "public function count()\n {\n return count($this->messages);\n }", "public function count()\n {\n return count($this->messages);\n }", "function get_responses_count(){\n\t\tglobal $conn;\n\t\t$responses_query=$conn->prepare('SELECT * from response where form_id = ? order by `timestamp` asc');\n\t\t$responses_query->bind_param('s',$this->id);\n\t\t$responses_query->execute();\n\t\t$results=$responses_query->get_result();\n\t\treturn $results->num_rows;\n\t}", "public function count()\n {\n return $this->messages->count();\n }", "public function getFollowingCount();", "public function getNotifCount()\n {\n $currentUser = Auth::user()->username;\n $notifications = DB::table('friendrequests')\n ->where('receiver', '=', $currentUser)\n ->count();\n echo $notifications;\n }", "public function getNbUnreadMessages();", "public function count()\n {\n return count($this->_messages);\n }", "public function countNewsCommentResponses() {\n\t\t$objectTypeID = $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', 'de.codequake.cms.news.comment');\n\n\t\t$sql = 'SELECT COUNT(*) AS count\n\t\t\tFROM wcf' . $this->dbNo . '_comment_response\n\t\t\tWHERE commentID IN (\n\t\t\t\tSELECT commentID\n\t\t\t\tFROM wcf' . $this->dbNo . '_comment\n\t\t\t\tWHERE\tobjectTypeID = ?\n\t\t\t)';\n\t\t$statement = $this->database->prepareStatement($sql);\n\t\t$statement->execute(array($objectTypeID));\n\t\t$row = $statement->fetchArray();\n\n\t\treturn $row['count'];\n\t}", "function post_get_post_reply_amount($tid)\n{\n\tglobal $db, $DBOP;\n\treturn $db->get_number_of_rows('posts', array($DBOP['='], 'tid', $tid));\n}", "function Chat_tbl_app_chat_Discussion_Posted_Counter() \n {\n $q = \"SELECT COUNT( _id ) AS n\n FROM `tbl_app_chat` \n WHERE (\n _to != '-999'\n AND _to != ''\n )\n AND _frm = '\".$_REQUEST['session_id'].\"'\n AND _to = '0'\";\n \n $res = mysql_query($q);\n $num_rows = mysql_num_rows($res);\n if ($num_rows)\n {\n $row = mysql_fetch_array($res);\n $val = $row['n'];\n return $val;\n }\n else\n {\n return \"\";\n }\n \n }", "public function getReplies()\n {\n return $this->getChild('replies');\n }", "private function getMyQuestionsTotalReplies($con,$q_id){\n $sql = \"SELECT COUNT(*) AS totalCount FROM `reply` WHERE `q_id` ='$q_id'\";\n $query = $con->query($sql);\n if($query){\n $row = $query->fetch_assoc();\n return number_format($row['totalCount'],0,\"\",\",\");\n }\n}", "public function getMessagesCount(): int\n {\n return $this->messagesCount;\n }", "function GetNumPosts(){\n\t}", "public function notificationscount(){\n $count = count(\\Notice::text()->unread());\n return $count;\n }", "public function unreadNotificationsCountAction()\n {\n $em = $this->get('doctrine_mongodb')->getManager();\n \n // устанавливаем текущего пользователя\n $user = $this->container->get('security.context')->getToken()->getUser();\n \n $notifications = $em->createQueryBuilder('NotificationBundle:Notification')\n ->field('owner.$id')->equals(new \\MongoId($user->getId()))\n ->field('readed')->equals(False)\n ->getQuery()->execute(); \n \n return $this->render('NotificationBundle:Default:unread_notifications_count.html.twig', array('notifications' => $notifications));\n }", "function Chat_tbl_app_chat_Discussion_All_User_Posted_Counter() \n {\n $q = \"SELECT COUNT( _id ) AS n\n FROM `tbl_app_chat` \n WHERE (\n _to != '-999'\n AND _to != ''\n )\n AND _to = '0'\";\n \n $res = mysql_query($q);\n $num_rows = mysql_num_rows($res);\n if ($num_rows)\n {\n $row = mysql_fetch_array($res);\n $val = $row['n'];\n return $val;\n }\n else\n {\n return \"\";\n }\n \n }", "public function count_entries()\n {\n return $this->link->count_entries($this);\n }", "function CountUnread(){\n\t $stmt = \"SELECT `c_id` FROM conversation WHERE `user1`='\".$this->user1.\"' OR `user2`='\".$this->user1.\"'\";\n\t $query = $this->db->query($stmt);\n\t if($query->num_rows()>0){\n\t $results = $query->result_array();\n\t $c = 0;\t\n\t foreach($results as $r){\n\t\t\t$c_id = $r['c_id'];\n\t\t\t\n\t\t\t$query_for_conv = $this->db->get_where('conversation_reply',array('user_id_fk !='=>$this->user1,'c_id_fk'=>$c_id,'status'=>0));\n\t\t\t$count = $query_for_conv->num_rows();\n\t\t\t\n\t\t\t$c = $c + $count;\n\t\t}\n\t\treturn $c;\t\n\t }\n\t \n\t return 0;\n\n\t}", "public function getNumComments() {\n $sql = 'select count(*) as NumComments from T_COMMENT';\n $result = $this->executeRequest($sql);\n $line = $result->fetch(); // Result always return 1 line\n return $line['NumComments'];\n }", "function nb_reponse_by_topic($id_topic){\r\n$req = mysql_query(\"\r\nSELECT COUNT(*) as cpt \r\nFROM f_reponse\r\nWHERE \r\nID_topic='\".$id_topic.\"'\r\n\");\r\n$row = mysql_fetch_array($req);\r\n$nb = $row['cpt']; \r\nreturn $nb;\r\n}", "public function count()\n {\n return count($this->body);\n }", "public static function number_of_comments(){\n ?>\n <a href=\"<?php comments_link(); ?>\">\n <?php\n comments_number(\n __( 'No comments', 'pinkbutterflies' ),\n '1 ' . __( 'comment', 'pinkbutterflies' ),\n '% ' . __( 'comments', 'pinkbutterflies' )\n );\n ?>\n </a>\n <?php\n }", "public function getNbCommentAdmin()\n {\n $db = $this->dbConnect();\n $req = $db->query('SELECT posts.title AS title, COUNT(comments.id) AS nb_comments, posts.content AS content, posts.id AS post_id, posts.creation_date AS creation_date_fr \n FROM posts\n LEFT JOIN comments ON comments.post_id = posts.id\n GROUP BY posts.id');\n return $req;\n }", "function getreplies($id)\n{\n global $smfserver, $smfusername, $smfpassword, $smfdb;\n\n $rows = getrows('smf_messages');\n // The plus three is because there are some skipped ID_MSG's, so it wasn't looking at the highest numbers\n $rows = $rows + 3;\n\n $con = mysql_connect($smfserver, $smfusername, $smfpassword);\n if (!$con)\n die('Could not connect: ' . mysql_error());\n \n mysql_select_db($smfdb);\n \n $count = 0;\n $found = 0;\n while ($count <= $rows)\n {\n $QUERY = mysql_query(\"SELECT * FROM smf_messages WHERE ID_MSG = $count\");\n $DATA = mysql_fetch_array($QUERY);\n \n if (($DATA['ID_TOPIC'] == $id) && ($DATA['ID_MSG'])) \n $found++;\n \n $count++; \n }\n \n mysql_close($con);\n \n // Because the algorithm above counted the thread itself, and we need only replies\n $found--;\n\n return ($found);\n}", "public function countMessage()\n {\n return $this->db->count_all_results('tbl_contact');\n }", "public function sendCount();", "public function get_reply_of_reply( $rplcr_no ) {\n\n\n \t\t\t\t\n\n \t\t\t\t// initialize the reply/\n \t\t\t\t$res=selectV1( \n\t\t \t \t\t\"*\", \n\t\t \t \t\t'fs_plcm_reply',\n\t\t \t \t\tarray(\"replied_no\"=>$rplcr_no),\n\t\t \t \t\t\"ORDER BY plcr_no ASC\"\n\t \t \t\t);\n\n\n\n\n\n\n\n\n\n\t \t \t\t// $reply[0] = $res;\n\t \t \t\t// $reply[0][2]['ul_li'] = 1; \n\n\t \t // \t\tfor ($i=0; $i < count($res) ; $i++) { \n\t \t // \t\t\t// echo \" $i reply <br>\";\t\n\t\t\t\t\t// $plcr_no = $res[$i]['plcr_no']; // first reply id distribute.\n\n\t\t\t\t\t// foreach ($res[$i] as $key => $value) {\n\t\t\t\t\t// \t echo $key.\" => \".$value.'<br>';\n\t\t\t\t\t// }\n\n\n\n\t \t // \t\t} \n\n \t\t\t\t// print_r($res);\n \t\t\t\t// echo \"total reply for plcrno = $rplcr_no is \".count($res).'<br>';\n\n\n\n\n\n \t\t\t\t// $rplcr_no == 1 ;\n \t\t\t\t// $_SESSION['old_plcr_no'] == 0; \n\n\n \t\t\t\t// if ( $rplcr_no == $_SESSION['old_plcr_no']) {\n \t\t\t\t\t \n \t\t\t\t// \t // add ++ li and ul\n\n \t\t\t\t// }else { \n\n \t\t\t// \t\t// pass the rplcr_no to session of old_plcr_no\n \t\t\t\t// \t// return the 1 li and ul\n \t\t\t\t// }\n \t\t\t \t\n \t\t\t\t\n\n\n \t\t\t\t// // echo 'total reply is = '.count($res);\n \t\t\t\treturn $res;\n \t\t\t}", "function getAnswerCount()\n\t{\n\t\treturn $this->getOrderingElementList()->countElements();\n\t}", "public function getNumberPosts()\r\n {\r\n $sql = 'select count(*) as nbPosts from T_BILLET';\r\n $result = $this->executeRequest($sql);\r\n $line = $result->fetch(); // Le résultat comporte toujours 1 ligne\r\n return $line['nbPosts'];\r\n }", "public function getNotificationCount() {\n\t\t$this->DB->build( array( 'select' => '*', \n\t\t\t'from' => $this->settings['perscom_database_requests'], \n\t\t\t'where' => 'status=\"Pending\"' ) );\n\n\t\t// Execute the DB query\n\t\t$result = $this->DB->execute();\n\n\t\t// Return the number of notifications\n\t\treturn $result->num_rows;\n\t}", "public function replies($optional = [])\n {\n return $this->apiCall('get', '/im.replies');\n }", "function getMessageNumber()\n {\n return (count($this->_message));\n }", "public function getFollowingCount()\n {\n return $this->request('GET', '/followings/count');\n }", "public function postsCount(){\n\t\treturn $this->query(\"\t\t\n\t\tSELECT COUNT(*) AS nbrOfPosts\n\t\tFROM articles\");\t\t\n }", "function get_comments_number() {\n\tglobal $entry;\n\treturn $entry['comment_count'];\n}", "public function unread_count(){\n \t$message_model = M('Messages');\n \t$unread_messages = $message_model->where(array('to_user_id'=>$_SESSION['login_user']['id']))->count();\n \t\n \techo $unread_messages;\n \n }", "public function getMessageCount()\n {\n $count = $this->guestManager->getMessageCount();\n return $count['CNT'];\n }", "public function getReply()\n\t{\n\t\tContactbookMessage::getReplies();\n\t}", "public function countComments()\n {\n $db = DB::conn();\n $count = $db->row(\"SELECT COUNT(*) as count FROM comment\n WHERE thread_id = ?\", array($this->id));\n return $count['count'];\n }", "public function countPublishComment() {\n $sql = 'SELECT count(*) as nbComments from comments WHERE publish = 1';\n $result = $this->executeRequest($sql) ;\n $line = $result->fetch() ;\n return $line['nbComments'] ; \n }", "public function count()\n {\n return $this->getContent()->count();\n }", "public function count() {\n\t\t$count = $this->client->llen(\"queue:{$this->name}:messages\");\n\t\treturn $count;\n\t}", "public function count()\n {\n $this->connection->survive($this->folder);\n\n return imap_num_msg($this->connection->getStream());\n }", "function getForumNbPosts($idForum){\n include(__ROOT__.'includes/bddConnect.php');\n \n $threads = getForumThreads($idForum);\n $count = count($threads);\n $nb = 0;\n \n for($i = 0; $i < $count; $i++){\n \n $req = $bdd->prepare('SELECT COUNT(*) AS nb FROM forums_messages WHERE idThread=? ');\n $req->execute(array($threads[$i]['id']));\n \n if($donnees = $req->fetch()){\n $nb += $donnees['nb'];\n }\n \n $req->closeCursor();\n \n }\n \n return $nb;\n \n}", "public function replies()\n {\n return $this->hasMany(Reply::class)->latest();\n }", "public function replies()\n {\n return $this->hasMany(Reply::class)->latest();\n }", "public function getFollowerCount()\n {\n return $this->request('GET', '/followers/count');\n }", "function wct_talks_pagination_count() {\n\techo wct_talks_get_pagination_count();\n}", "public function countAnswers() {\n return $this->_answers->count();\n }", "public function getMessagesCount()\n {\n $count = 0;\n foreach ($this->data['messages'] as $domain => $messages) {\n $count += count($messages);\n }\n\n return $count;\n }", "public function getNotificationCount(){\n \t$user_id=$this->Auth->user('username');\n \t// In a controller or table method.\n\t\t$query = $articles->find('all', ['conditions' => ['userId'=>$user_id,'seen'=>0]]);\n\t\t$number = $query->count();\n\t\t//return $number;\n \t \n }", "public function getTotalMessageCount(): ?int;", "public function get_notification_count()\n\t{\n\t\t$not_tot = get_notify_countByUser();\n\t\tif($not_tot != 0)\n\t\t{\n\t\t echo '<span class=\"m-nav__link-badge m-badge m-badge--danger noti_count\" id=\"badge\">'.$not_tot.'<span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t echo \"\";\n\t\t}\n\t}", "public function comments_count_func() {\n global $post, $structure;\n $post = $this->single;\n setup_postdata($post);\n $num = get_comments_number(0, 1, '%');\n return $num;\n }", "public function getTotalReplies($topic_id)\r\n {\r\n $this->db->query('SELECT * FROM replies WHERE topic_id = ' . $topic_id);\r\n $rows = $this->db->resultset();\r\n return $this->db->rowCount();\r\n }", "public function adminCountLinksGrid(){\n\t\t$query = \"SELECT COUNT(id) FROM links\";\n\t\treturn $this->getField($query);\n\t}", "public function count()\n {\n return $this->ids === null\n ? $this->imap->count()\n : count($this->ids);\n }", "public function getNotesCount()\n {\n return $this->notesCount;\n }", "function sf_linked_topic_post_count()\n{\n\tglobal $wp_query;\n\n\t$result = '';\n\t$postid = $wp_query->post->ID;\n\t$checkrow = sf_blog_links_postmeta('read', $postid, '');\n\n\tif($checkrow)\n\t{\n\t\t# link found for this post\n\t\t$keys = explode('@', $checkrow->meta_value);\n\t\t$result = sf_get_posts_count_in_topic($keys[1]);\n\t}\n\techo $result;\n\treturn;\n}", "public function numberOfItems() {\n return db_query('SELECT COUNT(mqid) FROM {messaging_store} WHERE name = :name', array(':name' => $this->name))->fetchField();\n }", "function getNumComments($moderated=false) {\n\t\t$sql = \"SELECT count(*) FROM \".prefix('comments');\n\t\tif (!$moderated) {\n\t\t\t$sql .= \" WHERE `inmoderation`=0\";\n\t\t}\n\t\t$result = query_single_row($sql);\n\t\treturn array_shift($result);\n\t}", "public function replies($optional = [])\n {\n return $this->apiCall('get', '/mpim.replies');\n }", "function get_user_message_count() {\n $userID = $this->Session->read('User.id');\n $countUnread = $this->Inbox->find('count',array('conditions' => array('Inbox.status' => '0', 'Inbox.to_id' => $userID)));\n \n if($countUnread>0)\n return $countUnread;\n else\n return '0';\n }", "public function replies()\n {\n\n return $this->hasMany(Reply::class)->latest();\n }", "public function countUnread();", "function count_messages($dbc, $user_id) {\n\n $s = $dbc->query(\"SELECT COUNT(*) AS message_number FROM comments where user_id=$user_id\");\n $result = $s->fetch_array(MYSQLI_ASSOC);\n\n return $result['message_number'];\n}", "public function getThreadCount()\n {\n return Comment::find()->select(['thread'])->where([\n 'model' => self::COMMENT_FOR,\n 'parent_id' => $this->id,\n 'status' => Comment::STATUS_APPROVED,\n ])->distinct()->count();\n }", "public function getThreadsCount()\n {\n return $this->db->fetch_atom(\n \"SELECT count(*)\n FROM club_discussion\n WHERE FK_CLUB = $this->group_id\"\n );\n }", "public function getMsgCount()\n {\n return $this->count(self::MSG);\n }", "abstract public function getPostCount();", "public function getDBCount()\n\t{\n\t\tif(!isset($this->response['user_ids']) OR !strlen($this->response['user_ids']))\n\t\t{\n\t\t\t$this->response['user_ids'] = (string) get_option( 'gs_fake_users' );\n\t\t}\n\n\t\t$query = sprintf('\n\t\t\tSELECT COUNT(*) FROM %1$s as c\n\t\t\tWHERE c.comment_parent IN(%2$s)\n\t\t\tAND c.comment_type = \\'message\\'\n\t\t\tAND c.trash=0\n\t\t\tAND c.draft=0\n\t\t\tORDER BY c.comment_date DESC',\n\t\t\t$this->db->comments,\n\t\t\tmysql_real_escape_string($this->response['user_ids'])\n\t\t);\n\t\treturn $this->db->get_var($query);\n\t}", "private function getNotificationCount(){\n\t\t$notificationCount = $this->model->notificationCount($this->sid);\n\t\treturn $notificationCount['COUNT(read_status)'];\n\t}", "public function countAllComments(){\n $comments = count($this->comments);\n $replies = count($this->replies);\n $userComments = $comments + $replies;\n return $userComments;\n }" ]
[ "0.78894436", "0.73385125", "0.7068024", "0.69236535", "0.6840969", "0.6832649", "0.67978096", "0.6719049", "0.6698079", "0.6667101", "0.6627292", "0.66083324", "0.6594059", "0.65918136", "0.6564117", "0.6531002", "0.65179443", "0.651758", "0.6517172", "0.649602", "0.6473178", "0.6470399", "0.64576036", "0.64297307", "0.6402852", "0.6401163", "0.6401163", "0.63988864", "0.6388749", "0.6388556", "0.63869894", "0.63725054", "0.6362024", "0.63490504", "0.63485867", "0.634555", "0.63398904", "0.630338", "0.62885326", "0.6288141", "0.6270007", "0.6259647", "0.6258923", "0.6257505", "0.6252073", "0.62509835", "0.622993", "0.62288594", "0.62266576", "0.6210369", "0.6209196", "0.6206406", "0.62022454", "0.61968964", "0.6193292", "0.61822635", "0.6169975", "0.6153177", "0.6147084", "0.61320657", "0.61316323", "0.61247087", "0.6124368", "0.6123938", "0.61132795", "0.61111677", "0.61096054", "0.61069", "0.6104638", "0.6101918", "0.61011297", "0.6097929", "0.6097929", "0.60941076", "0.6081884", "0.6065081", "0.60609543", "0.6054424", "0.60540414", "0.6052269", "0.6048557", "0.60407156", "0.6040112", "0.6037243", "0.6037172", "0.60348755", "0.60334814", "0.60334367", "0.6032968", "0.60275656", "0.60248625", "0.6021995", "0.60194033", "0.60184616", "0.600814", "0.60081065", "0.6005912", "0.6003377", "0.5998778", "0.5975522" ]
0.7879084
1
Gets the cell in the price table that contains the price for this ingredient.
Получает ячейку в таблице цен, содержащую цену для этого ингредиента.
protected function getPriceCell() { return new PriceCell(self::PRICE_TABLE_ROW_NUM, self::PRICE_TABLE_COL_NUM); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrice()\n {\n $currency = $this->getCurrency();\n $priceColumn = \"price_\".$currency;\n\n return $this->$priceColumn;\n }", "public function getPrice()\n {\n return $this->_fields['Price']['FieldValue'];\n }", "public function getPrice()\n\t{\n\t\t$column = self::COL_PRICE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getPrice() \n {\n return $this->_fields['Price']['FieldValue'];\n }", "public function getPrice()\n {\n return $this->source['real_price'];\n }", "public function getPrice()\n {\n return $this->_get(self::KEY_PRICE);\n }", "public function price()\n {\n // Defer to the quantity presenter\n return $this->entity->quantity->present()->price;\n }", "public function getPrice()\n {\n if ($this->_calculatePrice || !$this->getData('price')) {\n return $this->getPriceModel()->getPrice($this);\n } else {\n return $this->getData('price');\n }\n }", "public function getPrice()\n {\n $price = Products::find()->select(['Price'])->where(['Id'=>$this->product])->asArray()->one();\n return $price['Price'];\n }", "public function getPriceAttribute()\n {\n // Uses today date\n $date = Carbon::today();\n\n $price = $this->Prices()->whereDate('date_start', '<=', $date)->whereDate('date_end', '>=', $date)->first();\n if ($price !== null) {\n return $price->value;\n }\n }", "public function getItemPrice()\n {\n return $this->itemPrice;\n }", "public function price()\n {\n return $this->get('price');\n }", "public function get()\n {\n return $this->price;\n }", "public function GetPrice(){\n\t\treturn $this->Price;\n\t}", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice() {\n return $this->price;\n }", "public function getPrice() {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->safeGet('price');\n }", "public function price()\n {\n return $this->price;\n }", "public function getPrice() {\n\t\treturn $this->price;\n\t}", "public function getPrice() {\n\t\treturn $this->price;\n\t}", "public function getPrice() {\n\t\treturn $this->price;\n\t}", "public function getPrice() {\n return $this->price;\n }", "public function getPrice() {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n\t{\n\t\treturn $this->price;\n\t}", "public function getPrice()\n\t{\n\t\treturn $this->price;\n\t}", "public function getPrice()\n\t{\n\t\treturn $this->price;\n\t}", "public function price()\n {\n return $this->_price;\n }", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPricePoint() { return $this->pricePoint; }", "public function getPrice()\n {\n return $this->_price;\n }", "public function getPrice()\n {\n return $this->_price;\n }", "function getPrice() {\n\t\t\t$record_id = FSInput::get('id');\n\t\t\tif(!$record_id)\n\t\t\t\treturn -1;\n\t\t\t$query = \" SELECT price, discount\n\t\t\t\t\t\tFROM fs_products \n\t\t\t\t\t\tWHERE id = $record_id\n\t\t\t\t\t\t \";\n\t\t\tglobal $db;\n\t\t\t$db -> query($query);\n\t\t\t$rs = $db->getObject();\n\t\t\t\n\t\t\treturn array($rs->price,$rs -> discount);\n\t\t}", "public function getPrice()\n {\n return isset($this->Price) ? $this->Price : null;\n }", "public function price()\n {\n return $this->price_dollars;\n }", "public function price()\n {\n return $this->price_dollars;\n }", "public function price()\n\t{\n\t\treturn $this->isFrozen() ? $this->price : $this->compute_price();\n\t}", "function getPrice(){\n\t\treturn $this->price;\n\t}", "public function calPrice() {\n\t\treturn $this->price;\n\t}", "function getPriceObj(){\n \t\treturn $this->price;\n \t\n }", "public function getTableValue()\n {\n return $this->PriceModification * -1;\n }", "function getPrice()\r\n\t{\r\n\t\treturn $this->_price;\r\n\t}", "public function getPriceValue()\n {\n return $this->price_value;\n }", "public function get_price()\n {\n return $this->fee->amount;\n }", "public function getGoodsPrice()\n {\n return $this->goods_price;\n }", "public function getGoodsPrice()\n {\n return $this->goods_price;\n }", "public function getGoodsPrice()\n {\n return $this->goods_price;\n }", "public function getCell() {return $this->_cell;}", "abstract public function getPrice();", "abstract public function getPrice();", "function item_price($id) {\n return $this->get_item($id,'price');\n }", "public function calculateCost()\n {\n // Used 'like' due to the format of the sample data\n $productPrice = Product::where('name', 'like', $this->ingredients . '%')->orderBy('price', 'asc')->first()->price;\n\n return $productPrice;\n }", "protected function getPrice() {\n\t\treturn method_exists( $this->product, 'get_price' ) ? $this->product->get_price() : '';\n\t}", "public function get_price()\n {\n return $this->format($this->data['line_subtotal'] / $this->get_quantity());\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function getPriceId()\n {\n return $this->priceId;\n }", "public function getPrice(){\n }", "public function getPriceEach()\n {\n return $this->priceEach;\n }", "public function price()\n\t{\n\t\treturn $this->core->round($this->price);\n\t}" ]
[ "0.71225154", "0.6759141", "0.6758368", "0.6739091", "0.66514516", "0.66075695", "0.6595988", "0.6552465", "0.65171415", "0.64511114", "0.6418368", "0.6411609", "0.63858545", "0.6383639", "0.6375516", "0.6368775", "0.6368775", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63590336", "0.63499343", "0.63493264", "0.6341962", "0.6341962", "0.6341962", "0.6317674", "0.6317674", "0.6311952", "0.62975335", "0.62975335", "0.62975335", "0.6267832", "0.6265674", "0.6265674", "0.6265674", "0.6260888", "0.6247099", "0.62367785", "0.6226061", "0.6226061", "0.6224202", "0.6218447", "0.6205428", "0.6205428", "0.6203951", "0.62011546", "0.6158874", "0.61268145", "0.611567", "0.6072544", "0.6063233", "0.605019", "0.60420483", "0.60420483", "0.60420483", "0.60345787", "0.6019547", "0.6019547", "0.6012843", "0.60114115", "0.5993843", "0.59818286", "0.59782547", "0.5966917", "0.5957067", "0.59546757", "0.5953002" ]
0.8093637
0
function to create table that the current auth and refresh tokens will be stored in
функция для создания таблицы, в которую будут храниться текущие токены аутентификации и обновления
function sw_create_table(){ global $wpdb; $table_name = $wpdb->prefix . 'sw_creds'; $charset_collate = $wpdb->get_charset_collate(); //crete table query $sql = "CREATE TABLE $table_name ( id mediumint(9) NOT NULL PRIMARY KEY AUTO_INCREMENT, auth_token text NOT NULL, refresh_token text NOT NULL ) $charset_collate;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createTable() {\n\t\ttry {\n\t\t\t$driver = $this->pdo->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\t\t\tif (!isset(self::CREATE_TABLE[$driver])) {\n\t\t\tthrow new OAuthClientException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'The database driver %s is not supported',\n\t\t\t\t\t$driver\n\t\t\t\t)\n\t\t\t);\n\t\t\t}\n\t\t\t$this->pdo->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION );\n\t\t\t$sql = self::CREATE_TABLE[$driver];\n\t\t\t$this->pdo->exec($sql);\n\t\t} catch(\\Exception $e) {\n\t\t\tthrow new OAuthClientException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Unable to create the token storage table : %s',\n\t\t\t\t\t$e->getMessage()\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\ttry {\n\t\t\t $sql = \"CREATE UNIQUE INDEX oauth_session_index ON oauth_session(session, provider)\";\n\t\t\t $this->pdo->exec($sql);\n\t\t} catch(\\Exception $e) {\n\t\t\tthrow new OAuthClientException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Unable to create the token storage table index : %s',\n\t\t\t\t\t$e->getMessage()\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "protected function createTable()\n {\n YII_DEBUG && Yii::trace(\"Creating access token table '{$this->getTableName()}'\", 'oauth2.storage.accesstoken');\n $this->getDb()->createCommand()->createTable($this->getTableName(), array(\n 'AccessToken' => 'string NOT NULL PRIMARY KEY',\n 'ClientId' => 'string NOT NULL',\n 'UserId' => 'string',\n 'Expires' => 'TIMESTAMP NOT NULL',\n 'Scope' => 'text',\n ));\n }", "private function create(){\n try {\n Capsule::schema()->create(\n 'pandi_token_table',\n function ($table) {\n /** @var \\Illuminate\\Database\\Schema\\Blueprint $table */\n $table->increments('id');\n $table->text('token');\n $table->string('token_type');\n $table->date('expires_at')->nullable();\n $table->timestamps();\n }\n );\n } catch (\\Exception $e) {\n echo \"Unable to create table: {$e->getMessage()}\";\n } \n }", "public static function create_auth_table()\n\t{\n\t\t$db = Database::instance();\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS \".self::$auth_table.\" ( \".\n\t\t\t\t\t\"id int(11) NOT NULL auto_increment, \".\n\t\t\t\t\t\"user_id int(11) NOT NULL, \".\n\t\t\t\t\t\"system_information int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"configuration_information int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"system_commands int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"all_services int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"all_hosts int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"all_service_commands int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"all_host_commands int(11) NOT NULL default '0', \".\n\t\t\t\t\t\"PRIMARY KEY (id), \".\n\t\t\t\t\t\"KEY user_id (user_id));\";\n\t\t$db->query($sql);\n\t}", "function _createauthtable(){\n\t\t\tswitch ($this->app->config->item('rsauth_dbdriver','rsauth')){\n\t\t\t\tcase 'mysql':\n\t\t\t\t\t$this->app->db->query(\"CREATE TABLE \".$this->app->config->item('rsauth_table','rsauth').\" (\".\n\t\t\t\t\t\"username VARCHAR(50) NOT NULL DEFAULT '',\".\n\t\t\t\t\t\"password VARCHAR(32) NOT NULL DEFAULT '',\".\n\t\t\t\t\t\"PRIMARY KEY(username),\".\n\t\t\t\t\t\"KEY (username))\");\n\t\t\t\t\tlog_message('debug','rsauth table created');\n\t\t\t\t\t$this->app->db->query(\"INSERT INTO \".$this->app->config->item('rsauth_table','rsauth').\n\t\t\t\t\t\t\t\t\t\t\"(username, password) VALUES('\".$this->app->config->item('rsauth_adminuser','rsauth').\n\t\t\t\t\t\t\t\t\t\t\"','\".md5($this->app->config->item('rsauth_adminpassword','rsauth')).\"')\");\n\t\t\t\t\tlog_message('debug','rsauth admin data is set');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog_message('error','No auth table creation script for the database driver: '.\n\t\t\t\t\t\t\t\t$this->app->config->item('rsauth_dbdriver','rsauth'));\n\t\t\t}\n\t\t}", "function process_zs_auth_token($table_name, $request){\n if (Schema::hasTable($table_name)){\n $insertArr = array();\n $insertArr['organization_id'] = $request->organization_id;\n $insertArr['create_time'] = date('Y-m-d H:i:s');\n $insertArr['access_token'] = $request->zs_access_token;\n\n DB::table($table_name)->insert($insertArr);\n $msg = \"Table created and Saved Successfully!\";\n }\n }", "function sw_insert_auth_row($auth_token, $refresh_token){\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'sw_creds';\n\t\t//first delete any existing tokens \n\t\tsw_clear_tokens();\n\t\t//insert new auth and request token\n\t\t$wpdb->insert($table_name, array('id' => '', 'auth_token' => $auth_token, 'refresh_token' => $refresh_token));\n\t}", "private function createTable(){\n\t\t$request = \"CREATE TABLE IF NOT EXISTS \".$this->db_table.\" \n\t\t\t(\tid\t\tINT(11)\t\tUNSIGNED\t\tNOT NULL \tAUTO_INCREMENT,\n\t\t\t\tsession \tTEXT \t\t\t\t\tNOT NULL,\n\t\t\t\ttimestamp \tTEXT \t\t\t\t\tNOT NULL,\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8;\";\n\t\t$this->smapi_conn->query($request);\n\t\t// Insert 3 dummy sessions for PC, XBOX and PS4 to DB.\n\t\t$this->smapi_conn->query(\"INSERT INTO \".$this->db_table.\" (session, timestamp) VALUES ('', '0'), ('', '0'), ('', '0');\");\n\t\t$this->createSession();\n\t}", "function create_table() {\n\n\t\twp_schedule_event( time(), 'hourly', 'api_hourly_sync' );\n\n \tglobal $wpdb;\n \t$charset_collate = $wpdb->get_charset_collate();\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\n $table_name = $wpdb->prefix . 'api_twitter';\n $sql = \"CREATE TABLE $table_name (\n id BIGINT(20) NOT NULL,\n tweet text,\n added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n created_at TIMESTAMP NOT NULL,\n updated_at TIMESTAMP NOT NULL,\n user_id BIGINT(22) NOT NULL,\n user_name varchar(26) NOT NULL,\n user_handle varchar(26) NOT NULL,\n \t\tuser_image varchar(130) NOT NULL,\n user_location varchar(130) NOT NULL,\n hidden BOOLEAN NOT NULL,\n \t\tUNIQUE KEY id (id)\n \t) $charset_collate;\";\n\n dbDelta( $sql );\n\n\t\treturn true;\n\n\t}", "public function tableCreate()\n {\n $path = get_home_path();\n\n global $wpdb;\n\n require_once( $path . '/wp-admin/includes/upgrade.php');\n\n $table_name_api = $this->get_api_table();\n $table_name_social = $this->get_social_table();\n\n $charset_collate = $wpdb->get_charset_collate();\n\n\n $api = \"CREATE TABLE $table_name_api (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n api_name text NOT NULL,\n api_key mediumtext NOT NULL,\n api_secret mediumtext NOT NULL,\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\n\n $social = \"CREATE TABLE $table_name_social (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n social_source text NOT NULL,\n social_content_type text NOT NULL,\n social_title text NOT NULL,\n social_geo text NOT NULL,\n social_url longtext NOT NULL,\n social_api_key mediumtext NOT NULL,\n social_api_secret mediumtext NOT NULL,\n social_api_name text NOT NULL,\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\n\n dbDelta( $api );\n dbDelta( $social );\n\n}", "private function CreateTable() {\n\t\t$qry_tbl = \"CREATE TABLE IF NOT EXISTS `{$this->session_table}` (\n\t\t\t`id` varchar(100),\n\t\t\t`time` int(11),\n\t\t\t`data` text,\n\t\t\t`ip` varchar(15),\n\t\t\t`uagent` varchar(255),\n\t\t\tPRIMARY KEY(`id`)\n\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8\";\n\t\t$this->db->query($qry_tbl);\n\t}", "public static function create_tables()\n {\n }", "public function prepare_database() {\n // Create the users table\n $sql = $this->conn->prepare(\"CREATE TABLE IF NOT EXISTS `\" . $this->database_connection['db_users_table'] . \"` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` text NOT NULL, `password` text NOT NULL, `data` text NOT NULL, `active` int(11) NOT NULL DEFAULT '1', `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;\");\n if(!$sql->execute()) {\n return false;\n }\n // Create the user's tokens table\n $sql = $this->conn->prepare(\"CREATE TABLE IF NOT EXISTS `\" . $this->database_connection['db_tokens_table'] . \"` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Irrelevant - Only exists to make sure each column is unique', `user` text NOT NULL, `token` text NOT NULL, `expiration` bigint(11) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=88 ;\");\n if(!$sql->execute()) {\n return false;\n }\n // Create the API credentials table\n $sql = $this->conn->prepare(\"CREATE TABLE IF NOT EXISTS `\" . $this->database_connection['db_api_table'] . \"` (`id` int(11) NOT NULL AUTO_INCREMENT, `api_key` text NOT NULL, `api_secret` text NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;\");\n if(!$sql->execute()) {\n return false;\n }\n return true;\n }", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".$this->getTableName().\"` ( \".\n \"`cfg_id` INT(11) NOT NULL DEFAULT '1', \".\n \"`cfg_access_token` VARCHAR(255) NOT NULL DEFAULT '', \".\n \"`cfg_login_name` VARCHAR(255) NOT NULL DEFAULT '', \".\n \"`cfg_api_key` VARCHAR(255) NOT NULL DEFAULT '', \".\n \"`cfg_timestamp` TIMESTAMP, \".\n \"PRIMARY KEY (`cfg_id`) \".\n \" ) ENGINE=MyIsam DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\";\n $database->query($SQL);\n if ($database->is_error()) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "function createClientTable()\n {\n $attributes = \"\n id INT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n uuid VARCHAR(255) NOT NULL,\n name VARCHAR(100) NOT NULL,\n type ENUM ('admin', 'user') DEFAULT 'user',\n is_blocked TINYINT(4) DEFAULT 1,\n created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n \";\n\n (new dbConnection())->upTable(\"auth_clients\", $attributes);\n }", "function create_table()\n {\n }", "function create_table()\n {\n }", "function create_table(){\n\t\t$tables = array();\n\t\t/**\n\t\t* Table structure for table 'documents'\n\t\t*/\n\t\n\t\t$fields = array(\n\t\t\tarray(\"user_access_identifier\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"\t,\"key\"),\n\t\t\tarray(\"user_access_client\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"user_access_domain\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"\t\t,\"key\"),\n\t\t\tarray(\"user_access_browser\"\t\t\t\t,\"varchar(255)\"\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"user_access_platform\"\t\t\t,\"varchar(50)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"user_access_ip_address\"\t\t\t,\"varchar(15)\"\t\t,\"\"\t\t\t,\"default ''\"\t\t,\"key\"),\n\t\t\tarray(\"user_access_reverse_dns_lookup\"\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"user_access_referer\"\t\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"\t\t,\"key\"),\n\t\t\tarray(\"user_access_accept_language\"\t\t,\"varchar(10)\"\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"user_access_user_identifier\"\t\t,\"integer\"\t\t\t,\"NOT NULL\"\t,\"default '-1'\"\t\t,\"key\"),\n\t\t\tarray(\"user_access_session_identifier\"\t,\"varchar(50)\"\t\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"user_access_referal_qstring\"\t\t,\"text\"\t\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"user_access_bot_name\"\t\t\t,\"varchar(50)\"\t\t,\"\"\t\t\t,\"default ''\")\n\t\t\t\n\t\t);\n\t\t$primary =\"user_access_identifier\";\n\t\t$tables[count($tables)] = array(\"user_access\", $fields, $primary);\n\n\t\t$fields = array(\n\t\t\tarray(\"access_log_owner\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"access_log_client\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"access_log_date\"\t\t\t\t,\"datetime\"\t\t\t,\"NOT NULL\"\t,\"default '0000-00-00 00:00:00'\"),\n\t\t\tarray(\"access_log_url\"\t\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"\"),\n\t\t\tarray(\"access_log_query_string\"\t\t,\"text\"\t\t\t\t,\"\"\t\t\t,\"\"),\n\t\t\tarray(\"access_log_type\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\")\n\t\t);\n\t\t\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"user_access_log\", $fields, $primary);\n\n\t\t$fields = array(\n\t\t\tarray(\"access_ip\"\t\t\t,\"varchar(15)\"\t,\"NOT NULL\"\t,\"default '0.0.0.0'\"\t,\"key\"),\n\t\t\tarray(\"access_country\"\t\t,\"varchar(2)\"\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"user_access_ip_lookup\", $fields, $primary);\n\t\t\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"low_ip\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"high_ip\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"country_code\"\t,\"varchar(2)\"\t\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"user_access_ip_2_country\", $fields, $primary);\n\t\t\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"tld\"\t\t\t\t,\"varchar(5)\"\t\t,\"NOT NULL\"\t,\"default ''\"\t,\"key\"),\n\t\t\tarray(\"country\"\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"fips104\"\t\t\t,\"varchar(5)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"iso2\"\t\t\t,\"varchar(5)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"iso3\"\t\t\t,\"varchar(5)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"isono\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"capital\"\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"region\"\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"currency\"\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"currencycode\"\t,\"varchar(5)\"\t\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary =\"tld\";\n\t\t$tables[count($tables)] = array(\"user_access_countries\", $fields, $primary);\n\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"referal_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"\t,\"key\"),\n\t\t\tarray(\"referal_url\"\t\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary =\"referal_identifier\";\n\t\t$tables[count($tables)] = array(\"user_access_referals\", $fields, $primary);\n\t\t\n\t\treturn $tables;\n\t}", "private function create_tables() {\n\t\tglobal $psts;\n\n\t\t$table = self::$table;\n\n\t\t// Stripe table schema.\n\t\t$table = \"CREATE TABLE $table (\n\t\t blog_id bigint(20) NOT NULL,\n\t\t\tcustomer_id char(20) NOT NULL,\n\t\t\tsubscription_id char(22) NULL,\n\t\t\tPRIMARY KEY (blog_id),\n\t\t\tUNIQUE KEY ix_subscription_id (subscription_id)\n\t\t) DEFAULT CHARSET=utf8;\";\n\n\t\t// We can continue only if upgrade is not disabled.\n\t\tif ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) || ! DO_NOT_UPGRADE_GLOBAL_TABLES ) {\n\t\t\t// Make sure we have dbDelta function.\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t\t// Using dbDelta we won't break anything.\n\t\t\tdbDelta( $table );\n\n\t\t\t// Modify stripe customers table, if we have latest version.\n\t\t\tif ( version_compare( $psts->version, '3.5.9.3', '>=' ) ) {\n\t\t\t\t// Handle failed upgrades.\n\t\t\t\t$this->upgrade_table_indexes();\n\t\t\t}\n\t\t}\n\t}", "function create_assign_vaults_table(){\n $table_name = \"zv_assign_vaults\";\n $fields = array();\n if (!Schema::hasTable($table_name)){\n\n $fields[] = array('name' => 'user_id', 'type' => 'text');\n $fields[] = array('name' => 'chambers', 'type' => 'mediumtext');\n $fields[] = array('name' => 'secrets', 'type' => 'mediumtext');\n \n $response = $this->createTable($table_name, $fields);\n }\n\n }", "private function createTable() {\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t// check if table exist, if not create table\n\t\t\t$table_name = $wpdb->prefix . \"psp_monitor_404\";\n\t\t\tif ($wpdb->get_var( \"show tables like '$table_name'\" ) != $table_name) {\n\n\t\t $sql = \"CREATE TABLE IF NOT EXISTS \" . $table_name . \" (\n\t\t\t\t\t\t`id` INT(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t`hits` INT(10) NULL DEFAULT '1',\n\t\t\t\t\t\t`url` VARCHAR(200) NULL DEFAULT NULL,\n\t\t\t\t\t\t`referrers` TEXT NULL DEFAULT NULL,\n\t\t\t\t\t\t`user_agents` TEXT NULL DEFAULT NULL,\n\t\t\t\t\t\t`data` TIMESTAMP NOT NULL DEFAULT current_timestamp\n\t\t\t\t\t\tPRIMARY KEY (`id`),\n\t\t\t\t\t\tUNIQUE INDEX `uniq_urls` (`url`)\n\t\t\t\t\t);\";\n\t\t //`deleted` SMALLINT(1) NULL DEFAULT '0',\n\n\t\t require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n\t\t dbDelta($sql);\n\t\t\t}\n\t\t}", "function createClientKeysTable()\n { \n\n $attributes = \"\n id INT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n name VARCHAR(100) NOT NULL,\n auth_client_id INT(20) UNSIGNED NOT NULL,\n client_key VARCHAR(255) NOT NULL,\n is_blocked TINYINT(4) DEFAULT 1,\n created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n \";\n (new dbConnection())->upTable(\"auth_client_keys\", $attributes);\n }", "protected function _construct()\n\t{\n\t\t$table = $this->_addTable('twitter');\n\t\t$table->addColumn('id', 'int(11) NOT NULL auto_increment');\n\t\t$table->addColumn('username', 'varchar(255) NOT NULL');\n\t\t$table->addColumn('twitter_user_id', 'int(11) NOT NULL');\n\t\t$table->addColumn('token', 'varchar(255) NOT NULL');\n\t\t$table->addColumn('token_secret', 'varchar(255) NOT NULL');\n\t\t$table->addColumn('updated_at', 'datetime NOT NULL default \\'0000-00-00 00:00:00\\'');\n\t\t$table->addColumn('created_at', 'datetime NOT NULL default \\'0000-00-00 00:00:00\\'');\n\t}", "private function createTable()\r\n\t{\r\n\t\t\r\n\t}", "private function _createRegSignalTable()\n {\n //crea la tabla reg_signal si no existe\n $this->connection->exec(\"\n CREATE TABLE IF NOT EXISTS reg_user (\n user TEXT PRIMARY KEY,\n pass TEXT\n )\n \");\n\n \n //crea la tabla reg_signal si no existe\n $this->connection->exec(\"\n CREATE TABLE IF NOT EXISTS reg_signal (\n Id INTEGER PRIMARY KEY,\n user TEXT,\n nombre TEXT,\n autor TEXT,\n fecha TEXT,\n tamano INTEGER,\n descr TEXT,\n clasific TEXT,\n refSenial TEXT,\n tipoSenial TEXT,\n matSenial TEXT,\n kilometraje TEXT,\n cantHombres TEXT,\n estado TEXT,\n fechaConstr TEXT\n )\n \");\n }", "public function setup()\n {\n $this->oApp->getDB()->createTable('UserAuth', \"UserID INTEGER UNSIGNED NOT NULL,\nAuthToken VARCHAR(255) NOT NULL,\nLastUseTime TIMESTAMP NOT NULL,\nINDEX Unique_UserAuth(UserID, AuthToken)\");\n }", "public function CreateNewTable()\r\n {\r\n //Create simple a table from php script for account and profile storage:\r\n $table = \"CREATE TABLE accountTable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\r\n accountNumber INT(12),\r\n firstName VARCHAR(50) NOT NULL,\r\n lastName VARCHAR(50) NOT NULL,\r\n username VARCHAR(50) NOT NULL,\r\n password VARCHAR(100) NOT NULL,\r\n permissions VARCHAR(8))\";\r\n \r\n //Table creation exception handler:\r\n if ($this->databaseConn->query($table) === true)\r\n {\r\n echo \"Created new table successfully.\";\r\n }\r\n else\r\n {\r\n echo \"Error creating table: \" . $this->databaseConn->error;\r\n }\r\n\r\n return $table;\r\n }", "private function createAPIKeyTable() {\n try {\n $this->query(\n 'CREATE TABLE \"apikeys\"\n (\n \"service\" varchar(64) NOT NULL,\n \"key\" varchar(256) NOT NULL,\n PRIMARY KEY (\"service\")\n )'\n );\n\n echo \"APIKey database table successfully created.\\n\\n\";\n }\n\n // Table exists, do nothing\n catch (\\PDOException $e) {}\n }", "public function createtables(){\r\n\t\t\techo \"Ha llegao al crear tablas\";\r\n\t\t\t$this->createTableUser();\r\n\t\t}", "protected function createTable()\n {\n $schema = $this->db->createSchema();\n $schema->create($this->table)\n ->int('id')->increment()\n ->varchar('key', 255)\n ->int('start')\n ->int('ttl')\n ->text('value')\n ->primary('id');\n\n $this->db->query($schema);\n }", "public function initTable($conn){\n $sql = \"CREATE TABLE IF NOT EXISTS $this->userTable (\n id INTEGER(6) AUTO_INCREMENT PRIMARY KEY,\n username VARCHAR(30) NOT NULL,\n email VARCHAR(50) NOT NULL UNIQUE,\n password VARCHAR(30) NOT NULL\n )\";\n if ($conn->query($sql) === TRUE) {\n // echo \"Table created successfully<br>\";\n } else {\n echo \"Error creating table: \" . $conn->error;\n }\n }", "public function run()\n {\n DB::table('tokens')->insert([\n 'token' => '6dbfba62471fa1c2ee88a03fb619b117',\n 'user_id' =>1,\n 'expires_at' => '2029-06-18 20:23:02',\n 'created_at' => '2019-05-19 20:23:02',\n 'updated_at' => '2019-05-19 20:23:02'\n ]);\n DB::table('tokens')->insert([\n 'token' => '88ead18ce57eda1e109111c38f67a64b',\n 'user_id' =>2,\n 'expires_at' => '2029-06-18 20:23:02',\n 'created_at' => '2019-05-19 20:23:02',\n 'updated_at' => '2019-05-19 20:23:02'\n ]);\n }", "public function gamedev__create_tables() {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t\tglobal $wpdb;\n\t\t\tglobal $charset_collate;\n\n\t\t\t/*\n\t\t\t// Call this manually as we may have missed the init hook.\n\t\t\t$this->gamedev__register_table_name();\n\n\t\t\t$sql_create_table1 = \"CREATE TABLE {$wpdb->gamedev_}\n\t\t\t(\n\t\t\t\tID bigint(190) auto_increment,\n\t\t\t\tgetstories bigint(255),\n\t\t\t\tcreatepost bigint(255),\n\t\t\t\tcreatepage bigint(255),\n\t\t\t\tstorypersist bigint(255),\n\t\t\t\tdeletedefault bigint(255),\n\t\t\t\tnotifydismiss bigint(255) NOT NULL DEFAULT 1,\n\t\t\t\tnewnotify bigint(255) NOT NULL DEFAULT 1,\n\t\t\t\tnotifymessage MEDIUMTEXT,\n\t\t\t\tstorytimestylepak varchar(255) NOT NULL DEFAULT 'default',\n\t\t\t\tPRIMARY KEY (ID),\n\t\t\t\tKEY getstories (getstories)\n\t\t\t) $charset_collate; \";\n\t\t\tdbDelta( $sql_create_table1 );\n\t\t\t*/\n\t\t}", "function create_users_table($conn)\r\n{\r\n$conn->query(\"CREATE TABLE IF NOT EXISTS users (\r\n\tid INT PRIMARY KEY AUTO_INCREMENT,\r\n\tlogin VARCHAR(255) UNIQUE,\r\n\tmail VARCHAR(255) UNIQUE,\r\n\tgroupe VARCHAR(20),\r\n\tpassword VARCHAR(255),\r\n\ttoken VARCHAR(255))\");\r\n}", "public function run()\n {\n App\\Token::insert([\n [\n 'name' => 'Bitcoin',\n 'type' => 'token',\n 'ticker' => 'BTC',\n 'base' => 'BTC',\n 'address' => 'default_address',\n 'withdrawal_fee' => '0.002',\n 'withdraw_stat' => '1',\n 'deposit_stat' => '1',\n 'image' => config('app.url').'/bitcoin.svg',\n 'created_at' => now(),\n 'updated_at' => now(),\n 'circulation'=> '8million',\n 'description'=> null,\n 'url'=> null,\n 'white_paper'=> null,\n ],\n [\n 'name' => 'Ethereum',\n 'type' => 'token',\n 'ticker' => 'ETH',\n 'base' => 'ETH',\n 'address' => 'default_address',\n 'withdrawal_fee' => '0.002',\n 'withdraw_stat' => '1',\n 'deposit_stat' => '1',\n 'image' => config('app.url').'/ethereum.svg',\n 'created_at' => now(),\n 'updated_at' => now(),\n 'circulation'=> '7milllion',\n 'description'=> null,\n 'url'=> null,\n 'white_paper'=> null,\n ],\n [\n 'name' => 'Test Token',\n 'type' => 'token',\n 'ticker' => 'TTK',\n 'base' => 'ETH',\n 'address' => 'default_address',\n 'withdrawal_fee' => '0.002',\n 'withdraw_stat' => '1',\n 'deposit_stat' => '1',\n 'image' => config('app.url').'/ethereum.svg',\n 'created_at' => now(),\n 'updated_at' => now(),\n 'circulation'=> '7milllion',\n 'description'=> null,\n 'url'=> null,\n 'white_paper'=> null,\n ],\n [\n 'name' => 'Two Token',\n 'type' => 'token',\n 'ticker' => 'TWK',\n 'base' => 'ETH',\n 'address' => 'default_address',\n 'withdrawal_fee' => '0.002',\n 'withdraw_stat' => '1',\n 'deposit_stat' => '1',\n 'image' => config('app.url').'/ethereum.svg',\n 'created_at' => now(),\n 'updated_at' => now(),\n 'circulation'=> '7milllion',\n 'description'=> null,\n 'url'=> null,\n 'white_paper'=> null,\n ],\n ]);\n }", "function setupTable()\r\n\t{\r\n\t\tif(!sql::TableExists(dkpPointsHistoryTableEntry::tablename)) {\r\n\t\t\t$tablename = dkpPointsHistoryTableEntry::tablename;\r\n\t\t\tglobal $sql;\r\n\t\t\t$sql->Query(\"CREATE TABLE `$tablename` (\r\n\t\t\t\t\t\t`id` INT NOT NULL AUTO_INCREMENT ,\r\n\t\t\t\t\t\t`user` INT NOT NULL,\r\n\t\t\t\t\t\t`award` INT NOT NULL,\r\n\t\t\t\t\t\t`guild` INT NOT NULL,\r\n\t\t\t\t\t\tPRIMARY KEY ( `id` ),\r\n KEY `user` (`guild`,`user`,`award`),\r\n KEY `award` (`award`)\r\n\t\t\t\t\t\t) TYPE = innodb;\");\r\n\t\t}\r\n\t}", "public function __construct()\n {\n $this->pdo = new PDOAdapter('sqlite:'.__DIR__.'/../database.sqlite');\n $sql = '\n CREATE TABLE IF NOT EXISTS oauth_tokens (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n scopes TEXT NOT NULL,\n sub TEXT NULL,\n issuer TEXT NOT NULL,\n jti TEXT NOT NULL,\n expires_at DATETIME NOT NULL,\n issued_at DATETIME NOT NULL,\n revoked INTEGER DEFAULT 0,\n last_used_at DATETIME NULL,\n created_at DATETIME NULL,\n updated_at DATETIME NULL\n )\n ';\n\n // Create database at initialization\n $this->pdo->rawSql($sql);\n }", "public function createUserToken() {\n //get a new token\n $token = $this->_generate_token();\n //get an experation date for the token. For now it is a year.\n $tokenexp = date('Y-m-d H:i:s', strtotime('+1 year'));\n //check to see if the user has logged in with their password.\n if($this->verified) {\n //now setup query to pass token and exp date to db query.\n $sql = \"UPDATE `RamUsers` SET token = :token, token_exp = :token_exp WHERE user = :user\";\n $this->db->query($sql);\n //bind info to query\n $this->db->bind(':token', $token);\n $this->db->bind(':token_exp', $tokenexp);\n $this->db->bind(':user', $this->user);\n $this->db->execute();\n\n //Return user info based on login.\n return array('id'=>$this->id,'user'=>$this->user,'token'=> $token,'name'=>$this->name);\n }\n else {\n //failure message if user is not password verified.\n return array('result'=>'Fail', \"message\" => \"User password not verified\");\n }\n }", "public static function createTable()\n {\n }", "function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name\t= $this->make_table_name();\n\n\t\t// check that table already exist\n\t\t$table = $wpdb->get_var(\n\t\t\t$wpdb->prepare( \"SHOW TABLES LIKE '$table_name'\", \"%s\" )\n\t\t);\n\n\t\tif ( $table !== $table_name ) {\n\n\t\t\t// create table\n\t\t\t$sql = \"CREATE TABLE {$table_name} (\n\t\t\t\tid \t\t\t\tint \t\t NOT NULL AUTO_INCREMENT,\n\t\t\t\tuser_id\t \t\tvarchar(255) NOT NULL,\n\t\t\t\tprimary_pages \tvarchar(255),\n\t\t\t\tcustom_pages \tvarchar(255),\n\t\t\t\ttags \t\t\tvarchar(255),\n\t\t\t\tcategories \t\tvarchar(255),\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t);\";\n\n\t\t\t// execute statement\n\t\t\t$stat = $wpdb->query( $sql );\n\t\t}\n\t}", "function _wpsc_create_visitor_table() {\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\tglobal $wpdb;\n\tglobal $charset_collate;\n\n\t$sql = 'CREATE TABLE IF NOT EXISTS '. $wpdb->wpsc_visitors .' ('\n\t\t\t.'id bigint(20) unsigned NOT NULL AUTO_INCREMENT, '\n\t\t\t.'user_id bigint(20) unsigned DEFAULT NULL , '\n\t\t\t.'last_active timestamp NULL DEFAULT NULL, '\n\t\t\t.'expires timestamp NULL DEFAULT NULL, '\n\t\t\t.'created timestamp NULL DEFAULT NULL, '\n\t\t\t.'PRIMARY KEY ( `id` ), '\n\t\t\t.'KEY user_id ( `user_id` ), '\n\t\t\t.'KEY expires ( `expires` ), '\n\t\t\t.'KEY last_active ( `last_active` ), '\n\t\t\t.'KEY created ( `created` ) '\n\t\t\t.') '. $charset_collate;\n\n\tdbDelta( $sql );\n\n\t_wpsc_create_well_known_visitors();\n}", "function cratetable($tablename){\r\n //conect to DB\r\n $this->dbconnect();\r\n $qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\r\n userid int(11) NOT NULL auto_increment,\r\n useremail varchar(50) NOT NULL default '',\r\n password varchar(50) NOT NULL default '',\r\n userlevel int(11) NOT NULL default '0',\r\n PRIMARY KEY (userid)\r\n )\";\r\n $result = mysql_query($qry) or die(mysql_error());\r\n return;\r\n }", "private function define_tables()\n {\n }", "function cratetable($tablename){\n\t\t//conect to DB\n\t\t$this->dbconnect();\n\t\t$qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\n\t\t\t id int(11) NOT NULL auto_increment,\n\t\t\t useremail varchar(50) NOT NULL default '',\n\t\t\t password varchar(50) NOT NULL default '',\n\t\t\t userlevel int(11) NOT NULL default '0',\n\t\t\t PRIMARY KEY (userid)\n\t\t\t)\";\n\t\t$result = mysql_query($qry) or die(mysql_error());\n\t\treturn;\n\t}", "private function createUserTable()\n {\n $sql = 'CREATE TABLE IF NOT EXISTS ' . self::USER_TABLE . '\n (\n `id` INT(11) NOT NULL AUTO_INCREMENT,\n `username` VARCHAR(64),\n `password` VARCHAR(64),\n PRIMARY KEY (`id`)\n );';\n $this->query($sql);\n }", "public function Create() : void {\n $q = \"CREATE TABLE `{$this->table}` (\n `ctid` int(11) NOT NULL,\n `date` datetime DEFAULT current_timestamp(),\n `comment` text DEFAULT NULL,\n `expires` datetime DEFAULT NULL,\n PRIMARY KEY (`ctid`),\n UNIQUE KEY `ctid_UNIQUE` (`ctid`)\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Stores whitelist CTIDs';\";\n $this->Query($q);\n \n $q = \"CREATE TABLE `{$this->logtable}` (\n `date` datetime NOT NULL DEFAULT current_timestamp(),\n `ctid` int(12) DEFAULT NULL,\n `action` varchar(20) DEFAULT NULL,\n `metadata` text DEFAULT NULL,\n KEY `ctid` (`ctid`),\n KEY `idx_userlog_date` (`date`)\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n $this->Query($q);\n }", "function create_db_table(){\n $shabbos_tablestructure = array(\n \"zipcode\" => array(\"varchar(5) not null\",\"zipcode\"),\n \"candlelighting_date\" => array(\"DATE\",\"Date of lighting candles\"),\n \"candlelighting\" => array(\"varchar(80) not null\",\"Time of Candlelighting\"),\n \"parsha\" => array(\"varchar(80) not null\",\"Parsha\")\n );\n\n $req = Sql_Query(sprintf('select table_name from information_schema.tables where table_schema = \"'.$GLOBALS['database_name'].'\" AND table_name=\"%s\"', $this->shabbos_tablename));\n if (! Sql_Fetch_Row($req)) {\n Sql_create_Table ($this->shabbos_tablename,$shabbos_tablestructure);\n }\n\n }", "public function token_provider() {\n\t\t$test_data = array();\n\t\t//loop for auto create\n\t\tfor ($i = 0; $i < 10; $i++) {\n\t\t\t$test_data[][] = array('token' => sha1(time()));\n\t\t}\n\t\t \n\t\treturn $test_data;\n\t}", "public static function tableName()\n {\n return 'auth_token_user';\n }", "private function create_user_table(){\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS Users (\n\t\t\tid INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\tfirstName VARCHAR(256),\n\t\t\tlastName VARCHAR(256),\n\t\t\temail VARCHAR(256),\n\t\t\tusername VARCHAR(256),\n\t\t\tpassword VARCHAR(256) \n\t\t\t)\";\n\t\t\t$this->query_exec($sql);\t\t \t\n\t\t}", "public static function resume_info_tables(){\n global $table_prefix;\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n $tblname = 'resume_review';\n $wp_track_table = $table_prefix . \"$tblname \";\n\n $sql_query_to_create_table = \"CREATE TABLE IF NOT EXISTS \". $wp_track_table .\"(\n resume_id INT(11) NOT NULL AUTO_INCREMENT,\n resume VARCHAR(500) NOT NULL,\n file_url VARCHAR(150) NOT NULL,\n deal_id VARCHAR(11) NOT NULL,\n user_id INT(11) NOT NULL,\n admin_review VARCHAR(500) NOT NULL,\n PRIMARY KEY (id)\n ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1\"; /** sql query to create table */\n dbDelta($sql_query_to_create_table);\n\n }", "private function create_temp_table() {\n global $DB;\n\n $create = static::get_create_table_sql('tmp_connect_enrolments', 'CREATE TEMPORARY TABLE');\n $DB->execute($create, array('?'));\n\n $alter = static::get_alter_table_sql('tmp_connect_enrolments');\n $DB->execute($alter);\n }", "public function create_table( ) {\n\t\t$this->table_obj = $this->glue->make_temp_table( $this->table_obj );\n\n\t\t$this->table = $this->table_obj->get_name();\n\t\t$this->table_id_obj->set_name( $this->table );\n\t\t\n\t\treturn $this->table; \n\t\t\n\t}", "private function createDatabaseStructure() {\n\t\t$sql = \"\ncreate table account (\n id int auto_increment not null,\n email VARCHAR(255),\n password VARCHAR(255),\n realname VARCHAR(255),\n groups VARCHAR(255),\n timedate timestamp default CURRENT_TIMESTAMP,\n lastseen timestamp,\n status char(1),\n primary key(id),\n unique index(email)\n);\n\ncreate table page (\n id int auto_increment not null,\n title VARCHAR(255),\n primary key(id),\n unique index(title)\n);\n\ncreate table page_version (\n id int auto_increment not null,\n page_id int not null,\n account_id int not null,\n content VARBINARY(100000000),\n commitcomment VARCHAR(255),\n read_permission VARCHAR(255),\n timedate timestamp default CURRENT_TIMESTAMP,\n primary key(id)\n);\n\t\t\";\n\t}", "public static function rdv_create_table_function();", "public function addNewTokenRefresh() {\n if ($this->checkAuth()) {\n// $this->load->view('common/header');\n// $this->load->view('common/navigation');\n $data = $this->mToken->getSubCounter();\n print_r($data);\n// $this->load->view('addNewTokenTable', $data);\n// $this->load->view('common/footer');\n }\n }", "private function createTable(): void\n {\n $this->db\n ->createCommand()\n ->createTable(\n $this->historyTable,\n [\n 'version' => 'varchar(' . MigrateController::MAX_NAME_LENGTH . ') NOT NULL PRIMARY KEY',\n 'apply_time' => 'integer',\n ]\n )\n ->execute();\n $this->db\n ->createCommand()\n ->insert(\n $this->historyTable,\n [\n 'version' => MigrateController::BASE_MIGRATION,\n 'apply_time' => time(),\n ]\n )\n ->execute();\n }", "public function createTable() {\n\n $sql = \"CREATE TABLE IF NOT EXISTS `bk_color_codes` (\n\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t`name` varchar(30) NOT NULL DEFAULT '',\n\t\t`color` varchar(7) NOT NULL DEFAULT '',\n\t\t`text` varchar(7) NOT NULL DEFAULT '',\t\t\n\t\t`display_order` int(11) NOT NULL DEFAULT 0,\n `id_space` int(11) NOT NULL DEFAULT 1,\n `who_can_use` int(11) NOT NULL DEFAULT 1,\n\t\tPRIMARY KEY (`id`)\n\t\t);\";\n\n $this->runRequest($sql);\n\n $this->addColumn(\"bk_color_codes\", \"who_can_use\", \"int(11)\", 1);\n }", "public function createTable ()\n {\n }", "public function actionInit()\n {\n \\DB::select(<<<SQL\nCREATE TABLE `{$this->table}` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `email` varchar(255) DEFAULT NULL,\n `password` varchar(255) DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nSQL\n );\n $this->info(\"table created\");\n }", "public static function newTable() {\n\t\ttry {\n\t\t\tDB::getInstance()->createTable(self::$table_name, array('name' => 'VARCHAR(80)', 'status' => 'INT(1)'));\n\t\t} catch(TableCreationFailedException $e) {\n\t\t\tthrow $e;\n\t\t}\t\t\n\t\t\n\t}", "public function getTableName () {\n\t\treturn 'auth';\n\t}", "public function generateDefaultDbTables()\n {\n $queries = [\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_users' => \" \n CREATE TABLE {{table}} (\n `id` int(11) NOT NULL,\n `user` varchar(25) NOT NULL,\n `status` enum('0','1','2') NOT NULL DEFAULT '1',\n `level` enum('1','2','3','4') NOT NULL DEFAULT '1',\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ALTER TABLE `{{table}}` ADD PRIMARY KEY (`id`); ALTER TABLE `{{table}}` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\",\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_user_keys' => \"\n CREATE TABLE {{table}} (\n `id` int(11) NOT NULL,\n `user` int(11) NOT NULL,\n `auth_key` varchar(32) NOT NULL,\n `status` enum('0','1','2') NOT NULL DEFAULT '1',\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n ALTER TABLE `{{table}}`\n ADD PRIMARY KEY (`id`);ALTER TABLE `{{table}}`\n MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n \",\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_user_reports' => \"\n CREATE TABLE {{table}} (\n `id` int(11) NOT NULL,\n `user` int(11) NOT NULL,\n `uniq` varchar(25) NOT NULL,\n `report` text NOT NULL,\n `status` enum('0','1','2') NOT NULL DEFAULT '0' COMMENT '0 = pending, 1 completed, ',\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `{{table}}`\n ADD PRIMARY KEY (`id`);ALTER TABLE `{{table}}`\n MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n \",\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_user_requests' => \"\n CREATE TABLE {{table}} (\n `id` int(11) NOT NULL,\n `user` int(11) NOT NULL,\n `api` varchar(111) NOT NULL,\n `domain` text NOT NULL,\n `request` text NOT NULL,\n `time_taken` varchar(11) NOT NULL COMMENT 'milliseconds',\n `status` enum('0','1','2') NOT NULL DEFAULT '1',\n `log` text NOT NULL COMMENT 'use when call failed',\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `{{table}}`\n ADD PRIMARY KEY (`id`);ALTER TABLE `{{table}}`\n MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n \",\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_user_sites' => \"\n CREATE TABLE {{table}} (\n `id` int(11) NOT NULL,\n `user` int(11) NOT NULL,\n `api` varchar(25) NOT NULL,\n `domain` text NOT NULL,\n `status` enum('0','1','2','3') NOT NULL,\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `{{table}}`\n ADD PRIMARY KEY (`id`);ALTER TABLE `{{table}}`\n MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n \",\n $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_user_throttle' => \"\n CREATE TABLE `{{table}}` (\n `id` int(11) NOT NULL,\n `user` int(11) NOT NULL,\n `api` varchar(255) NOT NULL,\n `request` text NOT NULL,\n `resume` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),\n `status` enum('0','1','2') NOT NULL DEFAULT '1',\n `created_at` datetime NOT NULL DEFAULT current_timestamp(),\n `updated_at` datetime NOT NULL DEFAULT current_timestamp()\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `{{table}}`\n ADD PRIMARY KEY (`id`);ALTER TABLE `{{table}}`\n MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n \",\n // $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE_APPEND'] . 'api_users' => \"\",\n ];\n $result = [];\n\n if($this->db == false){\n if($this->DB_USER_CONNECT != false){\n $this->DB_USER_CONNECT->query(\"SET SQL_MODE = `NO_AUTO_VALUE_ON_ZERO`;START TRANSACTION;SET time_zone = `+00:00`;\");\n $this->DB_USER_CONNECT->query(\"CREATE DATABASE IF NOT EXISTS \".$_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE'].\" DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE `\".$_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE'].\"`;\");\n // SELECT THE DATABASE AS DEFAULT\n $this->db = $this->DB_USER_CONNECT::select_db($_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE']);\n $this->DB_USER_CONNECT = false;\n $result['database'] = $_ENV[$_ENV['ENVIRONMENT'] . '_DATABASE'] . ' database created successfully';\n }\n foreach ($queries as $table => $query) {\n $query = str_replace('{{table}}', $table, $query);\n $this->query($query);\n $result[$table] = [];\n if (!$this->db->error) {\n if ($this->db->affected_rows > 0) {\n $result[$table] = $table . ' :: Created successfully.';\n } else { // \n $result[$table] = $table . ' :: already exists.';\n }\n } else { // there was an error\n $result['table'] = 'Could not create table :: '.$table.' >> ' . $this->db->error;\n }\n }\n }\n\n return $result;\n }", "function plugin_activation_ticket() {\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'ticket_booking';\n\t$column_name = \"CREATE TABLE IF NOT EXISTS $table_name ( id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,user_id mediumint(10),email varchar(300),mobile_no varchar(15),subject varchar(250),message text,\";\n\tfor($i = 1; $i <= 100; $i++){\n\t\t$column_name .= \"ticket_\".$i.' int(10) default 0,';\n\t}\n\t$column_name .= \"create_ate date,update_at date,PRIMARY KEY (id));\";\n\t$wpdb->query($column_name);\n}", "public static function subscribe_info_tables(){\n\n global $table_prefix;\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n $tblname = 'subscribe_deals';\n $wp_track_table = $table_prefix . \"$tblname \";\n\n $sql_query_to_create_table = \"CREATE TABLE IF NOT EXISTS \". $wp_track_table .\"(\n id INT(11) NOT NULL AUTO_INCREMENT,\n deal_name VARCHAR(100) NOT NULL,\n value VARCHAR(11) NOT NULL,\n user_id INT(100) NOT NULL,\n random_number VARCHAR(50) NOT NULL,\n PRIMARY KEY (id)\n ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1\"; /** sql query to create table */\n dbDelta($sql_query_to_create_table);\n\n }", "function create_admin_logger_table() {\r\n global $wpdb;\r\n\r\n $wp_track_table = $this->tblName;\r\n\r\n #Check to see if the table exists already, if not, then create it\r\n\r\n if($wpdb->get_var( \"show tables like '$wp_track_table'\" ) != $wp_track_table)\r\n {\r\n $sql = \"CREATE TABLE $wp_track_table (\r\n id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,\r\n event varchar(50) NOT NULL,\r\n username varchar(50) NOT NULL,\r\n role varchar(50) NOT NULL,\r\n ip_address varchar(50) NOT NULL,\r\n logtime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\r\n status mediumint(9) unsigned DEFAULT 0 NOT NULL,\r\n PRIMARY KEY (id)\r\n );\";\r\n\r\n require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );\r\n dbDelta($sql);\r\n }\r\n }", "protected function createTable()\n {\n $stmt = 'CREATE TABLE IF NOT EXISTS \"' . $this->name;\n $stmt.= '\" (\"' . $this->keyColumnName . '\" TEXT PRIMARY KEY, \"';\n $stmt.= $this->valueColumnName . '\" TEXT);';\n $this->db->exec($stmt);\n }", "function create_table(){\r\n\t\t$tables = array();\r\n\r\n\t\t/**\r\n\t\t* Table structure for table 'embed_libertas_form'\r\n\t\t*/\r\n\t\t/*\r\n\t\t$fields = array(\r\n\t\t\tarray(\"embed_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"trans_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"client_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_int_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_str_identifier\"\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"module_starter\"\t\t\t,\"varchar(50)\"\t\t,\"NOT NULL\"\t,\"default ''\")\r\n\t\t);\r\n\t\t$primary =\"embed_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embed_libertas_form\", $fields, $primary);\r\n\t\t*/\r\n\t\treturn $tables;\r\n\t}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\t\t\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\ttype varchar(255) NOT NULL,\n\t\t\tname text NOT NULL,\n\t\t\tcolor text NOT NULL,\n\t\t\tcolor_text text,\n\t\t\tis_default tinyint(1) NOT NULL,\n\t\t\tis_visible tinyint(1) NOT NULL,\n\t\t\tis_bookable tinyint(1) NOT NULL,\n\t\t\tauto_pending varchar(20),\n\t\t\tcalendar_id bigint(10) NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "function give_v201_create_tables() {\n\tglobal $wpdb;\n\n\tif ( ! $wpdb->query( $wpdb->prepare( 'SHOW TABLES LIKE %s', \"{$wpdb->prefix}give_paymentmeta\" ) ) ) {\n\t\tGive()->payment_meta->create_table();\n\t}\n\n\tif ( ! $wpdb->query( $wpdb->prepare( 'SHOW TABLES LIKE %s', \"{$wpdb->prefix}give_formmeta\" ) ) ) {\n\t\tGive()->form_meta->create_table();\n\t}\n\n\tif ( ! $wpdb->query( $wpdb->prepare( 'SHOW TABLES LIKE %s', \"{$wpdb->prefix}give_logs\" ) ) ) {\n\t\tGive()->logs->log_db->create_table();\n\t}\n\n\tif ( ! $wpdb->query( $wpdb->prepare( 'SHOW TABLES LIKE %s', \"{$wpdb->prefix}give_logmeta\" ) ) ) {\n\t\tGive()->logs->logmeta_db->create_table();\n\t}\n}", "private function _defineTables(){ \n global $wpdb;\n $wpdb->ef_leagues = $wpdb->prefix . 'ef_leagues';\n\t$wpdb->ef_signups = $wpdb->prefix . 'ef_signups';\n\t$wpdb->ef_matches = $wpdb->prefix . 'ef_matches';\n\t$wpdb->ef_objections = $wpdb->prefix . 'ef_objections';\n $wpdb->ef_metas = $wpdb->prefix . 'usermeta';\n }", "function createTable() {\n\t}", "public function createRoutesTable()\n {\n $headers = ['Method', 'URI', 'Name'];\n\n $routes = [\n [\n 'method' => 'POST',\n 'uri' => 'api/confirm-password',\n 'name' => 'json-api-auth.password.confirm',\n ],\n [\n 'method' => 'POST',\n 'uri' => 'api/email/verification-notification',\n 'name' => 'json-api-auth.verification.send',\n ],\n [\n 'method' => 'POST',\n 'uri' => 'api/forgot-password',\n 'name' => 'json-api-auth.password.email',\n ],\n [\n 'method' => 'POST',\n 'uri' => 'api/login',\n 'name' => 'json-api-auth.login',\n ],\n [\n 'method' => 'GET|HEAD',\n 'uri' => 'api/logout',\n 'name' => 'json-api-auth.logout',\n ],\n [\n 'method' => 'POST',\n 'uri' => 'api/register',\n 'name' => 'json-api-auth.register',\n ],\n [\n 'method' => 'POST',\n 'uri' => 'api/reset-password',\n 'name' => 'json-api-auth.password.update',\n ],\n [\n 'method' => 'GET|HEAD',\n 'uri' => 'api/verify-email/{id}/{hash}',\n 'name' => 'json-api-auth.verification.verify',\n ],\n ];\n\n $this->table($headers, $routes);\n }", "function createTableSql () {\n return \"CREATE TABLE IF NOT EXISTS users (\n username STRING PRIMARY KEY,\n password STRING);\n \";\n }", "private static function create_custom_table() {\n\t global $wpdb;\n\n\t $charset_collate = $wpdb->get_charset_collate();\n\t $query = \"CREATE TABLE \" . VSPI_CACHE_TABLE . \" (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name tinytext NOT NULL,\n xmldata longblob,\n lastupdated tinytext,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n\n\t require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t dbDelta($query);\n }", "function create_module_tables()\n\t{\n\t\tcreate_table();\n\t}", "function create_table(Request $request, Response $response)\n {\n if ($this->check_json($request->getBody(), realpath(__DIR__ . '/schemas/table.json'))) {\n if ($this->check_auth()) {\n $db = new DbRoom();\n $data = $request->getParsedBody();\n if ($db->db_create_table($data)) {\n return $this->response($response, 201, $db->db_get_table($db->last_table_id_generated));\n } else {\n return $this->response($response, 400, array(\"message\" => \"bad data sent\"));\n }\n } else {\n return $this->response($response, 401, array('message' => 'user not logged'));\n }\n } else {\n return $this->response($response, 400, array(\"message\" => \"JSON format not valid\"));\n }\n }", "public function run()\n {\n\n DB::table('personal_access_tokens')->insert([\n 'name'=>'Docs Token',\n 'tokenable_type'=>'App\\Models\\User',\n 'tokenable_id' => '25',\n 'token'=>'46033d10ec0796dd6c54350ca3abd26632db684a8dead8d1cb18b1093b9e17a1',\n 'abilities'=>'[\"read\",\"create\",\"update\",\"delete\"]'\n ]);\n\n }", "private function create_token(Request $request) {\n $username = $request->input(\"username\");\n $email = $request->input(\"email\");\n // This password is diff from mqtt password.\n // We give user a mqtt password.\n $password = $request->input(\"password\"); \n\n // \n $json = array();\n\n $credentials = array(\n \"username\" => $username,\n \"password\" => $password\n );\n\n try {\n $issuer = \"backend_server\";\n $subject = \"user_auth\";\n $audience = \"app\";\n\t\t\t$issue_at = time();\n $not_before = $issue_at; // cannot use nbf, why? \n\n // You can set a very short time here,\n // but when it refreshes, it uses the jwt default setting.\n // so need to set to the same setting as default.\n $expire = $not_before + $this->token_ttl;\n\n // \n $mqtt_username = $username;\n $this->create_encrypt_mqtt_username_password_msg(\n $mqtt_username,\n $encrypt_mqtt_username,\n $encrypt_mqtt_password,\n $encrypt_mqtt_username_msg, \n $encrypt_mqtt_password_msg,\n \n $iv_mqtt_username,\n $iv_mqtt_password,\n $json\n );\n\n // https://scotch.io/tutorials/the-anatomy-of-a-json-web-token\n\t\t\t$claim = array(\n \"iss\" => $issuer,\n \"sub\" => $subject,\n \"aud\" => $audience,\n\t\t\t\t'iat' => $issue_at,\n\t\t\t\t'exp' => $expire,\n\n 'mqtt_username' => base64_encode($encrypt_mqtt_username_msg),\n 'mqtt_password' => base64_encode($encrypt_mqtt_password_msg),\n\t\t\t);\n\n if (! $token = JWTAuth::attempt($credentials, $claim)) {\n die(\"token issue\");\n }\n } \n\t\tcatch (JWTException $e) {\n \tdie(\"jwt exception\");\n }\n\n // insert token into table\n // or overwrite the existing token\n $identity = \"backend_server\";\n $this->record_token($username, $identity, $token, $json);\n\n // insert into user_mqtt_password\n $this->insert_into_user_mqtt_password(\n $mqtt_username, \n $encrypt_mqtt_username, \n $encrypt_mqtt_password, \n $password, \n\n $iv_mqtt_username,\n $iv_mqtt_password, \n $json\n );\n\n }", "private function createDummyTable() {}", "protected function getAuthTokenTable()\n {\n if (!($this->authTokenTable instanceof AuthTokenTable))\n {\n $this->authTokenTable = $this->getServiceLocator()->get('CRM\\Model\\AuthToken');\n }\n \n return $this->authTokenTable;\n }", "function raddy_register_db_table() {\r\n\r\n\tglobal $wpdb;\r\n\t$charset_collate = $wpdb->get_charset_collate();\r\n\t$table_name = $wpdb->base_prefix . ACTIVATIONS_TABLE;\r\n\r\n\t$sql = \"CREATE TABLE $table_name (\r\n\t\tactivation_id INT(100) AUTO_INCREMENT,\r\n\t\tuser_id INT(11) NOT NULL,\r\n\t\tuser_title VARCHAR(250),\r\n\t\tfirst_name VARCHAR(250),\r\n\t\tlast_name VARCHAR(250),\r\n\t\torganisation VARCHAR(250),\r\n\t\tdepartment VARCHAR(250),\r\n\t\tuser_position VARCHAR(250),\r\n\t\taddress_1 VARCHAR(250),\r\n\t\taddress_2 VARCHAR(250),\r\n\t\ttown_city VARCHAR(250),\r\n\t\tcounty_state VARCHAR(250),\r\n\t\tpost_zip VARCHAR(250),\r\n\t\tcountry VARCHAR(125),\r\n\t\ttelephone VARCHAR(250),\r\n\t\temail VARCHAR(250),\r\n\t\tfield_of_work VARCHAR(200),\r\n\t\ttype_organisation VARCHAR(200),\r\n\t\tactivation_date DATETIME,\r\n\t\tactivity VARCHAR(200),\r\n\t\tproduct VARCHAR(200),\r\n\t\tadditional_information VARCHAR(200),\r\n\t\tsoftware_level VARCHAR(200),\r\n\t\tserial_number VARCHAR(200),\r\n\t\tticket_number VARCHAR(200),\r\n\t\tsupport_from_date DATETIME,\r\n\t\tsupport_to_date DATETIME,\r\n\t\tPRIMARY KEY (activation_id)\r\n\t) $charset_collate;\";\r\n\r\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n\tdbDelta( $sql );\r\n}", "public static function\n\t\tcreate_Table($db, $tname) {\n\t\t\t\n\t\t\t/*******************************\n\t\t\t\tdispatch\n\t\t\t*******************************/\n\t\t\tif ($tname == DB::$tname_Tokens) {\n\t\t\t\n\t\t\t\t$res = DB::create_Table__Tokens($db, $tname);\n\n\t\t\t\treturn $res;\n\t\t\t\t\n\t\t\t} else if ($tname == DB::$tname_Categories) {\n\t\t\t\n\t\t\t\t$res = DB::create_Table__Categories($db, $tname);\n\n\t\t\t\treturn $res;\n\t\t\t\t\n\t\t\t} else if ($tname == DB::$tname_Genres) {\n\t\t\t\n\t\t\t\t$res = DB::create_Table__Genres($db, $tname);\n\n\t\t\t\treturn $res;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}//if ($tname == DB::$tname_Tokens)\n\t\t\t\n\t\t}", "public function addNewToken() {\n if ($this->checkAuth()) {\n $this->load->view('common/header');\n $this->load->view('common/navigation');\n $data['allCounters'] = $this->mToken->getSubCounter();\n $this->load->view('addNewTokenTable', $data);\n $this->load->view('common/footer');\n }\n }", "public static function createTable()\n {\n\n // instantiate the global $wpdb object, providing access to WP database\n $database = static::getDatabase();\n\n // retrives the database character collate for our WP DB\n // DOC https://developer.wordpress.org/reference/classes/wpdb/get_charset_collate/\n $charset = $database->get_charset_collate();\n\n $tableName = static::getTableName();\n\n // DOC ENUM TYPE : https://dev.mysql.com/doc/refman/8.0/en/enum.html\n $sql = \"\n CREATE TABLE IF NOT EXISTS `{$tableName}` (\n `id` INT(8) UNSIGNED NOT NULL AUTO_INCREMENT,\n `custom_id` VARCHAR(64) NOT NULL,\n `game_data` LONGTEXT,\n `game_response` LONGTEXT,\n `status` ENUM ('en cours', 'terminée'),\n `created_at` DATETIME NOT NULL,\n `updated_at` DATETIME,\n PRIMARY KEY(`id`),\n INDEX (`custom_id`) \n );\n ) {$charset};\n \";\n\n static::executeCreateTableQuery($sql);\n\n }", "public function create_table() \n\t{\n\t\tif (empty($this->table)) die('No table defined in ' . get_class($this) . '.');\n\t\t$this->dbforge->add_field($this->table_fields);\n\t\tforeach($this->primary_keys as $key) $this->dbforge->add_key($key, TRUE);\n\n\t\t$this->dbforge->add_key($this->table_keys);\n\t\treturn $this->dbforge->create_table($this->table, TRUE);\n\t}", "function createtable($tablename){\n $qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\n logid INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n ip VARCHAR( 16 ) NOT NULL ,\n host VARCHAR( 100 ) NOT NULL ,\n visitdate DATETIME NOT NULL ,\n visitedpage VARCHAR(255) NOT NULL ,\n referring VARCHAR( 255 ) NOT NULL\n )\";\n $result = mysql_query($qry) or die(mysql_error());\n return;\n }", "private function create() {\n return $request->user()->createToken($request->token_name, ['tickets:store','tickets:modify', 'tickets:delete']);;\n #return $request->user()->createToken($request->user()->token, ['tickets:store','tickets:modify', 'tickets:delete']); # uses initial token\n }", "function create_reafresh_token($rowss)\n{\n\n $dataService = DataService::Configure(array(\n 'auth_mode' => 'oauth2',\n 'ClientID' => $config['client_id'],\n\t\t'ClientSecret' => $config['client_secret'],\n 'RedirectURI' => $config['redirect_url'],\n 'baseUrl' => $config['base_url'],\n 'refreshTokenKey' => $rowss['refresh_token'],\n 'QBORealmID' => $rowss['realmId'],\n ));\n\n /*\n * Update the OAuth2Token of the dataService object\n */\n $OAuth2LoginHelper = $dataService->getOAuth2LoginHelper();\n $refreshedAccessTokenObj = $OAuth2LoginHelper->refreshToken();\n $dataService->updateOAuth2Token($refreshedAccessTokenObj);\n\t\n\treturn $refreshedAccessTokenObj;\n}", "function create_table(){\r\n\t\t$tables = array();\r\n\t\t/**\r\n\t\t* Table structure for table ''\r\n\t\t*/\r\n\t\t$fields = array(\r\n\t\t\tarray(\"es_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"es_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\r\n\t\t\tarray(\"es_label\"\t\t\t,\"varchar(255)\"\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_date_created\"\t\t,\"datetime\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0000-00-00 00:00:00'\"),\r\n\t\t\tarray(\"es_status\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_menu\"\t\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_base_uri\"\t\t\t,\"text\"\t\t\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_cache\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_auto_clean\"\t\t,\"unsigned small integer\"\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_last_cached\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\")\r\n\t\t);\r\n\t\t$primary =\"es_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embedscript_list\", $fields, $primary);\r\n\r\n\t\treturn $tables;\r\n\t}", "public static function paypal_info_tables(){\n global $table_prefix;\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n $tblname = 'paypal_detail';\n $wp_track_table = $table_prefix . \"$tblname \";\n\n $sql_query_to_create_table = \"CREATE TABLE IF NOT EXISTS \". $wp_track_table .\"(\n pay_id INT(11) NOT NULL AUTO_INCREMENT,\n token VARCHAR(500) NOT NULL,\n tx VARCHAR(150) NOT NULL,\n status VARCHAR(100) NOT NULL,\n currency VARCHAR(50) NOT NULL,\n cm VARCHAR(100) NOT NULL,\n item_number VARCHAR(100) NOT NULL,\n signature VARCHAR(500) NOT NULL,\n user_id INT(11) NOT NULL,\n PRIMARY KEY (id)\n ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1\"; /** sql query to create table */\n dbDelta($sql_query_to_create_table);\n\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\taction varchar(255) NOT NULL,\n\t\t\tdata longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "public abstract function createTable();", "public function generatePostToken(){$pTkn=$this->lhID->getNewID(\"pTkn\");$this->lhDB->connect('ibdpostdef');self::deleteOldPostTokens();$created=REQ_TS;\r\n $INSERT_NEW_TOKEN=$this->lhDB->PDO->prepare(\"INSERT INTO `tbl_index` (`pTkn`,`created`) VALUES (:pTkn,:created)\");\r\n $INSERT_NEW_TOKEN->bindParam(':pTkn',$pTkn);\r\n $INSERT_NEW_TOKEN->bindParam(':created',$created);\r\n $INSERT_NEW_TOKEN->execute();$INSERT_NEW_TOKEN->closeCursor();\r\n $this->lhDB->disconnect();\r\n return $pTkn;\r\n}", "function create_user_table($conn){\n $build = 'CREATE TABLE user (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n firstname VARCHAR(30) NOT NULL,\n lastname VARCHAR(30) NOT NULL,\n email VARCHAR(100),\n created_date TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n )';\n\n if ($conn->query($build) === FALSE) {\n echo \"Error creating table:\";\n print_r($conn->errorInfo());\n }\n}", "function testCreateTable(){\n $this->openRandomPage();\n parent::verifyCreateTable();\n parent::doLogout();\n }", "public function create_token()\n{\n\tif($this->token&&class_exists('session',0))Session::token();\n}", "function init_tokens() {\n $stox = new Token();\n $stox->name = \"STX\";\n $stox->url = \"https://etherscan.io/token/0x006bea43baa3f7a6f765f14f10a1a1b08334ef45\";\n $stox->table_name = \"stx_tbl\";\n\n $omise_go = new Token();\n $omise_go->name = \"OMG\";\n $omise_go->table_name = \"omg_tbl\";\n $omise_go->url = \"https://etherscan.io/token/OmiseGo\";\n\n $qtum = new Token();\n $qtum->name = \"Qtum\";\n $qtum->table_name = \"qtum_tbl\";\n $qtum->url = \"https://etherscan.io/token/Qtum\";\n\n $golem = new Token();\n $golem->name = \"Golem\";\n $golem->table_name = \"golem_tbl\";\n $golem->url = \"https://etherscan.io/token/Golem\";\n\n $tokens = array($stox, $omise_go, $qtum, $golem);\n\n return $tokens;\n}", "public function tableName()\n {\n return '{{tokens_' . self::$sid . '}}';\n }", "function create_table(){\n\t\t$tables = array();\n\t\t/*************************************************************************************************************************\n\t\t* Table structure for table 'metadata_details'\n\t\t*\n\t\t* Payment details for different paysysttems differ greatly this table holds the key pairs of variable/value\n\t\t*************************************************************************************************************************/\n\t\t$fields = array(\n\t\t\tarray(\"md_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"md_link_id\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"md_link_group_id\"\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"md_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"md_uri\"\t\t\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"md_title\"\t\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"md_module\"\t\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"md_description\"\t\t,\"text\"\t\t\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\t/*************************************************************************************************************************\n\t\t\t* shopping cart information\n\t\t\t*************************************************************************************************************************/\n\t\t\tarray(\"md_price\"\t\t\t,\"double\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"md_discount\"\t\t\t,\"double\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"md_weight\"\t\t\t,\"double\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0'\"), // in kg\n\t\t\tarray(\"md_vat\"\t\t\t\t,\"small integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), // charge vat (1,0) true/false\n\t\t\tarray(\"md_quantity\"\t\t\t,\"signed integer\"\t\t\t,\"NOT NULL\"\t,\"default '-1'\"),\n\t\t\tarray(\"md_canbuy\"\t\t\t,\"small integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), // can buy item (1,0) true/false\n\t\t\t/*************************************************************************************************************************\n\t\t\t* metadata Date information\n\t\t\t* \n\t\t\t* creation date :: is the creation date of the content\n\t\t\t* modified date :: is the date the content was last modified.\n\t\t\t* review date :: is the date that this content has to be reviewed.\n\t\t\t* publish date\t :: is the date that this content was published to the site.\n\t\t\t* remove date :: is the date that this content should be automatically removed from the site.\n\t\t\t* available date :: is the date that this content will be avaliable on the site can be equal to or greater than the publish date \n\t\t\t*************************************************************************************************************************/\n\t\t\tarray(\"md_date_creation\"\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"md_date_modified\"\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"md_date_review\"\t\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"md_date_publish\"\t\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"md_date_remove\"\t\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\"),\n\t\t\tarray(\"md_date_available\"\t\t,\"datetime\"\t\t\t,\"\"\t\t\t,\"default ''\")\n\t\t);\n\t\t$primary =\"md_identifier\";\n\t\t$tables[count($tables)] = array(\"metadata_details\", $fields, $primary);\n\t\t/*************************************************************************************************************************\n\t\t* Table structure for table 'metadata_properties'\n\t\t*\n\t\t* Payment details for different paysysttems differ greatly this table holds the key pairs of variable/value\n\t\t* the pap_identifier is mapped to the pad_identifier field\n\t\t*************************************************************************************************************************/\n\t\t$fields = array(\n\t\t\tarray(\"mdp_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), // link to Metadata record\n\t\t\tarray(\"mdp_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\n\t\t\tarray(\"mdp_property\"\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\",\"key\"),\n\t\t\tarray(\"mdp_value\"\t\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\",\"key\")\n\t\t);\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"metadata_properties\", $fields, $primary);\n\t\t/*************************************************************************************************************************\n\t\t* Table structure for table 'metadata_keywords'\n\t\t*\n\t\t* keywords are stored once for all clients\n\t\t*************************************************************************************************************************/\n\t\t$fields = array(\n\t\t\tarray(\"mdk_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), // primary key\n\t\t\tarray(\"mdk_value\"\t\t\t,\"varchar (255)\"\t\t\t,\"NOT NULL\"\t,\"default ''\",\"key\")\n\t\t);\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"metadata_keyword\", $fields, $primary);\n\t\t/*************************************************************************************************************************\n\t\t* Table structure for table 'metadata_keywords_relationship'\n\t\t*\n\t\t* keywords are stored once for all clients\n\t\t*************************************************************************************************************************/\n\t\t$fields = array(\n\t\t\tarray(\"mdkr_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\t// metadata record\n\t\t\tarray(\"mdkr_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), \t// client owner\n\t\t\tarray(\"mdkr_keyword\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"), \t// client owner\n\t\t\tarray(\"mdkr_count\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\")\t\t// keyword identifier\n\t\t);\n\t\t$primary =\"\";\n\t\t$tables[count($tables)] = array(\"metadata_keyword_relationship\", $fields, $primary);\n\t\t\n\t\treturn $tables;\n\t}" ]
[ "0.76250136", "0.73555964", "0.69405276", "0.69173795", "0.6854798", "0.66961837", "0.6607074", "0.6577548", "0.6475565", "0.6430224", "0.6368042", "0.6256351", "0.6208842", "0.6202615", "0.61807483", "0.6141855", "0.6141855", "0.61347747", "0.61108536", "0.6090892", "0.6045362", "0.6029426", "0.60137546", "0.6010201", "0.5990568", "0.59751666", "0.5960049", "0.59323686", "0.59285814", "0.59219575", "0.59138876", "0.58995676", "0.5875187", "0.58727694", "0.5855251", "0.58547777", "0.58508074", "0.5850118", "0.58455575", "0.5843645", "0.5830527", "0.58250886", "0.58208287", "0.5813421", "0.5792186", "0.57891804", "0.5779814", "0.57777447", "0.57678205", "0.57645506", "0.5758562", "0.574758", "0.5745203", "0.57424444", "0.57172334", "0.5715172", "0.57052225", "0.5702154", "0.56957775", "0.5695685", "0.56873643", "0.5684576", "0.56605935", "0.5643552", "0.56434435", "0.56407297", "0.56350255", "0.5634628", "0.5633889", "0.5624796", "0.5620457", "0.5618233", "0.56128705", "0.5611602", "0.5608685", "0.5603343", "0.5602791", "0.5601824", "0.5599577", "0.557419", "0.55667174", "0.55606854", "0.55566216", "0.5552761", "0.55379725", "0.5537876", "0.55354863", "0.5534602", "0.553371", "0.55327636", "0.55265635", "0.5526454", "0.55255693", "0.552387", "0.5521872", "0.55209464", "0.5516821", "0.5516792", "0.5509009", "0.55070335" ]
0.75871485
1
Returns the configured GitDirectory for the plugin
Возвращает настроенный GitDirectory для плагина
function getGitDir() { global $conf; $gitdir = $conf['plugin']['gitlivesync']['gitdir']; if (!isset($gitdir) || $gitdir === false || $gitdir === "") { $gitdir = $conf['savedir']."/git/"; } return DOKU_INC.$gitdir; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDirectory() {\n\t\treturn $this->config['plugin_dir'];\n\t}", "protected function getDirectory()\n {\n return config('repositories.repository_path');\n }", "public function getGitRootDirectory(){\r\n \r\n return $this->git_root_directory;\r\n \r\n }", "public function getDir()\n {\n return $this->gitRepo->getDir();\n }", "protected function getGitDirectory()\n {\n return getcwd().DIRECTORY_SEPARATOR;\n }", "public function directory(): string\n {\n return $this->get('plugin.directory');\n }", "public function getDirectory()\n {\n return PLUGINS_PATH. $this->directory . DIRECTORY_SEPARATOR;\n }", "public function getConfigDirectory()\n {\n return ($this->isPlugin())\n ? \\plugin_dir_path($this->reflection->getFileName()) . \"config/\"\n : \\plugin_dir_path($this->reflection->getFileName()) . \"config/bundles/\";\n }", "public function getConfigDir()\n {\n return $this->config_dir;\n }", "public function getDirectory()\n {\n return $this->options['directory'];\n }", "public function getConfigDir()\n {\n return $this->configDir;\n }", "public function get_plugin_dir() {\n\t\tif ( isset( $this->plugin_dir ) ) {\n\t\t\treturn $this->plugin_dir;\n\t\t}\n\t\t$this->plugin_dir = plugin_dir_path( dirname( __FILE__ ) );\n\t\treturn $this->plugin_dir;\n\t}", "protected function getConfigSyncPath() {\n /** @var \\Drupal\\Core\\Site\\Settings $settings */\n $settings = \\Drupal::service('settings');\n return $settings->get('config_sync_directory');\n }", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "abstract protected function getPluginDirectory(): string;", "public static function plugin_dir() {\r\n return plugin_dir_path( __FILE__ );\r\n }", "public function getGitFolder() {\n\t\treturn $this->getName();\n\t}", "public function getConfigurationDirectory()\n {\n return $this->getUserHomeDirectory().'/.githook';\n }", "public function getGitPath()\n {\n if( isset($this->path->project) && isset($this->path->user) )\n {\n $base = Zend_Registry::getInstance()->config->git->path;\n return( $base . $this->path->project . $this->path->user );\n }\n else\n {\n throw new Exception('Error getting git path');\n }\n }", "public function getPluginsDir()\n {\n return $this->plugins_dir;\n }", "function _get_plugin_directory()\n{\n return __DIR__;\n}", "public function getConfigDir() {\n return $this->getModuleDir() .'/Resources/config';\n }", "public function getProjectDirectory()\n {\n return $this->project_dir;\n }", "public function getRemoteDirectory(): string\n {\n return $this->remoteBackupDir;\n }", "public function getProjectDirectory() {\n return $this->projectDirectory;\n }", "public static function plugin_dir_url() {\n return plugin_dir_url( __FILE__ );\n }", "private function __dirPath() {\n return APP.'Plugin'.DS.'Cloggy'.DS.'webroot'.DS;\n }", "public static function getRepositoryPath()\n {\n if (is_null(self::$repositoryPath)) {\n $path = exec(sprintf('%s rev-parse --git-dir', self::GIT_EXECUTABLE));\n self::$repositoryPath = is_dir($path) ? realpath($path) : false;\n }\n\n return self::$repositoryPath;\n }", "protected function getRepository()\n {\n return $this->option('repo');\n }", "public function get_directory() {\n return $this->directory;\n }", "public function plugin_dir_name(){\n if(!empty($this->plugin_dir)){\n return $this->plugin_dir;\n }\n if(empty(self::$path)){\n self::$path=$this->get_base_path(); \n }\n $this->plugin_dir=basename(self::$path);\n return $this->plugin_dir;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function getDirectory()\n {\n return $this->directory;\n }", "public function get_plugin_class_directory() {\n return $this->plugin_class_directory;\n }", "public function getDirectory(): string\n {\n return $this->directory;\n }", "public function get_directory() {\n\t\treturn $this->directory;\n\t}", "protected function getRepositoryName()\n {\n return config('service-gen.repository_dir')\n }", "public function getModuleDirectory()\n {\n // get the last action stack entry\n $lastEntry = $this->getActionStack()->getLastEntry();\n if ($lastEntry)\n {\n return sfConfig::get('sf_app_module_dir') . '/' . $lastEntry->getModuleName();\n }\n }", "protected function getProjectDirPath(): string\n {\n return $this->configParameter('kernel.project_dir');\n }", "public function getRepositoryPath();", "public static function directory()\n {\n return config('changelog.directory_name', 'changelog');\n }", "public static function getDirectory()\n {\n return self::$dir;\n }", "public function baseDir()\n {\n return Config::get('f-sgallery::config.gallery_file_path');\n }", "public function getDirectory() {\n\t\treturn $this->directory;\n\t}", "public function getDirectory() {\n\t\treturn $this->directory;\n\t}", "public function getDirectory() {\n\t\treturn $this->directory;\n\t}", "public function getModuleDirectory()\n\t{\n\t\treturn \"{$this->getNamespaceDirectory()}/{$this->module}\";\n\t}", "public function getDirectory()\n\t{\n\t\treturn $this->directory;\n\t}", "public function getDir()\n\t{\n\t\treturn \"orgs/\".$this->getName();\n\t}", "public static function get_dir() {\n return static::$dir;\n }", "protected function getBaseDirectory()\n {\n return isset($this->config['base_directory']) ? $this->config['base_directory'] : getcwd();\n }", "public function getDirectory()\n {\n return $this->_directory;\n }", "public function getDirectory()\n\t\t{\n\t\t\treturn $this->directory;\n\t\t}", "private function getCommandFileDirectory()\n {\n $autoload = $this->getAutoloadInfo();\n return $this->plugin_dir . '/' . $autoload['dir'];\n }", "public function getConfigFolder(){\n return $this->configFolder;\n }", "public function getBuildDirectory() {\n\t\treturn sprintf('%s/%s',\n\t\t\tdirname($_SERVER['SCRIPT_FILENAME']),\n\t\t\t$this->getPublicBuildDirectory()\n\t\t);\n\t}", "public function getDirectory(): string\n {\n return $this->logger->getDirectory();\n }", "public function getGitUrl()\n {\n return $this->gitUrl;\n }", "public function getRepositoryPath()\n {\n return $this->repositoryPath;\n }", "public function getProjectDir()\n {\n $r = new \\ReflectionObject($this);\n return \\dirname($r->getFileName()) . '/..';\n }", "private function get_plugin_path() {\n if (isset($this->plugin_path)) {\n return $this->plugin_path;\n }\n $path = $this->plugin_path = plugin_dir_path( __FILE__ );\n\n return untrailingslashit($path);\n }", "public function getRepositoryPath(): string\n {\n return $this->repositoryPath;\n }", "public function getDirectory();", "public function getDirectory();", "public function plugin_path()\n {\n return untrailingslashit(plugin_dir_path(WC_CRM_FILE));\n }", "public static function getConfigDirPath() {\n return __DIR__ . '/../../../../app/config';\n }", "public function getRootDirectory()\n {\n if ($this->isExternal()) {\n return Util::getRootDir() . '/plugins/' . $this->getMachineName();\n }\n\n return Util::getRootDir();\n }", "public function getDirectory()\n {\n return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/frontend/view/data/social-networks/\".$this->get('id');\n }", "protected function getMigrateDirectory() {\n return variable_get('hedley_migrate_directory', FALSE) ? variable_get('hedley_migrate_directory') : drupal_get_path('module', 'hedley_migrate');\n }", "public function get_plugin_path() {\n\t\treturn trailingslashit( dirname( $this->_plugin_file ) );\n\t}", "public function getConfigFolder(){\n\t\treturn $this->getResourceFolder() . '/config';\n\t}", "public function getSourceDirectory() {\n\t\tif (!$this->sourceDirectory) {\n\t\t\t$this->sourceDirectory = sprintf('%s/%s/%s',\n\t\t\t\tdirname($_SERVER['SCRIPT_FILENAME']),\n\t\t\t\tUPLOAD_DIRECTORY,\n\t\t\t\t$this->getWorkspace()\n\t\t\t);\n\t\t}\n\t\treturn $this->sourceDirectory;\n\t}", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "protected function getDirectory()\r\n {\r\n $root = __DIR__ . '/../../../../web/';\r\n $uploadDir = $this->container->getParameter('analytics.log_directory'); \r\n return (substr($uploadDir, 0, 1) === '/' ? '' : $root) . $uploadDir . (substr($uploadDir, -1) === '/' ? '' : '/');\r\n }", "function get_plugin_dir()\n{\n\treturn WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n}", "public static function getPluginPath() {\n\t\treturn self::getRootPath().'/plugins';\n\t}", "function GetPluginPath() {\r\n\t\t$path = dirname($this->g_info['PluginFile']);\r\n\t\treturn trailingslashit(str_replace(\"\\\\\", \"/\", $path));\r\n\t}", "public function getProjectFolder(): Directory;", "public function getCacheDirectory()\n {\n return $this->dir;\n }", "public function getModuleDir() {\n if ($this->moduleDir) {\n return $this->moduleDir;\n }\n\n $this->moduleDir = dirname(Debugger::getClassFile($this));\n return $this->moduleDir;\n }", "public function get_plugin_path() {\n\n\t\tif ( $this->plugin_path )\n\t\t\treturn $this->plugin_path;\n\n\t\treturn $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t}", "public function getDirMod(){\n$fetch = elgg_get_plugins_path();\nif(!empty($fetch)){\n return elgg_get_plugins_path();\n }\n}", "public static function getModulePath()\n {\n return dirname(__DIR__);\n }", "public function getDir(): string\n {\n return $this->oLogger->getDir();\n }", "public function plugin_path()\n {\n return untrailingslashit(plugin_dir_path(__FILE__));\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getVendorDir()\n {\n $composer = json_decode(file_get_contents($this->composerJsonPath), true);\n\n if (!array_key_exists('config', $composer)) {\n return 'vendor';\n }\n\n if (!array_key_exists('vendor-dir', $composer['config'])) {\n return 'vendor';\n }\n\n return $composer['config']['vendor-dir'];\n }", "public function getURLDirectory() {\n\t\treturn $this->getURLHost() . $this->directory;\n\t}", "function getPluginsDirectoryPath()\n {\n return _KARYBU_PATH_ . 'modules/shop/plugins_shipping';\n }" ]
[ "0.73652023", "0.73375666", "0.7122872", "0.7077771", "0.7076493", "0.7027722", "0.6718198", "0.66385615", "0.65860987", "0.65795135", "0.65437245", "0.6538846", "0.65360326", "0.64672923", "0.64672923", "0.64672923", "0.6413069", "0.64107203", "0.64069027", "0.637358", "0.6327707", "0.62566274", "0.6250513", "0.62380934", "0.6230974", "0.62177086", "0.62174654", "0.62143326", "0.62030107", "0.62006724", "0.61728865", "0.6171181", "0.6125976", "0.6123935", "0.6123935", "0.6123935", "0.6123935", "0.6123935", "0.6123935", "0.6123935", "0.6123637", "0.61218417", "0.610749", "0.61005616", "0.60984963", "0.6072664", "0.60689056", "0.6055902", "0.6041806", "0.6026075", "0.60095066", "0.60095066", "0.60095066", "0.5996179", "0.5981201", "0.5978224", "0.5967507", "0.59492797", "0.5936036", "0.59327", "0.59259903", "0.5917186", "0.59057546", "0.5901569", "0.59007174", "0.5870831", "0.585958", "0.58593833", "0.58463746", "0.5834793", "0.5834793", "0.58318925", "0.5827608", "0.58264786", "0.5825239", "0.58237076", "0.58200294", "0.5813902", "0.58118707", "0.5803019", "0.5803019", "0.5803019", "0.5795844", "0.5795298", "0.5794665", "0.57806194", "0.5761631", "0.57535976", "0.57518", "0.57509524", "0.5745496", "0.57446826", "0.5744331", "0.57357806", "0.5730456", "0.5730456", "0.5730456", "0.57274604", "0.57273895", "0.57246286" ]
0.78230226
0
get_beneficios_vaga Busca dados pessoais de vaga
get_beneficios_vaga Ищет персональные данные вакансии
public function get_beneficios_vaga($id) { log_message('debug', 'get_beneficios_vaga. Param1: ' . $id); $this->db->where('idvaga', $id); $result = $this->db->get('beneficio_vaga'); log_message('debug', 'Last Query: ' . $this->db->last_query()); return $result->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_vagas(){\n\t\t\t$vagas = array();\n\t\t\t$criteria=new Criteria;\n\t\t\t$criteria->add(new Filter('id_empresa','=',$this->id));\n\t\t\t$repo= new Repository('Vaga');\n\t\t\t$vinculos = $repo->load($criteria);\n\t\t\tif ($vinculos){\n\t\t\t\tforeach ($vinculos as $vinculo){\n\t\t\t\t\t$vagas[] = new Vaga($vinculo->id);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $vagas;\n\t\t}", "function buscar_bairros($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\t\n\t\t$sql = \"select ponto_embarque.id, ponto_embarque.bairro\n\t\t\t\t\tfrom ponto_embarque\n\t\t\t\t\t\tinner join viagem_cliente on viagem_cliente.id_ponto_embarque = ponto_embarque.id\n\t\t\t\t\t\t\twhere viagem_cliente.id_viagem = \".$viagem.\"\n\t\t\t\t\t\t\t\tgroup by ponto_embarque.id\";\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "public function getVagas(){\r\n\t\t\t$vagas = array();\r\n\t\t\t$criteria=new Criteria;\r\n\t\t\t$criteria->add(new Filter('codigo_curso','=',$this->id));\r\n\t\t\t$repo= new Repository('CursoVaga');\r\n\t\t\t$vinculos = $repo->load($criteria);\r\n\t\t\tif ($vinculos){\r\n\t\t\t\tforeach ($vinculos as $vinculo){\r\n\t\t\t\t\t$vagas[] = new Curso($vinculo->id_curso);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $vagas;\r\n\t\t}", "function buscar_hoteis($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_hotel.*, hotel.hotel, cidade.cidade, estado.sigla,\n\t\t\t\tdate_format(data_chegada,'%d/%m/%Y') as data_chegada,\n\t\t\t\tdate_format(data_saida,'%d/%m/%Y') as data_saida\n\t\t\t\t\tfrom viagem_hotel\n\t\t\t\t\t\tinner join hotel on hotel.id = viagem_hotel.id_hotel\n\t\t\t\t\t\tinner join cidade on cidade.id = hotel.id_cidade\n\t\t\t\t\t\tinner join estado on estado.id = cidade.id_estado\n\t\t\t\t\t\t\twhere viagem_hotel.id_viagem = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "function getBeneficiosProducto($producto_id){\n\n include (\"conexion.php\");\n $sql = \"SELECT B.beneficio_tdc_nombre\n FROM comparador_beneficio_tdc B, comparador_producto_beneficio PB\n WHERE B.beneficio_tdc_id = PB.beneficio_tdc_id AND PB.producto_tdc_id = '$producto_id'\";\n $result = mysqli_query($mysqli, $sql);\n\n $beneficios = array();\n\n while($row = mysqli_fetch_array($result))\n {\n $beneficios[] = $row[\"beneficio_tdc_nombre\"];\n }\n\n return $beneficios;\n }", "public function buscaVagasDaRepublica ($republica_id = NULL) {\r\n\t\t// Busca Fotos\r\n\t\treturn $this->db->where('IDRepublica', $republica_id)->get('Vaga')->result();\r\n\t}", "public function BuscarVentasxFechas() \n\t{\n\t\tself::SetNames();\n\t\t$sql =\"SELECT \n\t\tventas.idventa, \n\t\tventas.codmesa,\n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado, \n\t\tventas.montopropina, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa, \n\t ventas.observaciones,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tdocumentos.documento,\n\t\tprovincias.provincia,\n\t\tdepartamentos.departamento,\n\t\tmediospagos.mediopago,\n\t\tSUM(detalleventas.cantventa) as articulos \n\t\tFROM (ventas LEFT JOIN detalleventas ON detalleventas.codventa=ventas.codventa)\n\t\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\t\tLEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\t\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\t\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento\n\t\t WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND ventas.statuspago = '0' AND ventas.empresa = ? GROUP BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->bindValue(3, $_SESSION[\"empresa\"]);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-info-circle'></span> NO SE ENCONTRARON VENTAS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\techo \"</div>\";\t\t\n\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function buscar_destinos($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_destinos.id, cidade.id as id_cidade, cidade.cidade, estado.sigla\n\t\t\t\t\tfrom viagem_destinos\n\t\t\t\t\t\tinner join cidade on cidade.id = viagem_destinos.id_cidade\n\t\t\t\t\t\tinner join estado on estado.id = cidade.id_estado\n\t\t\t\t\t\t\twhere viagem_destinos.id_viagem = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "function buscarItensVenda($cod)\n {\n $venda = new Vendas();\n $result = $venda->buscaItensVenda($cod);\n return $result;\n }", "function buscar_clientes($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_cliente.*, cliente.id as id_cliente, cliente.cliente,\n\t\t\t\tdate_format(cliente.data_nascimento,'%d/%m/%Y') as data_nascimento,\n\t\t\t\tcliente.rg, orgao_emissor.sigla,\n\t\t\t\tcliente_telefones.telefone, viagem_transporte.id_empresa_tipo_transporte,\n\t\t\t\tconcat(ponto_embarque.bairro,' - ',ponto_embarque.local) as ponto_cliente,\n\t\t\t\tconcat(empresa.empresa,' (',tipo_transporte.tipo_transporte,')') as transporte_cliente\n\t\t\t\t\tfrom viagem_cliente\n\t\t\t\t\t\tinner join cliente on cliente.id = viagem_cliente.id_cliente\n\t\t\t\t\t\tleft join orgao_emissor on orgao_emissor.id = cliente.id_orgao_emissor\n\t\t\t\t\t\tleft join cliente_telefones on cliente_telefones.id_cliente = cliente.id and cliente_telefones.principal = 1\n\t\t\t\t\t\tleft join ponto_embarque on ponto_embarque.id = viagem_cliente.id_ponto_embarque\n\t\t\t\t\t\tleft join viagem_transporte on viagem_transporte.id = viagem_cliente.id_transporte_viagem\n\t\t\t\t\t\tleft join empresa_tipo_transporte on empresa_tipo_transporte.id = viagem_transporte.id_empresa_tipo_transporte\n\t\t\t\t\t\tleft join empresa on empresa.id = empresa_tipo_transporte.id_empresa\n\t\t\t\t\t\tleft join tipo_transporte on tipo_transporte.id = empresa_tipo_transporte.id_tipo_transporte\n\t\t\t\t\t\t\twhere viagem_cliente.id_viagem = \".$viagem.\"\n\t\t\t\t\t\t\t\t-- order by numero_transporte, cliente.cliente\";\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "function constroi_vaga($r_vag_codigo, $r_vag_usu_codigo, $r_vag_cid_codigo, $r_vag_cat_codigo, $r_vag_nome, $r_vag_email, $r_vag_descricao, $r_vag_salario, $r_vag_dt_inicio, $r_vag_dt_termino, $r_vag_ativo, $r_vag_empresa, $r_vag_qtd, $r_vag_destaque, $r_vag_exclusivo, $r_vag_link, $r_vag_telefone, $r_vag_tipo, $r_vag_cidade_nome, $r_vag_estado_nome) {//essa função é responsável por construir a estrutura em html da vaga\n if ($r_vag_ativo) {//só mostra vaga se setiver ativa\n $local_logomarca = \"http://www.empregue-me.com/upload/gfx/vagas/vag_\" . $r_vag_codigo . \".jpeg\";\n\n $logo_path = \"../upload/gfx/vagas/vag_\" . $r_vag_codigo . \".jpeg\";\n\n\n if (!url_exists($local_logomarca)) {\n $logo_path = \"gfx/empregueme.jpeg\";\n }\n\n //se nao tiver nome da empresa, coloque como nome do empregue-me\n if ($r_vag_empresa == \"\") {\n $r_vag_empresa = \"empregue-me\";\n }\n\n //sql com quantidade de cadidatos por vagas\n $mysqli = mysqli_full_connection();\n $qry = \"SELECT count(*) as cont FROM vagas vag,curriculos_vagas currVag \n WHERE currVag.vag_codigo = vag.vag_codigo\n AND vag.vag_codigo = ?\";\n $stmt = $mysqli->prepare($qry);\n $stmt->bind_param('i', $r_vag_codigo);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($r_vag_candidatos);\n while ($stmt->fetch()) {\n //pluraliza ou nao a palavra candidatos\n if ($r_vag_estado_nome != \"SP\") {\n if ($r_vag_candidatos == 1) {\n $palavra_cand = $r_vag_candidatos . \" candidato\";\n } else {\n $palavra_cand = $r_vag_candidatos . \" candidatos\";\n }\n } else {\n $palavra_cand = \"\";\n }\n }\n $stmt->close();\n\n\n /* //verifica regime de contratação\n switch ($r_vag_tipo) {\n case 'tem':\n $r_vag_tipo = \"Temporário\";\n break;\n\n case 'clt':\n $r_vag_tipo = \"CLT\";\n break;\n\n case 'fre':\n $r_vag_tipo = \"Freelancer\";\n break;\n }\n */\n\n //verifica se o usuário é membro VIP para mostrar email\n $mostra_email = '';\n\n if (isset($_SESSION['membro_vip_ativo'])) {\n if ($_SESSION['membro_vip_ativo'] == 1) {\n $mostra_email = '<strong>E-mail:</strong> ' . $r_vag_email . '<br />';\n } else {\n $mostra_email = '<strong>E-mail:</strong><a href=\"membro_vip.php\"> <span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n } else {\n $mostra_email = '<strong>E-mail:</strong><a href=\"membro_vip.php\"> <span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n\n //verifica se precisa mostrar telefone\n if ($r_vag_telefone == \"\") {\n $mostra_telefone = \"\";\n } else {\n if (isset($_SESSION['membro_vip_ativo'])) {\n //verifica se o usuário é membro VIP\n if ($_SESSION['membro_vip_ativo'] == 1) {\n $mostra_telefone = '<strong>Telefone:</strong> ' . $r_vag_telefone . '<br />';\n } else {\n $mostra_telefone = '<strong>Telefone:</strong> \n\t\t\t\t<a href=\"membro_vip.php\"><span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n } else {\n $mostra_telefone = '<strong>Telefone:</strong> \n\t\t\t\t<a href=\"membro_vip.php\"><span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n }\n\n\n\n //ajusta data\n $data = explode('-', $r_vag_dt_inicio);\n $data_ajustada = $data[2] . \"/\" . $data[1] . \"/\" . $data[0];\n\n\n //ajusta salário\n if ($r_vag_salario == \"0.00\") {\n $r_vag_salario = \"À combinar\";\n } else {\n $r_vag_salario = \"R$ \" . $r_vag_salario; //ajusta com simbolo de R$\t\n }\n if (empty($_SESSION['login']) || !isset($_SESSION['login'])) {\n if (isset($_SESSION['adwords'])) {\n $r_curriculo = '<a class=\"candidatar\" href=\"main.php?freetrial=true\">Candidatar</a>';\n } else {\n $r_curriculo = '<a class=\"candidatar\" href=\"index.php?aviso=1\">Candidatar</a>';\n }\n } else {\n //vamos verificar se é vaga VIP\n //verifica curriculo e mostra se ele é habilitado ou não para enviar para vaga\n if ($_SESSION['curriculo'] == 0) { // curriculo = 0 o candidato nao criou o curriculo\n if ($_SESSION['tipo_conta'] == 0) {\n $r_curriculo = '<a class=\"candidatar\" href=\"main.php?mostra_alerta=semcv\">Candidatar</a>';\n } else {\n $r_curriculo = \"\";\n }\n } else {\n //verifica se o candidato ja enviou currículo\n $qry = \"SELECT count(*) as qtd FROM curriculos_vagas where curr_codigo = ? and vag_codigo = ?\";\n $stmt = $mysqli->prepare($qry);\n $curriculo = $_SESSION['curriculo'];\n $stmt->bind_param('ii', $curriculo, $r_vag_codigo);\n $stmt->execute();\n $stmt->bind_result($r_qtd);\n while ($stmt->fetch()) {\n \n }\n if ($r_qtd == 1) { //se o resultado for 1 o candidato nao pode se candidatar, caso contrario ele está apto.\n $r_curriculo = '<h4 style=\"color:#6ac824;\">Voce já se candidatou a essa vaga</h4>';\n } else {\n if ($r_vag_exclusivo == 1 && $_SESSION['membro_vip_ativo'] != 1) {//Se a vaga é exclusiva e o cara não é VIP\n $r_curriculo = '<a class=\"candidatar\" href=\"membro_vip.php\" target=\"_blank\">Seja VIP</a>'; //mostra pra ser VIP\n } else {// se não for exclusiva, pode candidatar\n //$link = \"http://localhost/empre941/novo/curriculo/envio/envia_curriculo/\" . $_SESSION['userid'] . \"/\" . $r_vag_codigo; //offline\n // $link = \"http://www.empregue-me.com/novo/curriculo/envio/envia_curriculo/\" . $_SESSION['userid'] . \"/\" . $r_vag_codigo; //online\n //ajusta uma ID junto com o link só para identificar qual mensagem pós envio deveremos mostrar ao usuário\n // $r_curriculo = '<a class=\"candidatar\" href=\"' . $link . '\">Candidatar</a>';\n //candidatar via ajax\n $r_curriculo = '\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"userid\" value=\"' . $_SESSION['userid'] . '\"/>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"vaga_codigo\" value=\"' . $r_vag_codigo . '\"/>\n\t\t\t\t\t\t\t<a class=\"candidatar\" href=\"javascript:void(0)\" >Candidatar</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t';\n }\n }\n }\n }\n\n//Verifica se é vaga exclusiva... se for, vamos mudar o layout\n if ($r_vag_exclusivo == 1) {//VAGA EXCLUSIVA\n $layout_vaga = '<div class=\"vaga_exclusiva\">';\n $vaga_logo = 'vaga_logo_exclusiva';\n $vaga_detalhe = 'vaga_detalhe_exclusiva';\n $vaga_settings = 'coroa.png';\n }\n if ($r_vag_exclusivo == 0) {//VAGA COMUM\n $layout_vaga = '<div class=\"vaga\">'; //se nao for, mostra layout padrão\n $vaga_logo = 'vaga_logo';\n $vaga_detalhe = 'vaga_detalhe';\n $vaga_settings = 'settings2.png';\n }\n\n\n if ($r_vag_destaque == 1) {//VAGA DESTAQUE\n $layout_vaga = '<div class=\"vaga_destaque\">';\n $vaga_logo = 'vaga_logo_destaque';\n $vaga_detalhe = 'vaga_detalhe_destaque';\n $vaga_settings = 'vaga_destaque.png';\n }\n\n $envia_mensagem = ''; //nao pode mostrar para quem n esta logado\t\n if (isset($_SESSION['login'])) {\n $envia_mensagem = '<a href=\"envia_mensagem_empresa.php?id=' . $r_vag_codigo . '\" class=\"btm_enviar_msg\">Enviar Mensagem</a>';\n }\n\n\n //--->> constroi vaga\n echo '<!--inicia VAGA-->\n\t' . $layout_vaga . '<a name=\"vaga' . $r_vag_codigo . '\"></a>\n\n<a href=\"vaga.php?id=' . $r_vag_codigo . '\" target=\"new\">\n\n\t\t\t\t<strong>Empresa: </strong> ' . $r_vag_empresa . '<br />\n\t\t\t\t<strong>Local: </strong> ' . $r_vag_cidade_nome . ', ' . $r_vag_estado_nome . '<br />\n\t\t\t\t<strong>Salário: </strong>' . $r_vag_salario . '<br />\t\t\n\t\t\t\t<strong>Regime de contratação: </strong> ' . $r_vag_tipo . '<br />\n\t\t\t\t' . $mostra_telefone . '\n\t\t\t\t' . $mostra_email . '\n\t\t\t\t<strong>Descrição: </strong> ' . $r_vag_descricao . '<br />\n\t\t</a>\n\n\t\t<div class=\"vaga_data\">Data: ' . $data_ajustada . '</div>\n\n\t\t\n\t\t<div class=\"' . $vaga_logo . '\">\n \t<img src=\"' . $logo_path . '\" class=\"vaga_logo_img\" width=\"38\" height=\"38\"/>\n </div>\n \t<div class=\"' . $vaga_detalhe . '\"></div>\n \t<div class=\"vaga_titulo\"><strong><span class=\"vermelho_destaque\">' . $r_vag_nome . '</span></strong></div>\n \n \n <div class=\"vaga_candidatos\"><span class=\"vermelho_destaque\"><strong>' . $palavra_cand . '</strong></span></div>\n \n <div class=\"vaga_settings\"><img src=\"gfx/ui/' . $vaga_settings . '\" /></div>\n \n\t\n\t\t\n\t\t<!----\n\t\t<div class=\"fb_pos\">\n\t\t<div class=\"fb-like\" data-href=\"https://www.empreguemeagora.com.br/vaga.php?id=' . $r_vag_codigo . '\" data-layout=\"button\" data-action=\"like\" data-show-faces=\"true\" data-share=\"true\"></div>\n\t\t</div>\n\t\t-->\n\t\t\n ' . $r_curriculo . '\n\t\t\n' . $envia_mensagem . '\n \n \n \n \t\n <!--máximo de 620 characteres aqui na descrição-->\n \n \n \n </div>\n\n<!--termina VAGA-->';\n // <div class=\"vaga_conteudo\">\t\n }\n}", "public function selectVeicoliVendita() {\n $query = 'SELECT IdAuto, Marca, Modello, KM, Cilindrata, PrezzoVendita, Immagine, DescrImmagine FROM AutoVendita GROUP BY Modello ORDER BY Marca ASC';\n $queryResult = $this->connessioneAmministratore->esegui($query);\n $_POST = array();\n if($queryResult == false) {\n return [];\n } else {\n $result = array();\n while($row=mysqli_fetch_assoc($queryResult)) {\n $veicoloV = (Object) [\n \"IdAuto\"=>$row['IdAuto'],\n \"Marca\"=>$row['Marca'],\n \"Modello\"=>$row['Modello'],\n \"KM\"=>$row['KM'],\n \"Cilindrata\"=>$row['Cilindrata'],\n \"PrezzoVendita\"=>$row['PrezzoVendita'],\n \"Immagine\"=>$row['Immagine'],\n \"DescrImmagine\"=>$row['DescrImmagine']\n ];\n array_push($result,$veicoloV);\n }\n return $result;\n }\n }", "public function BuscarVentasDiarias()\n{\n\tself::SetNames();\n $sql = \"SELECT \n\t\tventas.idventa, \n\t\tventas.codmesa,\n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado, \n\t\tventas.montopropina, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa, \n\t ventas.observaciones, \n\t\tcajas.nrocaja,\n\t\tcajas.nomcaja,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tdocumentos.documento,\n\t\tprovincias.provincia,\n\t\tdepartamentos.departamento,\n\t\tmediospagos.mediopago,\n\t\tSUM(detalleventas.cantventa) as articulos \n\t\tFROM (ventas LEFT JOIN detalleventas ON detalleventas.codventa=ventas.codventa)\n\t\tLEFT JOIN cajas ON ventas.codcaja = cajas.codcaja \n\t\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\t\tLEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\t\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\t\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento WHERE ventas.empresa = '\".$_SESSION[\"Empresa\"].\"' AND ventas.codigo = '\".limpiar($_SESSION[\"codigo\"]).\"' AND DATE_FORMAT(ventas.fechaventa,'%d-%m-%Y') = '\".date(\"d-m-Y\").\"' AND ventas.statuspago = '0' GROUP BY detalleventas.codventa\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t return $this->p;\n\t\t\t$this->dbh=null;\n}", "function buscarVenda($cod)\n {\n $venda = new Vendas();\n $result = $venda->buscaVenda($cod);\n return $result;\n }", "function buscar_restaurantes($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_restaurante.*, restaurante.restaurante, cidade.cidade, estado.sigla\n\t\t\t\t\tfrom viagem_restaurante\n\t\t\t\t\t\tinner join restaurante on restaurante.id = viagem_restaurante.id_restaurante\n\t\t\t\t\t\tinner join cidade on cidade.id = restaurante.id_cidade\n\t\t\t\t\t\tinner join estado on estado.id = cidade.id_estado\n\t\t\t\t\t\t\twhere viagem_restaurante.id_viagem = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "public function getPorCertameAndVaga1($certame,$vaga) {\n $q = Doctrine_Query::create()->from('TbInscricao')->where('id_certame = ?', $certame->getId());\n $q->andWhere('id_vaga = ? ',$vaga); \n return $q;\n }", "public function busca_cliente_vinc($id)\n {\n // Monta a query\n $query = \"\n select\n sq.id_equipamento, sq.id_sim, s.id_cliente, s.id_filial\n from tb_sim_equipamento sq\n inner join tb_sim s on s.num_sim = sq.id_sim\n where id = {$id}\";\n\n // Result que busca os valores\n $result = $this->db->select($query);\n\n // Verifica se existe resposta\n //if ($result)\n //{\n if(!empty($result)){\n\n foreach ($result as $row) {\n //$retorno[] = $row;\n\n // Busca cliente\n if (isset($row['id_cliente']) && !empty($row['id_cliente']))\n // monta a busca de cliente\n $queryCli = \"select nome from tb_cliente where id = {$row['id_cliente']}\";\n\n // Busca filial\n if (isset($row['id_filial']) && !empty($row['id_filial']))\n // monta a busca de filial\n $queryCli = \"select nome from tb_cliente where id = {$row['id_filial']}\";\n\n // Busca equipamento\n if (isset($row['id_equipamento']) && !empty($row['id_equipamento']))\n // monta a busca de equipamento\n $queryEqui = \"select tipo_equipamento as nome from tb_equipamento where id = {$row['id_equipamento']}\";\n\n // Realiza a busca da query de cliente e equipamento\n $buscaCli = $this->resultado_query($queryCli);\n $buscaEqui = $this->resultado_query($queryEqui);\n\n // coleta os dados e monta a variavel com o nome do cliente e equipamento\n $buscaCli = isset($buscaCli[0]['nome']) && !empty($buscaCli[0]['nome']) ? $this->converte($buscaCli[0]['nome'], 1) : \"\";\n $buscaEqui = isset($buscaEqui[0]['nome']) && !empty($buscaEqui[0]['nome']) ? $this->converte($buscaEqui[0]['nome'],1) : \"\";\n\n return $buscaCli . \"/\" . $buscaEqui;\n\n }\n\n // // Verifica se existe valor\n // if (@mysql_num_rows($result) > 0)\n // {\n // // Coleta os dados\n // $row = @mysql_fetch_assoc($result);\n\n // // Busca cliente\n // if (isset($row['id_cliente']) && !empty($row['id_cliente']))\n // // monta a busca de cliente\n // $queryCli = \"select nome from tb_cliente where id = {$row['id_cliente']}\";\n\n\n // // Busca filial\n // if (isset($row['id_filial']) && !empty($row['id_filial']))\n // // monta a busca de filial\n // $queryCli = \"select nome from tb_cliente where id = {$row['id_filial']}\";\n\n\n // // Busca equipamento\n // if (isset($row['id_equipamento']) && !empty($row['id_equipamento']))\n // // monta a busca de equipamento\n // $queryEqui = \"select tipo_equipamento as nome from tb_equipamento where id = {$row['id_equipamento']}\";\n\n\n // // Realiza a busca da query de cliente e equipamento\n // $buscaCli = $this->resultado_query($queryCli);\n // $buscaEqui = $this->resultado_query($queryEqui);\n\n // // coleta os dados e monta a variavel com o nome do cliente e equipamento\n // $buscaCli = isset($buscaCli[0]['nome']) && !empty($buscaCli[0]['nome']) ? $this->converte($buscaCli[0]['nome'], 1) : \"\";\n // $buscaEqui = isset($buscaEqui[0]['nome']) && !empty($buscaEqui[0]['nome']) ? $this->converte($buscaEqui[0]['nome'],1) : \"\";\n //\n // return $buscaCli . \"/\" . $buscaEqui;\n //}\n }\n }", "public function BuscarCreditosxFechas() \n\t{\n\t\tself::SetNames();\n\t\t$sql = \"SELECT \n\tventas.codventa, \n\tventas.totalpago, \n\tventas.tipopago,\n\tventas.statusventa,\n\tventas.fechaventa, \n\tventas.fechavencecredito,\n\tventas.fechapagado,\n\tclientes.codcliente,\n\tclientes.documcliente, \n\tclientes.dnicliente, \n\tclientes.nomcliente, \n\tclientes.tlfcliente, \n\tabonoscreditos.codventa as codigo, \n\tabonoscreditos.fechaabono, \n\tdocumentos.documento,\n\tSUM(abonoscreditos.montoabono) AS abonototal \n\tFROM (ventas INNER JOIN clientes ON ventas.codcliente = clientes.codcliente)\n\tLEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa\n\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\tWHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ?\n\t AND ventas.empresa = ? AND ventas.tipopago ='CREDITO' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->bindValue(3, $_SESSION[\"empresa\"]);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-info-circle'></span> NO SE ENCONTRARON CREDITOS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\techo \"</div>\";\t\t\n\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ListadoVentas($link, $idcliente, $idvendedor, $pagina, $cantidad){\n\t$idcliente = $link->real_escape_string($idcliente);\n\t$idvendedor = $link->real_escape_string($idvendedor);\n\t$pagina = $link->real_escape_string($pagina);\n\t$cantidad = $link->real_escape_string($cantidad);\n\t\n\t//examino la página a mostrar y el inicio del registro a mostrar\n\t$inicio = ($pagina - 1) * $cantidad;\n\t\n\t//miro a ver el número total de campos que hay en la tabla con esa búsqueda \n\t$sql = \"SELECT v.* FROM ventas v WHERE 1=1 \";\n\tif ($idcliente > 0){\n\t\t$sql .= \" AND v.id_cliente = $idcliente \";\n\t}\n\tif ($idvendedor > 0){\n\t\t$sql .= \" AND v.id_vendedor = $idvendedor \";\n\t}\n\t$rs = $link->query($sql) or die(\"Error en la consulta..\" . mysqli_error($link));\n\t$num_total_registros = mysqli_num_rows($rs);\n\tif ($num_total_registros == 0){\n\t\techo \"<div>No hay registros para los filtros seleccionados</div>\";\n\t\treturn;\n\t}\n\t//calculo el total de páginas\n\t$total_paginas = ceil($num_total_registros / $cantidad);\n\t$sql = \"SELECT v.*, c.descripcion AS cliente, u.nombre AS vendedor FROM ventas v LEFT JOIN clientes c ON c.id_cliente = v.id_cliente LEFT JOIN usuarios u ON u.id_usuario = v.id_vendedor WHERE 1=1 \";\n\tif ($idcliente > 0){\n\t\t$sql .= \" AND v.id_cliente = $idcliente \";\n\t}\n\tif ($idvendedor > 0){\n\t\t$sql .= \" AND v.id_vendedor = $idvendedor \";\n\t}\n\t$sql .= \" ORDER BY fecha_venta DESC LIMIT $inicio, $cantidad\";\n\t$rs = $link->query($sql) or die(\"Error en la consulta..\" . mysqli_error($link));\n\t?>\n\t<div class=\"table-responsive\">\n\t\t<table class=\"table table-condensed table-bordered\">\n\t\t\t<tr><th>fecha</th><th>cliente</th><th>vendedor</th><th></th><th></th></tr>\n\t\t\t<?php\n\t\t\twhile ($row = mysqli_fetch_array($rs)) {\n\t\t\t\t$fechaventa = \"\" . $row['fecha_venta'];\n\t\t\t\tif ($fechaventa != \"\") $fechaventa = date(\"d/m/Y\", strtotime($fechaventa));\n\t\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><?php echo $fechaventa; ?></td>\n\t\t\t\t\t<td><a href=\"admin-clientes.php?id=<?php echo $row[\"id_cliente\"]; ?>\"><?php echo $row[\"cliente\"]; ?></a></td>\n\t\t\t\t\t<td><?php echo $row[\"vendedor\"]; ?></td>\n\t\t\t\t\t<td class=\"text-center\"></td>\n\t\t\t\t\t<td class=\"text-center\"><a href=\"admin-ventas.php?e=1&id=<?php echo $row[\"id_venta\"]; ?>\" class=\"btn btn-xs btn-primary\">editar</a>&nbsp;<a href=\"admin-venta.php?id=<?php echo $row[\"id_venta\"]; ?>\" class=\"btn btn-xs btn-success\">detalle</a></td>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t</table>\n\t</div>\n\t<?php\n}", "public function BuscarCreditosxClientes() \n\t{\n\t\tself::SetNames();\n\t\t$sql = \"SELECT \n\tventas.codventa, \n\tventas.totalpago, \n\tventas.tipopago,\n\tventas.statusventa,\n\tventas.fechaventa, \n\tventas.fechavencecredito,\n\tventas.fechapagado,\n\tclientes.codcliente,\n\tclientes.documcliente, \n\tclientes.dnicliente, \n\tclientes.nomcliente, \n\tclientes.tlfcliente, \n\tabonoscreditos.codventa as codigo, \n\tabonoscreditos.fechaabono, \n\tdocumentos.documento,\n\tSUM(abonoscreditos.montoabono) AS abonototal \n\tFROM (ventas INNER JOIN clientes ON ventas.codcliente = clientes.codcliente)\n\tLEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa \n\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tWHERE ventas.codcliente = ? AND ventas.empresa = ? AND ventas.tipopago ='CREDITO' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim($_GET['codcliente']));\n\t\t$stmt->bindValue(2, $_SESSION[\"empresa\"]);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-info-circle'></span> NO SE ENCONTRARON CREDITOS PARA EL CLIENTE INGRESADO</center>\";\n\techo \"</div>\";\t\t\n\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getAvaliacoes() {\n\n if (count($this->aAvaliacaoAproveitamento) == 0 && $this->iCodigoDiario != \"\") {\n\n $oDaoDiario = new cl_diario;\n $sSqlDiarioAvaliacao = $oDaoDiario->sql_query_avaliacoes_periodo($this->iCodigoDiario);\n $rsDiarioAvaliacao = $oDaoDiario->sql_record($sSqlDiarioAvaliacao);\n $iTotalLinhas = $oDaoDiario->numrows;\n for ($iDiario = 0; $iDiario< $iTotalLinhas; $iDiario++) {\n\n $oDadosDiario = db_utils::fieldsMemory($rsDiarioAvaliacao, $iDiario);\n $oAvaliavaoAproveitamento = new AvaliacaoAproveitamento($oDadosDiario->codigo);\n if ($oDadosDiario->tipo_elemento == \"A\") {\n\n $oElementoAvaliacao = AvaliacaoPeriodicaRepository::getAvaliacaoPeriodicaByCodigo($oDadosDiario->codigo_elemento);\n } else {\n $oElementoAvaliacao = ResultadoAvaliacaoRepository::getResultadoAvaliacaoByCodigo($oDadosDiario->codigo_elemento);\n }\n\n $oAvaliavaoAproveitamento->setElementoAvaliacao($oElementoAvaliacao);\n $oAvaliavaoAproveitamento->setNumeroFaltas($oDadosDiario->numero_faltas);\n $oAvaliavaoAproveitamento->setParecerPadronizado($oDadosDiario->parecerpadronizado);\n $oAvaliavaoAproveitamento->setAmparado(trim($oDadosDiario->amparo) == \"S\" ? true : false);\n $oAvaliavaoAproveitamento->setConvertido(trim($oDadosDiario->convertido) == \"S\" ? true : false);\n $oAvaliavaoAproveitamento->setObservacao($oDadosDiario->observacao);\n $sTipoAvaliacao = $oElementoAvaliacao->getFormaDeAvaliacao()->getTipo();\n if ($this->oDiario->getMatricula()->isAvaliadoPorParecer()) {\n $sTipoAvaliacao = 'PARECER';\n }\n switch ($sTipoAvaliacao) {\n\n case 'NOTA' :\n\n $oValorAproveitamento = new ValorAproveitamentoNota($oDadosDiario->valor_nota);\n $oAvaliavaoAproveitamento->setParecer($oDadosDiario->parecer);\n break;\n\n case 'PARECER' :\n\n $oValorAproveitamento = new ValorAproveitamentoParecer($oDadosDiario->parecer);\n break;\n\n case 'NIVEL' :\n\n $oValorAproveitamento = new ValorAproveitamentoNivel($oDadosDiario->valor_conceito,\n $oDadosDiario->ordem_conceito);\n $oAvaliavaoAproveitamento->setParecer($oDadosDiario->parecer);\n break;\n }\n $oAvaliavaoAproveitamento->setValorAproveitamento($oValorAproveitamento);\n $oAvaliavaoAproveitamento->setAproveitamentoMinimo($oDadosDiario->minimo == \"S\" ? true : false);\n $oAvaliavaoAproveitamento->setEmRecuperacao($oDadosDiario->em_recuperacao == \"t\");\n $lAvaliacaoExterna = false;\n\n /**\n * a Nota sera externa quando a escola que lancou a avaliacao for\n * diferente da escola atual, ou a origem da nota for 'F', que informa que a nota é de fora da escola.\n */\n if ($oDadosDiario->tipo_elemento == \"A\") {\n\n $oAvaliavaoAproveitamento->setEscola(EscolaRepository::getEscolaByCodigo($oDadosDiario->escola));\n $oAvaliavaoAproveitamento->setTipo($oDadosDiario->origem);\n if ($oAvaliavaoAproveitamento->getTipo() == \"F\") {\n $oAvaliavaoAproveitamento->setEscola(EscolaProcedenciaRepository::getEscolaByCodigo($oDadosDiario->escola));\n }\n if ($oAvaliavaoAproveitamento->getEscola()->getCodigo() != $this->oDiario->getTurma()->getEscola()->getCodigo() ||\n $oAvaliavaoAproveitamento->getTipo() == 'F') {\n\n $lAvaliacaoExterna = true;\n }\n }\n $oAvaliavaoAproveitamento->setAvaliacaoExterna($lAvaliacaoExterna);\n $this->aAvaliacaoAproveitamento[] = $oAvaliavaoAproveitamento;\n }\n\n /**\n * Verificamos se todos os Resultados possuem Registros\n */\n $iTotalSemResultado = 0;\n foreach ($this->oDiario->getPeriodoAvaliacao() as $oPeriodo) {\n\n if ($oPeriodo->isResultado()) {\n\n $lPossuiResultado = false;\n foreach ($this->aAvaliacaoAproveitamento as $oAvaliacao) {\n if ($oPeriodo->getOrdemSequencia() == $oAvaliacao->getElementoAvaliacao()->getOrdemSequencia()) {\n\n $lPossuiResultado = true;\n break;\n }\n }\n if (!$lPossuiResultado) {\n\n $iTotalSemResultado ++;\n\n $oRetorno = $oPeriodo->getResultado($this->aAvaliacaoAproveitamento);\n if (!$oRetorno instanceof ValorAproveitamento) {\n $oRetorno = FormaObtencao::getTipoValorAproveitamento($oPeriodo->getFormaDeAvaliacao());\n }\n $this->adicionarAvaliacao($oPeriodo, $oRetorno);\n }\n }\n }\n }\n\n return $this->aAvaliacaoAproveitamento;\n }", "function buscarVendaCindice($cod)\n {\n $venda = new Vendas();\n $result = $venda->buscaVendaIndices($cod);\n return $result;\n }", "public function consultaBeneficio($beneficio){\n $url = 'http://app.viperconsig.com.br/WSInssben/wsdl';\n $function = 'ConsultaBen';\n $arguments = array($function => array('nb' => $beneficio,'username' => $this->usuario)); \n $client = new SoapClient($url);\n $result = $client->__soapCall($function, $arguments);\n }", "public function VentasPorId()\n\t{\n\tself::SetNames();\n\t$sql = \"SELECT \n\t\tventas.idventa, \n\t\tventas.codpedido,\n\t\tventas.codmesa,\n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado,\n\t\tventas.montopropina, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa,\n\t ventas.observaciones, \n\t salas.nomsala,\n\t mesas.nommesa,\n\t\tclientes.codcliente,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tclientes.limitecredito,\n\t\tdocumentos.documento,\n\t cajas.nrocaja,\n\t cajas.nomcaja,\n\t mediospagos.mediopago,\n\t usuarios.dni, \n\t usuarios.nombres,\n\t provincias.provincia,\n\t departamentos.departamento,\n\t\tROUND(SUM(if(pag.montocredito!='0',pag.montocredito,'0.00')), 2) montoactual,\n\t ROUND(SUM(if(pag.montocredito!='0',clientes.limitecredito-pag.montocredito,clientes.limitecredito)), 2) creditodisponible,\n\t pag2.abonototal\n FROM (ventas LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa)\n LEFT JOIN salas ON mesas.codsala = salas.codsala\n LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento \n\tLEFT JOIN cajas ON ventas.codcaja = cajas.codcaja\n\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\tLEFT JOIN usuarios ON ventas.codigo = usuarios.codigo\n \n LEFT JOIN\n (SELECT\n codcliente, montocredito \n FROM creditosxclientes) pag ON pag.codcliente = clientes.codcliente\n \n LEFT JOIN\n (SELECT\n codventa, codcliente, SUM(if(montoabono!='0',montoabono,'0.00')) AS abonototal\n FROM abonoscreditos \n WHERE codventa = '\".limpiar(decrypt($_GET[\"codventa\"])).\"') pag2 ON pag2.codcliente = clientes.codcliente\n WHERE ventas.codventa = ? AND ventas.statuspago = '0'\";\n $stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codventa\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "function getVenta($codigo)\n {\n $sql=\"SELECT codigo,metodoPago,metodoVenta,total,usuarios.usuario,DATE_FORMAT(fecha,'%d/%m/%Y') as fecha,hora FROM ventas INNER JOIN usuarios ON ventas.usuario=usuarios.id WHERE codigo = ? \";\n $getVenta=$this->conexion->prepare($sql);\n $getVenta->bindParam(1,$codigo);\n $getVenta->execute();\n return $getVenta->fetch();\n }", "public function buscarBebidas($codigo){\n if($codigo == null){\n throw new Exception(\"(Bebida_model) metodo buscarBebidas com parametros nulos\");\n }\n $this->db->where(\"pizzaria_bebida\", $codigo);\n $this->db->where(\"ativo_bebida\", 1);\n return $this->db->get(\"bebida\")->result_array();\n }", "function getMasVendidos() {\n $consulta = \\Base\\CompraQuery::create()\n ->select(array(\"id_prod\"))\n ->addAsColumn(\"veces\", 'count(id_prod)')\n ->addAsColumn(\"cantidad\", 'count(cant_prod)')\n ->groupBy(\"id_prod\")//'SUM(price_equipment)'\n ->orderBy(\"veces\", \"DESC\")\n ->limit(10)\n ->find();\n $arregloObj = json_decode(json_encode($consulta->toArray()), FALSE);\n return $arregloObj;\n //return $this->oMySQL->ejecutarConsultaSelect('SELECT id_prod, count(id_prod) AS veces ,count(cant_prod) as cantidad FROM compra GROUP BY id_prod ORDER BY veces DESC LIMIT 10 ');\n }", "public function BuscarVentasxCajas() \n\t{\n\t\tself::SetNames();\n\t\t$sql =\"SELECT \n\t\tventas.idventa, \n\t\tventas.codmesa,\n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado, \n\t\tventas.montopropina, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa, \n\t ventas.observaciones, \n\t\tcajas.nrocaja,\n\t\tcajas.nomcaja,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tdocumentos.documento,\n\t\tprovincias.provincia,\n\t\tdepartamentos.departamento,\n\t\tmediospagos.mediopago,\n\t\tSUM(detalleventas.cantventa) as articulos \n\t\tFROM (ventas LEFT JOIN detalleventas ON detalleventas.codventa=ventas.codventa)\n\t\tLEFT JOIN cajas ON ventas.codcaja = cajas.codcaja \n\t\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\t\tLEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\t\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\t\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento\n\t\t WHERE ventas.codcaja = ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND ventas.statuspago = '0' GROUP BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(decrypt($_GET['codcaja'])));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(3, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-info-circle'></span> NO SE ENCONTRARON VENTAS PARA LA CAJA SELECCIONADA</center>\";\n\techo \"</div>\";\t\t\n\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function cargar_datos_cab_venta($id){\n try{\n \n \n $pdo = AccesoDB::getCon();\n \n \n $sql = \"select b.nom_cli, b.mail_cli, c.nom_marca, b.anio_veh_cli, a.km_venta,b.fono_cli, b.modelo_veh_cli,b.patente_veh_cli,a.obs_venta, \n round(a.precio_total_venta/1.19) neto, round((a.precio_total_venta/1.19)*0.19) iva, a.precio_total_venta, a.dscto_venta\n from venta a LEFT JOIN clientes b ON a.id_cli_venta = b.id_cli\n LEFT JOIN marcas_veh c ON b.marca_veh_cli = c.id_marca\n where id_venta = :id\";\n \n \n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "function getviagem(){\n$Data_inicio=$this->Data_inicio;\n$Data_fim=$this->Data_fim;\n$Cidade=$this->Cidade;\n$Estado=$this->Estado;\n$CPF=$this->CPF;\n$sql = \"SELECT Id_viagem FROM `{$this->dbTable1}` WHERE Data_inicio='\".$Data_inicio.\"' AND Data_fim = '\".$Data_fim.\"' AND CPF = '\".$CPF.\"' AND Cidade = '\".$Cidade.\"' AND Estado = '\".$Estado.\"'\";\n$result = mysql_query($sql);\n$consulta=array();\nwhile($row = mysql_fetch_array($result) and $result!=null)\n{\n\n $consulta[] =array( $row['Id_viagem']); \n}\n$this->Id_viagem=$consulta;\n\nreturn $consulta;\n}", "function ListadoVentas($link, $fechadesde = \"\", $fechahasta = \"\", $idproveedor = 0, $idarticulo = 0, $pagtabla = 1, $cantidad = 20) {\n\t$fechadesde = $link->real_escape_string($fechadesde);\n\t$fechahasta = $link->real_escape_string($fechahasta);\n\t$idproveedor = $link->real_escape_string($idproveedor);\n\t$idarticulo = $link->real_escape_string($idarticulo);\n\t$pagtabla = $link->real_escape_string($pagtabla);\n\t$cantidad = $link->real_escape_string($cantidad);\n\t\n\t//examino la página a mostrar y el inicio del registro a mostrar\n\t$inicio = ($pagtabla - 1) * $cantidad;\n\n\t//miro a ver el número total de campos que hay en la tabla\n\t$sql = \"SELECT * FROM ventas v \n\tLEFT JOIN articulos a ON v.id_articulo = v.id_articulo \n\tLEFT JOIN proveedores p ON p.id_proveedor = a.id_proveedor\n\tLEFT JOIN usuarios u ON u.id_usuario = v.id_vendedora\n\tWHERE 1 = 1 \";\n\tif ($fechadesde != \"\"){\n\t\t$sql .= \" AND v.fecha_venta >= '\" . $fechadesde . \"' \";\n\t}\n\tif ($fechahasta != \"\"){\n\t\t$sql .= \" AND v.fecha_venta <= '\" . $fechahasta . \"' \";\n\t}\n\tif ($idproveedor > 0){\n\t\t$sql .= \" AND a.id_proveedor = \" . $idproveedor;\n\t}\n\tif ($idarticulo > 0){\n\t\t$sql .= \" AND v.id_articulo = $idarticulo \";\n\t}\n\n\t$rs = $link->query($sql) or die(\"Error en la consulta..\" . mysqli_error($link));\n\t$num_total_registros = mysqli_num_rows($rs);\n\n\t//calculo el total de páginas\n\t$total_paginas = ceil($num_total_registros / $cantidad);\n\n\t$sql = \"SELECT v.*, u.nombre as vendedora, p.nombre as proveedor, a.descripcion as articulo, a.id_proveedor\n\tFROM ventas v \n\tLEFT JOIN articulos a ON a.id_articulo = v.id_articulo \n\tLEFT JOIN proveedores p ON p.id_proveedor = a.id_proveedor\n\tLEFT JOIN usuarios u ON u.id_usuario = v.id_vendedora\n\tWHERE 1 = 1 \";\n\tif ($fechadesde != \"\"){\n\t\t$sql .= \" AND v.fecha_venta >= '\" . $fechadesde . \"' \";\n\t}\n\tif ($fechahasta != \"\"){\n\t\t$sql .= \" AND v.fecha_venta <= '\" . $fechahasta . \"' \";\n\t}\n\tif ($idproveedor > 0){\n\t\t$sql .= \" AND a.id_proveedor = \" . $idproveedor;\n\t}\n\tif ($idarticulo > 0){\n\t\t$sql .= \" AND v.id_articulo = $idarticulo \";\n\t}\n\n\t$rs = $link->query($sql) or die(\"Error en la consulta..\" . mysqli_error($link));\n\t?>\n\t<div class=\"table-responsive\">\n\t\t<table class=\"table table-condensed table-bordered\">\n\t\t\t<tr>\n\t\t\t\t<th>fecha</th>\n\t\t\t\t<th>vendedora</th>\n\t\t\t\t<th>proveedora</th>\n\t\t\t\t<th>articulo</th>\n\t\t\t\t<th>pcio venta</th>\n\t\t\t\t<th>observaciones</th>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t\twhile($row = mysqli_fetch_array($rs)) {\n\t\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><?php echo $row['fecha_venta']; ?></td>\n\t\t\t\t\t<td><?php echo $row['vendedora']; ?></td>\n\t\t\t\t\t<td><?php echo \"[\" . $row['id_proveedor'] . \"] \" . $row['proveedor']; ?></td>\n\t\t\t\t\t<td><?php echo $row['articulo']; ?></td>\n\t\t\t\t\t<td class=\"text-right\"><?php echo number_format($row['precio'], 2, '.', ''); ?></td>\n\t\t\t\t\t<td><?php echo $row['observaciones']; ?></td>\n\t\t\t\t\t<!--\n\t\t\t\t\t<td class=\"text-center\"><a class=\"btn btn-primary btn-xs verButton\" href=\"registro.php?id=<?php echo $row['id_venta']; ?>\">ver</a>&nbsp;<a class=\"btn btn-success btn-xs verButton\" href=\"registros.php?e=1&id=<?php echo $row['id_venta']; ?>\">editar</a></td>\n\t\t\t\t\t-->\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t</table>\n\t\t<?php Paginado($pagtabla, $total_paginas, \"registros\", \"&v=\" . $idproveedor . \"&fd=\" . $fechadesde . \"&fh=\" . $fechahasta); ?>\n\t</div>\n\t<?php\n}", "public function obtenerCabezeraVenta(Request $request) \n {\n if (!$request->ajax()) {\n return redirect('/');\n }\n\n $id = $request->id; \n\n $venta = Venta::join('cliente', 'venta.idcliente', '=', 'cliente.id')\n ->join('usuario', 'venta.idusuario', '=', 'usuario.id')\n ->select('venta.id', 'venta.fecha', 'venta.hora', \n 'venta.total', 'venta.estado', 'venta.numcomprobante', \n 'cliente.nombres as cliente', 'usuario.usuario as usuario')\n ->where('venta.id', '=', $id)\n ->orderBy('venta.id', 'desc')\n ->take(1)\n ->get();\n \n return ['venta' => $venta];\n }", "function listarProcesoVenta(){\n\t\t$this->procedimiento='vef.ft_proceso_venta_sel';\n\t\t$this->transaccion='VF_PROCON_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_venta','int4');\n\t\t$this->captura('tipos','_varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_desde','date');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('fecha_hasta','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function inicioBajaCuentas(){\n $sql = \"SELECT id, cta, saf, organismo, denominacion, banco, DATE_FORMAT(fecbajainicio, '%d/%m/%Y') AS fecbajainicio \n FROM cuentas \n WHERE inibaj = 1 \n AND baja = 0 \n AND fecbajainicio IS NOT NULL\";\n $res = mysql_query($sql, Conectar::con());\n while ($reg = mysql_fetch_assoc($res)) {\n $this->cuentas[] = $reg;\n }\n return $this->cuentas;\n }", "public function listaGeral()\n {\n $result = \\DB::select( \\DB::raw(\"\n SELECT p.id AS prova_id, p.tipo_prova, c.id AS corredor_id, (DATEDIFF(now(), c.data_nascimento) / 365) AS idade,\n c.nome AS nome_corredor, TIME_TO_SEC(TIMEDIFF(r.horario_fim, r.horario_inicio)) AS tempo\n\n FROM resultados r\n INNER JOIN corredores c ON c.id = r.corredor_id\n INNER JOIN provas p ON p.id = r.prova_id\n ORDER BY p.tipo_prova DESC\n \"));\n\n return $this->posicoesPorProva($result);\n }", "public function cargar_prov($vig){\n try{\n \n \n $pdo = AccesoDB::getCon();\n\n if($vig == 1){\n $sql = \"select * from proveedores where vigencia = 1\";\n } else{\n $sql = \"select * from proveedores\";\n } \n \n \n \n \n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "public function listarActivosVenta(){\n $sql=\"SELECT a.idarticulo, a.idcategoria, c.nombre AS categoria, a.codigo, a.nombre, a.stock, (SELECT precio_venta FROM detalle_ingreso WHERE idarticulo=\n a.idarticulo ORDER BY iddetalle_ingreso DESC LIMIT 0,1) AS precio_venta, a.descripcion, a.imagen, a.condicion FROM articulo a INNER JOIN categoria c\n ON a.idcategoria=c.idcategoria WHERE a.condicion='1'\";\n return ejecutarConsulta($sql);\n }", "public function getDataBodega(){\n $query = $this->con->query('SELECT * FROM bodega WHERE bodega.activo = 1');\n $retorno = [];\n $i=0;\n while ($fila = $query->fetch_assoc()){\n $retorno[$i]=$fila;\n $i++;\n }\n return $retorno;\n }", "function buscar_dados($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem.*, date_format(data_saida,'%d/%m/%Y') as data_saida,\n\t\t\t\treplace(valor,'.',',') as valor\n\t\t\t\t\tfrom viagem\n\t\t\t\t\t\twhere viagem.id = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "public function buscar_datos_prod($prod,$vig){\n try{\n \n \n $pdo = AccesoDB::getCon();\n $prod = \"%\".$prod.\"%\";\n \n if ($vig == 0) {\n $sql = \"select * from producto where cod_barra_prod = :cod\";\n }else if ($vig == 1) {\n $sql = \"select a.id_prod, a.nom_prod,a.uni_med_pro,a.stock_min_prod,\na.stock_prod,a.vig_prod,a.fec_cre_prod,a.usu_cre_prod,a.precio_bruto_prod,a.iva_prod,\na.proc_ganan_prod,a.precio_neto_prod,a.id_prov_prod,a.embalaje_prod,\na.cod_barra_prod,a.familia_prod,a.marca_prod,\nfam.desc_item, uni.desc_item, (a.precio_neto_prod + a.iva_prod) precio, a.id_prov_prod\nfrom producto a, tab_param fam, tab_param uni\n where a.uni_med_pro = uni.cod_item and uni.cod_grupo = 1 and uni.vig_item = 1\n and a.familia_prod = fam.cod_item and fam.cod_grupo = 2 and fam.vig_item = 1 \n and (a.cod_barra_prod like :prod or a.nom_prod like :prod) and a.vig_prod = 1;\";\n } \n \n \n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":prod\", $prod, PDO::PARAM_STR);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "function buscarVenta() {\n //Le deciamos que la locacion es lenguaje español\n setlocale(LC_CTYPE, 'es');\n //La sentencia a ejecutar\n $sql=\"SELECT \";\n $sql.=\"v.codigoVenta AS CodigoVenta, \";\n $sql.=\"v.cliente AS Cliente, \";\n $sql.=\"v.fecha AS Fecha, \";\n $sql.=\"d.codigoProducto AS CodigoProducto, \";\n $sql.=\"p.nombre AS Nombre, \";\n $sql.=\"p.precio AS Precio, \";\n $sql.=\"d.cantidad AS Cantidad, \";\n $sql.=\"d.descuento AS Descuento, \";\n $sql.=\"p.precio*d.cantidad AS Parcial, \";\n $sql.=\"((p.precio*d.cantidad)-d.descuento) AS SubTotal, \";\n $sql.=\"( \";\n $sql.=\"SELECT \";\n $sql.=\"SUM((dT.cantidad * pT.precio)-dT.descuento) AS TotalPagar \";\n $sql.=\"FROM \";\n $sql.=\"DetalleVenta AS dT INNER JOIN \";\n $sql.=\"Producto AS pT ON dT.codigoProducto = pT.codigoProducto \";\n $sql.=\"WHERE \";\n $sql.=\"dT.codigoVenta=v.codigoVenta \";\n $sql.=\") AS TotalPagar \";\n $sql.=\"FROM \";\n $sql.=\"Venta AS v INNER JOIN \";\n $sql.=\"DetalleVenta AS d ON v.codigoVenta = d.codigoVenta INNER JOIN \";\n $sql.=\"Producto AS p ON d.codigoProducto = p.codigoProducto \";\n $sql.=\"ORDER BY \";\n $sql.=\"CodigoVenta, Nombre\";\n try {\n //Creamos un objeto de la clase conexion\n $miconexion = new Conexion();\n //Obtenemos la conexion\n $cn = $miconexion->conectar();\n //Ejecutamos la sentencia\n $rs = mysql_query($sql, $cn);\n //Creamos un array que almacenara los datos de la sentencia\n $registros = array();\n //Recorremos el resultado de la consulta y lo almacenamos en el array\n while ($reg = mysql_fetch_array($rs)) {\n array_push($registros, $reg);\n }\n //Liberamos recursos\n mysql_free_result($rs);\n mysql_close($cn);\n } catch (exception $e) {\n try {\n mysql_free_result($rs);\n } catch (exception $e) {\n\n }\n try {\n mysql_close($cn);\n } catch (exception $e) {\n\n }\n }\n return $registros;\n }", "function buscavencimentos ($conn, $id){\r\n\t\t$query = \"SELECT * FROM vencimentos WHERE ID_USUARIO = '{$id}'\";\r\n\t\t$vencimentos = mysqli_query($conn, $query);\r\n\t\treturn mysqli_fetch_assoc($vencimentos);\r\n\t}", "function consultarAlicuotasIVA() {\n $datos = array();\n $result = $this->checkToken();\n if ($result[\"code\"] == Wsfev1::RESULT_OK) {\n $params = new stdClass();\n $params->Auth = new stdClass();\n $params->Auth->Token = $this->token;\n $params->Auth->Sign = $this->sign;\n $params->Auth->Cuit = $this->cuit;\n\n try {\n $results = $this->client->FEParamGetTiposIva($params);\n } catch (Exception $e) {\n return array(\"code\" => Wsfev1::RESULT_ERROR, \"msg\" => \"No pudimos comunicarnos con AFIP: \" . $e->getMessage(), \"datos\" => NULL);\n }\n\n $this->checkErrors('FEParamGetTiposIva');\n if (!isset($results->FEParamGetTiposIvaResult)) {\n return array(\"code\" => Wsfev1::RESULT_ERROR, \"msg\" => \"Respuesta mal formada\", \"datos\" => NULL);\n } else if (isset($results->FEParamGetTiposIvaResult->Errors)) {\n $error_str = \"Error al realizar consulta de alicuotas de iva: \\n\";\n foreach ($results->FEParamGetTiposIvaResult->Errors->Err as $e) {\n $error_str .= \"$e->Code - $e->Msg\";\n }\n return array(\"code\" => Wsfev1::RESULT_ERROR, \"msg\" => $error_str, \"datos\" => NULL);\n } else if (is_soap_fault($results)) {\n return array(\"code\" => Wsfev1::RESULT_ERROR, \"msg\" => \"$results->faultcode - $results->faultstring\", \"datos\" => NULL);\n } else {\n $X = $results->FEParamGetTiposIvaResult->ResultGet;\n foreach ($X->IvaTipo as $Y) {\n $datos[$Y->Id] = $Y->Desc;\n }\n return array(\"code\" => Wsfev1::RESULT_OK, \"msg\" => \"OK\", \"datos\" => $datos);\n }\n } else {\n return $result;\n }\n }", "public function listBodega(){\n return DB::table('v_bodegas_combo')->get();\n }", "public function CargarDivevaviaRp($cod, $pro)\n {\n $calificacion = $this->ArrayCalifVia($pro);\n $calificacion2 = $this->ArrayCalifAdi($pro);\n $nombre = \"\";\n $row = 0;\n $consulta = mysqli_query(\n $this->conexion,\n \"SELECT criterios_via.*,tipos_cri_via.nombre as ncri,convocatoria.nombre FROM `criterios_via`,tipos_cri_via,convocatoria WHERE criterios_via.tipo=tipos_cri_via.cod and criterios_via.id_convocatoria=$cod and criterios_via.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta2 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_via.*,tipos_cri_via.nombre as ncri,convocatoria.nombre FROM `criterios_via`,tipos_cri_via,convocatoria WHERE criterios_via.tipo=tipos_cri_via.cod and criterios_via.id_convocatoria=$cod and criterios_via.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta3 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_adi.*,tipos_cri_adi.nombre as ncri,convocatoria.nombre FROM `criterios_adi`,tipos_cri_adi,convocatoria WHERE criterios_adi.tipo=tipos_cri_adi.cod and criterios_adi.id_convocatoria=$cod and criterios_adi.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta4 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_adi.*,tipos_cri_adi.nombre as ncri,convocatoria.nombre FROM `criterios_adi`,tipos_cri_adi,convocatoria WHERE criterios_adi.tipo=tipos_cri_adi.cod and criterios_adi.id_convocatoria=$cod and criterios_adi.id_convocatoria=convocatoria.id order by tipo\"\n );\n //coincidir con codigos de tipo de criterios tabla tipo_cri_ele\n $count1 = 0;\n $count2 = 0;\n $count3 = 0;\n $count4 = 0;\n $count5 = 0;\n $count6 = 0;\n $count7 = 0;\n $count8 = 0;\n $count9 = 0;\n $count10 = 0;\n $pun1 = 0;\n $pun2 = 0;\n $pun3 = 0;\n $pun4 = 0;\n $pun5 = 0;\n $pun6 = 0;\n $pun7 = 0;\n $pun8 = 0;\n $pun9 = 0;\n $pun10 = 0;\n $puntajeG = 0;\n while ($datos = mysqli_fetch_array($consulta)) {\n if ($datos['tipo'] == 1) {\n $count1 += 1;\n $pun1 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 2) {\n $count2 += 1;\n $pun2 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 3) {\n $count3 += 1;\n $pun3 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 4) {\n $count4 += 1;\n $pun4 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 5) {\n $count5 += 1;\n $pun5 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 6) {\n $count6 += 1;\n $pun6 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 7) {\n $count7 += 1;\n $pun7 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 8) {\n $count8 += 1;\n $pun8 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 9) {\n $count9 += 1;\n $pun9 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 10) {\n $count10 += 1;\n $pun10 += $datos['puntaje'];\n }\n $puntajeG += $datos['puntaje'];\n }\n ?>\n<br>\n\n<table class=\"table table-bordered\" id=\"tblcriele\"><thead style=\"background:#f8f9fa;\"><tr><th width=\"15%\">Criterio</th><th width=\"10%\">Puntaje<br>(max)</th><th width=\"20%\">Requisito</th><th width=\"15%\">Fuente de verificación</th><th width=\"10%\">Puntaje<br>(max)</th><th width=\"10%\">Puntaje alcanzado</th><th width=\"15%\"> Concepto</th></tr></thead><tbody id=\"bd-list-convos\">\n<?php\n$contador = 0;\n$contadorsub = 1;\n$contador1 = 0;\n$contador2 = 0;\n$contador3 = 0;\n$contador4 = 0;\n$contador5 = 0;\n$contador6 = 0;\n$contador7 = 0;\n$contador8 = 0;\n$contador9 = 0;\n$contador10 = 0;\n$fila = 1;\n$conceptoF = 0;\nwhile ($datos = mysqli_fetch_array($consulta2)) {\n echo \"<tr>\";\n if ($datos['tipo'] == 1 && $contador1 == 0) {\n $contador++;\n echo \"<td rowspan='$count1' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count1' style='vertical-align: middle;'><b>$pun1</b></td>\";\n $contador1++;\n $contadorsub = 1;\n }\n\n if ($datos['tipo'] == 2 && $contador2 == 0) {\n $contador++;\n echo \"<td rowspan='$count2' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count2' style='vertical-align: middle;'><b>$pun2</b></td>\";\n $contador2++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 3 && $contador3 == 0) {\n $contador++;\n echo \"<td rowspan='$count3' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count3' style='vertical-align: middle;'><b>$pun3</b></td>\";\n $contador3++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 4 && $contador4 == 0) {\n $contador++;\n echo \"<td rowspan='$count4' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count4' style='vertical-align: middle;'><b>$pun4</b></td>\";\n $contador4++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 5 && $contador5 == 0) {\n $contador++;\n echo \"<td rowspan='$count5' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count5' style='vertical-align: middle;'><b>$pun5</b></td>\";\n $contador5++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 6 && $contador6 == 0) {\n $contador++;\n echo \"<td rowspan='$count6' style='vertical-align: middle;'><b>$datos[ncri]</b></td><td rowspan='$count6' style='vertical-align: middle;'><b>$pun6</b></td>\";\n $contador6++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 7 && $contador7 == 0) {\n $contador++;\n echo \"<td rowspan='$count7' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count7' style='vertical-align: middle;'><b>$pun7</b></td>\";\n $contador7++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 8 && $contador8 == 0) {\n $contador++;\n echo \"<td rowspan='$count8' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count8' style='vertical-align: middle;'><b>$pun8</b></td>\";\n $contador8++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 9 && $contador9 == 0) {\n $contador++;\n echo \"<td rowspan='$count9' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count9' style='vertical-align: middle;'><b>$pun9</b></td>\";\n $contador9++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 10 && $contador10 == 0) {\n $contador++;\n echo \"<td rowspan='$count10' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count10' style='vertical-align: middle;'><b>$pun10</b></td>\";\n $contador10++;\n $contadorsub = 1;\n }\n $califila = $this->ConsultaCalifila2($calificacion, $datos['id']);\n \n\n echo \"<td style='vertical-align: middle;'> $datos[requisito]</td> <td style='vertical-align: middle;'> $datos[observacion]</td><td style='vertical-align: middle;'> $datos[puntaje]</td> <td style='vertical-align: middle;' class='balnco'>$califila[0]</td><td style='vertical-align: middle;'>$califila[1]</td></tr>\";\n $fila++;\n $conceptoF += $califila[0];\n}\n\necho \"<tr style='background:#E6F5F4;display:none;'><td colspan='5' class='balnco'><b>Sub Total</b></td><td colspan='2' class='balnco'>$conceptoF</td></tr>\";\n\nif ($fila == 1) {\n echo \"<tr><td colspan='7' align='center'> No hay criterios</td></tr>\";\n}\n\n$countadc1 = 0;\n$punadc1 = 0;\n$puntajeGadc = 0;\nwhile ($datos = mysqli_fetch_array($consulta3)) {\n if ($datos['tipo'] == 1) {\n $countadc1 += 1;\n $punadc1 += $datos['puntaje'];\n }\n $puntajeGadc += $datos['puntaje'];\n}\n$contadoradc = 0;\n$contadorsubadc = 1;\n$contador1adc = 0;\n$filaadc = 1;\n$conceptoFadc = 0;\nwhile ($datos = mysqli_fetch_array($consulta4)) {\n echo \"<tr>\";\n if ($datos['tipo'] == 1 && $contador1adc == 0) {\n $contadoradc++;\n echo \"<td rowspan='$countadc1' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$countadc1' style='vertical-align: middle;'><b>$punadc1</b></td>\";\n $contador1adc++;\n $contadorsubadc = 1;\n }\n $califila = $this->ConsultaCalifila2($calificacion2, $datos['id']);\n $ayuda = \"\";\n if ($datos['observacion'] != \"\" || $datos['observacion'] != null) {\n $ayuda = \"<i class=\\\"fa fa-question-circle\\\" style=\\\"cursor:help;\\\" onmouseover=\\\"$('#helpadc$filaadc').css('display','block')\\\" onmouseout=\\\"$('#helpadc$filaadc').css('display','none')\\\"></i>\n <span class='tooltiptext2' id='helpadc$filaadc'>$datos[observacion]</span>\";\n } else {\n $ayuda = \"\";\n }\n\n echo \"<td width='25%' style='vertical-align: middle;'> $datos[requisito] $ayuda</td><td width='6%' style='vertical-align: middle;'> $datos[puntaje]</td> <td style='vertical-align: middle;' class='balnco'>$califila[0]</td><td style='vertical-align: middle;'>$califila[1]</td></tr>\";\n $filaadc++;\n $conceptoFadc += $califila[0];\n}\n\necho \"<tr style='background:#E6F5F4;display:none;'><td colspan='5' class='balnco'><b>Sub Total 2</b></td><td colspan='2' class='balnco'>$conceptoFadc</td></tr>\";\n\n$puntTotal = $conceptoF + $conceptoFadc;\nif ($puntTotal > 100) {\n $puntTotal = 100;\n}\n$conceptoFinnal=\"NO VIABLE\";\nif ($puntTotal >= 80) {\n $conceptoFinnal=\"VIABLE\";\n}\necho \"<tr style='background:#E6F5F4;'><td colspan='5' class='balnco'><b>Total</b></td><td colspan='2' class='balnco'>$puntTotal</td></tr>\";\n$this->mensaje = $conceptoFinnal;\nif ($filaadc == 1) {\n echo \"<tr style='display:none;'><td colspan='7' align='center'> No hay criterios de puntaje adicional</td></tr>\";\n}\n\necho \"<tr ><td colspan='7' class='espacio'></td></tr><tr><td colspan='2' style='vertical-align:midde;'> <b>Concepto Final : </b>$conceptoFinnal</td><td colspan='5'>\" . $this->finalConcept2($pro) . \"</td></tr>\";\n\necho \"<tr ><td colspan='7' class='espacio'></td></tr>\";?>\n</tbody></table>\n<?php\n }", "function buscasinvex(){\n\t\t$comodin= $this->datasis->traevalor('COMODIN');\n\n\t\t$mid = $this->uri->segment($this->uri->total_segments());\n\n\t\tif($mid == false) {\n\t\t\techo 'Consulta Vacia';\n\t\t\treturn;\n\t\t}\n\n\t\tif(strlen($comodin)==1 && $comodin!='%' && $mid!==false){\n\t\t\t$mid=str_replace($comodin,'%',$mid);\n\t\t}\n\t\t$qdb = $this->db->escape($mid.'%');\n\t\t$qba = $this->db->escape($mid);\n\n\t\t$data = '[]';\n\t\tif($mid !== false){\n\n\t\t\t// Busca\n\t\t\t$mSQL=\"\n\t\t\tSELECT DISTINCT TRIM(a.descrip) AS descrip, TRIM(a.codigo) AS codigo,\n\t\t\ta.precio1, precio2, precio3, precio4, a.iva, if(a.existen>=0,a.existen,0) existen,\n\t\t\ta.tipo,a.peso, a.ultimo, a.pond, a.barras, a.marca, a.modelo\n\t\t\tFROM sinv AS a\n\t\t\tWHERE (a.codigo LIKE ${qdb} OR a.descrip LIKE ${qdb} OR a.barras LIKE ${qdb}) AND a.activo='S'\n\t\t\tORDER BY if(a.existen>0,0,1), a.descrip LIMIT 30\";\n\n\t\t\t$retArray = $retorno = array();\n\n\t\t\t$cana=1;\n\n\t\t\t$query = $this->db->query($mSQL);\n\t\t\tif ($query->num_rows() > 0){\n\t\t\t\tforeach( $query->result_array() as $row ) {\n\n\t\t\t\t\t$retArray['codigo'] = $row['codigo'];\n\t\t\t\t\t$retArray['tipo'] = $row['tipo'];\n\t\t\t\t\t$retArray['peso'] = $row['peso'];\n\t\t\t\t\t$retArray['ultimo'] = $row['ultimo'];\n\t\t\t\t\t$retArray['pond'] = $row['pond'];\n\t\t\t\t\t$retArray['base1'] = round($row['precio1']*100/(100+$row['iva']),2);\n\t\t\t\t\t$retArray['base2'] = round($row['precio2']*100/(100+$row['iva']),2);\n\t\t\t\t\t$retArray['base3'] = round($row['precio3']*100/(100+$row['iva']),2);\n\t\t\t\t\t$retArray['base4'] = round($row['precio4']*100/(100+$row['iva']),2);\n\t\t\t\t\t$retArray['descrip'] = $this->en_utf8($row['descrip']);\n\t\t\t\t\t$retArray['barras'] = $row['barras'];\n\t\t\t\t\t$retArray['iva'] = $row['iva'];\n\t\t\t\t\t$retArray['existen'] = $row['existen'];\n\t\t\t\t\t$retArray['marca'] = $row['marca'];\n\t\t\t\t\t$retArray['modelo'] = $row['modelo'];\n\t\t\t\t\tarray_push($retorno, $retArray);\n\t\t\t\t}\n\t\t\t\t$data = json_encode($retorno);\n\t }\n\t\t}\n\t\techo $data;\n\t}", "function buscar_transportes($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_transporte.id, empresa.empresa, tipo_transporte.tipo_transporte,\n\t\t\t\tviagem_transporte.quantidade, viagem_transporte.contato, viagem_transporte.valor,\n\t\t\t\tviagem_transporte.id_empresa_tipo_transporte\n\t\t\t\t\tfrom viagem_transporte\n\t\t\t\t\t\tinner join empresa_tipo_transporte on empresa_tipo_transporte.id = viagem_transporte.id_empresa_tipo_transporte\n\t\t\t\t\t\tinner join tipo_transporte on tipo_transporte.id = empresa_tipo_transporte.id_tipo_transporte\n\t\t\t\t\t\tinner join empresa on empresa.id = empresa_tipo_transporte.id_empresa\n\t\t\t\t\t\t\twhere viagem_transporte.id_viagem = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "public function listaValorVenda($codigoVenda){\n\t\n\t\t$conn = new Conexao();\n\t\t$conn->openConnect();\n\t\n\t\t$mydb = mysqli_select_db($conn->getCon(), $conn->getBD());\n\t\t$resultado = mysqli_query($conn->getCon(),\n\t\t\t\t\"SELECT * FROM valores_venda WHERE codigo_venda LIKE '\".$codigoVenda.\"'\");\n\t\n\t\t$arrayProduto = array();\n\t\n\t\twhile ($row = mysqli_fetch_assoc($resultado)) {\n\t\t\t$arrayProduto[]=$row;\n\t\t}\n\t\n\t\t$conn->closeConnect ();\n\t\treturn $arrayProduto;\n\t\n\t}", "public function retornaViatgesAbonats ( ) {\r\n $sql = \"SELECT * FROM \" . _DB_PREFIX_ .\"viatges WHERE abonat=1 ORDER BY data asc\";\r\n return $this->getRows ( $sql );\r\n \r\n }", "public function Buscar(){\r\n\t\t$sql = \"SELECT nome, quant FROM venda\";\r\n\r\n\t\t// Execução do SQL\r\n\t\t$consulta = Conexao::getBD()->query($sql);\r\n\r\n\t\t// Contagem das linhas que vai ser retonada na consulta feita\r\n\t\t$rows = $consulta->rowCount();\r\n\r\n\t\t//Array responsavel por armazenar os dados do banco com duas Chaves:\r\n\t\t// Chave \"nomes\": Vai armazenar em um array os nomes(Do campo \"nome\" da tabela \"venda\")\r\n\t\t// retornados na consulta.\r\n\t\t// Chave \"quant\": Vai armazenar em um array os valores(Do campo \"quant\" da tabela \"venda\")\r\n\t\t// retornados na minha consulta.\r\n\t\t$arrayDados = array(\r\n\t\t\t'nomes' => array(),\r\n\t\t \t'quant' => array(),\r\n\t\t \t);\r\n\t\t\r\n\t\t// Laço de retição que vai se repetir de acordo com a quantidade de linhas ($rows) que foi \r\n\t\t//retornado na consulta.\r\n\t\tfor ($i=0; $i < $rows; $i++) {\r\n\t\t\t// Vai transformar a consulta em um Array Assosiativo e armazena-la na variavel \"$linhas\"\r\n\t\t\t$linhas = $consulta->fetch(PDO::FETCH_ASSOC);\r\n\r\n\t\t\t// Vai preenchar o $ArrayDados na chave \"nomes\" na posição do \"$i\" com os dados da variavel\r\n\t\t\t// $linhas na chave \"nome\".\r\n\t\t\t$arrayDados['nomes'][$i] = $linhas['nome'];\r\n\t\t\t\r\n\t\t\t// Vai preenchar o $ArrayDados na chave \"quant\" na posição do \"$i\" com os dados da variavel\r\n\t\t\t// $linhas na chave \"quant\".\r\n\t\t \t$arrayDados['quant'][$i] = $linhas['quant'];\r\n\t\t}\r\n\r\n\t\t// Retorna o $arrayDados preenchido\r\n\t\treturn $arrayDados;\r\n\t}", "public function buscarProdutosAtivos(){\r\n\t\techo 'buscarProdutosAtivos';\r\n\t\t\t\r\n\t\t$sql = \"SELECT * FROM `tb_produto` WHERE prod_status = 'S';\";\r\n\r\n\t\t$conn = new Conexao();\r\n\t\t\r\n\t\t$query = $conn->Conn();\r\n\t\t\r\n\t\t//criar um array que irá receber a lista de produtos\r\n\t\t$produtosArray = array();\r\n\t\t\t\r\n\t\tif($resultado = $query->query($sql)){\r\n\t\t\t\r\n\t\t\twhile ($row = mysqli_fetch_array($resultado)) {\r\n\t\t\t\t//echo \"dentro \".$row['prod_id'].\" - \".$row['prod_nome'].\"<br>\";\r\n\t\t\t\t$produtoDTO = new ProdutoDTO();\r\n\t\t\t\t\r\n\t\t\t\t$produtoDTO->setId($row['prod_id']);\r\n\t\t\t\t$produtoDTO->setNome($row['prod_nome']);\r\n\t\t\t\t$produtoDTO->setTamanho($row['prod_tamanho']);\r\n\t\t\t\t$produtoDTO->setCusto($row['prod_custo']);\r\n\t\t\t\t$produtoDTO->setStatus('S');\r\n\t\t\t\t$produtoDTO->setDescricao($row['prod_descricao']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t$produtosArray[] = ($produtoDTO);\r\n\t\t\t\t//echo \"id: $genero[0], Genero: $genero[1]<br>\";\r\n\t\t\t\t\t\r\n\t\t\t\t//echo ;\r\n\t\t\t\t//echo \"<br>$i<br>\";\r\n\r\n\t\t\t}\r\n\t\t\tmysqli_free_result($resultado);\r\n\t\t}\r\n\t\t$conn->fecharConn();\r\n\t\t\r\n\t\treturn $produtosArray;\r\n\t}", "public function ObtenerProvincias(){\r\n\t$soap = new SoapClient('http://assets.uci.cu/servicios/v4/AssetsWS.wsdl');\r\n $resultado = $soap->ObtenerProvincias();\r\n foreach ($resultado as $r) { \r\n $datos[$r->IdProvincia] = $r->NombreProvincia;\r\n }\r\n\treturn $datos;\r\n }", "public function getCiudades()\n {\n if($this->getInt('pais'))\n //Devuele un objeto json que se carga en tiempo real\n echo json_encode($this->_ajax->getCiudades($this->getInt('pais')));\n }", "public function QtdContratosAberto(){\n\t\t\n\t\t$sql = \"SELECT COUNT(status) as aberto FROM contrato WHERE status LIKE 'aberto'\";\n\n\t\t$conn = new Conexao();\n\t\t$conn->openConnect();\n\t\t\n\t\t$mydb = mysqli_select_db($conn->getCon(), $conn->getBD());\n\t\t$resul = mysqli_query($conn->getCon(), $sql);\n\t\t\n\t\t$conn->closeConnect ();\n\t\t\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_assoc($resul)) {\n\t\t\t$array[]=$row;\n\t\t}\n\t\t\n\t\treturn $array;\n\t\t\n\t}", "public function getCanchasBloqueos($params){ \n $_db = $this->__construct();\n $idCancha = $params->idCancha; \n \n // Obtiene Canchas de la Instalacion \n $cmdSql = \"SELECT id, FechaInicial,FechaFinal,HoraInicial,HoraFinal,Comentario\n FROM ReservacionBloqueo WHERE CONCAT(FechaFinal,' ',HoraFinal)>=NOW() and Estado=1 and IdCancha=\".$idCancha.\" order by FechaRegistro DESC\";\n\n $_resultCanchas = $_db->query($cmdSql) \n or die('Connect Error 01 ('.$cmdSql.' '. $_db->connect_errno . ') ' . $_db->connect_error);\n \n $resultsCanchas = array(); \n while ($row = $_resultCanchas->fetch_assoc()) {array_push($resultsCanchas, $row);} \n $NoFilas = sizeof($resultsCanchas);\n \n $msj = array('CantFilas'=>'');\n $msj['CantFilas']=$NoFilas;\n\n $results = array($resultsCanchas); \n $respuesta = array($msj,$results); \n return $respuesta;\n\t \n}", "public function atendimentos(Request $request)\n\t{\n\t\t$list = array();\n\t\t$take = $request->input('itensPorPagina');\n $de = $request->input('de');\n $ate = $request->input('ate');\n $vendedor_id = $request->input('vendedor_id');\n $pagina = $request->input('pagina');\n $orderBy = $request->input('orderBy');\n $orderByField = $request->input('orderByField');\n $skip = $take*$pagina;\n $qb = DB::table('atendimento')\n ->join('vendedor', 'vendedor.id', '=', 'atendimento.vendedor_id')\n ->join('filial', 'filial.id', '=', 'vendedor.filial_id')\n ->join('produto', 'produto.id', '=', 'atendimento.produto_id');\n $filial = \"\";\n if(isset($_COOKIE['filial'])){\n $filial = $_COOKIE['filial'];\n }\n if($vendedor_id){\n $qb = $qb->where('atendimento.vendedor_id', '=', $vendedor_id);\n }\n if($filial){\n $qb = $qb->where(\"vendedor.filial_id\",\"=\",$filial);\n }\n if($de && $ate){\n $qb = $qb->whereBetween('atendimento.created_at', array($de, $ate));\n }\n $qb2 = $qb;\n\t\t$list[\"total\"] = $qb->select(\n\t\t\t'atendimento.motivo',\n\t\t\tDB::raw('count(atendimento.motivo) as quantidade')\n\t\t)->groupBy('atendimento.motivo')->get();\n\t\tif($take){\n\t\t\t$qb = $qb->take($take);\n\t\t}\n\t\tif($skip){\n\t\t\t$qb = $qb->skip($skip);\n\t\t}\n\t\tif($orderByField && $orderBy){\n\t\t\t$qb = $qb->orderBy($orderByField, $orderBy);\n\t\t}\n\t\t$list[\"dados\"] = $qb->select('atendimento.*', 'vendedor.nome as nome_vendedor', 'filial.nome as nome_filial', 'produto.descricao as nome_produto')->get();\n\t\t\n\n\t\treturn response()->json($list);\n\t}", "function getVendedor($idAviso)\r\n {\r\n return $this->getAdapter()->fetchAll('EXEC KO_SP_AVISO_VENDEDOR_QRY ?', array($idAviso));\r\n }", "public function getBecarios() {\n $pdo = Database::connect();\n $sql = \"select * from becarios\";\n $resultado = $pdo->query($sql);\n//transformamos los registros en objetos de tipo Beca:\n $listado = array();\n foreach ($resultado as $res) {\n $becario = new Becario($res['cedula'], $res['fecha_ini'], $res['fecha_fin'], $res['carrera'], $res['cuenta'], $res['cod_beca']);\n array_push($listado, $becario);\n }\n Database::disconnect();\n//retornamos el listado resultante:\n return $listado;\n }", "public function traerProvinciasSelect(){\n //con la primera parte de la consulta genero un campo por defecto\n\t\t$sql = \"SELECT '0' as id, '' as text UNION SELECT pr.codigoProvincia as id, pr.provincia as text FROM provinciasCat pr order by id;\";\n\t\t$datos = $this->gestorBD->hacerConsulta($sql);\n\t\treturn $datos;\n }", "public function consultarVigentes(){\n try {\n\n //CONEXION A LA BASE DE DATOS\n $conexion = new PDO('mysql:host='.$this->datosConexionBD[0].';\n dbname='.$this->datosConexionBD[3], $this->datosConexionBD[1], $this->datosConexionBD[2]);\n\n $conexion -> exec(\"set names utf8\");\n\n //Sentencia SQL para eliminar un usuario\n return $resultados = $conexion->query(\"SELECT * FROM cotizaciones WHERE statusCotizacion = 1 ORDER BY yyyyCotizacion DESC, mmCotizacion DESC, ddCotizacion DESC\");\n\n }\n\n catch(PDOException $e){\n return \"Error: \" . $e->getMessage();\n }\n }", "function buscarEspaciosPlanMenosAprobados(){\n foreach ($this->espaciosPlan as $espacio)\n {\n $espacioPlan[]=$espacio['CODIGO'];\n }\n \n $resultado_espacios=array_diff($espacioPlan, $this->espaciosAprobados);\n return $resultado_espacios; \n }", "function cadastraFaturas($faturas,$formaPagto,$produto,$data_geracao,$id_cliente_produto,$id_cliente) {\n\n\t\t\t$id_cobranca = 0;\n\t\t\t$gera_carne = false;\n\t\t\t\n\t\t\t$prefProv = $this->preferencias->obtemPreferenciasProvedor();\n\t\t\t\n\t\t\t$id_forma_pagamento = $formaPagto['id_forma_pagamento'];\n\t\t\t\n\t\t\tif ($formaPagto ['carne'] == 't' && count ($faturas) > 0) {\n\t\t\t\t$gera_carne = true;\n\t\t\t\t$soma_fatura = 0;\n\t\t\t\tforeach ($faturas as $fatura){\n\t\t\t\t\t$soma_fatura += $fatura [\"valor\"];\n\t\t\t\t}\n\n\t\t\t\t$dados = array (\n\t\t\t\t\t'data_geracao' => $data_geracao,\n\t\t\t\t\t'id_cliente_produto' => $id_cliente_produto,\n\t\t\t\t\t'valor' => $soma_fatura,\n\t\t\t\t\t'vigencia' => count ($faturas),\n\t\t\t\t\t'id_cliente' => $id_cliente,\n\t\t\t\t);\n\n\t\t\t\t$id_cbtb_carne = $this->cbtb_carne->insere ($dados);\n\t\t\t}\n\n\t\t\tfor( $i=0;$i<count($faturas);$i++) {\n\t\t\t\t$fatura = $faturas[$i];\n\t\t\t\t$cod_barra = \"\";\n\t\t\t\t$linha_digitavel = \"\";\n\t\t\t\t$nosso_numero = \"\";\n\t\t\t\t\n\n\t\t\t\tif ($gera_carne) {\n\t\t\t\t\t// gera codigo de barras\n\t\t\t\t\t$nosso_numero = $this->pftb_forma_pagamento->obtemProximoNumeroSequencial ($id_forma_pagamento);\n\n\t\t\t\t\t// ($banco,$agencia,$conta,$carteira,$convenio,$vencimento,$valor,$id,$moeda=9,$cnpj_ag_cedente=\"\",$codigo_cedente=\"\",$operacao_cedente=\"\")\n\n\t\t\t\t\t\n\n\t\t\t\t\tswitch ($formaPagto [\"tipo_cobranca\"]) {\n\t\t\t\t\t\tcase \"PC\":\n\t\t\t\t\t\t\t$cod_barra = MArrecadacao::codigoBarrasPagContas ($fatura [\"valor\"], $prefProv ['cnpj'], $nosso_numero, $fatura ['data']);\n\t\t\t\t\t\t\t$linha_digitavel = MArrecadacao::linhaDigitavel ($cod_barra);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"BL\":\n\t\t\t\t\t\t\t$boleto = MBoleto::factory ($formaPagto[\"codigo_banco\"],$formaPagto[\"agencia\"],$formaPagto[\"conta\"],$formaPagto[\"carteira\"],$formaPagto[\"convenio\"],$fatura['data'],$fatura ['valor'],$nosso_numero,self::$moeda,$formaPagto ['cnpj_ag_cedente'],$formaPagto ['codigo_cedente'],$formaPagto ['operacao_cedente']);\n\t\t\t\t\t\t\t$cod_barra = $boleto->obtemCodigoBoleto ();\n\t\t\t\t\t\t\t$linha_digitavel = $boleto->obtemLinhaDigitavel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"MO\":\n\t\t\t\t\t\t\t// Carnê genérico\n\t\t\t\t\t\t\t$carne = new MCarne($fatura[\"valor\"],$id_cliente_produto,$nosso_numero,$fatura['data']);\n\t\t\t\t\t\t\t$cod_barra = $carne->obtemCodigoBarras();\n\t\t\t\t\t\t\t$linha_digitavel = $carne->obtemLinhaDigitavel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->cadastraFatura($id_cliente_produto, $id_cobranca, $fatura[\"data\"], $fatura[\"valor\"], $id_forma_pagamento, $produto[\"nome\"], $id_cbtb_carne, $nosso_numero, $linha_digitavel, $cod_barra);\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t\t// Caso tenha gerado o carnê retorna o número do mesmo, caso contrário retorna vazio.\n\t\t\treturn($gera_carne?$id_cbtb_carne:\"\");\n\t\t\t\n\t\t}", "public function listar()\n\t{\n\t\t$sql=\"SELECT a.idtransferenciabch,a.idproveedores,a.idctasbancarias,DATE(a.fecha_hora) as fecha, a.tipo_transfbch, a.serie_transf,a.num_transf,b.cuentapg,\n\t\tb.numctapg,\tc.casa_comercial,\tc.tipo_cuenta,\tc.nombre_banco,\tFORMAT(a.monto_acreditar,2) as monto_acreditar,\ta.descripcion,\n\t\ta.condicion\n\t\tFROM transferenciabch a\n\t\tINNER JOIN ctasbancarias b ON a.idctasbancarias=b.idctasbancarias\n\t\tINNER JOIN proveedores c ON a.idproveedores=c.idproveedores\n\t\tORDER BY a.idtransferenciabch desc\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "protected function listBanco()\n {\n $arrBanco = $this->listEntity('InepZend\\Module\\Corporative\\Service\\VwBanco', array(), null, null, array('coBanco' => 'ASC', 'dsBanco' => 'ASC'));\n foreach ($arrBanco as $intCodBanco => $strNameBanco)\n $arrBanco[$intCodBanco] = str_pad($intCodBanco, 3, '0', STR_PAD_LEFT) . ' - ' . $strNameBanco;\n return $arrBanco;\n }", "public function cargar_familia_prod($vig){\n try{\n \n \n $pdo = AccesoDB::getCon();\n\n if($vig == 1){\n $sql = \"select * from tab_param where vig_item = 1 and cod_grupo = 2 and cod_item <> 0 order by desc_item desc\";\n } else{\n $sql = \"select * from tab_param where cod_grupo = 2 and cod_item <> 0\";\n } \n \n \n \n \n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "public function BuscarProductosVendidos() \n\t {\n\t\tself::SetNames();\n $sql =\"SELECT productos.codproducto, productos.producto, productos.codcategoria, detalleventas.descproducto, detalleventas.precioventa, productos.existencia, categorias.nomcategoria, ventas.fechaventa, SUM(detalleventas.cantventa) as cantidad FROM (ventas LEFT JOIN detalleventas ON ventas.codventa=detalleventas.codventa) LEFT JOIN productos ON detalleventas.codproducto=productos.codproducto LEFT JOIN categorias ON productos.codcategoria=categorias.codcategoria WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND productos.empresa = ? GROUP BY detalleventas.codproducto, detalleventas.precioventa, detalleventas.descproducto ORDER BY productos.codproducto ASC\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->bindValue(3, $_SESSION[\"empresa\"]);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN PRODUCTOS FACTURADOS PARA EL RANGO DE FECHA INGRESADA</center>\";\n\t\techo \"</div>\";\t\t\n\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ventasPorAgente($id)\n {\n $consulta = \"SELECT a.nombre as nombre, count(a.id) as ventas, sum(tv.importe_venta) as total, c.nom_ciudad as sede \n FROM agentes_ventas av INNER JOIN tipo_venta tv on av.id_venta = tv.id_venta \n INNER JOIN agentes a on av.id_agente = a.id \n INNER JOIN ciudad c ON a.id_ciudad = c.id_ciudad WHERE a.id =:id\";\n\n $result = $this->GetInstance()->prepare($consulta);\n $result->bindParam(':id', $id);\n $result->execute();\n return $result->fetch();\n }", "public function get_balance_general($dia)\n {\n $sql = \"\n SELECT \n COUNT(costo_consulta) numero_pacientes,\n 0 AS numero,\n 'Consultas' AS descripcion, \n costo_consulta AS costo,\n (COUNT(costo_consulta) * costo_consulta) AS total\n FROM citas \n WHERE \n fecha = '\".$dia.\"' AND \n id_tipo_cita != 2 AND \n cobrado = 1 AND\n activo = 1\n GROUP BY costo_consulta\n UNION\n SELECT \n COUNT(costo_consulta) numero_pacientes,\n 0 AS numero,\n 'Membresias' AS descripcion, \n costo_consulta AS costo,\n (COUNT(costo_consulta) * costo_consulta) AS total \n FROM citas \n WHERE \n fecha = '\".$dia.\"' AND \n id_tipo_cita = 2 AND \n cobrado = 1 AND\n activo = 1\n GROUP BY costo_consulta\n UNION\n SELECT \n 0 AS numero_pacientes,\n SUM(numero_carnets_vendidos) as numero,\n 'Venta de carnets' AS descripcion,\n 20 as costo ,\n (SUM(numero_carnets_vendidos) * 20) as total\n FROM venta_carnets \n WHERE\n fecha = '\".$dia.\"' AND \n activo = 1\n UNION\n SELECT \n 0 numero_pacientes,\n COUNT(importe) as numero,\n 'Total gastos' AS descripcion, \n count(importe) AS costo ,\n SUM(importe) AS total \n FROM gastos \n WHERE \n fecha = '\".$dia.\"' AND \n activo = 1\n \n UNION\n SELECT \n 0 AS numero_pacientes, \n COUNT(importe) AS numero,\n 'Total devoluciones' AS descripcion,\n count(importe) as costo,\n SUM(importe) AS total\n FROM devoluciones\n WHERE \n activo = 1 AND\n fecha = '\".$dia.\"';\n\n \";\n $query = $this->db->query($sql);\n \n if($query->num_rows() > 0)\n {\n return $query;\n }\n else\n {\n return FALSE;\n }\n }", "function Grabar_Boleta_Venta($filas,$alumno,$codint,$referencia,$cuenta,$banco,$empresa,$pv,$fecboleta,$fecpago,$subt,$descuento,$total,$moneda,$montext){\n $respuesta = new xajaxResponse();\n $ClsBan = new ClsBanco();\n\t$ClsBol = new ClsBoletaCobro();\n $ClsPer = new ClsPeriodoFiscal();\n\t$ClsVent = new ClsVenta();\n\t$ClsMon = new ClsMoneda();\n\n\t//--\n\t$monchunk = explode(\"/\",$montext);\n\t$tcamb = $ClsMon->get_tipo_cambio($moneda); // Tipo de Cambio\n\n\t$sql = \"\";\n\t//------------\n\t$motivo = \"\";\n\tif($filas > 0 && $alumno != \"\" && $cuenta != \"\" && $banco != \"\" && $moneda != \"\"){\n\t\t// BOLETA\n $result = $ClsVent->get_detalle_temporal($pv,$empresa);\n if(is_array($result)){\n $motivo = \"\";\n foreach($result as $row){\n $motivo.= \"(\".trim($row[\"dventemp_cantidad\"]).\") \".utf8_decode($row[\"dventemp_detalle\"]).\", \";\n }\n $motivo = substr($motivo, 0, -2);\n }else{\n $motivo = trim(\"Uniformes y otros accesorios\");\n }\n ////////--\n $periodo = $ClsPer->periodo;\n $codigo = $ClsBol->max_boleta_cobro();\n\t\t$codigo++;\n if($referencia == \"\"){\n //--- repmplazado por el $codigo\n $referencia = $codigo;\n }\n $sql.= $ClsBol->insert_boleta_cobro($codigo,$periodo,$cuenta,$banco,$alumno,$codint,$referencia,\"V\",$total,$motivo,$descuento,\"\",$fecboleta);\n\t\t//DETALLE DE VENTA\n\t\t$P = 0; // contador de filas con productos para descargar a inventario\n\t\t$P+= $ClsVent->count_detalle_temporal($pv,$empresa,'','P');\n\t\t// detalle de venta (traslado de tablas temporales)\n\t\t$sql.= $ClsBol->insert_detalle_desde_temporal($codigo,$cuenta,$banco,$pv,$empresa);\n\t\t$sql.= $ClsVent->delete_detalle_temporal($pv,$empresa);\n\t\t\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsBol->exec_sql($sql);\n\t\t//$respuesta->alert(\"$rs\");\n\t\tif($rs == 1){\n\t\t\tif($P > 0){ ///cantidad de productos a descargar\n\t\t\t\t$usu = $_SESSION[\"codigo\"];\n\t\t\t\t$hashkey = $ClsBol->encrypt($codigo, $usu);\n\t\t\t\t$hashkey1 = $ClsBol->encrypt($alumno, $usu);\n\t\t\t\t//--\n\t\t\t\t$respuesta->script('boletaOKdescargar(\"'.$hashkey.'\",'.$codigo.','.$cuenta.','.$banco.','.$P.')');\n\t\t\t}else{\n\t\t\t\t$usu = $_SESSION[\"codigo\"];\n\t\t\t\t$hashkey = $ClsBol->encrypt($codigo, $usu);\n\t\t\t\t$hashkey1 = $ClsBol->encrypt($alumno, $usu);\n\t\t\t\t//--\n\t\t\t\t$respuesta->script('swal(\"Excelente\", \"Transacci\\u00F3n registrada satisfactoriamente!!!\", \"success\").then((value)=>{ window.open(\"../../CONFIG/BOLETAS/REPboleta.php?hashkey='.$hashkey.'\"); window.location.href =\\'../CPBOLETAFACTURAS/FRMalumno.php?hashkey='.$hashkey1.'\\' });');\n\t\t\t}\n\t\t\t$respuesta->assign(\"lblparrafo\",\"innerHTML\",$msj);\n\t\t}else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error en la transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n\t\t}\n\t}\n\n return $respuesta;\n}", "function listarBalanceGeneral(){\n\t $this->procedimiento='conta.f_balance';\n\t $this-> setCount(false);\n\t\t$this->setTipoRetorno('record');\n\t $this->transaccion='CONTA_BALANCE_SEL';\n\t $this->tipo_procedimiento='SEL';//tipo de transaccion\n\t \n\t $this->setParametro('desde','desde','date');\n\t\t$this->setParametro('hasta','hasta','date');\n\t\t$this->setParametro('nivel','nivel','integer');\n\t\t$this->setParametro('id_deptos','id_deptos','varchar'); \t\t\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','varchar'); \n\t\t$this->setParametro('incluir_cierre','incluir_cierre','varchar'); \n\t\t$this->setParametro('tipo_balance','tipo_balance','varchar'); \n\t\t$this->setParametro('incluir_sinmov','incluir_sinmov','varchar'); \n\t \n\t //Definicion de la lista del resultado del query\n\t $this->captura('id_cuenta','int4'); \n\t\t $this->captura('nro_cuenta','varchar');\n\t\t $this->captura('nombre_cuenta','varchar');\n\t\t $this->captura('id_cuenta_padre','int4');\n\t\t $this->captura('monto','numeric');\n\t\t $this->captura('nivel','int4');\n\t\t $this->captura('tipo_cuenta','varchar');\n\t\t $this->captura('movimiento','varchar');\n\t\t \n\t\t//Ejecuta la instruccion\n\t $this->armarConsulta();\n\t\t//echo $this->getConsulta();\n\t\t//exit;\n\t $this->ejecutarConsulta();\n\t \n\t return $this->respuesta; \n }", "public function getInventario()\n\t{\n\t\t$dp_id = $this->dependencia_id;\n\t\t$anho = $this->anho;\n\t\t$mes = $this->mes_id;\n\t\t\n\t\t$obs='';\n\t\tif ($this->informativo==1) {\n\t\t\t$obs = 'bm.observaciones, ';\n\t\t}\n\t\t\n\t\t$anho = $anho + (int)(($mes+1)/12);\n\t\t$mes = ($mes+1)%12;\n\t\t$timeStamp = mktime(0,0,0,$mes,1,$anho);\n\t\t$fecha = date('Y-m-d',$timeStamp);\n\t\t\n\t\t$conection = Yii::app()->db;\n $data = $conection->createCommand()\n\t\t\t->select( 'bm.id, cl.grupo, cl.subgrupo, cl.seccion, bm.codigo, bm.cantidad, bm.descripcion, bm.valor_unitario, '.$obs)\n\t\t\t->from(\t'bienmueble bm')\n\t\t\t->join( 'bm_clasificacion cl', 'bm.clasificacion_id = cl.id')\n\t\t\t->join( '(\tSELECT bstatus.bienmueble_id, bstatus.fecha\n\t\t\t\t\t\tFROM bm_movimiento bstatus\n\t\t\t\t\t\tINNER JOIN (\n\t\t\t\t\t\t\tSELECT bienmueble_id, MAX( fecha ) AS fecha\n\t\t\t\t\t\t\tFROM bm_movimiento sta\n\t\t\t\t\t\t\tGROUP BY bienmueble_id, dependencia_id\n\t\t\t\t\t\t\tHAVING fecha < \"'.$fecha.'\"\n\t\t\t\t\t\t) AS last_sta ON ( bstatus.bienmueble_id = last_sta.bienmueble_id AND bstatus.fecha = last_sta.fecha ) \n\t\t\t\t\t\tWHERE dependencia_id='.$dp_id.' AND concepto_id<20 AND last_sta.fecha < \"'.$fecha.'\" \n\t\t\t\t\t ) as st_hist', 'st_hist.bienmueble_id=bm.id' )\n\t\t ->where('st_hist.fecha < \"'.$fecha.'\" AND st_hist.bienmueble_id = bm.id AND \n\t\t\t\tcl.id = bm.clasificacion_id')\n\t\t\t\t//, array(':dp_id'=>$dp_id) )\n\t\t\t->order('bm.codigo ASC, st_hist.fecha')\n\t\t\t//->text;\n\t\t //print_r($data);exit;\n\t\t ->queryAll();\n\t\treturn $data;\n\t\t/*\n\t\tSELECT `bm`.`id`, `cl`.`grupo`, `cl`.`subgrupo`, `cl`.`seccion`, `bm`.`codigo`, `bm`.`cantidad`, `bm`.`descripcion`, `bm`.`valor_unitario` \n\t\tFROM `bienmueble` `bm` \n\t\tJOIN `bm_clasificacion` `cl` ON bm.clasificacion_id = cl.id \n\t\tJOIN (\tSELECT bstatus.bienmueble_id, bstatus.fecha \n\t\t\t\tFROM bm_movimiento bstatus \n\t\t\t\tINNER JOIN ( \tSELECT bienmueble_id, MAX( fecha ) AS fecha \n\t\t\t\t\t\t\t\tFROM bm_movimiento sta \n\t\t\t\t\t\t\t\tWHERE dependencia_id=12 \n\t\t\t\t\t\t\t\tGROUP BY bienmueble_id, dependencia_id ) \n\t\t\t\tAS last_sta ON ( bstatus.bienmueble_id = last_sta.bienmueble_id AND bstatus.fecha = last_sta.fecha ) \n\t\t\t\tWHERE dependencia_id=12 AND concepto_id<20 AND last_sta.fecha < \"2012-08-01\" ) \n\t\t\t\tAS st_hist ON st_hist.bienmueble_id=bm.id \n\t\tWHERE st_hist.fecha < \"2012-08-01\" AND st_hist.bienmueble_id = bm.id AND cl.id = bm.clasificacion_id \n\t\tORDER BY `bm`.`codigo` ASC, `st_hist`.`fecha`\n\t\t*/\n }", "public function getAllVoos()\n {\n $voos = DB::table('voos as v')\n ->join('aeronaves as a', 'v.aeronave_id', '=', 'a.id')\n ->join('tipos as t', 'a.tipo_id', '=', 't.id')\n ->join('aeroportos as ao', 'v.origem_id', '=', 'ao.id') \n ->join('aeroportos as ad', 'v.destino_id', '=', 'ad.id') \n ->select('v.id','v.numero','v.data','v.hora','a.matricula', 't.tipo', 'ao.nome as origem', 'ad.nome as destino')\n ->orderBy('v.id','desc')\n ->get();\n\n //Verifica se existe um voo com o ID informado\n if(!$voos)\n {\n return response()->json(['response' => 'Não existem voos cadastrados'], 200);\n }\n \n return $voos;\n }", "public function CargarDivevavia2($cod, $pro)\n {\n $calificacion = $this->ArrayCalifVia($pro);\n $calificacion2 = $this->ArrayCalifAdi($pro);\n $nombre = \"\";\n $row = 0;\n $consulta = mysqli_query(\n $this->conexion,\n \"SELECT criterios_via.*,tipos_cri_via.nombre as ncri,convocatoria.nombre FROM `criterios_via`,tipos_cri_via,convocatoria WHERE criterios_via.tipo=tipos_cri_via.cod and criterios_via.id_convocatoria=$cod and criterios_via.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta2 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_via.*,tipos_cri_via.nombre as ncri,convocatoria.nombre FROM `criterios_via`,tipos_cri_via,convocatoria WHERE criterios_via.tipo=tipos_cri_via.cod and criterios_via.id_convocatoria=$cod and criterios_via.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta3 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_adi.*,tipos_cri_adi.nombre as ncri,convocatoria.nombre FROM `criterios_adi`,tipos_cri_adi,convocatoria WHERE criterios_adi.tipo=tipos_cri_adi.cod and criterios_adi.id_convocatoria=$cod and criterios_adi.id_convocatoria=convocatoria.id order by tipo\"\n );\n $consulta4 = mysqli_query(\n $this->conexion,\n \"SELECT criterios_adi.*,tipos_cri_adi.nombre as ncri,convocatoria.nombre FROM `criterios_adi`,tipos_cri_adi,convocatoria WHERE criterios_adi.tipo=tipos_cri_adi.cod and criterios_adi.id_convocatoria=$cod and criterios_adi.id_convocatoria=convocatoria.id order by tipo\"\n );\n //coincidir con codigos de tipo de criterios tabla tipo_cri_ele\n $count1 = 0;\n $count2 = 0;\n $count3 = 0;\n $count4 = 0;\n $count5 = 0;\n $count6 = 0;\n $count7 = 0;\n $count8 = 0;\n $count9 = 0;\n $count10 = 0;\n $pun1 = 0;\n $pun2 = 0;\n $pun3 = 0;\n $pun4 = 0;\n $pun5 = 0;\n $pun6 = 0;\n $pun7 = 0;\n $pun8 = 0;\n $pun9 = 0;\n $pun10 = 0;\n $puntajeG = 0;\n while ($datos = mysqli_fetch_array($consulta)) {\n if ($datos['tipo'] == 1) {\n $count1 += 1;\n $pun1 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 2) {\n $count2 += 1;\n $pun2 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 3) {\n $count3 += 1;\n $pun3 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 4) {\n $count4 += 1;\n $pun4 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 5) {\n $count5 += 1;\n $pun5 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 6) {\n $count6 += 1;\n $pun6 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 7) {\n $count7 += 1;\n $pun7 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 8) {\n $count8 += 1;\n $pun8 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 9) {\n $count9 += 1;\n $pun9 += $datos['puntaje'];\n }\n if ($datos['tipo'] == 10) {\n $count10 += 1;\n $pun10 += $datos['puntaje'];\n }\n $puntajeG += $datos['puntaje'];\n }\n ?>\n<br>\n\n<table class=\"table table-bordered\" id=\"tblcriele\"><thead style=\"background:#f8f9fa;\"><tr><th width=\"15%\">Criterio</th><th width=\"10%\">Puntaje<br>(max)</th><th width=\"20%\">Requisito</th><th width=\"18%\">Fuente de verificación</th><th width=\"10%\">Puntaje<br>(max)</th><th width=\"10%\">Puntaje alcanzado</th><th width=\"17%\"> Concepto</th></tr></thead><tbody id=\"bd-list-convos\">\n<?php\n$contador = 0;\n$contadorsub = 1;\n$contador1 = 0;\n$contador2 = 0;\n$contador3 = 0;\n$contador4 = 0;\n$contador5 = 0;\n$contador6 = 0;\n$contador7 = 0;\n$contador8 = 0;\n$contador9 = 0;\n$contador10 = 0;\n$fila = 1;\n$conceptoF = 0;\nwhile ($datos = mysqli_fetch_array($consulta2)) {\n echo \"<tr>\";\n if ($datos['tipo'] == 1 && $contador1 == 0) {\n $contador++;\n echo \"<td rowspan='$count1' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count1' style='vertical-align: middle;'><b>$pun1</b></td>\";\n $contador1++;\n $contadorsub = 1;\n }\n\n if ($datos['tipo'] == 2 && $contador2 == 0) {\n $contador++;\n echo \"<td rowspan='$count2' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count2' style='vertical-align: middle;'><b>$pun2</b></td>\";\n $contador2++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 3 && $contador3 == 0) {\n $contador++;\n echo \"<td rowspan='$count3' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count3' style='vertical-align: middle;'><b>$pun3</b></td>\";\n $contador3++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 4 && $contador4 == 0) {\n $contador++;\n echo \"<td rowspan='$count4' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count4' style='vertical-align: middle;'><b>$pun4</b></td>\";\n $contador4++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 5 && $contador5 == 0) {\n $contador++;\n echo \"<td rowspan='$count5' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count5' style='vertical-align: middle;'><b>$pun5</b></td>\";\n $contador5++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 6 && $contador6 == 0) {\n $contador++;\n echo \"<td rowspan='$count6' style='vertical-align: middle;'><b>$datos[ncri]</b></td><td rowspan='$count6' style='vertical-align: middle;'><b>$pun6</b></td>\";\n $contador6++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 7 && $contador7 == 0) {\n $contador++;\n echo \"<td rowspan='$count7' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count7' style='vertical-align: middle;'><b>$pun7</b></td>\";\n $contador7++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 8 && $contador8 == 0) {\n $contador++;\n echo \"<td rowspan='$count8' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count8' style='vertical-align: middle;'><b>$pun8</b></td>\";\n $contador8++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 9 && $contador9 == 0) {\n $contador++;\n echo \"<td rowspan='$count9' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count9' style='vertical-align: middle;'><b>$pun9</b></td>\";\n $contador9++;\n $contadorsub = 1;\n }\n if ($datos['tipo'] == 10 && $contador10 == 0) {\n $contador++;\n echo \"<td rowspan='$count10' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$count10' style='vertical-align: middle;'><b>$pun10</b></td>\";\n $contador10++;\n $contadorsub = 1;\n }\n $califila = $this->ConsultaCalifila2($calificacion, $datos['id']);\n \n\n echo \"<td style='vertical-align: middle;'> $datos[requisito] </td><td style='vertical-align: middle;'> $datos[observacion] </td><td style='vertical-align: middle;'> $datos[puntaje]</td> <td style='vertical-align: middle;'>$califila[0]</td><td style='vertical-align: middle;'>$califila[1]</td></tr>\";\n $fila++;\n $conceptoF += $califila[0];\n}\n\necho \"<tr style='background:#E6F5F4;display:none;'><td colspan='5' ><b>Sub Total</b></td><td colspan='2'>$conceptoF</td></tr>\";\n\nif ($fila == 1) {\n echo \"<tr><td colspan='7' align='center'> No hay criterios</td></tr>\";\n}\n\n$countadc1 = 0;\n$punadc1 = 0;\n$puntajeGadc = 0;\nwhile ($datos = mysqli_fetch_array($consulta3)) {\n if ($datos['tipo'] == 1) {\n $countadc1 += 1;\n $punadc1 += $datos['puntaje'];\n }\n $puntajeGadc += $datos['puntaje'];\n}\n$contadoradc = 0;\n$contadorsubadc = 1;\n$contador1adc = 0;\n$filaadc = 1;\n$conceptoFadc = 0;\nwhile ($datos = mysqli_fetch_array($consulta4)) {\n echo \"<tr>\";\n if ($datos['tipo'] == 1 && $contador1adc == 0) {\n $contadoradc++;\n echo \"<td rowspan='$countadc1' style='vertical-align: middle;'><b>$datos[ncri]</b> </td><td rowspan='$countadc1' style='vertical-align: middle;'><b>$punadc1</b></td>\";\n $contador1adc++;\n $contadorsubadc = 1;\n }\n $califila = $this->ConsultaCalifila2($calificacion2, $datos['id']);\n \n\n echo \"<td style='vertical-align: middle;'> $datos[requisito]</td><td style='vertical-align: middle;'> $datos[observacion]</td><td style='vertical-align: middle;'> $datos[puntaje]</td> <td style='vertical-align: middle;'>$califila[0]</td><td style='vertical-align: middle;'>$califila[1]</td></tr>\";\n $filaadc++;\n $conceptoFadc += $califila[0];\n}\n\necho \"<tr style='background:#E6F5F4;display:none;'><td colspan='5'><b>Sub Total 2</b></td><td colspan='2' >$conceptoFadc</td></tr>\";\n\n$puntTotal = $conceptoF + $conceptoFadc;\nif ($puntTotal > 100) {\n $puntTotal = 100;\n}\n$conceptoFinnal=\"NO VIABLE\";\nif ($puntTotal >= 80) {\n $conceptoFinnal=\"VIABLE\";\n}\necho \"<tr style='background:#E6F5F4;'><td colspan='5' ><b>Total</b></td><td colspan='2' >$puntTotal</td></tr>\";\n\nif ($filaadc == 1) {\n echo \"<tr style='display:none;'><td colspan='7' align='center'> No hay criterios de puntaje adicional</td></tr>\";\n}\n\necho \"<tr ><td colspan='7' style='border:0px solid #FFF;height:10px;vertical-align:midde;'></td></tr><tr><td colspan='2'> <b>Concepto Final : </b>$conceptoFinnal</td><td colspan='6'>\" . $this->finalConcept2($pro) . \"</td></tr>\";\n\necho \"<tr ><td colspan='7' style='border:0px solid #FFF;height:30px;'></td></tr>\";?>\n</tbody></table>\n<?php\n }", "public function ventasDiarias($empresa,$fechaini='',$fechafin='')\n {\n // SUM(dv.cantidad) AS cantidad,dv.subtotal,p.precio_compra,FORMAT(dv.subtotal - ( p.precio_compra * dv.cantidad ),2) AS ganancia,el.nombre AS local \n // FROM factura_venta fv\n // INNER JOIN venta v ON fv.venta_id = v.id\n // INNER JOIN venta_forma_pago vfp ON vfp.venta_id = v.id\n // INNER JOIN forma_pago fp ON vfp.forma_pago_id = fp.id\n // INNER JOIN cliente c ON fv.cliente_id = c.id\n // INNER JOIN detalle_venta dv ON dv.venta_id = v.id \n // INNER JOIN empleado em ON em.id = v.empleado_id\n // INNER JOIN producto_x_local pxl ON dv.producto_x_local_id = pxl.id\n // INNER JOIN producto p ON p.id = pxl.producto_id\n // INNER JOIN empresa_local el ON el.id = em.empresa_local_id\n // INNER JOIN empresa e ON e.id = el.empresa_id\n // WHERE el.estado = 1 AND v.estado = 1 AND fv.tipo_id = 2 AND e.id = ?\n // \";\n\n $sql = \"SELECT fv.id,fv.ticket AS codigo,c.razon_social,fv.fecha,fp.nombre AS tipo,\n CONCAT(em.apellido_paterno,' ',em.apellido_materno,' ',em.nombres) AS usuario,\n SUM(vfp.cantidad + IFNULL(vfp.igv,0)) AS monto_total,\n el.nombre AS local, vfp.numero_dias AS dias \n FROM factura_venta fv\n INNER JOIN venta v ON fv.venta_id = v.id\n INNER JOIN venta_forma_pago vfp ON vfp.venta_id = v.id\n INNER JOIN forma_pago fp ON vfp.forma_pago_id = fp.id\n INNER JOIN cliente c ON fv.cliente_id = c.id\n INNER JOIN empleado em ON em.id = v.empleado_id\n INNER JOIN empresa_local el ON el.id = fv.empresa_local_id\n INNER JOIN empresa e ON e.id = el.empresa_id\n WHERE el.estado = 1 AND v.estado = 1 AND fv.tipo_id = 2 AND e.id = ?\n \";\n \n if($fechaini == '' || $fechafin == ''){\n $sql .=\" AND MONTH(fv.fecha) = MONTH(CURRENT_DATE()) AND YEAR(fv.fecha) = YEAR(CURRENT_DATE()) AND DAY(fv.fecha) = DAY(CURRENT_DATE())\";\n }elseif($fechaini != '' && $fechafin != ''){\n\n $fechaini = date(\"Y-m-d\", strtotime(str_replace('/', '-', $fechaini) ) );\n $fechafin = date(\"Y-m-d\", strtotime(str_replace('/', '-', $fechafin) ) );\n\n $sql .=\" AND CAST(fv.fecha AS DATE) BETWEEN ? AND ? \";\n }\n $sql .=\" GROUP BY fv.id\";\n $sql .=\" ORDER BY fv.fecha DESC \";\n\n $stmt = $this->conn->prepare($sql);\n $stmt->bindValue(1, $empresa);\n if($fechaini != '' && $fechafin != ''){\n $stmt->bindValue(2, $fechaini);\n $stmt->bindValue(3, $fechafin);\n }\n $stmt->execute();\n $ventas = $stmt->fetchAll();\n\n\n return $ventas;\n }", "public function listaValorDaVenda(){\n\t\n\t\t$sql = sprintf(\"SELECT * FROM valores_venda\");\n\t\n\t\t$conn = new Conexao();\n\t\t$conn->openConnect();\n\t\n\t\t$mydb = mysqli_select_db($conn->getCon(), $conn->getBD());\n\t\t$resultado = mysqli_query($conn->getCon(), $sql);\n\t\n\t\t$arrayProduto = array();\n\t\n\t\twhile ($row = mysqli_fetch_assoc($resultado)) {\n\t\t\t$arrayProduto[]=$row;\n\t\t}\n\t\n\t\t$conn->closeConnect ();\n\t\treturn $arrayProduto;\n\t\n\t}", "function listarCuentaArb(){\n\t\t $this->procedimiento='conta.f_cuenta_sel';\n\t\t $this-> setCount(false);\n\t\t $this->transaccion='CONTA_CTA_ARB_SEL';\n\t\t $this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t \n\t\t $id_padre = $this->objParam->getParametro('id_padre');\n\t\t \n\t\t $this->setParametro('id_padre','id_padre','varchar'); \n\t\t\t$this->setParametro('id_gestion','id_gestion','integer'); \n\t\t \n\t\t //Definicion de la lista del resultado del query\n\t\t $this->captura('id_cuenta','int4');\n\t\t $this->captura('id_cuenta_padre','int4');\n\t\t $this->captura('nombre_cuenta','varchar');\n\t\t $this->captura('tipo_nodo','varchar');\n\t\t\t $this->captura('nro_cuenta','varchar');\n\t\t\t $this->captura('desc_cuenta','varchar');\n\t\t\t $this->captura('id_moneda','integer');\n\t\t\t $this->captura('desc_moneda','varchar');\n\t\t\t $this->captura('tipo_cuenta','varchar');\n\t\t\t $this->captura('sw_auxiliar','varchar');\n\t\t\t $this->captura('tipo_cuenta_pat','varchar');\n\t\t\t $this->captura('sw_transaccional','varchar');\n\t\t\t $this->captura('id_gestion','integer');\n\t\t\t $this->captura('valor_incremento','varchar');\n\t\t\t $this->captura('eeff','varchar');\n\t\t\t $this->captura('sw_control_efectivo','varchar');\n\t\t\t $this->captura('id_config_subtipo_cuenta','int4');\n\t\t\t $this->captura('desc_csc','varchar');\n\t\t\t $this->captura('tipo_act','varchar');\n\t\t\t\n\t\t\t \n\t\t //Ejecuta la instruccion\n\t\t $this->armarConsulta();\n\t\t\t $this->ejecutarConsulta();\n\t\t \n\t\t return $this->respuesta; \n }", "function total_pagado_venta($ven_id) {\n// sum(vpag_capital_desc) as descuento, sum(vpag_capital_inc) as incremento ,\n// sum(vpag_costo) as costo\n// from venta_pago where vpag_ven_id='$ven_id' and vpag_estado='Activo'\n// \";\n// $pagado = FUNCIONES::objeto_bd_sql($sql_pag);\n $pagado = FUNCIONES::total_pagado($ven_id);\n return $pagado;\n }", "public function CreditosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT \n\t\tventas.idventa, \n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa,\n\t ventas.observaciones,\n\t\tcajas.nrocaja,\n\t\tcajas.nomcaja,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tdocumentos.documento,\n\t\tmediospagos.mediopago,\n\t\tusuarios.dni, \n\t\tusuarios.nombres,\n\t\tprovincias.provincia,\n\t\tdepartamentos.departamento,\n\t\tSUM(montoabono) AS abonototal\n\t\tFROM (ventas LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa)\n\t\tLEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\t\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\t\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento \n\t\tLEFT JOIN cajas ON abonoscreditos.codcaja = cajas.codcaja\n\t\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\t\tLEFT JOIN usuarios ON cajas.codigo = usuarios.codigo\n\t\tWHERE ventas.codventa = ? GROUP BY abonoscreditos.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decrypt($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function ventasVendedorReporte(Request $request){\n $vendedores = User::join('personal','users.id','=','personal.id')\n ->join('vendedores','personal.id','vendedores.id')\n ->select('personal.id',\n DB::raw(\"CONCAT(personal.nombre,' ',personal.apellidos) AS vendedor\"),\n 'vendedores.tipo','vendedores.inmobiliaria')\n ->orderBy('vendedor','asc')->get();\n\n\n if(sizeOf($vendedores)){ // cuenta los clientes asignados a ese vendedor\n foreach ($vendedores as $ve => $vendedor) {\n $vendedor->atendio = Cliente::where('vendedor_id','=',$vendedor->id)\n ->where('clasificacion','!=',7)->count();\n }\n }\n\n \n return['vendedores'=>$vendedores];\n }", "public function Mostrar_deposito_bancario() {\n $conexion = new Conexion();\n $conex = $conexion->conectar();\n\n if (substr($conex, 0, 12) == 'codigo_error') {\n echo '<meta http-equiv=\"refresh\" content=\"0;url=' . \"mostrar_deposito_bancario.php?\" . $conex . '\" />';\n return;\n }\n\n $sql = \"SELECT * FROM `vista_deposito_bancario`\";\n\n if (!$result = mysqli_query($conex, $sql)) {\n $error = 'codigo_error=' . mysqli_errno($conex);\n $conexion->desconectar();\n echo '<meta http-equiv=\"refresh\" content=\"0;url=' . \"mostrar_deposito_bancario.php?\" . $error . '\" />';\n return;\n }\n\n\n $conexion->desconectar();\n return $result;\n }", "public function todasVendas()\n {\n $todasVendas = DB::table('clientes')->join('vendas','clientes.id','=','vendas.idCliente')->get();\n $clientesVenda = DB::table('clientes')->get();\n $itemVenda = DB::table('produtos')->get();\n\n \treturn view::make('vendas')->with(compact('itemVenda'))->with(compact('todasVendas'))->with(compact('clientesVenda'));\n }", "function listarCursoAvanceArb(){\n $this->procedimiento='sigefo.ft_curso_sel';\t\t\n \t\t$this->setCount(false);\t\n $this->transaccion='SIGEFO_SCU_ARB_SEL';\t\t\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $id_padre = $this->objParam->getParametro('id_padre');\n $this->setParametro('id_padre', 'id_padre', 'varchar');\t \n\t\t$this->setParametro('id_gestion', 'id_gestion', 'int4');\n\t\t\n //Definicion de la lista del resultado del query\n $this->captura('id_correlativo','int4');\n\t\t$this->captura('id_uo_t_temp','int4');\n $this->captura('id_uo_padre_temp','int4');\n $this->captura('id_uo_temp','int4');\n $this->captura('nombre_unidad_temp','varchar');\n\t\t$this->captura('id_curso_temp','int4');\n $this->captura('nombre_curso_temp','varchar');\n\t\t$this->captura('cod_prioridad_temp','varchar');\n $this->captura('tipo_nodo_temp','varchar');\n\t\t\n\t\t$this->captura('id_correlativo_key','int4');\n\t\t$this->captura('horas_temp','int4');\n\t\t$this->captura('cantidad_temp','int4');\n\t\t\n\t\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function lista_vacantes() {\n $this->dbh = Conectar::con();\n //Se declara la variable identificador el cual obtendra el id de la empresa el cual se obtiene del metodo lista_ojetos_revisados\n//Se recibe l identificador de la empresa del metodo lista de objetos revisados\n $sql = \"select v.id_vacante, v.id_revision_objeto, v.nombre, v.salario, v.horario, v.escolaridad, v.habilidades, v.descripcion, v.tiempo, v.genero, v.experiencia, v.rango_edad, revision_objeto.status from (vacante v inner join revision_objeto on v.id_revision_objeto = revision_objeto.id_revision_objeto) inner join empresa on revision_objeto.id_empresa = \" . $_SESSION['idemp'] . \" group by nombre;\";\n if ($this->dbh->query($sql) == NULL) {\n $this->platillo[] = NULL;\n } else {\n foreach ($this->dbh->query($sql) as $res) {\n $this->platillo[] = $res;\n }\n }\n return $this->platillo;\n }", "public function cadastroNovaVaga(Request $request)\n {\n $novaVaga = new VagaEmprego();\n $slugname = \\slugify($request->empresa);\n DB::beginTransaction();\n\n $empresa = Empresa::procurarPorNomeOuCriar($request->empresa);\n\n $novaVaga->titulo = $request->titulo;\n $novaVaga->sub_titulo = $request->subtitulo;\n $novaVaga->descricao = $request->descricao;\n $novaVaga->regime_contratacao_id = $request->regime_contratacao_id;\n $novaVaga->remuneracao = $request->remuneracao;\n $novaVaga->aceita_remoto = $request->aceita_remoto;\n $novaVaga->requisitos = $request->requisitos;\n $novaVaga->contato = $request->contato;\n $novaVaga->regime_contratacao_id = $request->regime_contratacao_id;\n\n if (isset($empresa)) {\n $novaVaga->empresa_id = $empresa->id;\n $empresaSuccess = true;\n }\n\n $data = $request->all();\n\n if (array_key_exists('ativa', $data) and $data['ativa'] == 'on') {\n $data['ativa'] = 1;\n $novaVaga->ativa = $data['ativa'];\n }\n\n if (array_key_exists('aceita_remoto', $data) and $data['aceita_remoto'] == 'on') {\n $data['aceita_remoto'] = 1;\n $novaVaga->aceita_remoto = $data['aceita_remoto'];\n }\n \n if (isset($data['beneficios'])) {\n $beneficiosInput = $data['beneficios'];\n } else {\n $beneficiosInput = [];\n }\n\n $novaVagaSuccess = $novaVaga->save();\n\n if ($novaVagaSuccess) {\n\n $beneficios = Beneficio::all();\n $beneficiosVaga = [];\n foreach ($beneficios as $beneficio) {\n if (array_key_exists($beneficio->id, $beneficiosInput)) {\n if ($beneficiosInput[$beneficio->id] == \"on\") {\n\n $vagaBeneficio = new VagaEmpregoBeneficio();\n\n $vagaBeneficio->vaga_emprego_id = $novaVaga->id;\n $vagaBeneficio->beneficio_id = $beneficio->id;\n\n $beneficiosVaga[] = $vagaBeneficio->toArray();\n }\n }\n }\n $vagaEmpregoBeneficioSucess = VagaEmpregoBeneficio::insert($beneficiosVaga);\n\n if ($vagaEmpregoBeneficioSucess && $novaVagaSuccess && $empresaSuccess) {\n DB::commit();\n flash('Vaga de trabalho registrata com sucesso')->success();\n return redirect()->back();\n }\n }\n DB::rollBack();\n\n if (!$vagaEmpregoBeneficioSucess) {\n flash('Registro nao concluido , erro ao informar beneficios.')->error();\n return redirect()->back();\n }\n if (!$novaVagaSuccess) {\n flash('Registro nao concluido , erro nos dados da nova vaga')->error();\n return redirect()->back();\n }\n if (!$empresaSuccess) {\n flash('Registro nao concluido , erro nos dados da empresa')->error();\n return redirect()->back();\n }\n }", "public function getBeneficios()\n {\n $this->db->select(\"BEF_PK,\n\t\t\t\t\t\tORDER_BENEFICIO,\n\t\t\t\t\t\tBEF_DESCRIPCION,\n\t\t\t\t\t\tBEF_MONTO,\n\t\t\t\t\t\tBEF_TIPO_BEN\")\n ->from(\"beneficios\")\n ->where(\"BEF_ESTADO\", 'ACTIVO')\n ->order_by('ORDER_BENEFICIO', 'asc');\n\n $query = $this->db->get();\n return $query->num_rows() > 0 ? $query->result() : false;\n }", "public function obtenerRecogidas(){\n\t\t// inner join tiposhuevo tp on tp.idTipoHuevo = ip.idTipoHuevo\n\t\t// where ip.idGalpon = 1\n\t\t// and ip.idLote = 1\n\t\t// and ip.fechaInventarioProduccion = '2021-07-02'\n\t\t// and ip.entrada = 1\n\t\t$this->constructorSQL->select('inventarioproduccion', 'sum(cantidadProduccion) AS produccion, concat(fechaInventarioProduccion,idGalpon,idLote) AS id, inventarioproduccion.*')\n\t\t\t->where('entrada', '=', '1')\n\t\t\t->groupBy('fechaInventarioProduccion, idGalpon, idLote')\n\t\t\t->ejecutarSQL();\n\t\t$recogidas = $this->constructorSQL->ejecutarSQL();\n\t\techo json_encode($recogidas);\n\t}", "function listarCuenta(){\n\t\t$this->procedimiento='conta.f_cuenta_sel';\n\t\t$this->transaccion='CONTA_CTA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('filtro_ges','filtro_ges','varchar');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t\n\t\t \n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('estado_reg','varchar');\n $this->captura('id_empresa','int4');\n $this->captura('id_parametro','int4');\n $this->captura('id_cuenta_padre','int4');\n $this->captura('nro_cuenta','varchar');\n $this->captura('id_gestion','int4');\n $this->captura('id_moneda','int4');\n $this->captura('nombre_cuenta','varchar');\n $this->captura('desc_cuenta','varchar');\n $this->captura('nivel_cuenta','int4');\n $this->captura('tipo_cuenta','varchar');\n $this->captura('sw_transaccional','varchar');\n $this->captura('sw_auxiliar','varchar');\n $this->captura('tipo_cuenta_pat','varchar');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('desc_moneda','varchar');\n $this->captura('gestion','int4');\n\t\t$this->captura('sw_control_efectivo','varchar');\n\t\t$this->captura('tipo_act','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function cargar_datos_prod($cod,$vig){\n try{\n \n \n $pdo = AccesoDB::getCon();\n \n if ($vig == 0) {\n $sql = \"select * from producto where (cod_barra_prod = :cod or id_prod = :cod) \";\n }else if ($vig == 1) {\n $sql = \"select a.id_prod, a.nom_prod,a.uni_med_pro,a.stock_min_prod,\na.stock_prod,a.vig_prod,a.fec_cre_prod,a.usu_cre_prod,a.precio_bruto_prod,a.iva_prod,\na.proc_ganan_prod,a.precio_neto_prod,a.id_prov_prod,a.embalaje_prod,\na.cod_barra_prod,a.familia_prod,a.marca_prod,\nfam.desc_item, uni.desc_item, a.precio_bruto_prod precio, a.id_prov_prod\nfrom producto a, tab_param fam, tab_param uni\n where a.uni_med_pro = uni.cod_item and uni.cod_grupo = 1 and uni.vig_item = 1\n and a.familia_prod = fam.cod_item and fam.cod_grupo = 2 and fam.vig_item = 1 \n and (a.cod_barra_prod = :cod or a.id_prod = :cod) and a.vig_prod = 1\";\n } else if ($vig == 2) {\n $sql = \"select * from producto where (cod_barra_prod = :cod or id_prod = :cod) and vig_prod = 1\";\n\n }\n \n \n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":cod\", $cod, PDO::PARAM_STR);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "public function retornaViatgesPendents ( ) {\r\n $sql = \"SELECT * FROM \" . _DB_PREFIX_ . \"viatges WHERE abonat=0 ORDER BY data asc\";\r\n return $this->getRows ( $sql );\r\n \r\n }", "public function consultaAgressividade(){\r\n\t\t\r\n\t\t\t$agressividadesDisponiveis = array();\r\n\t\t\r\n\t\t\t$conn = Database::conexao();\r\n\t\t\r\n\t\t\t$consultaAgressividade = 'SELECT id FROM Agressividade;';\r\n\t\t\t$preparaConsultaAgressividade= $conn->query($consultaAgressividade);\r\n\t\t\t$preparaConsultaAgressividade->execute();\r\n\t\t\r\n\t\t\t$result = $preparaConsultaAgressividade->setFetchMode(PDO::FETCH_NUM);\r\n\t\t\r\n\t\t\twhile ($row = $preparaConsultaAgressividade->fetch()) {\r\n\t\t\r\n\t\t\t\t$agressividadesDisponiveis[] = $row[0];\r\n\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\treturn $agressividadesDisponiveis;\r\n\t\t\r\n\t\t}", "public function getCarroViagemProgramacao()\n {\n $draw = intval($this->input->get(\"draw\"));\n $start = intval($this->input->get(\"start\"));\n $length = intval($this->input->get(\"length\"));\n\n $query = $this->db->select('*,s.nome as cidade_s, d.nome as cidade_d')\n ->from('programacao_carro_viagem as p')\n ->join('veiculos', 'veiculos.id_veic = p.fk_carro_vc')\n ->join('cidade as s', 's.id = p.fk_cidade_vc')\n ->join('cidade as d', 'd.id = p.fk_cidade_destino_vc')\n ->get();\n \n $data = [];\n\n foreach ($query->result() as $r) {\n\n $data[] = array(\n date(\"d/m/Y\", strtotime($r->data_saida_vc)),\n date(\"H:i\", strtotime($r->hora_saida_vc)),\n $r->placa_veic,\n $r->cidade_s,\n $r->cidade_d,\n $r->local_saida_vc,\n '<div class=\"btn-group\">\n <button type=\"button\" class=\"btn btn-danger dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n Ações\n </button>\n <div class=\"dropdown-menu\">\n <a class=\"viewProgramCarViagem dropdown-item\" href=\"#\" id=\"'.$r->id_vc.'\">\n <i class=\"material-icons\"> touch_app </i>&nbsp;Visualizar\n </a>\n <div class=\"dropdown-divider\"></div>\n <a class=\"addEncomendasDaViagem dropdown-item\" href=\"#\" id=\"'.$r->id_vc.'\">\n <i class=\"material-icons\"> category </i>&nbsp;Encomendas\n </a>\n </div>\n </div>'\n );\n\n }\n\n $result = array(\n \"draw\" => $draw,\n \"recordsTotal\" => $query->num_rows(),\n \"recordsFiltered\" => $query->num_rows(),\n \"data\" => $data\n );\n\n echo json_encode($result);\n exit();\n }", "function buscaContasPorFormaPag()\n {\n $conta = new Conta();\n $result = $conta->buscarContasFormPag();\n return $result;\n }", "public function getDadosVVGAll() {\n\n\t\tif (empty($this->__get('codSubgrupo_pesq'))) {\n\t\t\t$query = \"\n\t\t\t\t\tselect seql_vnclID as sequencial_base,\n\t\t\t\t\t\t DATE_FORMAT(dt_inc_vncl, '%d/%m/%Y') as data_inicio_vinculo,\n\t\t\t\t\t\t DATE_FORMAT(dt_fim_vncl, '%d/%m/%Y') as data_fim_vinculo,\n\t\t\t\t\t\t case when cd_est_vncl = 1 THEN 'Ativo'\n\t\t\t\t\t\t when cd_est_vncl = 2 THEN 'Encerrado'\n\t\t\t\t\t\t end as estado_vinculo, \t\n\t\t\t\t\t\t case when cd_atu_vlnt = 1 THEN 'Coordenador Cadastral'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 2 THEN 'Coordenador Financeiro'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 3 THEN 'Coordenador Revisor'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 4 THEN 'Coordenador Geral'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 5 THEN 'Voluntário'\n\t\t\t\t\t\t end as cod_atuacao_base\t\t\t\t\t\t\n\t\t\t\t\t\tfrom tb_vncl_vlnt_grp\n\t\t\t\t\t\twhere cd_vlntID = :cd_vlnt\n\t\t\t\t\t\tand cd_grpID = :cd_grp\n\t\t\t\t\t\tand cd_sbgrpID is null\n\t\t\t\t\t\torder by seql_vnclID\";\n\t\t\t$stmt = $this->db->prepare($query);\n\t\t\t$stmt->bindValue(':cd_vlnt', $this->__get('codVoluntario_pesq'));\n\t\t\t$stmt->bindValue(':cd_grp', $this->__get('codGrupo_pesq'));\n\t\t\t$stmt->execute();\n\t\t} else {\n\t\t\t$query = \"\n\t\t\t\t\tselect seql_vnclID as sequencial_base,\t\t\t\t\t\n\t\t\t\t\t\t DATE_FORMAT(dt_inc_vncl, '%d/%m/%Y') as data_inicio_vinculo,\n\t\t\t\t\t\t DATE_FORMAT(dt_fim_vncl, '%d/%m/%Y') as data_fim_vinculo,\n\t\t\t\t\t\t case when cd_est_vncl = 1 THEN 'Ativo'\n\t\t\t\t\t\t\t when cd_est_vncl = 2 THEN 'Encerrado'\n\t\t\t\t\t\t end as estado_vinculo,\t\n\t\t\t\t\t\t case when cd_atu_vlnt = 1 THEN 'Coordenador Cadastral'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 2 THEN 'Coordenador Financeiro'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 3 THEN 'Coordenador Revisor'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 4 THEN 'Coordenador Geral'\n\t\t\t\t\t\t\t when cd_atu_vlnt = 5 THEN 'Voluntário'\n\t\t\t\t\t\t end as cod_atuacao_base\n\t\t\t\t\t\tfrom tb_vncl_vlnt_grp\n\t\t\t\t\t\twhere cd_vlntID = :cd_vlnt\n\t\t\t\t\t\tand cd_grpID = :cd_grp\n\t\t\t\t\t\tand cd_sbgrpID = :cd_sbgrp\n\t\t\t\t\t\torder by seql_vnclID\";\n\t\t\t$stmt = $this->db->prepare($query);\n\t\t\t$stmt->bindValue(':cd_vlnt', $this->__get('codVoluntario_pesq'));\n\t\t\t$stmt->bindValue(':cd_grp', $this->__get('codGrupo_pesq'));\n\t\t\t$stmt->bindValue(':cd_sbgrp', $this->__get('codSubgrupo_pesq'));\n\t\t\t$stmt->execute();\n\t\t}\n\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\t\n\n\t}", "function getVentas($desde=null,$hasta=null)\n {\n if(($desde===null ) && ($hasta===null)){\n $sql=\"SELECT codigo,metodoPago,metodoVenta,total,usuarios.usuario,DATE_FORMAT(fecha,'%d/%m/%Y') as fecha,hora FROM ventas INNER JOIN usuarios ON ventas.usuario=usuarios.id WHERE `fecha` BETWEEN CURDATE() - INTERVAL 7 DAY AND CURDATE() ORDER BY fecha DESC\";\n }else{\n $sql=\"SELECT codigo,metodoPago,metodoVenta,total,usuarios.usuario,DATE_FORMAT(fecha,'%d/%m/%Y') as fecha,hora FROM ventas INNER JOIN usuarios ON ventas.usuario=usuarios.id WHERE fecha BETWEEN '$desde' AND '$hasta' ORDER BY fecha ASC\";\n }\n $getVentaA=$this->conexion->prepare($sql);\n $getVentaA->execute();\n return $getVentaA->fetchAll(PDO::FETCH_ASSOC);\n }", "function bandeja_get(){\n\t\t$limit = 30;\n\t\t$max = 0;\n\t\t$min = 0;\n\t\t\n\t\t$this->_bandeja_mensajes_estado();\n\t\t\n\t\t$sql = \"select ban_id as nro_envio, ban_cel as celular, ban_contenido as contenido,\n\t\tban_men_id as id from bandeja where ban_estado='LISTO' and ban_fecha_cre='\".date('Y-m-d').\"' order by ban_id asc limit 0,\".$limit; \n\t\t\n\t\t$query = $this->db->query($sql);\n\t\t$num = $query->num_rows();\n\t\tif ($num>0) {\n\t\t\tforeach ($query->result() as $i=>$obj) \n\t\t\t{\n\t\t\t\tif ($i == 0) {\n\t\t\t\t\t$min = $obj->nro_envio;\n\t\t\t\t}\n\t\t\t\tif ($i == ($num - 1)) {\n\t\t\t\t\t$max = $obj->nro_envio;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$jsonEstructura = array(\n\t\t\t\t'mensaje' => \"Hay \".$query->num_rows().\" mensajes para enviar\",\n\t\t\t\t'accion' => \"correcto\",\n\t\t\t\t'opciones' => array(\n\t\t\t\t\t\t\t\t\t'max'=>$max,\n\t\t\t\t\t\t\t\t\t'min'=>$min\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t'datos' => $query->result_array()\n\t\t\t); \n } else {\n\t\t\t$jsonEstructura = array(\n\t\t\t\t'mensaje' => \"No hay mensajes para enviar\",\n\t\t\t\t'accion' => \"error\",\n\t\t\t\t'opciones' => \"\",\n\t\t\t\t'datos' => array() \n\t\t\t);\n\t\t} \n\t\t$this->_bandeja_estado_bandeja($max, $min);\n\t\t$this->response($jsonEstructura, 200);\n\t}", "public function buscar_apartado_caja(Request $request){\n $id_cliente = $request->id_cliente;\n $tienda = $request->user()->tienda;\n $buscar = separados::where('id_tienda', $tienda)\n ->where('id_cliente',$id_cliente)\n ->where('estado', 0)->get();\n $buscar->each(function($buscar){\n $buscar->productosSeparados;\n });\n return response()->json($buscar);\n }", "public function loMasVendido() {\r\n\r\n $LMV = DB::connection('mysql')->select(\"SELECT \r\n tb_productos.*\r\n FROM\r\n tb_order_body\r\n INNER JOIN tb_order_header\r\n ON tb_order_header.idOrderHeader = tb_order_body.fk_idOrderHeader\r\n INNER JOIN tb_productos\r\n ON tb_productos.codeProdSys = tb_order_body.codeProdSys\r\n WHERE tb_order_header.fk_idStateOrder != 3\r\n AND tb_productos.fk_idSatate = 1\r\n GROUP BY \r\n tb_productos.nombre limit 10\");\r\n\r\n return response()->json(self::getAgrupationLosMasVendios($LMV), 200);\r\n }", "function listarVendas()\n {\n $venda= new Vendas();\n $result = $venda->listaVendas();\n return $result;\n }", "public static function getBiPde($data) {\n $return = array();\n $verify = new ZendX_Utilities_SecurityWSCheck();\n if ($verify->isValid($data)) {\n $periodosMapper = new Ccm_Model_CatperiodosMapper();\n $periodos = $periodosMapper->getAll();\n\n $table = new Zend_Db_Table(array('db' => 'db1', 'name' => 'mod_clientes'));\n $select = $table->select()\n ->from(array('a' => 'mod_clientes'), array('COUNT(*) as total'))\n ->where('a.locked=?', 0)\n ->where('a.id_canal IN(?)', array(1, 4));\n $result = $table->fetchAll($select)->toArray();\n if (!empty($result)) {\n $pv = (int) $result[0]['total'];\n }\n\n $select = $table->select()\n ->from(array('a' => 'mod_clientes'), array('COUNT(*) as total'))\n ->where('a.locked=?', 0)\n ->where('a.id_canal IN(?)', array(2, 3));\n $result = $table->fetchAll($select)->toArray();\n if (!empty($result)) {\n $cc = (int) $result[0]['total'];\n }\n\n foreach ($periodos as $periodo) {\n $epv = $ecc = 0;\n $idPeriodo = $periodo['id'];\n\n $select = $table->select()\n ->from(array('a' => 'mod_clientes'), array('COUNT(*) as total'))\n ->join(array('b' => 'mod_evaluacion'), 'a.id = b.id_cliente', array())\n ->where('b.id_periodo=?', $idPeriodo)\n ->where('a.locked=?', 0)\n ->where('a.id_canal IN(?)', array(1, 4));\n $result = $table->fetchAll($select)->toArray();\n if (!empty($result)) {\n $epv = (int) $result[0]['total'];\n }\n $select = $table->select()\n ->from(array('a' => 'mod_clientes'), array('COUNT(*) as total'))\n ->join(array('b' => 'mod_evaluacion'), 'a.id = b.id_cliente', array())\n ->where('b.id_periodo=?', $idPeriodo)\n ->where('a.locked=?', 0)\n ->where('a.id_canal IN(?)', array(2, 3));\n $result = $table->fetchAll($select);\n \n if (!empty($result)) {\n $ecc = (int) $result[0]['total'];\n }\n $return[$periodo['nombre']] =\n array(\n 'pv' => array('totalclientes' => $pv, 'evaluados' => $epv),\n 'cc' => array('totalclientes' => $cc, 'evaluados' => $ecc)\n );\n }\n }\n return json_encode($return);\n }", "function consultaBens(){\n $bd= conectaBD();\n $sql=\"SELECT *\n FROM bens, unidade\n WHERE bens.ID_Unidade = unidade.ID_Unidade\";\n $resultado = $bd->query($sql);\n $bd->close();\n return $resultado;\n }" ]
[ "0.70555633", "0.6996315", "0.67456317", "0.6548096", "0.6519631", "0.650713", "0.65042335", "0.6458812", "0.64573425", "0.6454458", "0.6441072", "0.6425286", "0.6420453", "0.63881105", "0.63458294", "0.6339843", "0.6309227", "0.63090456", "0.6307644", "0.6302221", "0.6285059", "0.62780595", "0.6236393", "0.6230762", "0.6219548", "0.62007195", "0.6199008", "0.619637", "0.6189513", "0.61821145", "0.61819994", "0.6180646", "0.6173188", "0.61719054", "0.61696094", "0.6165693", "0.6161606", "0.61581", "0.61568713", "0.61556405", "0.61542434", "0.61540467", "0.6153639", "0.61417365", "0.6133685", "0.6132663", "0.61272043", "0.6126923", "0.61258537", "0.61247736", "0.61230284", "0.61144775", "0.6113534", "0.61082166", "0.609984", "0.6097517", "0.60881925", "0.6085604", "0.60848033", "0.60805327", "0.6072929", "0.6070326", "0.60700876", "0.6068775", "0.60517895", "0.60429317", "0.6042451", "0.60418296", "0.60414094", "0.60358375", "0.6033674", "0.60321456", "0.60261786", "0.60245615", "0.6024201", "0.6023947", "0.6015498", "0.60119903", "0.601184", "0.60114974", "0.6010626", "0.6008838", "0.6008374", "0.59976465", "0.59953606", "0.599421", "0.599294", "0.5981687", "0.5980616", "0.59805536", "0.5978222", "0.5977796", "0.59772164", "0.5975881", "0.5964857", "0.5960243", "0.5959479", "0.59588456", "0.59583384", "0.5958188" ]
0.7289408
0
get_idioma Seleciona um idioma da vaga
get_idioma Выбирает язык вакансии
public function get_idioma($id, $id_idioma) { log_message('debug', 'get_idioma. Param1: ' . $id . ' Param2: ' . $id_idioma); $this->db->select('conhecimento_vaga.idconhecimento_vaga, conhecimento_vaga.idconhecimento, conhecimento_vaga.id_vaga, conhecimento_vaga.conhecimento, conhecimento_vaga.obrigatorio, conhecimento_vaga.nivel, nivel_idioma.nivel_idioma'); $this->db->from('conhecimento_vaga'); $this->db->join('nivel_idioma', 'conhecimento_vaga.nivel = nivel_idioma.idnivel_idioma'); $this->db->where('conhecimento_vaga.id_vaga', $id); $this->db->where('conhecimento_vaga.idconhecimento_vaga', $id_idioma); $result = $this->db->get(); log_message('debug', 'Last Query: ' . $this->db->last_query()); return $result->row(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_idiomas($id)\n {\n log_message('debug', 'get_idiomas. Param1: ' . $id);\n\n $this->db->select('conhecimento_vaga.*, nivel_idioma.nivel_idioma');\n $this->db->from('conhecimento_vaga');\n $this->db->join('conhecimento', \n 'conhecimento_vaga.idconhecimento = conhecimento.idconhecimento');\n $this->db->join('nivel_idioma', \n 'conhecimento_vaga.nivel = nivel_idioma.idnivel_idioma');\n $this->db->where('conhecimento.idtipo_conhecimento = 2');\n $this->db->where('conhecimento_vaga.id_vaga', $id);\n $result = $this->db->get();\n\n log_message('debug', 'Last Query: ' . $this->db->last_query());\n\n return $result->result(); \n }", "public function llenarIdiomas($opcion) {\n//$funcion = $parametros[\"funcionJSEjecutar\"];\n//$comboTipoEstudio = $this->comboTipoEstudio('1');\n $comboInstitucion = $this->comboInstitucion('1', 3);\n $comboEspecialidad = $this->comboEspecialidad('1', 14);\n//$comboProfesion = $this->comboProfesion('1');\n $comboEstadoEstudio = $this->comboEstadoEstudio('1');\n $comboTipoNivel = $this->comboTipoNivel('1');\n\n// $comboTipoDocumentos = $o_LPersona->comboTipoDocumento('1');\n// print_r($comboTipoDocumentos);\n\n require_once(\"../../cvista/rrhh/idiomasEmpleado.php\");\n }", "public function TipoCambioPorId()\n{\n\tself::SetNames();\n\t$sql = \"SELECT * FROM tiposcambio INNER JOIN tiposmoneda ON tiposcambio.codmoneda = tiposmoneda.codmoneda WHERE tiposcambio.codcambio = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codcambio\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function SelectNoticiasIdRelacaoEdicao($cod_relacao_idioma, $cod_idioma)\n {\n try\n {\n $query = Doctrine_Query::create()\n ->select(\"n.*, DATE_FORMAT(n.dat_data, '%d/%m/%Y') dat_data, DATE_FORMAT(n.dat_inicio_publicacao, '%d/%m/%Y %H:%i:%s') dat_inicio_publicacao, DATE_FORMAT(n.dat_termino_publicacao, '%d/%m/%Y %H:%i:%s') dat_termino_publicacao, wi.*\")\n ->from($this->table_alias)\n ->innerJoin(\"n.WebsiteIdiomas wi\")\n ->where(\"n.cod_relacao_idioma =?\", $cod_relacao_idioma)\n ->andWhere('n.cod_idioma = ?', $cod_idioma)\n ->limit(1);\n\n //Verifica se houve resultado\n if($query->count() > 0)\n {\n $dados = $query->execute()->toArray();\n return $dados[0];\n }\n else\n {\n return false;\n }\n }\n catch (Doctrine_Exception $e)\n {\n echo $e->getMessage();\n }\n }", "public function selectByAlunoAndId($matricula, $id){\n $sql = \"select * from vw_entrega where matricula = \".$matricula.\" and idEntrega =\".$id;\n\n $conex = new conexaoMySql();\n $PDO_conex = $conex->conectDatabase();\n\n $select = $PDO_conex->query($sql);\n\n if ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n $listEntrega = new entrega();\n\n $listEntrega->setTitulo($rs['titulo']);\n $listEntrega->setArquivo($rs['arquivo']);\n\t\t\t$data = $rs['data'];\n\t\t\t$dt = explode(\"-\", $data);\n\t\t\t$data = $dt[2].\"/\".$dt[1].\"/\".$dt[0];\n $listEntrega->setData($data);\n\t\t\t$listEntrega->setDisciplina($rs['disciplina']);\n\t\t\t$listEntrega->setProfessor($rs['professor']);\n\n return $listEntrega;\n }\n }", "function pintarIdiomas()\n\t{\n\t\t$punto = \"\";\n\t\t//obtenemos la ruta actual para establecer la redireccion correcta\n\t\tif(substr(getcwd(), -7) == \"Paginas\")\n\t\t{\n\t\t\t$punto = \".\";\n\t\t}\n\t\t\n\t\t\n\t\t//Mostramos un enlace a la ayuda\n\t\trequire(\"{$punto}./paginas/confg.php\");\n\t\techo \"<a href=\\\"{$cfg[\"WIKI\"]}\\\" target=\\\"_blank\\\"><img src=\\\"/imagenes/ayuda.png\\\" style=\\\"height: 25px; width: 25px;\\\"/></a><br>\";\n\t\t\n\t\t//Estaneamos los paquetes de idiomas instalados en el directorio correspondiente\n\t\tforeach (scandir(\"{$punto}./Idiomas/\") as $valor)\n\t\t{\n\t\t\t//Omitimos los ficheros arriba, actual e index.\n\t\t\tif(($valor != \".\") && ($valor != \"..\") && ($valor != \"index.php\"))\n\t\t\t{\n\t\t\t\t//Generamos el formulario correspondiente de cambio de idioma.\n\t\t\t\techo \"<form style=\\\"display: inline-block;\\\" method=\\\"post\\\" action=\\\"/paginas/cambiar_idioma.php\\\"/>\";\n\t\t\t\techo \"<input type=\\\"text\\\" name=\\\"idioma\\\" value=\\\"\".str_replace(\".php\", \"\", $valor).\"\\\" hidden/>\";\n\t\t\t\techo \"<input type=\\\"text\\\" name=\\\"link\\\" value=\\\"\".$_SERVER['REQUEST_URI'].\"\\\" hidden/>\";\n\t\t\t\techo \"<input type=\\\"image\\\" alt=\\\"\".str_replace(\".php\", \"\", $valor).\"\\\" title=\\\"\".str_replace(\".php\", \"\", $valor).\"\\\" src=\\\"/Imagenes/Banderas/\".str_replace(\".php\", \"\", $valor).\".png\\\"/>\";\n\t\t\t\techo \"</form> \";\n\t\t\t}\n\t\t}\n\t}", "public function SelectUltimoRelacionamentoIdioma()\n {\n try\n {\n $query = Doctrine_Query::create()\n ->select(\"*\")\n ->from($this->table_alias)\n ->orderBy(\"cod_relacao_idioma DESC\")\n ->limit(1)\n ->execute()\n ->toArray();\n\n return $query[0];\n }\n catch (Doctrine_Exception $e)\n {\n echo $e->getMessage();\n }\n }", "function set_idioma($_idioma)\r\n {\r\n $encontrado = false;\r\n foreach($this->idiomas as $idioma)\r\n \t{\r\n if ($idioma[\"prefijo\"] == $_idioma)\r\n \t{\r $encontrado = true;\r\n $this->idioma_actual = $idioma;\r\n $_SESSION[\"idioma\"]=$idioma[\"prefijo\"];\r \t}\r \t}\r\n\r\n # si no encontro el idioma setea el por defecto\r\n if (!$encontrado)\r\n \t$this->set_idioma(\"esp\");\r\n }", "function retAulaId($titleAula, $docenteId){\n\n $objDb = new db();\n $link = $objDb ->conecta_mysql();\n\n $sqlReturnId = \"select distinct a.id as aulaid\n from aula as a\n inner join docente as d on d.ID = a.IDDOCENTE\n where a.TITLE = '\".$titleAula.\"' and a.IDDOCENTE = $docenteId\";\n\n $aulaId = mysqli_query($link,$sqlReturnId);\n\n if($aulaId){\n while ($nAulas = mysqli_fetch_array($aulaId, MYSQLI_ASSOC)){\n echo $nAulas['aulaid'];\n }\n }else{\n null;\n }\n }", "public function getIdioma_idioma_key(){\n return $this->idioma_idioma_key;\n }", "public function get($anuncio_id);", "public function ArqueoCajaPorId()\n{\n\tself::SetNames();\n\t$sql = \"SELECT * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja LEFT JOIN usuarios ON cajas.codigo = usuarios.codigo WHERE arqueocaja.codarqueo = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codarqueo\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function seleccionar($id=\"\"){\r\n\t\t\t$resul=\"\";\r\n\t\t\t$objPG= new consultas(__FILE__,__CLASS__,__FUNCTION__);\r\n\t\t\t$resul=$objPG->selecion(\"0,\".$id.\";\",__LINE__);\r\n\t\t\tunset($objPG);\r\n\t\t\treturn \t$resul['resul'];\r\n\t\t}", "public function findIdMairie(){\n $req = $this->createQueryBuilder('r');\n $req->innerJoin('r.annonce', 'a')\n ->addSelect('a')\n ->innerJoin('a.mairie', 'm')\n ->addSelect('m');\n $req->select('m.id');\n\n return $req->getQuery()->getResult();\n }", "function getIdMessaggioDiRiferimento();", "function idioma_actual() {\n\n\n if ( $this->idioma_actual ) return $this->idioma_actual;\n\n // Si hay un idioma definido en el url se redefine idioma actual\n if (isset($_GET[\"idioma\"])) { \n $_SESSION[$this->proyecto.\"-idioma\"] = $_GET[\"idioma\"]; \n $this->idioma_actual = $_GET['idioma'];\n return $_GET['idioma'];\n }\n\n // Si no existe variable de session se crea el predeterminado.\n if (isset($_SESSION[$this->proyecto.\"-idioma\"])) {\n\n $this->idioma_actual = $_SESSION[$this->proyecto.\"-idioma\"] ;\n\n } else {\n\n // Miramos el idioma que el usuario tiene definido en el navegador\n\n $sitelang = getenv(\"HTTP_ACCEPT_LANGUAGE\");\n $sitelang = $sitelang[0].$sitelang[1];\n\n if ( array_key_exists($sitelang,$this->idiomas_activados ) ) { // Si es un idioma activado lo definimos\n\n $_SESSION[$this->proyecto.\"-idioma\"] = $sitelang;\n $this->idioma_actual = $sitelang;\n\n } else { // sino es un idioma activado cogemos el por defecto\n\n $_SESSION[$this->proyecto.\"-idioma\"] = $this->idiomaxdefecto;\n $this->idioma_actual = $this->idiomaxdefecto;\n\n }\n\n }\n\n }", "function SeleccionarPersonasDeOficina($id_oficina, $id_organizacion){\n\n $sql=pg_query(\"SELECT id_persona FROM pasantias.persona_organizacion_oficina WHERE codigo_sucursal='$id_organizacion' AND id_oficina=$id_oficina \");\n $Lista=array();\n $cont=0;\n while($registro=pg_fetch_array($sql)){\n\n $Lista[$cont]=$registro[\"id_persona\"];\n\n $cont++;\n\n }\n\n return $Lista;\n\n }", "function SeleccionarPersonasDeOficina($id_oficina, $id_organizacion){\n\n $sql=pg_query(\"SELECT id_persona FROM pasantias.persona_organizacion_oficina WHERE codigo_sucursal='$id_organizacion' AND id_oficina=$id_oficina \");\n $Lista=array();\n $cont=0;\n while($registro=pg_fetch_array($sql)){\n\n $Lista[$cont]=$registro[\"id_persona\"];\n\n $cont++;\n\n }\n\n return $Lista;\n\n }", "function aggiungi_id($sconti)\n {\n\t $url = file_get_contents('http://localhost/json/libricateg.json');\n\t $libricateg = json_decode($url, true);\n\t $indice = 0;\n\t $libri = array();\n\t foreach ($libricateg as $k=>$v)\n\t {\n\t\tforeach($v as $key=>$value)\n\t\t{\n\t\t\t foreach ($sconti as $sconto)\n\t\t\t {\n\t\t\t\tif($value[\"categoria\"] == $sconto[\"tipo\"])\n\t\t\t\t{\n\t\t\t\t\t$libri[$indice][\"id\"] = $value[\"libro\"];\n\t\t\t\t\t$libri[$indice][\"sconto\"] = $sconto[\"sconto\"];\n\t\t\t\t\t$indice++;\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t }\n\t \n\t return $libri;\n }", "public function cambia_idioma()\n\t{\n\t?>\n\t\t<select class=\"escoge_idioma\">\n\t \t<?php\n\t \tif($this->uri->segment(1) == \"es\"){\n\t \t?>\n\t \t\t<option value=\"<?php echo base_url()?>es/idioma\">ES</option> \n\t \t\t<option value=\"<?php echo base_url()?>en/idioma\">EN</option>'?>\n\t \t<?php\n\t \t}else{\n\t \t\t?>\n\t \t\t<option value=\"<?php echo base_url()?>en/idioma\">EN</option> \n\t \t\t<option value=\"<?php echo base_url()?>es/idioma\">ES</option>'?>\n\t \t<?php\n\t \t}\n\t \t?>\n\t \t</select>\n\t<?php\n\t}", "public function idiomas_instalados(){\r\n\t\t//variables para la funcion\r\n\t\t$resultado = '';\r\n\r\n\t\t//consulta de idiomas\r\n\t\t$idiomas = $this->db->query('SELECT codigo_lenguaje, nombre_lenguaje from lenguajes');\r\n\r\n\t\t$arr_asoc = $idiomas->result_array();\r\n\t\t$nuevakey = '';\r\n\r\n\t\tforeach ($arr_asoc as $array) {\r\n\t\t\tforeach($array as $llave => $contenido){\r\n\t\t\t\tif($llave == 'codigo_lenguaje'){\r\n\t\t\t\t\t$resultado[$contenido] = '';\r\n\t\t\t\t\t$nuevakey = $contenido;\r\n\t\t\t\t}//fin if\r\n\t\t\t\telseif($llave == 'nombre_lenguaje'){\r\n\t\t\t\t\t$resultado[$nuevakey] = $contenido;\r\n\t\t\t\t\t$nuevakey = '';\r\n\t\t\t\t}//fin elseif\r\n\t\t\t}//fin foreach array\r\n\t\t}//fin foreach array asociativo\r\n\r\n\r\n\t\treturn $resultado;\r\n\r\n\t}", "function find_id_toshow()\n\t{\n\tGLOBAL $CircleGroups;\n\tGLOBAL $ExterneStromzaehlerGroups;\n\n\t$id_result = array();\n\n\t$id = false;\n\t$maxleistung = 0;\n\t$info = \"\";\n\t$objectname = \"\";\n\t$idleistung = 0;\n\t$idgesamt = 0;\n\t$idkosten = 0;\n\t$type = \"\";\n\t$parent = 0;\n\t$objectident = \"\";\n\n\t\n\t$CircleVisuPath = \"Visualization.WebFront.Hardware.Plugwise.MENU.Stromzaehler\";\n \t$CircleIdCData = get_ObjectIDByPath($CircleVisuPath);\n\n\t$CircleDataPath = \"Program.IPSLibrary.data.hardware.Plugwise.Circles\";\n \t$CircleIdData = get_ObjectIDByPath($CircleDataPath);\n\n\t$GruppenVisuPath= \"Visualization.WebFront.Hardware.Plugwise.MENU.Gruppen\";\n \t$GroupsIdData = get_ObjectIDByPath($GruppenVisuPath);\n\n\t$OthersDataPath = \"Program.IPSLibrary.data.hardware.Plugwise.Others\";\n \t$GroupsIdOData = get_ObjectIDByPath($OthersDataPath);\n\n\t//***************************************************************************\n\t// Welcher Stromzaehler soll dargestellt werden\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach ( IPS_GetChildrenIDs($CircleIdCData) as $child )\n\t\t\tif ( GetValueInteger($child) == 1 )\n\t \t{ // gefunden\n\t\t\t\t$id = true;\n\t\t\t\t$type = \"ZAEHLER\";\n\t \t\t$object = IPS_GetObject($child);\n\t \t$info = $object['ObjectInfo'];\n\t \t$objectname = $object['ObjectName'];\n\t\t\t\t\n\t \t// suche in Circles\n\t \t$parent = @IPS_GetObjectIDByIdent($info,$CircleIdData);\n\t \tif ( $parent )\n\t \t{\n\t\t\t\t\t$idleistung = IPS_GetObjectIDByName('Leistung',$parent);\n\t\t\t\t\t$idgesamt = IPS_GetObjectIDByName('Gesamtverbrauch',$parent);\n\t\t\t\t\t$idkosten = IPS_GetObjectIDByName('Kosten',$parent);\n\n\t\t\t\t\tforeach ($CircleGroups as $circle )\n\t \t\t\t\t{\t// Maxwert fuer Circle aus Config\n\t \t\t\t\tif ( $info == $circle[0] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$maxleistung = $circle[4];\n\t \t\t\t\tbreak;\n\t \t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t $id = false ; //Doch kein Circle\n\t\t}\n\t\t\n\t//***************************************************************************\n\t// Welcher externe Stromzaehler soll dargestellt werden\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach($ExterneStromzaehlerGroups as $extern)\n\t\t\tif ( $extern[0] == $info ) // $info wird bei Circlesuche gefunden\n\t\t\t\t{\n\t\t\t\t$type = \"EXTERN\";\n\t\t\t\t$id = true;\n\t\t\t\t$objectname = $extern[0];\n\t\t\t\t$idleistung = $extern[2];\n\t\t\t\t$idgesamt = $extern[3];\n\t\t\t\t$maxleistung = $extern[4];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t}\n\n\t//***************************************************************************\n\t// kein Stromzaehler oder Extern , dann Gruppe suchen\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach ( IPS_GetChildrenIDs($GroupsIdData) as $child )\n\t\t\tif ( GetValueInteger($child) == 1 )\n\t \t{\n\t\t\t\t$id = true;\n\t\t\t\t$type = \"GRUPPE\";\n\t\t\t\t\n\t\t\t\t$object = IPS_GetObject($child);\n\t \t$ident = $object['ObjectIdent'];\n\t \t$idleistung = IPS_GetObjectIDByIdent('Leistung',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\t \t$idgesamt = IPS_GetObjectIDByIdent('Gesamtverbrauch',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\t \t$idkosten = IPS_GetObjectIDByIdent('Kosten',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\n\t\t\t\t$objectname = $object['ObjectName'];\n\t\t\t\t$objectident = $object['ObjectIdent'];\n\t\t\t\t$maxleistung = 0;\n\t\t\t\tbreak;\n\t\t\t\t}\n\n\t//***************************************************************************\n\t// kein Stromzaehler oder Extern oder Gruppe dann Gesamt\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden dann Gesamt\n\t\t{ // Erst mal diese Daten nehmen\n\t\t$id = true;\n\t\t$type = \"GESAMT\";\n\t\t$idgesamt = IPS_GetObjectIDByIdent('SYSTEM_MAIN',$GroupsIdOData);\n\t\t$idleistung = IPS_GetObjectIDByName('Leistung',$idgesamt);\n\t\t$idkosten = IPS_GetObjectIDByIdent('Kosten',$idgesamt);\n\t\t$idgesamt = IPS_GetObjectIDByName('Gesamtverbrauch',$idgesamt);\n\t\t\n\t\t$objectname = \"Gesamt\";\n\t\t}\n\n\n\n\tif ( $objectname == \"SYSTEM_REST\" )\n $objectname = \"Sonstiges\";\n\n\t//***************************************************************************\n\t// \n\t//***************************************************************************\n\t$id_result['TYPE'] = $type;\n\t$id_result['ID'] = $id;\n\t$id_result['IDLEISTUNG'] = $idleistung;\n\t$id_result['IDGESAMT'] = $idgesamt;\n\t$id_result['IDKOSTEN'] = $idkosten;\n\t$id_result['MAXLEISTUNG'] = $maxleistung;\n\t$id_result['INFO'] = $info;\n\t$id_result['OBJECTNAME'] = $objectname;\n\t$id_result['PARENT'] = $parent;\n\t$id_result['OBJECTIDENT'] = $objectident;\n\t\n\treturn $id_result;\n\t}", "public function obtenerColectivo();", "function _get_id_ao($sel,$id)\n{\n\t$aoid = 0;\n\tswitch($sel)\n\t{\n\t\tcase 'a':\n\t\t\t$q = 'SELECT aid as \"id\" FROM {muestrario} WHERE bid = '.$id;\n\t\tbreak;\n\t\tcase 'o':\n\t\t\t$q = 'SELECT oid as \"id\" FROM {muestitem} WHERE cid = '.$id;\n\t\tbreak;\n\t}\n\t\n\t$res = db_query($q);\n\t\twhile($row = db_fetch_array($res))\n\t\t\t$aoid = $row['id'];\n\t\t\t\n\t\t\t\nreturn $aoid;\n}", "function descripciones($idioma = NULL) {\n\n $idioma = ( $idioma ) ? $idioma : $this->idioma ;\n\n return $this->descripciones[$idioma];\n\n }", "public function selectByIdContato()\r\n {\r\n \r\n }", "function getIdasociada() { return $this->idasociada;\n }", "public function caricaIdAuto(){\n \n $query = 'SELECT invendita.id_commerciante invendita_commerciante,'\n . ' invendita.id_auto invendita_auto, '\n . 'invendita.data_invendita invendita_data '\n . 'FROM invendita '; \n \n $mysqli = Db::getInstance()->connectDb();\n if ($mysqli->errno > 0) {\n error_log(\"[caricaIdAuto] impossibile eseguire la query\");\n $mysqli->close();\n return null;\n }\n \n $stmt = $mysqli->stmt_init();\n $stmt->prepare($query);\n if (!$stmt) {\n error_log(\"[caricaIdAuto] impossibile\" .\n \" inizializzare il prepared statement\");\n $mysqli->close();\n return null;\n }\n \n $invendita = self::caricaInvenditaDaStmt($stmt);\n \n if(isset($invendita)){\n $mysqli->close();\n \n return $invendita;\n }\n \n \n }", "function obtener_espacioid_por_idcalendario($id_calendario){\n $resultado = \"\"; \n $sql=\"SELECT id_espacio FROM `tb_calendario` WHERE id_calendario = $id_calendario\";\n //echo $sql . '<br>';\n try{\n // Get DB Object\n $db = new db();\n // Connect\n $db = $db->connect();\n $stmt = $db->query($sql);\n foreach($stmt as $row)\n $id_espacio = $row[0];\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n $db = null;\n //echo 'echo CF '. $id_espacio . '<br>';\n if($id_espacio){\n $resultado = $id_espacio;\n }else{ $resultado = \"vacio\";}\n } catch(PDOException $e){\n //echo '{\"error\": {\"text\": '.$e->getMessage().'}';\n $resultado = $e->getMessage();\n }\n //echo $resultado;\n return $resultado;\n }", "public function obtenerIDs(){\n $this->Consulta(\"*\", \"vehiculos\", \"\");\n if($this->numFilas != 0){\n while($r = mysql_fetch_array($this->Resultado)){\n echo \"(\". $r[0] .\") \";\n echo $r[1] .\" :: \";\n echo $r[2] .\" :: >\";\n echo $r[2] .\"<hr>\";\n }\n }\n }", "public function grafico_2A41($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_1\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A42($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_2\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function MedidasPorId()\n{\n\tself::SetNames();\n\t$sql = \"SELECT * FROM medidas WHERE codmedida = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codmedida\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function grafico_2A31($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_1\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A42($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_2\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A31($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A3_1\n\t\t\t\t FROM RESULTADOS_4A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function MesasPorId()\n{\n\tself::SetNames();\n\t$sql = \"SELECT salas.codsala, salas.nomsala, salas.fecha, mesas.codmesa, mesas.nommesa, mesas.fecha, mesas.statusmesa, mesas.empresa FROM mesas LEFT JOIN salas ON mesas.codsala = salas.codsala WHERE mesas.codmesa = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codmesa\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function grafico_4A42($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A4_2\n\t\t\t\t FROM RESULTADOS_4A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A44($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_4\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function show(Idioma $idioma)\n {\n //\n }", "public function grafico_4A22($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_2\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A41($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_1\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A32($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A3_2\n\t\t\t\t FROM RESULTADOS_4A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A23($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_3\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A46($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_6\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_3A42($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.3A4_2\n\t\t\t\t FROM RESULTADOS_3A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function TipoMonedaPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \"SELECT * FROM tiposmoneda WHERE codmoneda = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decrypt($_GET[\"codmoneda\"])));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function grafico_1A44($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_4\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "function categoria($id, $idioma='es_ES'){\n\t\t$arrayCategoria=array();\n\t\t$query=\"SELECT categoria.id, categoria.idPadre, categoriaNombre.nombre FROM categoria, categoriaNombre, idioma WHERE categoria.id='\".$id.\"' AND categoria.id=categoriaNombre.idCategoria AND categoriaNombre.idIdioma=idioma.id AND idioma.codigo='\".$idioma.\"' \";\n\t\t$cursor=mysql_query($query);\n\t\t$registro=mysql_fetch_array($cursor);\n\t\t$arrayCategoria[id]=$registro[id];\n\t\t$arrayCategoria[nombre]=$registro[nombre];\n\t\t$arrayCategoria[padre]=$registro[idPadre];\n\t\treturn $arrayCategoria;\n\t}", "public function grafico_4A41($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A4_1\n\t\t\t\t FROM RESULTADOS_4A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function selectorDeCodigos(){\n\n\t\t\t$conexionRecuperada= new conexion();\n \t\t\t$conexionEstablecida=$conexionRecuperada->cConexion();\n\n\n\t\t\tif ($_SESSION[\"idRol\"]==2) {\n \t\t\t\n\t\t\t\t$query2=\"SELECT a.idFederacion,a.rucOrganismo,a.nombreOrganismo,(SELECT a1.nombreProvincia FROM in_md_provincias AS a1 WHERE a1.idProvincia=a.provinciaFederacion) AS provinciaFederacion,(SELECT a1.nombreCanton FROM in_md_canton AS a1 WHERE a1.idCanton=a.cantonFederacion) AS cantonFederacion,(SELECT a1.nombreParroquia FROM in_md_parroquia AS a1 WHERE a1.idParroquia=a.parroquiaFederacion) AS parroquiaFederacion,a.telefono,a.direccion,a.email,b.idTramite,SUBSTRING(nombreOrganismo, 1, 3) AS nombreCompletoSin,YEAR(NOW()) AS anioFechas,a.tipoOrganismo,c.cedulaRepresentante,c.nombreReperesentante FROM pro_federacion AS a INNER JOIN pro_representante AS c ON c.idFederacion=a.idFederacion LEFT JOIN pro_proyecto AS b ON a.usuario=b.idUsuario WHERE a.usuario='\".$_SESSION[\"username\"].\"' GROUP BY a.usuario ORDER BY b.idTramite ASC LIMIT 1;\";\n\n\t\t\t\t$resultado2 = $conexionEstablecida->query($query2);\n\n\t\t\t\twhile($registro2 = $resultado2->fetch()) {\n\n\t\t\t\t\t$idFederacion=$registro2['idFederacion'];\n\t\t\t\t\t$rucOrganismo=$registro2['rucOrganismo'];\n\t\t\t\t\t$nombreOrganismo=$registro2['nombreOrganismo'];\n\t\t\t\t\t$provinciaFederacion=$registro2['provinciaFederacion'];\n\t\t\t\t\t$cantonFederacion=$registro2['cantonFederacion'];\n\t\t\t\t\t$parroquiaFederacion=$registro2['parroquiaFederacion'];\n\t\t\t\t\t$telefono=$registro2['telefono'];\n\t\t\t\t\t$direccion=$registro2['direccion'];\n\t\t\t\t\t$email=$registro2['email'];\n\t\t\t\t\t$nombreCompletoSin=$registro2['nombreCompletoSin'];\n\t\t\t\t\t$anioFechas=$registro2['anioFechas'];\n\t\t\t\t\t$tipoOrganismo=$registro2['tipoOrganismo'];\n\t\t\t\t\t$cedulaRepresentante=$registro2['cedulaRepresentante'];\n\t\t\t\t\t$nombreReperesentante=$registro2['nombreReperesentante'];\n\t\t\t\n\t\t\t\t}\n\n\n\t\t\t\t$query3=\"SELECT idTramite FROM pro_proyecto WHERE idUsuario='$rucOrganismo' ORDER BY idTramite DESC LIMIT 1;\";\n\n\t\t\t\t$resultado3 = $conexionEstablecida->query($query3);\n\n\t\t\t\twhile($registro3 = $resultado3->fetch()) {\n\n\t\t\t\t\t$idTramite=$registro3['idTramite'];\n\n\t\t\t\t}\n\n\n\t\t\t\t$query4=\"SELECT COUNT(idTramite) AS contador FROM pro_proyecto WHERE idUsuario='$rucOrganismo';\";\n\n\t\t\t\t$resultado4 = $conexionEstablecida->query($query4);\n\n\t\t\t\twhile($registro4 = $resultado4->fetch()) {\n\n\t\t\t\t\t$contador=$registro4['contador'];\n\n\t\t\t\t}\n\n\t\t\t\tif (empty($idTramite)) {\n\t\t\t\t\t$idTramite=0;\n\t\t\t\t}else{\n\t\t\t\t\t$idTramite=$idTramite;\n\t\t\t\t}\n\n\t\t\t\t$contador=$contador+1;\n\n\t\t\t\t$codigo=$contador.\"-\".$rucOrganismo.\"-\".$nombreCompletoSin.\"-\".$anioFechas;\n\n\n \t\t\t}else if($_SESSION[\"idRol\"]==3){\n\n\t\t\t\t$query2=\"SELECT a.idAteleta,a.tipoOrganismo,a.cedulaUsuario,a.nombreCompleto,a.fechaNacimiento,a.sexo,(SELECT a1.nombreProvincia FROM in_md_provincias AS a1 WHERE a1.idProvincia=a.provincia) AS provincia, (SELECT a1.nombreCanton FROM in_md_canton AS a1 WHERE a1.idCanton=a.canton) AS canton, (SELECT a1.nombreParroquia FROM in_md_parroquia AS a1 WHERE a1.idParroquia=a.parroquia) AS parroquia,a.telefono,a.direccion,a.email,b.idTramite,SUBSTRING(nombreCompleto, 1, 3) AS nombreCompletoSin,YEAR(NOW()) AS anioFechas FROM pro_deportistaorganismo AS a LEFT JOIN pro_proyecto AS b ON a.usuario=b.idUsuario WHERE a.usuario='\".$_SESSION[\"username\"].\"' GROUP BY a.usuario ORDER BY b.idTramite ASC LIMIT 1;\";\n\n\t\t\t\t$resultado2 = $conexionEstablecida->query($query2);\n\n\n\t\t\t\twhile($registro2 = $resultado2->fetch()) {\n\n\t\t\t\t\t$idAteleta=$registro2['idAteleta'];\n\t\t\t\t\t$tipoOrganismo=$registro2['tipoOrganismo'];\n\t\t\t\t\t$cedulaUsuario=$registro2['cedulaUsuario'];\n\t\t\t\t\t$nombreCompleto=$registro2['nombreCompleto'];\n\t\t\t\t\t$fechaNacimiento=$registro2['fechaNacimiento'];\n\t\t\t\t\t$sexo=$registro2['sexo'];\n\t\t\t\t\t$provincia=$registro2['provincia'];\n\t\t\t\t\t$canton=$registro2['canton'];\n\t\t\t\t\t$parroquia=$registro2['parroquia'];\n\t\t\t\t\t$telefono=$registro2['telefono'];\n\t\t\t\t\t$direccion=$registro2['direccion'];\n\t\t\t\t\t$email=$registro2['email'];\n\t\t\t\t\t$nombreCompletoSin=$registro2['nombreCompletoSin'];\n\t\t\t\t\t$anioFechas=$registro2['anioFechas'];\n\n\t\t\t\t}\n\n\t\t\t\t$query3=\"SELECT idTramite FROM pro_proyecto WHERE idUsuario='$cedulaUsuario' ORDER BY idTramite DESC LIMIT 1;\";\n\n\t\t\t\t$resultado3 = $conexionEstablecida->query($query3);\n\n\t\t\t\twhile($registro3 = $resultado3->fetch()) {\n\n\t\t\t\t\t$idTramite=$registro3['idTramite'];\n\n\t\t\t\t}\n\n\t\t\t\t$query4=\"SELECT COUNT(idTramite) AS contador FROM pro_proyecto WHERE idUsuario='$cedulaUsuario';\";\n\n\t\t\t\t$resultado4 = $conexionEstablecida->query($query4);\n\n\t\t\t\twhile($registro4 = $resultado4->fetch()) {\n\n\t\t\t\t\t$contador=$registro4['contador'];\n\n\t\t\t\t}\n\n\t\t\t\tif (empty($idTramite)) {\n\t\t\t\t\t$idTramite=0;\n\t\t\t\t}else{\n\t\t\t\t\t$idTramite=$idTramite;\n\t\t\t\t}\n\n\t\t\t\t$contador=$contador+1;\n\n\t\t\t\t$codigo=$contador.\"-\".$cedulaUsuario.\"-\".str_replace('Ã', 'N',$nombreCompletoSin).\"-\".$anioFechas;\n\n\n \t\t\t}\n\n\t\t\treturn $codigo;\n\t\t\t\n\n\t\t}", "public function grafico_1A31($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A3_1\n\t\t\t\t FROM RESULTADOS_1A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A45($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_5\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "function obtenerTareasProyecto($id=null){ //tiene que recibir un id pero en caso de que no se le pasara mejor ponemos null\n include 'conexion.php';\n \n try {\n return $conn->query(\"SELECT id,nombre,estado FROM tareas WHERE id_proyecto={$id}\"); //aqui utilizo comillas dibles \"\" para poder inyectar js\n }catch(Exception $e){\n echo\"Error: \".$e->getMessage();\n return false;\n }\n \n }", "function retornaTipoOcorrencia($id)\n\t{\n\t\t$sql = \"SELECT * FROM ig_tipo_ocorrencia WHERE idTipoOcorrencia = '$id'\";\n\t\t$con = bancoMysqli();\n\t\t$query = mysqli_query($con,$sql);\n\t\t$campo = mysqli_fetch_array($query);\n\t\treturn $campo['tipoOcorrencia'];\t\n\t}", "public function selectByAluno($matricula){\n\t\t$sql = \"select * from vw_entrega where matricula =\".$matricula;\n\t\t\n\t\t$conex = new conexaoMySql();\n $PDO_conex = $conex->conectDatabase();\n\n $select = $PDO_conex->query($sql);\n\n $cont = 0;\n $listEntrega = null;\n while ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n //Cria um objeto array da classe entrega\n $listEntrega[] = new entrega();\n $listEntrega[$cont]->setIdEntrega($rs['idEntrega']);\n\t\t\t$listEntrega[$cont]->setMatriculaAluno($rs['matricula']);\n $listEntrega[$cont]->setTitulo($rs['titulo']);\n $listEntrega[$cont]->setArquivo($rs['arquivo']);\n\t\t\t$listEntrega[$cont]->setData($rs['data']);\n $listEntrega[$cont]->setDisciplina($rs['disciplina']);\n\t\t\t$listEntrega[$cont]->setProfessor($rs['professor']);\n\n $cont += 1;\n }\n return $listEntrega;\n $conex->closeDatabase();\n\t}", "public function grafico_2A47($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_7\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A12($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A1_2\n\tFROM RESULTADOS_4A1 A\n\tWHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A32($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A3_2\n\t\t\t\t FROM RESULTADOS_1A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A11($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A1_1\n\tFROM RESULTADOS_4A1 A\n\tWHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A24($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_4\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "function getSujetProbleme($id)\n{\n require 'config/dbconnect.php';\n\n $sql = \"SELECT * FROM problemevehicule WHERE id = ?\";\n $requete = $db->prepare($sql);\n $requete->execute([$id]);\n\n $result = $requete->fetch();\n return $result['raison'];\n}", "public function grafico_2A32($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_2\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A21($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_1\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function listarNacionalidadeId()\n {\n $result = $this->sql->query(\n NacionalidadeDAO::$SELECT_ID,\n array(\n 'idNacionalidade' => array(0 => $this->getIdNacionalidade(), 1 => \\PDO::PARAM_INT)\n )\n );\n if ($result->rowCount() == 1) {\n $linha = $result->fetch(\\PDO::FETCH_OBJ);\n $itens = array(\n 'idNacionalidade' => $linha->id_nacionalidade,\n 'nomeNacionalidade' => $linha->nome_nacionalidade\n );\n } else {\n $itens = null;\n }\n //devolver o resultado \n return $itens;\n }", "public function grafico_1A24($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A2_4\n\t\t\t\t FROM RESULTADOS_1A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_3A41($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.3A4_1\n\t\t\t\t FROM RESULTADOS_3A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A22($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A2_2\n\t\t\t\t FROM RESULTADOS_1A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A45($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_5\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A46($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_6\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A14($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A1_4\n\t\t\t\t FROM RESULTADOS_2A1 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A36($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_6\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A44($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A4_4\n\t\t\t\t FROM RESULTADOS_4A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A34($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_4\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A23($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A2_3\n\t\t\t\t FROM RESULTADOS_1A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A40($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_0\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A35($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_5\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "function get_anio_comision($parametros)\n\t{\n\t\t$sql = \"SELECT anio_academico \n\t\t\t\t\tFROM sga_comisiones\n\t\t\t\tWHERE comision = {$parametros['comision']}\";\n\t\treturn kernel::db()->consultar_fila($sql, db::FETCH_ASSOC);\n\t}", "public function grafico_2A43($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A4_3\n\t\t\t\t FROM RESULTADOS_2A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A13($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A1_3\n\tFROM RESULTADOS_4A1 A\n\tWHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A27($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A2_7\n\t\t\t\t FROM RESULTADOS_1A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A14($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A1_4\n\t\t\t\t FROM RESULTADOS_4A1 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_3A44($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.3A4_4\n\t\t\t\t FROM RESULTADOS_3A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A24($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A2_4\n\t\t\t\t FROM RESULTADOS_2A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A47($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_7\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A33($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A3_3\n\t\t\t\t FROM RESULTADOS_4A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A30($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A3_0\n\t\t\t\t FROM RESULTADOS_4A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_4A20($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_0\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function idioma(){\n\n return $this->hasMany('App\\Idioma','id_tipo_idioma','id_tipo_idioma');\n\n }", "public function grafico_2A30($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_0\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A33($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A3_3\n\t\t\t\t FROM RESULTADOS_2A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A43($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_3\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A34($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A3_4\n\t\t\t\t FROM RESULTADOS_1A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "private function getID(){\n\t\treturn $this->ultimoID;\n\t}", "public function grafico_4A26($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.4A2_6\n\t\t\t\t FROM RESULTADOS_4A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_2A23($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A2_3\n\t\t\t\t FROM RESULTADOS_2A2 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A40($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A4_0\n\t\t\t\t FROM RESULTADOS_1A4 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "function actionIdioma() {\n $res = Yii::$app->request->get('id');\n $hab = Yii::$app->request->get('hab');\n $idioma = Yii::$app->request->get('idioma');\n\n $connection = \\Yii::$app->db;\n $connection->open();\n\n $command2 = $connection->createCommand('select habitacion.nombre,reservacion_hab.precio,reservacion_hab.fecha_entrada,reservacion_hab.fecha_salida from reservacion,habitacion,reservacion_hab,agencia where reservacion_hab.hab=habitacion.id AND reservacion_hab.reservacion=reservacion.id and reservacion_hab.reservacion=:reserva and reservacion.agencia=agencia.id and agencia.pago=1 GROUP BY habitacion.nombre,reservacion_hab.fecha_entrada,reservacion_hab.fecha_salida');\n $command2->bindParam(':reserva', $res);\n $mos_res = $command2->queryAll();\n\n if ($hab != \"\") {\n $command2 = $connection->createCommand('select habitacion.nombre,reservacion_hab.precio,reservacion_hab.fecha_entrada,reservacion_hab.fecha_salida from reservacion,habitacion,reservacion_hab,agencia where reservacion_hab.hab=habitacion.id and reservacion_hab.hab=:hab AND reservacion_hab.reservacion=reservacion.id and reservacion_hab.reservacion=:reserva and reservacion.agencia=agencia.id and agencia.pago=1 GROUP BY reservacion_hab.fecha_entrada,reservacion_hab.fecha_salida');\n $command2->bindParam(':reserva', $res);\n $command2->bindParam(':hab', $hab);\n $mos_res = $command2->queryAll();\n }\n\n\n $result = array();\n $imp = 0;\n\n $mos_hab = [];\n for ($i = 0; $i < count($mos_res); $i++) {\n if ($mos_res[$i]['nombre'] != 'ANEXO') {\n $mos_hab[count($mos_hab)] = $mos_res[$i];\n }\n }\n $mos_res = $mos_hab;\n\n for ($i = 0; $i < count($mos_res); $i++) {\n\n if ($idioma == \"Ingles\") {\n $result[count($result)] = array(\n 'desc' => '<b style=\"font-size: 10px\">LODGING</b>',\n 'cant' => \"\",\n 'precio' => '',\n 'total' => ''\n );\n } else {\n $result[count($result)] = array(\n 'desc' => '<b style=\"font-size: 10px\">LOGEMENT</b>',\n 'cant' => \"\",\n 'precio' => '',\n 'total' => ''\n );\n }\n\n $start_ts = strtotime($mos_res[$i]['fecha_entrada']);\n $end_ts = strtotime($mos_res[$i]['fecha_salida']);\n $diferencia = $end_ts - $start_ts;\n $dif_dias = round($diferencia / 86400);\n\n $imp+=$mos_res[$i]['precio'] * $dif_dias;\n $tota = 0;\n $total = Yii::$app->formatter->asDecimal($mos_res[$i]['precio'] * $dif_dias);\n\n if ($idioma == \"Ingles\") {\n $result[count($result)] = array(\n 'desc' => '<p style=\"margin-left:1em\">' . $mos_res[$i]['nombre'] . '</p>',\n 'cant' => '<p style=\"margin-left:2em\">' . $dif_dias . '</p>',\n 'precio' => '<p style=\"margin-left:1em\">' . $mos_res[$i]['precio'] . '</p>',\n 'total' => '<p style=\"margin-left:1em\">' . Yii::$app->formatter->asDecimal($total, 2) . '</p>'\n );\n } else {\n $result[count($result)] = array(\n 'desc' => '<p style=\"margin-left:1em\">' . $mos_res[$i]['nombre'] . '</p>',\n 'cant' => '<p style=\"margin-left:2em\">' . $dif_dias . '</p>',\n 'precio' => '<p style=\"margin-left:1em\">' . $mos_res[$i]['precio'] . '</p>',\n 'total' => '<p style=\"margin-left:1em\">' . Yii::$app->formatter->asDecimal($total, 2) . '</p>'\n );\n }\n }\n\n if ($idioma == \"Ingles\") {\n $command = $connection->createCommand('select servicio.id,servicio.ingles as nombre FROM servicio,subservicios,reservacion_servicios where servicio.id=subservicios.servicio and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY servicio.ingles ORDER BY servicio.prioridad asc');\n } else {\n $command = $connection->createCommand('select servicio.id,servicio.frances as nombre FROM servicio,subservicios,reservacion_servicios where servicio.id=subservicios.servicio and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY servicio.frances ORDER BY servicio.prioridad asc');\n }\n\n $command->bindParam(':reserva', $res);\n $servicios = $command->queryAll();\n\n\n\n if ($hab != \"\") {\n if ($idioma == \"Ingles\") {\n $command = $connection->createCommand('select servicio.id,servicio.ingles as nombre FROM servicio,subservicios,reservacion_servicios where servicio.id=subservicios.servicio and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.hab=:hab and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY servicio.ingles ORDER BY servicio.prioridad asc');\n } else {\n $command = $connection->createCommand('select servicio.id,servicio.frances as nombre FROM servicio,subservicios,reservacion_servicios where servicio.id=subservicios.servicio and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.hab=:hab and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY servicio.frances ORDER BY servicio.prioridad asc');\n }\n\n $command->bindParam(':reserva', $res);\n $command->bindParam(':hab', $hab);\n $servicios = $command->queryAll();\n }\n\n\n for ($i = 0; $i < count($servicios); $i++) {\n\n if ($idioma == \"Ingles\") {\n $command1 = $connection->createCommand('select subservicios.ingles as nombre, SUM(reservacion_servicios.cant)as cant,reservacion_servicios.precio,SUM(reservacion_servicios.cant)*reservacion_servicios.precio as total from subservicios,reservacion_servicios,servicio where servicio.id=:serv and subservicios.servicio=servicio.id and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY reservacion_servicios.servicio ORDER BY subservicios.ingles');\n } else {\n $command1 = $connection->createCommand('select subservicios.frances as nombre, SUM(reservacion_servicios.cant)as cant,reservacion_servicios.precio,SUM(reservacion_servicios.cant)*reservacion_servicios.precio as total from subservicios,reservacion_servicios,servicio where servicio.id=:serv and subservicios.servicio=servicio.id and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.estado=0 GROUP BY reservacion_servicios.servicio ORDER BY subservicios.frances');\n }\n\n $command1->bindParam(':reserva', $res);\n $command1->bindParam(':serv', $servicios[$i]['id']);\n $subservicios = $command1->queryAll();\n\n if ($hab != \"\") {\n if ($idioma == \"Ingles\") {\n $command1 = $connection->createCommand('select subservicios.ingles as nombre, SUM(reservacion_servicios.cant)as cant,reservacion_servicios.precio,SUM(reservacion_servicios.cant)*reservacion_servicios.precio as total from subservicios,reservacion_servicios,servicio where servicio.id=:serv and subservicios.servicio=servicio.id and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.hab=:hab and reservacion_servicios.estado=0 GROUP BY reservacion_servicios.servicio ORDER BY subservicios.ingles');\n } else {\n $command1 = $connection->createCommand('select subservicios.frances as nombre, SUM(reservacion_servicios.cant)as cant,reservacion_servicios.precio,SUM(reservacion_servicios.cant)*reservacion_servicios.precio as total from subservicios,reservacion_servicios,servicio where servicio.id=:serv and subservicios.servicio=servicio.id and subservicios.id=reservacion_servicios.servicio and reservacion_servicios.reservacion=:reserva and reservacion_servicios.hab=:hab and reservacion_servicios.estado=0 GROUP BY reservacion_servicios.servicio ORDER BY subservicios.frances');\n }\n\n $command1->bindParam(':reserva', $res);\n $command1->bindParam(':hab', $hab);\n $command1->bindParam(':serv', $servicios[$i]['id']);\n $subservicios = $command1->queryAll();\n }\n\n\n\n $result[count($result)] = array(\n 'desc' => \"<b style='font-size: 10px';margin-left:-1em'>\" . $servicios[$i]['nombre'] . \"</b>\",\n 'cant' => ' ',\n 'precio' => ' ',\n 'total' => ' '\n );\n\n\n for ($k = 0; $k < count($subservicios); $k++) {\n $result[count($result)] = array(\n 'desc' => '<p style=\"margin-left:1em\">' . $subservicios[$k]['nombre'] . '</p>',\n 'cant' => '<p style=\"margin-left:2em\">' . $subservicios[$k]['cant'] . '</p>',\n 'precio' => '<p style=\"margin-left:1em\">' . $subservicios[$k]['precio'] . '</p>',\n 'total' => '<p style=\"margin-left:1em\">' . $subservicios[$k]['total'] . '</p>'\n );\n $imp+=$subservicios[$k]['total'];\n }\n }\n $imp = Yii::$app->formatter->asDecimal($imp);\n $imp.=' CUC';\n if ($idioma == \"Ingles\") {\n $result[count($result)] = array(\n 'desc' => '',\n 'cant' => '',\n 'precio' => '<h4 style=\"margin-left:1em\">' . ' TOTAL AMOUNT' . '</h4>',\n 'total' => '<h4 style=\"margin-left:1em\">' . Yii::$app->formatter->asDecimal($imp, 2) . '</h4>'\n );\n } else {\n\n $result[count($result)] = array(\n 'desc' => '',\n 'cant' => '',\n 'precio' => '<h4 style=\"margin-left:1em\">' . 'MONTANT TOTAL' . '</h4>',\n 'total' => '<h4 style=\"margin-left:1em\">' . Yii::$app->formatter->asDecimal($imp, 2) . '</h4>'\n );\n }\n\n\n $columns = array(\n array('db' => 'desc', 'dt' => 0),\n array('db' => 'cant', 'dt' => 1),\n array('db' => 'precio', 'dt' => 2),\n array('db' => 'total', 'dt' => 3)\n );\n\n\n require( 'ssp.class.php' );\n\n\n $result2 = SSP::simple($result, $columns);\n\n\n echo json_encode($result2['data']);\n }", "public function grafico_2A11($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.2A1_1\n\tFROM RESULTADOS_2A1 A\n\tWHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}", "public function grafico_1A36($id_prueba){\n $consulta = $this->db->prepare(\"SELECT A.1A3_6\n\t\t\t\t FROM RESULTADOS_1A3 A\n\t\t\t\t WHERE A.ID_PRUEBA = '$id_prueba'\");\n $consulta->execute();\n\t\t\t\t\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n}" ]
[ "0.6851279", "0.6532635", "0.6525465", "0.6440139", "0.64222497", "0.6361569", "0.63533247", "0.6286005", "0.6277582", "0.6246969", "0.6228053", "0.6175209", "0.61736095", "0.6157031", "0.6140831", "0.6140257", "0.6118549", "0.6118549", "0.608115", "0.606539", "0.60498494", "0.6025049", "0.6009527", "0.6007089", "0.60062563", "0.6003967", "0.59964365", "0.5974505", "0.5970526", "0.59584415", "0.5954552", "0.59429383", "0.5933152", "0.5932913", "0.5930453", "0.5923809", "0.5921853", "0.59173787", "0.5917243", "0.5906269", "0.5903194", "0.5903071", "0.58928806", "0.5891835", "0.58909124", "0.5890255", "0.5890046", "0.5889776", "0.58885103", "0.5885763", "0.5884594", "0.58819103", "0.5881258", "0.5879567", "0.5876626", "0.5876463", "0.5873136", "0.58713055", "0.5869577", "0.58692867", "0.58691317", "0.58683956", "0.58663815", "0.58635265", "0.5861836", "0.5858989", "0.5858985", "0.5858108", "0.58580035", "0.5856789", "0.58567137", "0.585617", "0.5856057", "0.5855997", "0.58559895", "0.58545405", "0.5851689", "0.5851245", "0.58508325", "0.58499545", "0.5849953", "0.58494765", "0.58422893", "0.5838721", "0.5838508", "0.58381605", "0.58379185", "0.58377856", "0.583497", "0.5833406", "0.58317196", "0.5831609", "0.583024", "0.5829448", "0.582909", "0.58290124", "0.5827746", "0.5826297", "0.5825268", "0.5825183" ]
0.7280726
0
Initializes a new Validator with rules and the data to perform the validation on
Инициализирует новый Validator с правилами и данными для выполнения проверки
public function __construct($rules, $data) { $this->rules = $rules; $this->data = $data; // Initialize the bootstrapper $bootstrap = new \Validator\Bootstrapper(dirname(__FILE__)); $bootstrap->register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function initValidator();", "public function __construct ()\n {\n $this->validationResult = new RuleValidationResult();\n }", "public function __construct($data)\n {\n $this->data = $data;\n $this->validationRules = new ValidationRules();\n }", "public function __construct() {\n $this->validators = array();\n }", "public function __construct()\n {\n $this->rules = new ValidationFieldRuleList;\n }", "public function initValidators()\n {\n //Validator for the length\n $this->lengthValidator = new LengthValidator();\n $this->lengthValidator->initialize($this->context);\n\n //Validator for the occurrences\n $this->occurrenceRegexValidator = new OccurrenceRegexValidator();\n $this->occurrenceRegexValidator->initialize($this->context);\n\n return $this;\n }", "public function __construct()\n {\n $this->validator = new Validator;\n }", "protected function validator(array $data,$rules)\n {\n return Validator::make($data,$rules);\n }", "public function __construct() {\n\t\t$this->_validators = array(); // we does not transfer here any params\n\t\t$this->_errors = array();\n\t}", "public function __construct() {\n\n\t\t//Call the parent constructor\n\t\tparent::__construct(); \n\t\t\n\t\t$this->validate = array_merge(\n\t\t\t\t\t$this->validate\n\t\t\t\t);\t\t\n\n\t}", "public function __construct() {\n\n\t\t//Call the parent constructor\n\t\tparent::__construct(); \n\t\t\n\t\t$this->validate = array_merge(\n\t\t\t\t\t$this->validate\n\t\t\t\t);\t\t\n\n\t}", "function __construct()\n {\n parent::__construct();\n\n\t$this->set_rules(array(\n\t\t\tarray(\n\t\t\t\t'field' => 'calle',\n\t\t\t\t'label' => 'Calle',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'numero_exterior',\n\t\t\t\t'label' => 'Número Exterior',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'numero_interior',\n\t\t\t\t'label' => 'Número Interior',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'codigo_postal',\n\t\t\t\t'label' => 'Código Postal',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'numero_telefonico',\n\t\t\t\t'label' => 'Número Telefónico',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'colonia',\n\t\t\t\t'label' => 'Colonia',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'delegacion',\n\t\t\t\t'label' => 'Delegación',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'estado',\n\t\t\t\t'label' => 'Estado',\n\t\t\t\t'rules' => 'required'\n\t\t\t)));\n\n }", "public static function validate($data){\n return Validator::make($data, static::$rules);\n }", "public function __construct() {\n $this->rules = [\n 'worker_id' => 'required|exists:workers,id',\n 'job_id' => 'required|exists:jobs,id',\n 'beginning' => 'required|date',\n 'ending' => 'required|date',\n 'termination' => 'date',\n 'status' => 'required|in:ACTIVE,EXPIRED,CANCELED',\n 'income' => 'required|numeric|max:9999999999.9999',\n 'security' => 'boolean'\n ];\n }", "public function init()\n {\n $this->model->validators[] = Validator::createValidator('required', $this->model, 'content');\n }", "protected function init()\n {\n $this->rules = (array)Lang::get('validation.rules');\n }", "public function __construct() {\n $this->rules = [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'street_name' => 'required',\n 'zip_code' => 'required',\n ];\n }", "public function validator(array $data): \\Illuminate\\Validation\\Validator;", "function __construct($Validators = array()) {\n\t\t$this->Validators = $Validators;\n\t}", "public function __construct()\n\t{\n\t\t$this->validationObj\t=\tnew validation();\n\t}", "public function validate($data, array $rules, $context = null): ValidatorInterface;", "public function validate()\n {\n\n // run some data manipulation methods...\n $this->data = $this->replaceArrayKeys($this->data); // replace any numerical keys in array with a string version\n $this->createRulesForAddressLines(); // adds to $this->rules if address lines are present\n $this->createRulesAndErrorsForLineItems(); // adds to $this->rules if line items are present\n\n // create instance of CI4 validator\n $validation = \\Config\\Services::validation();\n\n // reset the validation instance\n $validation->reset();\n\n // set rules\n $validation->setRules($this->rules);\n\n // run validation on $data\n $validation->run($this->data);\n\n // check if there are any errors and throw them!\n if(!empty($validation->getErrors())){\n\n // throw a ValidationException with errors attached\n $exception = new ValidationException();\n $exception->setErrors($validation->getErrors());\n throw $exception;\n\n }\n\n }", "public function prepareForValidation()\n {\n $this->getValidatorInstance()\n ->addRules($this->getInternalRules());\n }", "protected function _init()\r\n {\r\n parent::_init();\r\n\r\n $this->_validators[] = array(\r\n 'validator' => 'Regex',\r\n 'options' => [\r\n //'pattern' => '/^(https?:\\/\\/)?([\\w\\.]+)\\.([a-z]{2,6}\\.?)(\\/[\\w\\.]*)*\\/?$/'\r\n 'pattern' => '/^(http|https|ftp)\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\\\+&amp;%\\$#\\=~])*$/'\r\n ]\r\n );\r\n }", "function _validationRules() {\n }", "public function __construct($rules = array(), $data = FALSE)\n\t{\n\t\t$this->set_rules($rules);\n\t\t$this->set_data($_POST, TRUE);\n\n\t\tif(is_array($data))\n\t\t{\n\t\t\t$this->set_data($data);\n\t\t}\n\t}", "public function validator_rules() {\n $this->validate_notification_name();\n $this->validate_message_subject();\n $this->validate_message_body();\n $this->validate_message_body_codes();\n $this->validate_message_type();\n $this->validate_schedule_params();\n }", "public function validator()\n {\n }", "function __construct($data, $rules, $custom_messages=array()) {\r\n\t\t$this->rules = $rules;\r\n\t\t$this->data = $data;\r\n\t\t$this->custom_messages = $custom_messages;\r\n\r\n\t\t// Load the mime types just once\r\n\t\tif (empty(self::$mime_types)) {\r\n\t\t\tself::$mime_types = get_allowed_mime_types();\r\n\t\t}\r\n\t}", "public static function make(array $data, array $rules)\n {\n ApiValidator::$validator = Validator::make($data, $rules, config('api-validation'));\n }", "function validator(array $data = [], array $rules = [], array $messages = [], array $customAttributes = [])\n{\n /** @var Pmld\\Validation\\ValidationFactory $factory */\n $factory = app(ValidationFactory::class);\n\n if (func_num_args() === 0) {\n return $factory;\n }\n\n return $factory->make($data, $rules, $messages, $customAttributes);\n}", "protected function validator(array $data)\n {\n\n }", "public function ValidatorHelper() {\n\t\t$this->validators = array();\n\t\t$this->errors = array();\n\t\t\n\t\t//bootstrap the ValidationRules\n\t\t$bootstrapper = new Bootstrapper();\n\t\t$bootstrapper->setIncludePath('lib/Validator/ValidationRules');\n\t\t$bootstrapper->register();\n\t}", "protected function _createValidator()\n\t{\n\t\treturn new Validator();\n\t}", "public function __construct($validator)\n {\n $this->validator = $validator;\n }", "public function validator(array $data);", "public function __construct()\n {\n $this->validator = new CValidator();\n }", "private function __construct($model, $rules) {\n $this->model = self::flatten($model);\n $this->rules = $this->normalizeRules($rules);\n $this->context = new ValidatorContext($this);\n }", "private function validator(array $data, array $rules)\n {\n return Validator::make($data, $rules);\n }", "private function __construct() {\n $this->ruleArray = array();\n }", "public function __construct($rules)\n {\n $this->rules = $rules;\n }", "public function __construct()\n {\n $this->form_builder = new FormValidator();\n }", "protected function validator(array $data)\n {\n return \\Validator::make($data, static::$rules);\n }", "public function validate($data)\n {\n $this->data = $data;\n \n if (!is_array($this->rules)) {\n throw new SimpleValidatorException(\"Invalid ruleset.\", 1);\n }\n \n // \"required_if\" turns into \"required\" or is eliminated\n // depending on the condition\n foreach ($this->rules as $key => $rule) {\n $this->rules[$key] = $this->parse_required_if($rule);\n }\n \n // find any keys that are in the rules, but not in the data\n // if any of these keys have \"required\" then assign the error\n $keysInRulesAndNotInData = array_diff_key($this->rules, $data);\n foreach ($keysInRulesAndNotInData as $key => $ruleString) {\n $rules = explode(' ', $ruleString);\n if (in_array('required', $rules)) {\n $this->errors[$key] = $this->errorForRequired;\n }\n }\n \n foreach ($data as $key => $valueToValidate) {\n if (is_string($valueToValidate)) {\n $valueToValidate = trim($valueToValidate);\n }\n if (!isset($this->rules[$key])) {\n if ($this->ignoreUnexpectedKeys) {\n // ignore the unexpected key and skip to the next key\n continue;\n } else {\n throw new SimpleValidatorException(\"Rule not found for $key\", 1);\n }\n }\n $rule = $this->rules[$key];\n $validationResult = $this->singleValidate($valueToValidate, $rule);\n \n if ($validationResult) {\n $this->errors[$key] = $validationResult;\n }\n \n } // end foreach ($data as $key => $valueToValidate)\n return $this->errors;\n }", "public function __construct()\r\n {\r\n $this->config = $this->getValidatorConfig();\r\n $this->errors = new ErrorBag;\r\n }", "public function __construct() { // schema is optional\n\t\t$this->validators = new KraftwerkValidator();\n\t\tparent::__construct();\n\t}", "protected function setUpValidators() {\n\t\t// Validate ISBN number\n\t\t$validators = array();\n\t\t$validators['isbn'] = new Zend_Validate_Isbn();\n\t\t$this->setColumnValidators('isbn', $validators);\n\n\t\t// Validate year. It's safe to assume no one will possess a book printed by 1900, is it?\n\t\t// Also, we check if a date of edition is not set in future.\n\t\t$validators = array();\n\t\t$validators['int'] = new Zend_Validate_Int();\n\t\t$validators['year'] = new Void_Validate_GreaterThanOrEqual(1900);\n\t\t$validators['past'] = new Void_Validate_LessThanOrEqual(date('Y'));\n\t\t$this->setColumnValidators('year', $validators);\n\n\t\t// Validate number of pages. We assume 16 pages minimum (it seems to be a reasonable\n\t\t// number; from a formal point of view, if it's less than 48 pages, it's a brochure).\n\t\t$validators = array();\n\t\t$validators['pages'] = new Void_Validate_GreaterThanOrEqual(16);\n\t\t$this->setColumnValidators('pages', $validators);\n\t}", "public function __construct(Validator $validator)\n\t{\n\t\tparent::__construct($validator);\n\t}", "public function __construct(){\n # parent::__construct();\n $this->rule_add = ['url'=>'required', 'description'=>'required', 'group_rule'=>'required'];\n }", "function __construct()\n {\n if (!($this->modelClass instanceof Model || is_array($this->validateRules))) {\n echo Response::json('object not found', 404, []);\n die;\n }\n }", "public function __construct(Validator $validator) {\n $this->validator = $validator;\n }", "public function validate(array $dataToValidate): ValidatorInterface;", "function run() {\n\t\t$messages = array();\n\t\tforeach($this->validators as $validator) {\n\t\t\t$validator->validate($messages);\n\t\t}\n\t\treturn new ValidationResult($messages);\n\t}", "function validate(array $data, array $rules, $softValidation = false, $customAttributes = [])\n{\n// if ($softValidation) {\n// array_walk($rules, function (&$value, $key) {\n// $value = $value;\n// });\n// }\n $validator = Validator::make($data, $rules, [], $customAttributes);\n// dd($validator);\n\n if ($validator->fails()) {\n throw new App\\Exceptions\\ValidationException(implode(', ', $validator->messages()->all()));\n }\n\n return $validator;\n}", "public function __construct(){\n # parent::__construct();\n $this->rule_add = ['name'=>'required', 'ip'=>'required', 'listen_port'=>'required', 'group_website'=>'required'];\n }", "public function make(array $data, array $rules, array $messages = array(), array $customAttributes = array())\n {\n $validator = parent::make($data, $rules, $messages, $customAttributes);\n\n if($validator->fails() && Config::get('validation::throwException'))\n {\n throw new ValidationException( $validator->messages() );\n }\n\n return $validator;\n }", "public function validate(){}", "public function __construct(Validator $validator)\n {\n $this->validator = $validator;\n }", "protected function validator(array $data)\n {\n $validator = Validator::make($data, AuthValidation::walletRegistrationRules());\n if ($validator->fails())\n {\n $failedRules = $validator->failed();\n Log::info($this->tag . json_encode($failedRules)); \n }\n return $validator;\n }", "protected function makeValidator() : \\Illuminate\\Validation\\Validator\n {\n return Validator::make(\n static::toArray(),\n $this->getRules(),\n $this->hasCustomMessages() ? $this->messages : []\n );\n }", "public function __construct($translator, $data, $rules, $messages)\n\t{\n\t\tparent::__construct($translator, $data, $rules, $messages);\n\t}", "abstract protected function getValidationRules();", "public function validate(array $data, RulesSet $rulesSet = null): \\Illuminate\\Validation\\Validator\n {\n if (!empty($rulesSet)) {\n $this->applySet($rulesSet);\n }\n $this->validator = ValidatorFacade::make($data, $this->rules, $this->messages);\n\n return $this->validator;\n }", "protected abstract static function validationRules($modelInstance);", "protected function validator(array $data)\n {\n return parent::validator($data);\n }", "protected function setValidatorRulesForNewsForm() {\n Validator::addRule('date', Validator::RULE_REQUIRED);\n Validator::addRule('author', Validator::RULE_REQUIRED);\n Validator::addRule('title', Validator::RULE_REQUIRED);\n Validator::addRule('abstract', Validator::RULE_REQUIRED);\n Validator::addRule('body', Validator::RULE_REQUIRED);\n }", "protected function setupRules()\n {\n $this->rules = (new Rules($this))->getRules();\n }", "public function __construct()\n {\n $this->setValidationRunning();\n parent::__construct();\n }", "public function __construct() {\n\t\t$this->validators = new \\SPLObjectStorage();\n\t}", "protected function validate() {}", "public static function make(array $data, array $rules, array $messages = []): Validation\n {\n static::ensureValidValidationClass();\n\n $instance = new static::$validationClass();\n\n $instance->data($data);\n $instance->rules($rules);\n $instance->messages($messages);\n\n return $instance;\n }", "public function __construct()\n {\n $attributes = $this->rules();\n foreach ($attributes as $name => $validator) {\n $this->$name = null;\n $this->attributes[] = $name;\n }\n }", "public function __construct() {\n $this->properties = array(\n 'login' => new \\phpillowRegexpValidator('(^[\\x21-\\x7e]+$)i'),\n 'email' => new \\phpillowEmailValidator(),\n 'name' => new \\phpillowStringValidator(),\n 'password' => new \\phpillowRegexpValidator('(^0|1|[a-f0-9]{32}$)'),\n 'description' => new \\phpillowStringValidator(),\n 'created' => new \\phpillowDateValidator(),\n );\n\n parent::__construct();\n }", "protected function validator(array $data) {\n return Validator::make($data, [\n 'title' => 'required',\n 'body' => 'required'\n ]);\n }", "public function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'nerd_level' => 'required|numeric'\n ]);\n }", "public function setValidationProperties()\n {\n $this->jenisLaporan = $this->validator[0] ?? null;\n\n $this->wilker = $this->validator[1] ?? null;\n\n $this->jenisPermohonan = $this->validator[2] ?? null;\n\n $this->tanggalLaporan = $this->validator[3] ?? null;\n\n $this->laporanHasValue = $this->validator[7] ?? null;\n }", "public function __construct(Validator $v=null)\n {\n }", "protected function setValidatorRules()\n {\n Validator::addGlobalRule('unique_category_label', function($fields, $value, $params) {\n return Category::findBy(['label' => $value, 'NOT id' => $this->id])->count() === 0;\n });\n }", "private function __construct($rules){\n\t\t$this->addRules($rules);\n\t}", "public function getValidator();", "public function validator() : Validate\n {\n $this->validator = Validator::make(\n $this->all(),\n $this->rules()\n );\n\n return $this->validator;\n }", "public function validator(array $data)\n {\n return Validator::make($data,[\n 'Name' => 'required',\n 'RFC' => 'required',\n 'NumeroSocial' => 'required',\n ]);\n }", "function\t__construct() {\n\t\tDataMiner::__construct() ;\n\t\treturn $this->valid ;\n\t}", "protected function validator(array $data)\n {\n $toValidate=[\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'user_type' => 'required|integer|max:2',\n //make conditionally required:solved\n //needed to add bottom paramenters in comments for each $data item;\n 'faculty' => 'required_if:user_type,==,1',\n //'faculty' =>'string|min:2|max:50',\n 'org_name' => 'required_if:user_type,==,2',\n //'org_name' => 'string|min:2|max:100',\n 'org_location' => 'required_if:user_type,==,2',\n //'org_location' => 'string|min:2|max:100' ,\n ];\n\n return Validator::make($data,$toValidate);\n }", "function addValidate() {\n\t\t$validate1 = array(\n\t\t\t\t'email'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter email'),\n\t\t\t\t\t\t'mustBeEmail'=> array(\n\t\t\t\t\t\t'rule' => array('email'),\n\t\t\t\t\t\t'message' => 'Please enter valid email',\n\t\t\t\t\t\t'last'=>true),\n\t\t\t\t\t\t'duplicate' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'rule' => 'isUnique',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'on' => 'create',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'message' => 'This email is already exist.'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'password'=> array(\n\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t'message'=> 'Please enter password')\n\t\t\t\t\t),\n\t\t\t\t\t'username'=> array(\n\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t'message'=> 'Please enter username')\n\t\t\t\t\t),\n\t\t\t\t\t'postal_code'=> array(\n\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t'message'=> 'Please enter postal_code')\n\t\t\t\t\t)/* ,\n\t\t\t\t\t'year'=> array(\n\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t'message'=> 'Please enter year')\n\t\t\t\t\t) */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t );\n\t\t\t\n\t\t$this->validate=$validate1;\n\t\treturn $this->validates();\n\t}", "public function make(array $data, array $rules = [], array $messages = [], array $customAttributes = []);", "public function setValidationRules(Validator $validator, array $options = []): Validator;", "protected function validator(array $data): \\Illuminate\\Contracts\\Validation\\Validator\n {\n $conditions = [\n 'user_type' => ['required', 'in:player,coach'],\n 'firstName' => ['required', 'string', 'max:255'],\n 'lastName' => ['required', 'string', 'max:255'],\n 'dob' => ['required', 'date', 'before:-16 years', 'after:-122 years'],\n 'gender' => ['required', 'in:male,female'],\n 'email' => ['required', 'string', 'email:strict,dns,spoof,filter', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n 'terms' => ['required'],\n 'phone_country_code' => ['required_with:phone', 'bail', 'string', Rule::in(array_keys(config('treiner.countries')))],\n 'newsletter' => ['nullable'],\n 'phone' => ['required', 'phone:' . config('treiner.countries.' . $data['phone_country_code'] . '.iso_2_letter')],\n ];\n\n if ($data['user_type'] === 'coach') {\n $conditions = array_merge($conditions, [\n 'verification_type' => ['required', 'string', 'max:255'],\n 'verification' => ['required', 'string', 'max:255'],\n 'business_type' => ['required', 'in:individual,company'],\n 'club' => ['required', 'string', 'max:255'],\n 'abn' => ['required', 'string', 'max:64'],\n 'years_coaching' => ['required', 'integer', 'max:60', 'min:0'],\n 'age_groups_coached' => ['required', 'array'],\n 'session_types' => ['required', 'array'],\n 'qualification' => ['required', 'string', Rule::in(config('treiner.qualifications'))],\n 'profile_summary' => ['required', 'string', 'max:2047'],\n 'profile_philosophy' => ['required', 'string', 'max:2047'],\n 'profile_playing' => ['required', 'string', 'max:2047'],\n 'profile_session' => ['required', 'string', 'max:2047'],\n 'profile' => ['required', 'image', 'max:8191'],\n 'lat' => 'required|numeric|min:-90|max:90',\n 'lng' => 'required|numeric|min:-180|max:180',\n 'locality' => 'required|string|max:255',\n 'country' => 'required|string|max:255',\n 'phone' => ['nullable', 'phone:' . config('treiner.countries.' . $data['phone_country_code'] . '.iso_2_letter')],\n 'fee' => ['integer', 'min:0'],\n ]);\n }\n else if ($data['user_type'] === 'player') {\n $conditions = array_merge($conditions, [\n 'profile' => ['nullable', 'image', 'max:8191'],\n ]);\n }\n else if($data['user_type'] !== 'player') {\n throw new Exception(\"Error Processing Request\", 1);\n }\n\n return Validator::make($data, $conditions);\n }", "protected function _getValidator()\n {\n }", "public static function make(array $rules, array $data)\n\t{\n\t\t$rulesSet = (new RulesParser)->parse($rules);\n\n\t\t$validationEngine = new ValidationEngine;\n\t\t$validationEngine->setInputData($data);\n\t\t$validationEngine->validate($rulesSet);\n\n\t\treturn $validationEngine;\n\t}", "public function init()\n {\n parent::init();\n $this->user = Instance::ensure($this->user, User::className());\n foreach ($this->rules as $i => $rule) {\n if (is_array($rule)) {\n $this->rules[$i] = Yii::createObject(array_merge($this->ruleConfig, $rule));\n }\n }\n }", "protected function BaseValidator(array $data)\n {\n return Validator::make($data, [\n\n ]);\n }", "protected function BaseValidator(array $data)\n {\n return Validator::make($data, [\n\n ]);\n }", "private function setRules() {\n\n $this->requestRules = [\n 'name' => [\n 'required',\n 'max:255'\n ],\n 'first_name' => [\n 'required',\n 'max:255'\n ],\n 'email' => [\n 'required',\n 'max:255',\n 'email',\n 'unique:users,email,' . $this->modelId . ',id'\n ],\n 'login' => [\n 'required',\n 'max:255',\n 'unique:users,login,' . $this->modelId . ',id'\n ],\n 'password' => [\n $this->setRule('required', 'nullable'),\n 'min:8',\n 'max:120',\n 'confirmed',\n 'regex:/^.*(?=.{8,120})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\d])(?=.*[^a-zA-Z\\d\\s]).*$/'\n ],\n 'theme' => [\n 'boolean'\n ]\n ];\n }", "public function validator() {\n $validator = parent::validator();\n\n $validator->addNested('icon', $this->getIconValidator());\n\n $validator->requirePresence('key');\n $validator->add('key', ['required' => ['rule' => 'notBlank']]);\n\n $validator->addNested('name', $this->getI18nValidator());\n\n $validator->requirePresence('queryUrl');\n $validator->add('queryUrl', [\n 'required' => ['rule' => 'notBlank'],\n 'url' => ['rule' => 'url'],\n ]);\n\n $validator->add('target', []);\n\n $validator->add('weight', [\n 'valid' => ['rule' => 'isInteger']\n ]);\n\n return $validator;\n }", "public function getValidator() {}", "protected function validate()\n {\n foreach ($this->rules as $field => $rules) {\n // get input value\n $value = $this->getValue($field);\n\n foreach ($rules as $rule) {\n if ($rule instanceof \\Closure) {\n $this->validateCustomRule($rule, $field, $value);\n } elseif ($rule instanceof RuleInterface) {\n $this->validateRule($rule, $field, $value);\n }\n }\n }\n\n $this->validated = true;\n }", "public function validates(array $validation_rules = array(), array $validation_messages = array());", "protected static function makeValidator($data, $rules, $customMessages, $attributeNames)\n {\n return static::getModelValidator()->make($data, $rules, $customMessages, $attributeNames);\n }", "public static function validate(array $data, array $rules, array $messages = [], array $customAttributes = [])\n {\n }" ]
[ "0.73084366", "0.7160404", "0.70271856", "0.68940884", "0.68823254", "0.68682325", "0.68583214", "0.6825045", "0.6762306", "0.6749039", "0.6749039", "0.674874", "0.6723393", "0.6705015", "0.6687723", "0.6660225", "0.665351", "0.6650007", "0.66481704", "0.66360146", "0.65775704", "0.6556206", "0.6547794", "0.65433633", "0.652173", "0.6521583", "0.6512478", "0.64727634", "0.6460539", "0.6456488", "0.6448662", "0.6447095", "0.6443265", "0.6435615", "0.6424851", "0.6421834", "0.64073795", "0.6377694", "0.6370955", "0.63456535", "0.6344827", "0.6323701", "0.63212633", "0.6310429", "0.6304108", "0.6300609", "0.6285815", "0.6285045", "0.62764174", "0.6275208", "0.6271999", "0.62639624", "0.6250164", "0.6242781", "0.6235396", "0.6232417", "0.6222811", "0.62205344", "0.6206607", "0.620374", "0.62032694", "0.61978745", "0.61915016", "0.6185725", "0.61790293", "0.61609626", "0.615243", "0.6147629", "0.61451", "0.61422205", "0.6142145", "0.61351526", "0.6132727", "0.612097", "0.6117499", "0.61120677", "0.6111475", "0.61040914", "0.6095848", "0.6085123", "0.6080215", "0.6077485", "0.6068966", "0.60671973", "0.6066622", "0.6066449", "0.6065787", "0.60555935", "0.6048929", "0.6048534", "0.6047967", "0.6039373", "0.6039373", "0.6039208", "0.60362303", "0.60350984", "0.6034744", "0.6032777", "0.6024691", "0.60215586" ]
0.74406916
0
Gets forms wrapper id.
Получает идентификатор обертки форм.
public static function getFormWrapperId(array $form) { $wrapper_id = 'os2web-spotbox-form-wrapper'; if (!empty($form['#ief_id'])) { $wrapper_id .= '-' . $form['#ief_id']; } return $wrapper_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFormRebuildWrapperId() {\n $wrapper = [];\n $wrapper[] = $this->getFormId();\n if ($id = $this->getEntity()->id()) {\n $wrapper[] = \"id-{$id}\";\n }\n $wrapper[] = 'wrapper';\n $result = implode('-', $wrapper);\n\n return $result;\n }", "public function getFormId();", "public function getFormId();", "protected function getFormPreviewWrapperId() {\n $wrapper = [];\n $wrapper[] = $this->getFormId();\n if ($id = $this->getEntity()->id()) {\n $wrapper[] = \"id-{$id}\";\n }\n $wrapper[] = 'preview';\n $result = implode('-', $wrapper);\n\n return $result;\n }", "public function getId() {\n return $this->formId;\n }", "public function getWrapperId()\n {\n $pell = $this->clientPluginInstanceName;\n return \"$pell-wrap-\". $this->getId();\n }", "public function getFormId()\n {\n return $this->formId;\n }", "public function getFormID(): string\n {\n return $this->formID;\n }", "public function getFormId()\n\t{\n\t\tif($this->formId!==null)\n\t\t{\n\t\t\treturn $this->formId;\n\t\t}\n\t\treturn $this->getId();\n\t}", "public function getFormId() {\n return str_replace('\\\\', '__', get_class($this));\n }", "function formID()\n {\n return $this->FormID;\n }", "public function getFormId()\r\n {\r\n if ($this->formId !== null) {\r\n return $this->formId;\r\n }\r\n $hash = '';\r\n if ($this->mappingObject != null) {\r\n $hash .= get_class($this->mappingObject);\r\n if (property_exists($this->mappingObject, 'id')) {\r\n $reflector = new \\ReflectionObject($this->mappingObject);\r\n $property = $reflector->getProperty('id');\r\n $property->setAccessible(true);\r\n $val = $property->getValue($this->mappingObject);\r\n if (in_array(gettype($val), array('boolean', 'integer', 'double', 'string'))) {\r\n $hash .= '_'.$val;\r\n } else {\r\n $hash .= '_'.gettype($val);\r\n }\r\n unset($property);\r\n unset($reflector);\r\n }\r\n }\r\n $hash .= $this->formIdAuto;\r\n return 'f'.crc32($hash);\r\n }", "protected function get_form_identifier() {\n $formid = $this->_customdata->id.'_'.get_class($this);\n return $formid;\n }", "protected function get_form_id() {\n if ($this->id) {\n return $this->id;\n }\n return 'new';\n }", "function getFormID() {\n\t\treturn $this->_formID;\n\t}", "public function formId()\n {\n return $this->BLocale->transliterate($this->_formLayoutName);\n }", "public function getFormId() {\n self::dump('getFormId');\n return 'entajax_selects';\n }", "protected function get_form_identifier() {\n return parent::get_form_identifier() . '_' . $this->_customdata['wikiinfo']->cm->id;\n }", "public function getFormId()\n {\n return 'curso_module_curso_form';\n }", "public function getFormId() {\n return test_api_delete_form;\n }", "public function getFormId()\n {\n return str_replace('\\\\', '_', __CLASS_);\n }", "function getFormId($form){\n \n $target_id = 0;\n \n // Loop through all fields in form to find ID of Passport Number field\n \n foreach( $form['fields'] as &$field ) {\n \n if ($field->label == \"Passport Number\") {\n \n $target_id = $field->id;\n \n //End loop\n break;\n \n } else {\n \n $target_id = null;\n \n }\n }\n \n return $target_id;\n \n}", "public function getFormId() {\r\n return 'ifba_import_form';\r\n }", "public function getFormId() {\n return 'cfr_wiki_search_form';\n }", "public function getFormId() {\n return 'form_uuid';\n }", "public function getFormId() {\n\t\treturn 'custom_config_form';\n\t}", "public function getIdentifier()\n {\n return sprintf('%d_%d', $this->form->getId(), $this->config('id'));\n }", "public function getInputID() {\n\t\ttry {\n\t\t\t$formName\t= $this->getForm()->getName();\n\t\t\t$name\t\t= $this->getName();\n\t\t\treturn \"frm-$formName-ctrl-$name\";\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getContextualId()\n {\n /* @var FormBuilder $form */\n $form = $this->forms->get('item');\n\n return $form->getContextualId();\n }", "public function getFormId() {\n return 'hello_world_form';\n }", "public function getFormId() {\n\t return 'configform_mymodule_form';\n\t }", "protected function getFormID($id){\n return $this->functions[$id]['form']['id'];\n }", "public function getFormId(): string\n {\n return 'campaign_alerts_admin_settings';\n }", "public function getFormId() {\n return 'calibr8_import_import_form';\n }", "public function getFormId() {\n return 'form_examples_kitchen_sink';\n }", "public function getDefaultFormId()\n {\n\n return $this->getConfigForStore(self::XML_FORM_ID_CONFIG_PATH);\n\n }", "public function getContainerElementID() {\n\t\ttry {\n\t\t\treturn \"control-\". $this->getInputID();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getFormId()\n {\n return 'honeys_place_settings_form';\n }", "public function getFormId(){\n return 'lesser_forms_settings';\n }", "public function getFormId() {\n return 'd8_simple_form';\n }", "public function getFormId() {\n return 'bsm_form';\n }", "protected function _getFormIdPrefix()\n\t{\n\t\treturn $this->getFormId().'_';\n\t}", "public function getId()\n {\n if ($this->id !== '') {\n return $this->id;\n }\n if ($this->autoId === '') {\n $this->autoId = NextForm::htmlIdentifier($this->element->getType(), true);\n }\n return $this->autoId;\n }", "function getID() {\n\t\treturn $this->data_array['extra_field_id'];\n\t}", "function getDomID()\n {\n return 'custom_field_' . $this->getControllingCustomFieldID();\n }", "public function getFormId()\n {\n return 'todo_list_new_task_form';\n }", "public function getFormId() {\n\t\treturn 'weather_form';\n\t}", "function getFormID($entity_type, $operation_path) {\n // Force the form ID, so that child classes get the same one. This means\n // both the add and edit generic operation forms get the same form ID, and\n // thus makes form alteration easier.\n return implode('_', array('entity_operations_operation_form', $entity_type, 'edit'));\n }", "public function getID() {\n return isset($this->container['ID']) ? $this->container['ID'] : null;\n\t}", "public function getId()\n {\n // Containers have a \"_\" as prefix in their id to avoid\n // conflicts between fields and containers with the same name\n if ($this->isContainer()) {\n return '_' . $this->id;\n }\n \n return $this->id;\n }", "public function getFormId() {\n\n return 'campaign_monitor_add_list_form';\n }", "public function get_id() {\n return $this->get_field( 'ID' );\n }", "public static function getId() {\n static::$_last_id=(static::$widgetPrefix ? static::$widgetPrefix : \\yii\\base\\Widget::$autoIdPrefix) . static::getAutoIdPrefix() . static::$counter++ . static::$suffix;\n return static::$_last_id;\n }", "public function getFormId() {\n return 'form_api_example_state_demo';\n }", "public function getRenderId(): string\n {\n return $this->rawData['parameterArray']['itemFormElID'] ?? '';\n }", "public function getElementId()\n\t{\n\t\treturn 'f2cs_'.$this->moduleId.'_'.$this->id.'_'.$this->formId;\n\t}", "public function extract_client_id() {\n preg_match('/(?<=\\id=\"filepicker-wrapper-)[^\"]*/', $this->content, $matches);\n return $matches[0];\n }", "public function getControlId();", "public function getFormId() {\n return 'cohesion_google_map_apikey_form';\n }", "public function getForm_fk()\n {\n return $this->form_fk;\n }", "public function get_id() {\n\t\treturn apply_filters( 'socialchef_entity_id', $this->post ? $this->id : null, $this );\n\t}", "public function get_form_ids() {\r\n\t\treturn $this->wpdb->get_col( \"SELECT `id` FROM {$this->prefixed_table_name}\" );\r\n\t}", "function RecordID() {\n\t\treturn $this->form->getRecord()->ID;\n\t}", "public function getFormId() {\n return 'spiders_settings';\n }", "public static function generalId(): string\n {\n return $_POST['id'];\n }", "public function getId()\n\t{\n\t\tif ($this->id)\n\t\t{\n\t\t\treturn $this->id;\n\t\t}\n\n\t\t$dbh = self::getDbh();\n\t\t$dbh->setQuery('INSERT INTO `#__courses_forms` () VALUES ()');\n\t\t$dbh->query();\n\n\t\treturn ($this->id = $dbh->insertid());\n\t}", "public function getFormId() {\n return 'calendario_haab_settings_form';\n }", "protected function get_generic_id()\n\t\t{\n\t\t\treturn implode(self::SEPARATOR_ID, array('form', substr(md5($this->action), 0, 8)));\n\t\t}", "public function getId()\n {\n return (int)\\XLite\\Core\\Request::getInstance()->id;\n }", "private function getIdForm() {\r\n if(is_array($this->_attrForm)){\r\n foreach ($this->_attrForm as $key => $value) {\r\n if($key == 'id'){\r\n return $this->_aliasForm.$value;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public function getFormFieldSetId() {\n return @$this->attributes['form_field_set_id'];\n }", "public function getId() {\n return !empty($this->html_params['id']) ? $this->html_params['id'] : NULL;\n }", "function getID() {\n\t\treturn $this->get(\"id\");\n\t}", "public function getFormId() {\n return 'my_database';\n }", "public function getId() {\n if (!isset($this->id)) {\n $this->id = Html::getUniqueId('exo-modal-' . time());\n }\n return $this->id;\n }", "function rdc_frm_get_form_id_from_key ( $form_key ) {\n\tglobal $wpdb;\n\t\n\t$table_name = $wpdb->prefix.'frm_forms'; //more reliable than $frmdb->forms\n\t$form_id = $wpdb->get_var($wpdb->prepare(\"SELECT id from $table_name WHERE form_key = %s \", $form_key));\t\n\treturn is_numeric($form_id) ? $form_id : 0;\n}", "public function getElementId()\n {\n return $this->getElement()->getElementId();\n }", "public function get_first_input_id( $form ) {\n\t\treturn '';\n\t}", "public function get_first_input_id( $form ) {\n\t\treturn '';\n\t}", "private function get_form_id_from_form_string ( $form_string ) {\r\n\t\t$form_id = stristr( $form_string, 'gform_wrapper_' );\r\n\t\t$form_id = str_ireplace( 'gform_wrapper_', '', $form_id );\r\n\t\t//$form_id = stristr( $form_id, \"'\", true );\r\n\t\t$form_id = strtok( $form_id, \"'\" );\r\n\r\n\t\treturn $form_id;\r\n\t}", "public function getFormId($form_arg, FormStateInterface &$form_state);", "public function getInput_id()\n {\n return $this->input_id;\n }", "function GetID () {\n return $this->submission_id;\n }", "protected function init_form_id() {\n\t\t$this->form_id = (int) $this->entry->form_id;\n\t}", "private function getDocumentId()\n {\n return $this->request->attributes->get('singleDocument', null);\n }", "function ItemsForm_Details_ID()\n {\n $anchor=\"TOP\";\n if (!empty($this->Args[ \"Anchor\" ]))\n {\n $anchor=$this->Args[ \"Anchor\" ];\n }\n\n return $anchor;\n }", "public function getIDField()\n {\n return $this->idField;\n }", "public function id() {\n return $this->decorated->id();\n }", "public function getFormId() {\n return 'string_mobile_api_variable_delete_form';\n }", "public function getIdentifier(): string\n {\n return 'maps2MoveFlexFormFields';\n }", "function getFormID($entity_type, $operation_path) {\n // Convert '/' in operation path to '_' so that the form ID can form part of\n // a valid function name for alter hooks.\n $operation_path = str_replace('/', '_', $operation_path);\n return implode('_', array('entity_operations_operation_form', $entity_type, $operation_path));\n }", "public function getFormKey() {\n\t\treturn $this->formKey;\n\t}", "public static function createIdentifier()\n\t{\n\t\t// get last id\n\t\t$id = (int) BackendModel::getContainer()->get('database')->getVar('SELECT i.id FROM forms AS i ORDER BY i.id DESC LIMIT 1');\n\n\t\t// create identifier\n\t\tdo\n\t\t{\n\t\t\t$id++;\n\t\t\t$identifier = 'form' . $id;\n\t\t}\n\n\t\t// @todo refactor me...\n\t\t// keep trying till its unique\n\t\twhile((int) BackendModel::getContainer()->get('database')->getVar(\n\t\t\t'SELECT 1\n\t\t\t FROM forms AS i\n\t\t\t WHERE i.identifier = ?\n\t\t\t LIMIT 1',\n\t\t\t$identifier) > 0);\n\n\t\treturn $identifier;\n\t}", "public function id()\n {\n return $this->attr('id');\n }", "public function getFormId() {\n return 'create_task_form';\n }", "public function getId() {\n $id = parent::getId();\n if (!$id) {\n $this->setAttrib('id', $this->getName());\n $id = parent::getId();\n }\n return $id;\n }", "public static function get_next_id() {\n\t\tcheck_ajax_referer( 'everest_forms_get_next_id', 'security' );\n\n\t\t$form_id = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;\n\t\tif ( $form_id < 1 ) {\n\t\t\twp_send_json_error(\n\t\t\t\tarray(\n\t\t\t\t\t'error' => __( 'Invalid form', 'everest-forms' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tif ( ! current_user_can( apply_filters( 'everest_forms_manage_cap', 'manage_options' ) ) ) {\n\t\t\twp_send_json_error();\n\t\t}\n\t\t$field_key = EVF()->form->field_unique_key( $form_id );\n\t\t$field_id_array = explode( '-', $field_key );\n\t\t$new_field_id = ( $field_id_array[ count( $field_id_array ) - 1 ] + 1 );\n\t\twp_send_json_success(\n\t\t\tarray(\n\t\t\t\t'field_id' => $new_field_id,\n\t\t\t\t'field_key' => $field_key,\n\t\t\t)\n\t\t);\n\t}", "public function getFormId() {\n return 'degov_default_settings';\n }", "public function getFormId() {\n return 'campaign_monitor_subscription_form';\n }", "public function getFormId() {\n return 'va_gov_build_trigger_preview_form';\n }" ]
[ "0.8070361", "0.7716349", "0.7716349", "0.7598352", "0.7428284", "0.733693", "0.7305592", "0.72699064", "0.72399193", "0.721514", "0.7168973", "0.71549106", "0.7147141", "0.71431106", "0.7084894", "0.7061743", "0.6973223", "0.6962654", "0.685108", "0.6808817", "0.6782072", "0.676219", "0.67531496", "0.672357", "0.67053825", "0.66841125", "0.6656147", "0.6635111", "0.66331416", "0.66164654", "0.66005015", "0.65797687", "0.65740347", "0.6568374", "0.653353", "0.6524273", "0.6519873", "0.6505052", "0.6478492", "0.6470182", "0.64471143", "0.6420237", "0.6401442", "0.638927", "0.63880354", "0.6386703", "0.63756156", "0.636053", "0.63205844", "0.6315452", "0.6294333", "0.62690806", "0.62666434", "0.62653273", "0.6253804", "0.62446904", "0.623819", "0.62320185", "0.6226156", "0.6222502", "0.61717504", "0.61617655", "0.61609066", "0.6156358", "0.61491024", "0.61441827", "0.6136825", "0.61330205", "0.61327547", "0.61295265", "0.6129027", "0.61044496", "0.6095674", "0.6084811", "0.60713947", "0.6051966", "0.6047825", "0.604281", "0.604281", "0.60277915", "0.6015214", "0.60145307", "0.6012199", "0.6002363", "0.598441", "0.5983841", "0.5976577", "0.59729606", "0.59697795", "0.594646", "0.5945555", "0.59362644", "0.59338313", "0.5930497", "0.5928298", "0.5919654", "0.59162045", "0.59094703", "0.5905805", "0.58971256" ]
0.7926933
1
Bind an instance of the Source Adapter Factory to the container. Attaches the default adapter types
Привязывает экземпляр фабрики адаптера источника к контейнеру. Прикрепляет типы адаптеров по умолчанию
public function registerSourceAdapterFactory(): void { $this->app->singleton('mediable.source.factory', function (Container $app) { $factory = new SourceAdapterFactory; $classAdapters = $app['config']->get('mediable.source_adapters.class', []); foreach ($classAdapters as $source => $adapter) { $factory->setAdapterForClass($adapter, $source); } $patternAdapters = $app['config']->get('mediable.source_adapters.pattern', []); foreach ($patternAdapters as $source => $adapter) { $factory->setAdapterForPattern($adapter, $source); } return $factory; }); $this->app->alias('mediable.source.factory', SourceAdapterFactory::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setAdapters()\n {\n if ($this->requestAdapter === null) {\n $this->withRequestAdapter(new Request\\SlimRequest());\n }\n\n if ($this->responseAdapter === null) {\n $this->withResponseAdapter(new Response\\SlimResponse());\n }\n\n }", "function _register_adapters()\n\t{\n\t\t$this->get_registry()->add_adapter('I_Component_Factory', 'A_Security_Factory');\n\t}", "public static function getDefaultAdapter() {}", "private function bootAdapters()\n\t{\n\t\t// include all adapters\n\t\tforeach (glob(__DIR__ . DS . 'Import' . DS . 'Adapter' . DS . '*.php') as $adapter)\n\t\t{\n\t\t\trequire_once $adapter;\n\t\t}\n\n\t\t// anonymous function to get adapters\n\t\t$isAdapterClass = function($class)\n\t\t{\n\t\t\treturn (in_array('Hubzero\\Content\\Import\\Adapter', class_implements($class)));\n\t\t};\n\n\t\t// set our adapters (any declared class implementing the ResourcesImportInterface)\n\t\t$this->adapters = array_values(array_filter(get_declared_classes(), $isAdapterClass));\n\t}", "abstract protected function getAdapter();", "protected function _constructAdapter()\n {\n $this->_initFromZendConfig();\n $this->_validateConfiguration();\n\n $base = 'Streamwide_Db_Adapter';\n $adapter = $this->_adapter;\n $class = $base . '_' . ucfirst( $adapter );\n\n Zend_Loader::loadClass( $class );\n $dbAdapter = new $class( $this->_config );\n $this->_ensure( $dbAdapter instanceof Zend_Db_Adapter_Abstract, 'Adapter class \"' . $class . '\" does not extend Zend_Db_Adapter_Abstract' );\n\n switch ( $adapter ) {\n case 'mysql':\n $dbAdapter = new Streamwide_Db_Adapter_Decorator_ValuesSet( $dbAdapter );\n break;\n \n case 'oracle':\n $dbAdapter = new Streamwide_Db_Adapter_Decorator_Insert( // add insert queries enhancements\n new Streamwide_Db_Adapter_Decorator_ValuesSet( // add enhancements for sql functions that require sets of values\n new Streamwide_Db_Adapter_Decorator_PositionalParamsConversion( // add conversion for positional parameters\n new Streamwide_Db_Adapter_Decorator_LastInsertId( // add last insert id enhancement\n $dbAdapter\n )\n )\n )\n );\n break;\n \n default:\n // do nothing;\n break;\n }\n\n return $dbAdapter;\n }", "function initAdapter()\n {\n }", "public function create($source): SourceAdapterInterface\n {\n $adapter = null;\n\n if ($source instanceof SourceAdapterInterface) {\n return $source;\n } elseif (is_object($source)) {\n $adapter = $this->adaptClass($source);\n } elseif (is_resource($source)) {\n $adapter = StreamResourceAdapter::class;\n } elseif (is_string($source)) {\n $adapter = $this->adaptString($source);\n }\n\n if ($adapter) {\n return new $adapter($source);\n }\n\n throw ConfigurationException::unrecognizedSource($source);\n }", "public function newInstance(string $name, array $options = []): AdapterInterface\n {\n }", "public function getSourceAdapter()\n {\n return $this->source;\n }", "public function adapter($name = null)\n {\n $name = $name ?: $this->getDefaultDriver();\n\n return $this->adapters[$name] = $this->get($name);\n }", "public function createAdapter(string $name, array $config): Adapter;", "public function getSourceAdapters()\n {\n return $this->sourceAdapters;\n }", "protected function _prepareAdapter()\n\t{\n\t\tif ($this->_adapter instanceof KZ_Filter_File_Resize_Adapter_Abstract) {\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->_adapter = new $this->_adapter();\n\t\t}\n\t}", "public function getAdapter();", "public function registerAdapter($adapterFqcn, $adapteeFqcn);", "protected function registerBindings()\n {\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Stream\\StreamModel',\n config('streams::config.streams.model')\n );\n\n $this->app->bind(\n 'Anomaly\\Streams\\Platform\\Stream\\Contract\\StreamRepositoryInterface',\n config('streams::config.streams.repository')\n );\n }", "function getAdapter();", "function getAdapter();", "private function fakeAdapter()\n {\n $adapter = new FakeFeatureAdapter;\n $this->app->singleton(FeatureAdapter::class, function () use ($adapter) {\n return $adapter;\n });\n\n return $adapter;\n }", "protected function configure()\n {\n $this->bind(FooInterface::class)->to(TestFoo::class);\n }", "abstract public function getAdapter(): \\Foo\\Bar\\Name\\Adapter\\BasicInterface;", "public function bootAdapter()\n {\n $this->adapter = new OnepayAdapter();\n }", "protected function registerBaseBindings()\n {\n static::setInstance($this);\n $this->instance('app', $this);\n $this->instance(Container::class, $this);\n $this->bind(RooterFactory::class);\n }", "private function registerContainerBindingds()\n {\n Storage::extend('qcloud_oss', function ($app, $config) {\n $adapter = new QcloudAdapter($config['secretId'], $config['secretKey'], $config['bucket'], $config['region']);\n\n $filesystem = new Filesystem($adapter);\n\n return $filesystem;\n });\n }", "protected function registerApiAdapter(): void\n {\n $this->app->singleton('spikkl.api', function (Container $app) {\n $config = $app['config'];\n\n return new ApiClientAdapter($config, $app['spikkl.api.client']);\n });\n }", "protected function mapBindings()\n {\n\n $this->app->register(\n \\Alaouy\\Youtube\\YoutubeServiceProvider::class\n );\n// //解决循环加载的问题\n// $this->app->bind(\\GetCandy\\Api\\Shipping\\ShippingCalculator::class, function ($app) {\n// return $app->make(\\GetCandy\\Api\\Shipping\\ShippingCalculator::class);\n// });\n\n $this->app->singleton(UserContract::class, function ($app) {\n return $app->make(UserService::class);\n });\n\n $this->app->singleton('currency_converter', function ($app) {\n return new CurrencyConverter;\n });\n\n $this->app->singleton('api', function ($app) {\n return $app->make(Factory::class);\n });\n\n $this->app->singleton('fractal', function ($app) {\n return new Manager();\n });\n\n $this->app->singleton(SearchContract::class, function ($app) {\n return $app->make(config('getcandy.search.client'));\n });\n\n $mediaDrivers = config('assets.upload_drivers', []);\n\n foreach ($mediaDrivers as $name => $driver) {\n $this->app->singleton($name . '.driver', function ($app) use ($driver) {\n return $app->make($driver);\n });\n }\n }", "public function bindTypes($bindTypes);", "public function adapter();", "protected function registerDhlAdapter()\n {\n $this->app->singleton(DhlParcelClientAdapter::class, function (ContainerInterface $container) {\n return new DhlParcelClientAdapter($container->get('dhlparcel'));\n });\n\n $this->app->alias(DhlParcelClientAdapter::class, 'dhlparcel.adapter');\n }", "private static function create(): Adapter\n {\n /** @noinspection PhpUndefinedVariableInspection */\n switch (Container::getConfig()::$db_type) {\n case 'mysql':\n return new DB\\MySQL();\n case 'mysqli':\n return new DB\\MySQLi();\n default:\n die(\"<b>Error! Unknown Database type.</b>\");\n }\n }", "public function __invoke(ContainerInterface $container, $requestedName, array $options = null)\n {\n $config = $this->getConfig($container);\n return new Adapter($config[$requestedName]);\n }", "protected function bindRepositories()\n {\n /*\n $this->app->singleton(\n\n 'gzero.menu.account',\n function () {\n return new Register();\n }\n );\n */\n\n $this->app->singleton(\n 'croppa.src_dir',\n function () {\n return app('filesystem')->disk(config('gzero.upload.disk'))->getDriver();\n }\n );\n }", "public function setAdapter(ProxyAdapterInterface $adapter);", "public function setAdapterString($adapter);", "private function init()\n {\n if ($this->encoder === null) {\n // Send the adapter config as JSON payload to the host\n $config = new AdapterConfig(\n $this->codec->getName(),\n $this->getAdapterType(),\n $this->getExtraConfig()\n );\n Codecs::json()->newEncoder($this->output)->useNewlines(false)->encode($config);\n\n // Set up encoder / decoder for further communication\n $this->decoder = $this->codec->newDecoder($this->input);\n $this->encoder = $this->codec->newEncoder($this->output);\n }\n }", "public function addDatasource()\n {\n return new DatasourceBuilder('Datasources'\n ,$this->event\n ,$this->typeRepo\n ,$this->utilities\n ,$this->generator\n ,$this->locale\n ,$this->connection\n ,$this->templateLoader\n ,$this->datasourceRepo);\n }", "function _register_adapters()\n {\n $this->get_registry()->add_adapter(\n\t\t\t'I_Display_Type',\n\t\t\t'A_NextGen_Basic_Album'\n\t\t);\n\n if (!is_admin() && apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id))\n {\n // Add a controller for displaying albums on the front-end\n $this->get_registry()->add_adapter(\n 'I_Display_Type_Controller',\n 'A_NextGen_Basic_Album_Controller',\n array(\n NGG_BASIC_COMPACT_ALBUM,\n NGG_BASIC_EXTENDED_ALBUM,\n $this->module_id\n )\n );\n\n // Add a generic adapter for display types to do late url rewriting\n $this->get_registry()->add_adapter(\n 'I_Displayed_Gallery_Renderer',\n 'A_NextGen_Basic_Album_Routes'\n );\n\n $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Breadcrumbs');\n $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Descriptions');\n $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Child_Entities');\n }\n\n\n\t\t// Add a mapper for setting the defaults for the album\n $this->get_registry()->add_adapter(\n\t\t\t'I_Display_Type_Mapper',\n\t\t\t'A_NextGen_Basic_Album_Mapper'\n\t\t);\n\n if (M_Attach_To_Post::is_atp_url() || is_admin())\n {\n // Add a display settings form for each display type\n $this->get_registry()->add_adapter(\n 'I_Form',\n 'A_NextGen_Basic_Compact_Album_Form',\n NGG_BASIC_COMPACT_ALBUM\n );\n $this->get_registry()->add_adapter(\n 'I_Form',\n 'A_NextGen_Basic_Extended_Album_Form',\n NGG_BASIC_EXTENDED_ALBUM\n );\n }\n\n // Creates special parameter segments\n $this->get_registry()->add_adapter(\n 'I_Routing_App',\n 'A_NextGen_Basic_Album_Urls'\n );\n }", "private function ImageDriverBinding()\n {\n return $this->app->bind(\n \\Innovate\\Image\\InnovateImageUploadContract::class,\n \\Innovate\\Image\\InnovateImageUpload::class\n );\n }", "abstract protected function doCreateAdapter(array $options): AdapterInterface;", "protected function setSources()\n {\n // Backward Compatible modules need the old way of doing things\n if ($this->bwc) {\n // Sources can be used to override the file name mapping for a specific\n // view or the parser for a view.\n $this->sources = array(\n array(\n 'name' => translate('LBL_EDITVIEW'),\n 'type' => MB_EDITVIEW,\n 'image' => 'EditView',\n 'path' => \"modules/{$this->module}/metadata/editviewdefs.php\",\n ),\n array(\n 'name' => translate('LBL_DETAILVIEW'),\n 'type' => MB_DETAILVIEW,\n 'image' => 'DetailView',\n 'path' => \"modules/{$this->module}/metadata/detailviewdefs.php\",\n ),\n array(\n 'name' => translate('LBL_LISTVIEW'),\n 'type' => MB_LISTVIEW,\n 'image' => 'ListView',\n 'path' => \"modules/{$this->module}/metadata/listviewdefs.php\",\n ),\n );\n // Some modules should not have a QuickCreate form at all, so do not add them to the list\n if (!in_array(strtolower($this->module), self::$quickCreateNotSupportedModules)) {\n $this->sources[] = array(\n 'name' => translate('LBL_QUICKCREATE'),\n 'type' => MB_QUICKCREATE,\n 'image' => 'QuickCreate',\n 'path' => \"modules/{$this->module}/metadata/quickcreatedefs.php\",\n );\n }\n } else {\n $this->sources = array(\n array(\n 'name' => translate('LBL_RECORDVIEW'),\n 'type' => MB_RECORDVIEW,\n 'image' => 'RecordView',\n 'path' => \"modules/{$this->module}/clients/base/views/record/record.php\",\n ),\n array(\n 'name' => translate('LBL_LISTVIEW'),\n 'type' => MB_LISTVIEW,\n 'image' => 'ListView',\n 'path' => \"modules/{$this->module}/clients/base/views/list/list.php\",\n ),\n );\n }\n }", "protected function registerBaseBindings(): void\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n\n $this->loadConfigFiles();\n $this->singleton('config', function () {\n return new \\Nur\\Config\\Config($this->config);\n });\n\n $this->singleton('files', function () {\n return new Filesystem;\n });\n\n $this->instance(PackageManifest::class, new PackageManifest(\n new Filesystem, $this->basePath(), $this->getCachedPackagesPath()\n ));\n }", "public function register(FisheryContainerInterface $container)\n {\n $container['data.provider.dbal'] = $container->share(function ($c) {\n return $this->create($c['dbal']['dsn']);\n });\n }", "private function registerBindingShortCodes()\n {\n // General Shortcode classes\n $this->app->bind('ShortcodeRouter',\n function() {\n return new ShortcodeRouter();\n });\n $this->app->bind('ShortcodeController',\n function(Application $app) {\n return new ShortcodeController($app);\n });\n\n $this->app->bind('ShortcodeView',\n function(Application $app) {\n $settings = $app->make('Settings');\n\n return new ShortcodeView($settings->get('template_dir'), $settings->get('upload_dir') . '/twig-cache/');\n });\n }", "protected function bindSentryProvider()\n {\n $this->app->singleton('revisionable.userprovider', function ($app) {\n $field = $app['config']->get('sofa_revisionable.userfield');\n\n return new \\Sofa\\Revisionable\\Adapters\\Sentry($app['sentry'], $field);\n });\n }", "public function testAdapterCreation() {\n $port = 1234;\n $host = 'foo.bar';\n Config::inst()->update('AdapterFactory', 'Adapter', 'Ntb\\Statistics\\StatsDAdapter');\n Config::inst()->update('AdapterFactory', 'Host', $host);\n Config::inst()->update('AdapterFactory', 'Port', $port);\n\n\n $adapter = AdapterFactory::create();\n\n $this->assertEquals($port, $adapter->getPort());\n }", "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n }", "public function adapt($resource);", "function getBindFactory() {\n return new Tracker_FormElement_Field_List_BindFactory();\n }", "private function registerBinding()\n {\n /*\n * bind Tax Repository to its Eloquent implementation\n */\n $this->app->bind(\n \\Innovate\\Repositories\\Tax\\TaxContract::class,\n \\Innovate\\Repositories\\Tax\\EloquentTaxRepository::class\n );\n /*\n * bind BankTransferInfoContract to its elquent implementation EloquentBankTransferInfoRepository\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\BankTransferInfoContract::class,\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\EloquentBankTransferInfoRepository::class\n );\n\n /*\n *\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\CheckOutAgreementContract::class,\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\EloquentCheckOutAgreementRepository::class\n );\n\n $this->eavAttributeBindings();\n $this->eavAttributeCategoryBindings();\n\n $this->CategoryBindings();\n $this->CategoryDescriptionBindings();\n\n $this->eavIntValueBinding();\n $this->eavTextValueBinding();\n $this->eavVarcharValueBinding();\n\n $this->ProductDescripionBinding();\n\n $this->ImageDriverBinding();\n $this->ActivityLogBinding();\n $this->CartBinding();\n\n $this->WishListBinding();\n $this->CustomerBinding();\n $this->CustomerTransactionBinding();\n $this->OrderBinding();\n $this->ShippingBinding();\n $this->DownloadLinkBinding();\n }", "protected function registerBindings()\n {\n $this->app->singleton('currency.helper', function ($app) {\n return new CurrencyHelper($app->config);\n });\n\n $this->app->singleton('i18n.taxrate', function ($app) {\n return new TaxRate(new VatCalculator($app->config));\n });\n\n $this->app->singleton('country.helper', function ($app) {\n return new CountryHelper($app->config);\n });\n }", "protected function bindServicesToContainer()\n {\n $this->container->singleton('cache', function ($container) {\n return new CacheManager($container);\n });\n\n $this->container->singleton('cache.store', function ($container) {\n return $container['cache']->driver();\n });\n\n $this->container->instance('Psr\\Log\\LoggerInterface', $this->getMonologInstance());\n\n $this->container->singleton('log', function ($container) {\n return new LogManager($container);\n });\n\n }", "public function __construct(array $options = array())\n {\n $this->options = $options + $this->options;\n $this->adapter = new Adaptable(array(\n 'save' => $this->options['save'], 'load' => $this->options['load']\n ));\n }", "private function registerBindingSocialNetworks()\n {\n $this->app->bind('SocialNetworksRouter',\n function(Application $app) {\n return new SocialNetworksRouter($app->make('SocialNetworksController'));\n });\n $this->app->bind('SocialNetworksController',\n function(Application $app) {\n return new SocialNetworksController($app);\n });\n $this->app->bind('SocialNetworksModel', 'RpsCompetition\\Frontend\\SocialNetworks\\SocialNetworksModel');\n $this->app->bind('SocialNetworksView',\n function(Application $app) {\n $settings = $app->make('Settings');\n\n return new SocialNetworksView($settings->get('template_dir'),\n $settings->get('upload_dir') . '/twig-cache/');\n });\n }", "public function __construct()\n {\n $driver = config('simple-sdp.driver');\n\n $this->make($driver);\n }", "public function _initDefaultAdapter(){\n\t\t$config = Common::getConfig('dbConfig', 'default');\n\t\t$defaultAdapter = Db_Pdo::factory($config);\n\t\t// set default adatpter\n\t\tDb_Adapter_Pdo::setDefaultAdapter($defaultAdapter);\n }", "public function __construct()\n {\n $this->source = ResourceHolder::getDataSource();\n }", "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n }", "protected function registerBaseBindings()\n {\n self::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n }", "protected function _initAdapter()\n {\n $this->_adapter = $this->_getAdapterModel('');\n\n return $this;\n }", "public function addTypeAdapterFactory(TypeAdapterFactory $typeAdapterFactory): GsonBuilder\n {\n $this->typeAdapterFactories[] = $typeAdapterFactory;\n\n return $this;\n }", "public function instantiate(): ConquestDataSource;", "public function __construct($adapter)\n {\n $this->_adapter = $adapter;\n }", "public static function setDefaultAdapter($adapter)\r\n {\r\n static::$defaultAdapter = static::factory($adapter);\r\n }", "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n\n $this->instance(static::class, $this);\n }", "public function registerBaseBindings()\n {\n self::setInstance($this);\n\n $this->instance(ServiceContainer::class, $this);\n\n $this->instance('app', $this);\n }", "protected function adapt(FilesystemInterface $filesystem)\n\t{\n\t\treturn new FilesystemAdapter($filesystem);\n\t}", "protected function registerBroadcastingBindings()\n {\n $this->singleton('Illuminate\\Contracts\\Broadcasting\\Factory', static function ($app) {\n return $app->loadComponent(\n 'broadcasting', 'Illuminate\\Broadcasting\\BroadcastServiceProvider', 'Illuminate\\Contracts\\Broadcasting\\Factory'\n );\n });\n\n $this->singleton('Illuminate\\Contracts\\Broadcasting\\Broadcaster', static function ($app) {\n return $app->loadComponent(\n 'broadcasting', 'Illuminate\\Broadcasting\\BroadcastServiceProvider', 'Illuminate\\Contracts\\Broadcasting\\Broadcaster'\n );\n });\n }", "static function setDefaultSource(PdoDataSource $source) {\n\t\tself::$sources[self::DEFAULT_SOURCE] = $source;\n\t}", "public function transport(SourceInterface $source);", "protected function registerBaseBindings()\n {\n \\Illuminate\\Container\\Container::setInstance($this->container);\n\n /**\n * Needed for the laravel framework code.\n * Use container inside flarum instead.\n */\n $this->container->instance('app', $this->container);\n $this->container->alias('app', \\Illuminate\\Container\\Container::class);\n\n $this->container->instance('container', $this->container);\n $this->container->alias('container', \\Illuminate\\Container\\Container::class);\n\n $this->container->instance('flarum', $this);\n $this->container->alias('flarum', self::class);\n\n $this->container->instance('flarum.paths', $this->paths);\n $this->container->alias('flarum.paths', Paths::class);\n }", "public function __construct()\n {\n $this->_initAdapter();\n }", "protected function registerRouterAdapter()\n {\n $this->app->singleton('api.router.adapter', function($app) {\n return new DingoRoutingLaravelAdapter($this->cloneLaravelRouter(), $app['router']->getRoutes());\n });\n }", "function getServiceAdapter()\n {\n }", "private function registerBindings()\n {\n $this->app->singleton(\\Broadway\\EventDispatcher\\EventDispatcher::class, function () {\n return new CallableEventDispatcher();\n });\n\n $this->app->singleton(\\Broadway\\EventHandling\\EventBus::class, function () {\n return new SimpleEventBus();\n });\n\n $this->app->singleton('laravelbroadway.event.registry', function ($app) {\n return new EventRegistry($app[\\Broadway\\EventHandling\\EventBus::class]);\n });\n }", "protected function registerConfigBindings()\n {\n $loader = new FileLoader(new Filesystem(), $this['path.config']);\n\n $this->singleton('config', static function ($app) use ($loader) {\n return new Repository($loader, $app->environment());\n });\n }", "protected function createAdapter()\n {\n return $this->objectManager->create(\\Magento\\Framework\\Search\\Adapter\\Mysql\\Adapter::class);\n }", "protected function bindSentinelProvider()\n {\n $this->app->singleton('revisionable.userprovider', function ($app) {\n $field = $app['config']->get('sofa_revisionable.userfield');\n\n return new \\Sofa\\Revisionable\\Adapters\\Sentinel($app['sentinel'], $field);\n });\n }", "public function registerBindings()\n {\n //Bind Implementations of Interfaces\n collect($this->implementations)->each(function ($class, $interface) {\n //Bind Interface to class\n $this->app->bind($interface, $class);\n });\n\n //Bind WatsonBridge for Personality insights that we depend on\n $this->app->bind('PersonalityInsightsBridge', function ($app, $args) {\n //Get Username\n $username = config('personality-insights.credentials.' . $args['credentialsName'] . '.username');\n //Get Password\n $password = config('personality-insights.credentials.' . $args['credentialsName'] . '.password');\n //Get base url\n $url = config('personality-insights.credentials.' . $args['credentialsName'] . '.url');\n //Return bridge\n return new Bridge($username, $password, $url);\n });\n }", "abstract protected function getAdapterInterfaceName();", "protected function initializeContainer() {\n $container = new Container();\n\n $container->addServiceProvider(HttpMessageServiceProvider::class);\n $container->addServiceProvider(TemplateServiceProvider::class);\n\n $container->inflector(TemplateAwareInterface::class)\n ->invokeMethod('setTemplateDriver', ['Twig_Environment']);\n\n $container->delegate(new ReflectionContainer());\n\n $this->container = $container;\n }", "public static function search_adapter()\n {\n if (self::$_search_dapter) {\n return self::$_search_dapter;\n }\n foreach (self::config()->search_adapters as $connector => $adapter) {\n if ($connector && $adapter && DB::getConn() instanceof $connector) {\n return self::$_search_dapter = new $adapter();\n }\n }\n }", "public function __construct() {\n $this->_db = StickConfig::getInstance()->datasource;\n static::$_dataSource = $this->_db->getAbstract();\n }", "public function registerBindings()\n {\n\n /**\n * Setup Singleton classes\n */\n $this->app->singleton('Settings',\n function() {\n return new \\Illuminate\\Config\\Repository();\n });\n\n $this->app->singleton('OptionsGeneral', 'RpsCompetition\\Options\\General');\n $this->app->singleton('Session',\n function() {\n return new \\Avh\\Framework\\Network\\Session(['name' => 'raritan_' . COOKIEHASH]);\n });\n $this->app->singleton('IlluminateRequest', '\\Illuminate\\Http\\Request');\n $this->app->instance('IlluminateRequest',\n forward_static_call(['Illuminate\\Http\\Request', 'createFromGlobals']));\n\n /**\n * Setup Classes\n */\n\n $this->app->bind('RequestController',\n function(Application $app) {\n return new RequestController($app);\n });\n\n $this->app->bind('FrontendView',\n function(Application $app) {\n $settings = $app->make('Settings');\n\n return new FrontendView($settings->get('template_dir'), $settings->get('upload_dir') . '/twig-cache/');\n });\n $this->app->bind('FrontendModel',\n function(Application $app) {\n return new FrontendModel($app->make('PhotoHelper'));\n });\n if (class_exists('Imagick')) {\n $this->app->bind('\\Imagine\\Image\\ImagineInterface', '\\Imagine\\Imagick\\Imagine');\n } else {\n $this->app->bind('\\Imagine\\Image\\ImagineInterface', '\\Imagine\\Gd\\Imagine');\n }\n\n $this->app->bind('PhotoHelper',\n function(Application $app) {\n return new PhotoHelper($app->make('IlluminateRequest'),\n $app->make('RpsDb'),\n $app->make('\\Imagine\\Image\\ImagineInterface'));\n });\n\n $this->app->bind('SeasonHelper',\n function(Application $app) {\n return new SeasonHelper($app->make('RpsDb'));\n });\n\n $this->app->bind('WpSeoHelper',\n function(Application $app) {\n return new WpseoHelper($app->make('Settings'),\n $app->make('QueryCompetitions'),\n $app->make('QueryMiscellaneous'));\n });\n $this->app->bind('WpSeoSitemap',\n function(Application $app) {\n return new WpseoSitemap($app->make('QueryCompetitions'),\n $app->make('QueryMiscellaneous'),\n $app->make('PhotoHelper'));\n });\n\n $this->app->bind('CompetitionHelper',\n function(Application $app) {\n return new CompetitionHelper($app->make('RpsDb'));\n });\n\n $this->app->bind('HtmlBuilder', '\\Avh\\Framework\\Html\\HtmlBuilder');\n\n $this->registerBindingShortCodes();\n $this->registerBindingSocialNetworks();\n $this->registerBindingsForms();\n }", "public function setAdapterForClass(string $adapterClass, string $sourceClass): void\n {\n $this->validateAdapterClass($adapterClass);\n $this->classAdapters[$sourceClass] = $adapterClass;\n }", "public function registerBindings()\n {\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Asset\\AssetContract::class,\n \\App\\Repositories\\Frontend\\Asset\\EloquentAssetRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Dealership\\DealershipContract::class,\n \\App\\Repositories\\Frontend\\Dealership\\EloquentDealershipRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Dealer\\DealerContract::class,\n \\App\\Repositories\\Frontend\\Dealer\\EloquentDealerRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Mfr\\MfrContract::class,\n \\App\\Repositories\\Frontend\\Mfr\\EloquentMfrRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Checkout\\CheckoutContract::class,\n \\App\\Repositories\\Frontend\\Checkout\\EloquentCheckoutRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\Location\\LocationContract::class,\n \\App\\Repositories\\Frontend\\Location\\EloquentLocationRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Frontend\\AssetLogs\\AssetLogsContract::class,\n \\App\\Repositories\\Frontend\\AssetLogs\\EloquentAssetLogsRepository::class\n );\n }", "abstract protected function getDefaultDataSource();", "public function __construct(AdapterInterface $adapter)\n {\n $this->adapter = $adapter;\n }", "protected function registerBroadcastingBindings()\n {\n $this->singleton(Illuminate\\Contracts\\Broadcasting\\Factory::class, function () {\n return $this->loadComponent(\n 'broadcasting',\n \\Illuminate\\Broadcasting\\BroadcastServiceProvider::class,\n \\Illuminate\\Contracts\\Broadcasting\\Factory::class\n );\n });\n\n $this->singleton(Illuminate\\Contracts\\Broadcasting\\Broadcaster::class, function () {\n return $this->loadComponent(\n 'broadcasting',\n \\Illuminate\\Broadcasting\\BroadcastServiceProvider::class,\n \\Illuminate\\Contracts\\Broadcasting\\Broadcaster::class\n );\n });\n }", "abstract public function bind(array $binding);", "public function adapter($name = '', array $options = array())\n {\n if ($name) {\n $adapter = $this->loadAdapter($name, $options);\n } else {\n if (!$this->adapter) {\n $name = $this->getOption('adapter');\n $options = array_merge($this->getOption($name), $options);\n $this->adapter = $this->loadAdapter($name, $options);\n }\n $adapter = $this->adapter;\n }\n\n return $adapter;\n }", "public function bindToClass(string $className): Driver;", "public function __construct($adapter)\n {\n $this->setAdapter($adapter);\n }", "public function getAdapters()\n {\n return $this->adapters;\n }", "public function getAdapters()\n {\n return $this->adapters;\n }", "protected function setSourcesAttributes()\n {\n $sources = [];\n\n if (isset($this->data['sources'])) {\n foreach ($this->data['sources'] as $source) {\n $mediaQuery = $source['mediaQuery'];\n $image = $source['image'];\n\n if (config('twill-image.webp_support')) {\n $sources[] = $this->buildSourceObject(\n $image['srcSetWebp'],\n $image['aspectRatio'],\n $this->mimeType(\"webp\"),\n $mediaQuery\n );\n }\n\n $sources[] = $this->buildSourceObject(\n $image['srcSet'],\n $image['aspectRatio'],\n $this->mimeType($image['extension']),\n $mediaQuery\n );\n }\n }\n\n $image = $this->data['image'];\n\n if (config('twill-image.webp_support')) {\n $sources[] = $this->buildSourceObject(\n $image['srcSetWebp'],\n $image['aspectRatio'],\n $this->mimeType(\"webp\"),\n );\n }\n\n $sources[] = $this->buildSourceObject(\n $image['srcSet'],\n $image['aspectRatio'],\n $this->mimeType($image['extension'])\n );\n\n $this->sources = $sources;\n }", "protected function registerAdapter($name, $classOrFactory)\n {\n $this\n ->define($name, function($config = []) use($classOrFactory) {\n $factory = is_object($classOrFactory) ? $classOrFactory : new $classOrFactory();\n\n return $factory->create([ $config ]);\n })\n ;\n }", "public function binding(array $bindings): Driver;", "public function addSourceAdapter($pattern, SourceAdapter $adapter)\n {\n $this->sourceAdapters[$pattern] = $adapter;\n\n return $this;\n }", "public function getAdapter()\n {\n return $this->getAdapater();\n }" ]
[ "0.58426905", "0.5804445", "0.56457007", "0.5589984", "0.5569588", "0.55514497", "0.5541657", "0.54910845", "0.5489063", "0.5414662", "0.538319", "0.5379529", "0.53766733", "0.5372261", "0.53696114", "0.53452355", "0.5232904", "0.5223148", "0.5223148", "0.5218677", "0.5195284", "0.51739776", "0.51444495", "0.5143559", "0.5129287", "0.51169235", "0.5110311", "0.5109482", "0.51048344", "0.507122", "0.50528663", "0.50351024", "0.50336665", "0.5020016", "0.5011091", "0.50083613", "0.5007234", "0.50043267", "0.49900535", "0.4978858", "0.49695173", "0.49597785", "0.49562144", "0.49304816", "0.4929459", "0.49209058", "0.49123782", "0.49121958", "0.49067855", "0.49058336", "0.48978877", "0.48931167", "0.4887539", "0.48834383", "0.4882485", "0.48804682", "0.4863109", "0.48589298", "0.48579526", "0.4857406", "0.48544547", "0.48418143", "0.48296148", "0.48267445", "0.4816485", "0.48037344", "0.47995344", "0.47994128", "0.47972083", "0.47960752", "0.47957617", "0.4777151", "0.47758576", "0.4773427", "0.47705674", "0.47673666", "0.4761137", "0.47597626", "0.47581834", "0.47565743", "0.47511742", "0.47474912", "0.4740793", "0.47344702", "0.47339538", "0.47323793", "0.4730114", "0.47300515", "0.47288924", "0.4725552", "0.47222447", "0.4717129", "0.4716028", "0.47118682", "0.47118682", "0.4709953", "0.47031772", "0.4697079", "0.46899492", "0.46898448" ]
0.7551
0
Bind the Media Uploader to the container.
Привяжите загрузчик медиа к контейнеру.
public function registerUploader(): void { $this->app->bind('mediable.uploader', function (Container $app) { return new MediaUploader( $app['filesystem'], $app['mediable.source.factory'], $app['config']->get('mediable') ); }); $this->app->alias('mediable.uploader', MediaUploader::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function getFacadeAccessor() { return 'Media'; }", "public function registerMover(): void\n {\n $this->app->bind('mediable.mover', function (Container $app) {\n return new MediaMover($app['filesystem']);\n });\n $this->app->alias('mediable.mover', MediaMover::class);\n }", "protected function registerMediaRecognitionManager()\n {\n $this->app->singleton('recognize', function ($app) {\n return new MediaRecognitionManager($app);\n });\n }", "public function registerMediaCollections(): void\n {\n $this\n ->addMediaCollection('healthworker_images')\n ->singleFile();\n }", "protected static function getFacadeAccessor() { return MediaContract::class; }", "protected static function getFacadeAccessor()\n {\n return 'mediable.uploader';\n }", "protected static function getFacadeAccessor()\n {\n return 'mediable.uploader';\n }", "public function registerMediaCollections()\n\t{\n\t\t$this->addMediaCollection('avatars')\n\t\t\t->singleFile()\n\t\t\t->registerMediaConversions(function (Media $media = null) {\n\t\t\t\t$this->addMediaConversion('thumb')\n\t\t\t\t\t->width(50)\n\t\t\t\t\t->height(50)\n\t\t\t\t\t->withResponsiveImages();\n\t\t\t\t$this->addMediaConversion('profile')\n\t\t\t\t\t->width(350)\n\t\t\t\t\t->height(350)\n\t\t\t\t\t->withResponsiveImages();\n\t\t\t});\n\t}", "public function registerMediaCollections()\n {\n $this\n ->addMediaCollection('cover')\n ->registerMediaConversions(function (Media $media) {\n $this\n ->addMediaConversion('thumb')\n ->fit(Manipulations::FIT_STRETCH, 250, 250);\n });\n }", "public function register()\n {\n $this->app->bind(ChunkingUploaderInterface::class, function ($app) {\n return new Uploader(env('UPLOADS_DIR', '/tmp'));\n });\n }", "protected function registerFilesBindings()\n {\n $this->singleton('files', static function () {\n return new Filesystem();\n });\n }", "public function registerMediaCollections(): void\n {\n $this\n ->addMediaCollection('default')\n ->singleFile();\n\n }", "protected function registerFilesBindings()\n {\n $this->singleton('files', function () {\n return new \\Roots\\Acorn\\Filesystem\\Filesystem();\n });\n }", "public function registerMediaCollections(): void\n {\n $this->addMediaCollection('avatar')\n ->accepts('image/*')\n ->canView('seo.view') // Set the ability (Gate) which is required to view the medium (in most cases you would want to call private())\n ->canUpload('seo.upload') ;// Set the ability (Gate) which is required to upload & attach new files to the model;\n }", "public function registerMediaCollections(): void\n {\n // $this->addMediaCollection('logo')->singleFile();\n\n $this\n ->addMediaCollection('logo')\n // ->useFallbackUrl('https://www.gravatar.com/avatar/'.md5($this->email).'?d=mm')\n ->singleFile()\n ->registerMediaConversions(function () {\n $this->addMediaConversion('thumb')\n ->width(70)\n ->format('png');\n\n $this->addMediaConversion('small')\n ->width(120)\n ->format('png');\n\n $this->addMediaConversion('medium')\n ->width(160)\n ->format('png');\n\n $this->addMediaConversion('large')\n ->width(320)\n ->format('png');\n });\n\n\n $this->addMediaCollection('favicon')->singleFile();\n }", "public function registerMediaCollections()\n {\n $this->addMediaCollection('avatar')\n ->useDisk('profiles');\n\n $this->addMediaCollection('service_provider')\n ->useDisk('service_providers');\n }", "public static function bootRequestMediaTrait(): void\n {\n static::saved(static function (self $model) {\n $model->registerMediaCollections();\n\n collect($model->mediaCollections)->each(function (MediaCollection $collection) use ($model) {\n /**\n * Media to delete\n */\n $ids = request()->input(\"{$collection->name}_delete\");\n $model->getMedia($collection->name)->filter(function (Media $media) use ($ids) {\n return in_array($media->id, is_array($ids) ? $ids : [$ids], false);\n })->each->delete();\n\n /**\n * Media to add\n */\n if (request()->hasFile($collection->name)) {\n $model->addMultipleMediaFromRequest([$collection->name])\n ->each(function (FileAdder $file) use ($collection) {\n $file->toMediaCollection($collection->name);\n });\n }\n });\n });\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function register()\n {\n// $this->app->singleton(BaseMediaManager::class, function ($app) {\n// return $this->app->make(MediaManager::class);\n// });\n }", "public function registerMediaCollections(): void\n {\n $this->addMediaCollection('avatar')\n ->singleFile();\n\n $this->addMediaCollection('cover')\n ->singleFile();\n\n $this->addMediaCollection('cover.post')\n ->singleFile();\n }", "public function registerMediaCollections()\n {\n // Register media collection for avatar that only accepts images\n $this->addMediaCollection(enum('media.post.banner'))\n ->acceptsFile(function (File $file) {\n $allowedMimes = [\n 'image/jpeg', 'image/png', 'image/tiff', 'image/bmp',\n ];\n\n return in_array($file->mimeType, $allowedMimes);\n })\n ->singleFile();\n\n $this->addMediaCollection(enum('media.post.attach'));\n }", "public function registerMediaCollections(): void\n {\n $this->addMediaCollection('logo')->singleFile();\n $this->addMediaCollection('favicon')->singleFile();\n }", "function register_media_Widget() {\n register_widget( 'Media_Widget' );\n}", "public function setMedia()\r\n {\r\n parent::setMedia();\r\n $this->addJqueryPlugin('tagify');\r\n }", "public function registerMediaCollections(): void\n {\n $this\n ->addMediaCollection('main')\n ->withResponsiveImages()\n ->singleFile();\n\n $this\n ->addMediaCollection('images')\n ->withResponsiveImages();\n\n $this->addMediaConversion('thumb')\n ->width(config('larashop.thumbnails.product.width'))\n ->height(config('larashop.thumbnails.product.height'))\n ->nonOptimized();\n\n $this->addMediaConversion('medium')\n ->width(config('larashop.medium_images.product.width'))\n ->height(config('larashop.medium_images.product.height'))\n ->nonOptimized();\n }", "public function attach($component) {\n parent::attach($component);\n\n // Setup uploader.\n $this->_uploader = new $this->uploader['class'];\n foreach ($this->uploader as $key => $value) {\n if ($key == 'class') continue;\n\n $this->_uploader->$key = $value;\n }\n }", "public function init()\n\t{\n\t\tparent::init();\n\t\t\n\t\t// Set the form's attributes\n\t\t$this->setName('mediaForm');\n\t\t$this->setAction($this->getView()->baseUrl('admin/media/upload'));\n\t\t$this->setMethod(self::METHOD_POST);\n\t\t$this->setAttrib('enctype', self::ENCTYPE_MULTIPART);\n\t\t\n\t\t// Token\n\t\t$token = new Zend_Form_Element_Hash('media_hash');\n\t\t$token->setOptions(array(\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => uniqid(md5(__CLASS__)),\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\t\t$this->addElement($token);\n\t\t\n\t\t// Id\n\t\t$id = new Zend_Form_Element_Hidden('media_id');\n\t\t$id->setOptions(array(\n\t\t\t\t'required' => false,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'ValueDisabled' => true,\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\t\t$this->addElement($id);\n\t\t\n\t\t// Define a destination\n\t\t$targetFolder = realpath(APPLICATION_PATH . '/../uploads'); // Relative to the root\n\t\t\n\t\t// File\n\t\t$file = new Zend_Form_Element_File('media_url');\n\t\t$file->setOptions(array(\n\t\t\t\t'label' => 'MediaForm:@Media files',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'multiple' => 'true',\n\t\t\t\t'validators' => array(array('Count', false, 1)),\n\t\t\t\t'decorators' => array('File')\n\t\t));\n\t\t$file->setValueDisabled(true);\n $this->addElement($file);\n \n // Upload button\n $submit = new Zend_Form_Element_Button('btnUpload');\n $submit->setOptions(array(\n \t\t'label' => 'Uploadify:@Button upload',\n \t\t'type' => 'button',\n \t\t'onclick' => 'LumiaJS.admin.media.upload(this)',\n \t\t'decorators' => array('ViewHelper')\n ));\n $this->addElement($submit);\n \n // Cancel button\n $submit = new Zend_Form_Element_Button('btnCancel');\n $submit->setOptions(array(\n \t\t'label' => 'Uploadify:@Button cancel',\n \t\t'type' => 'button',\n// \t\t'onclick' => 'LumiaJS.admin.media.cancel(this)',\n \t\t'decorators' => array('ViewHelper')\n ));\n $this->addElement($submit);\n \n // Stop button\n $submit = new Zend_Form_Element_Button('btnStop');\n $submit->setOptions(array(\n \t\t'label' => 'Uploadify:@Button stop',\n \t\t'type' => 'button',\n \t\t'onclick' => 'LumiaJS.admin.media.stop(this)',\n \t\t'decorators' => array('ViewHelper')\n ));\n $this->addElement($submit);\n\t}", "protected function registerMediaboxSingleton()\n {\n $this->app->bind(MediaboxInterface::class, Mediabox::class);\n\n $this->app->singleton(Mediabox::class, function ($app) {\n $mediabox = new Mediabox(\n $path = $app['request']->get('p') ?? config('mediabox.base_path'),\n config('mediabox.root_path')\n );\n\n if (! $mediabox->exists($mediabox->rootPath($path))) {\n return abort(Response::HTTP_NOT_FOUND);\n }\n\n if (config('mediabox.title')) {\n $mediabox->setRootFolderName(config('mediabox.title'));\n }\n\n if (config('mediabox.show_hidden_files', false)) {\n $mediabox->showHiddenFiles(\n config('mediabox.allow_hidden_files_toggle_via_url')\n ? filter_var($app['request']->get('h') ?: false, FILTER_VALIDATE_BOOLEAN)\n : config('mediabox.show_hidden_files', false)\n );\n }\n\n return $mediabox;\n });\n }", "protected function bindRouteParameters()\n {\n $this->app['router']->bind('media', function ($value) {\n $mediabox = new Mediabox($value, config('mediabox.root_path'));\n $file = new File($mediabox->rootPath($value), config('mediabox.root_path'));\n\n if (! $file->exists()) {\n return abort(Response::HTTP_NOT_FOUND);\n }\n\n return $file;\n });\n\n $this->app['router']->bind('file', function ($value) {\n $mediabox = new Mediabox($value, config('mediabox.root_path'));\n $file = new File($mediabox->rootPath($value), config('mediabox.root_path'));\n\n if (! $file->exists()) {\n return abort(Response::HTTP_NOT_FOUND);\n }\n\n return $file;\n });\n }", "public function lifecycleFileUpload()\n {\n $this->upload();\n }", "public static function bindingContainer()\r\n {\r\n self::$container = new Container();\r\n\r\n self::$container->bind('auth', \\BabiPHP\\Auth\\Authentication::getInstance());\r\n self::$container->bind('session', new \\BabiPHP\\Session\\Session());\r\n self::$container->bind('cookie', new \\BabiPHP\\Misc\\Cookie(self::$container->getBasePath()));\r\n }", "public function register ()\n {\n if ( ! ( $this->activated( 'media_widget' ) ) ) return;\n /* Crate a new instance of the MediaWidget class */\n $media_widget = new MediaWidget ();\n $media_widget -> register ();\n\n\n }", "public function register(Silex\\Application $app)\n {\n $app['upload'] = function () use ($app) {\n $allowedExensions = $app['config']->get('general/accept_file_types');\n $uploadHandler = new UploadHandler($app['upload.container']);\n $uploadHandler->setPrefix($app['upload.prefix']);\n $uploadHandler->setOverwrite($app['upload.overwrite']);\n $uploadHandler->addRule('extension', array('allowed' => $allowedExensions));\n\n $pattern = $app['config']->get('general/upload/pattern', '[^A-Za-z0-9\\.]+');\n $replacement = $app['config']->get('general/upload/replacement', '-');\n $lowercase = $app['config']->get('general/upload/lowercase', true);\n\n $uploadHandler->setSanitizerCallback(\n function ($filename) use ($pattern, $replacement, $lowercase) {\n if ($lowercase) {\n return preg_replace(\"/$pattern/\", $replacement, strtolower($filename));\n }\n\n return preg_replace(\"/$pattern/\", $replacement, $filename);\n }\n );\n\n return $uploadHandler;\n };\n\n // This exposes the file container as a configurabole object please refer to:\n // Sirius\\Upload\\Container\\ContainerInterface\n // Any compatible file handler can be used.\n $app['upload.container'] = function () use ($app) {\n $base = $app['resources']->getPath($app['upload.namespace']);\n if (!is_writable($base)) {\n throw new \\RuntimeException(\"Unable to write to upload destination. Check permissions on $base\", 1);\n }\n $container = new FlysystemContainer($app['filesystem']->getFilesystem($app['upload.namespace']));\n\n return $container;\n };\n\n // This allows multiple upload locations, all prefixed with a namespace. The default is /files\n // Note, if you want to provide an alternative namespace, you must set a path on the $app['resources']\n // service\n $app['upload.namespace'] = 'files';\n\n // This gets prepended to all file saves, can be reset to \"\" or add your own closure for more complex ones.\n $app['upload.prefix'] = date('Y-m') . '/';\n\n $app['upload.overwrite'] = false;\n }", "public function upload_media()\n\t{\n\t\n\t}", "public function getUploader()\r\n {\r\n if ($this->upload) {\r\n return $this->upload;\r\n }\r\n return ($this->upload = new Ilib_Filehandler_UploadHandler($this));\r\n }", "public function lifecycleFileUpload() {\n $this->upload();\n }", "public function lifecycleFileUpload() {\n $this->upload();\n }", "private function registerClient()\n {\n $this->app->bind(SmsMediaClientContract::class, function () {\n $config = config('services.smsmedia');\n\n if (empty($config['base_url'])) {\n throw new \\UnexpectedValueException('SMS Media Base Url cannot be null or empty');\n }\n\n $token = $config['credentials']['token'];\n \n switch ($config['mode']) {\n case 'auth':\n if (empty($config['credentials']['username']) or empty($config['credentials']['password']))\n throw new \\UnexpectedValueException('SMS Media username and/or password cannot be null or empty');\n \n $token = base64_encode($config['credentials']['username'].':'.$config['credentials']['password']);\n break;\n case 'token':\n if (empty($token))\n throw new \\UnexpectedValueException('SMS Media Token cannot be null or empty');\n break;\n default:\n throw new \\UnexpectedValueException('Invalid SMS Media configuration value');\n }\n\n $client = new SmsMediaClient($config['base_url'], $config['sender_id'], $token);\n\n return $client;\n });\n }", "public function lifecycleFileUpload()\n {\n $this->upload();\n }", "public function lifecycleFileUpload()\n {\n $this->upload();\n }", "public function lifecycleFileUpload()\n {\n $this->upload();\n }", "public function lifecycleFileUpload(): void\n {\n $this->upload();\n }", "public function registerMediaConversions()\n {\n $this->addMediaConversion('thumb')\n ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop'])\n ->performOnCollections('staff');\n\n $this->addMediaConversion('form')\n ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])\n ->performOnCollections('staff');\n }", "public function registerBindings() {\n \n $this->app->bind(\n\t\t\t'App\\Repositories\\Backend\\Media\\MediaContract',\n\t\t\t'App\\Repositories\\Backend\\Media\\EloquentMediaRepository'\n\t\t);\n }", "private function ImageDriverBinding()\n {\n return $this->app->bind(\n \\Innovate\\Image\\InnovateImageUploadContract::class,\n \\Innovate\\Image\\InnovateImageUpload::class\n );\n }", "public function configure()\n {\n return $this->afterCreating(function (Event $event) {\n // Use a dummy base64 picture for unit tests, but download a larger fancier picture for local dev env\n if (App::environment('testing')) {\n $media = $event->addMediaFromBase64('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wEbDCgCXDUMQAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAMSURBVAjXY/j//z8ABf4C/tzMWecAAAAASUVORK5CYII=');\n } else {\n $media = $event->addMediaFromUrl('https://placekitten.com/600/400');\n }\n\n $media->toMediaCollection('images');\n });\n }", "private function registerContainerBindingds()\n {\n Storage::extend('qcloud_oss', function ($app, $config) {\n $adapter = new QcloudAdapter($config['secretId'], $config['secretKey'], $config['bucket'], $config['region']);\n\n $filesystem = new Filesystem($adapter);\n\n return $filesystem;\n });\n }", "public function bindContainerObjects()\n {\n $this->app = App::make('app');\n }", "private function getMediaFeedService() {\n return $this->container->get('post_feeds.MediaFeeds'); //call media feed service\n }", "public function initUploader() {\n\t\t $this->UploadForm->init();\n\t}", "public function __construct()\n {\n $pck = FileManager::package();\n $pck->mergeWithConfig($this->mimes, 'mime.types');\n $pck->mergeWithConfig($this->media_mapping, 'mime.media');\n }", "public function lifecycleFileUpload() {\n $this->uploadPhoto();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../resources/config/laravel-medialibrary.php', 'laravel-medialibrary');\n\n $this->app->bind(Filesystem::class, function (Application $app) {\n return new Filesystem($this->app->filesystem->disk($app->config->get('laravel-medialibrary.filesystem')), $app->config);\n });\n\n $this->app->bind(UrlGenerator::class, function (Application $app) {\n $urlGeneratorClass = 'Spatie\\MediaLibrary\\UrlGenerator\\\\'.ucfirst($this->getDriverType()).'UrlGenerator';\n\n $customClass = $app->config->get('laravel-medialibrary.custom_url_generator_class');\n\n if ($customClass != '' && class_exists($customClass) && is_subclass_of($customClass, UrlGenerator::class)) {\n $urlGeneratorClass = $customClass;\n }\n\n return $this->app->make($urlGeneratorClass);\n });\n\n $this->app->singleton(MediaRepository::class);\n\n $this->app['command.medialibrary:regenerate'] = $this->app->make(RegenerateCommand::class);\n\n $this->commands(['command.medialibrary:regenerate']);\n }", "public function __construct(Container $container)\n {\n parent::__construct();\n\n $this->files = $container['filesystem'];\n }", "function wp_media_upload_handler()\n{\n}", "public function register()\n\t{\n\t\t$this->app['upload'] = $this->app->share(function($app)\n {\n return new Uploads;\n });\n\t}", "public function getMediaService()\n {\n if (!$this->mediaService) {\n $this->mediaService = $this->getServiceLocator()->get('playgroundgallery_media_service');\n }\n return $this->mediaService;\n }", "protected function registerFileSystem()\n {\n $this->app->bindIf('files', function () {\n return new Filesystem();\n }, true);\n }", "function &getUploader() {\r\n\r\n\t\t return $this->uploader;\r\n\r\n\t}", "public function register()\n {\n $media_sizes = $this->getConfigs();\n if (!$media_sizes) return;\n\n foreach ($media_sizes as $id => $media_size) {\n if (!empty($media_size) && is_array($media_size)) {\n add_image_size($id, $media_size['width'], $media_size['height'], $media_size['crop']);\n }\n }\n\n // List media sizes on /wp-admin/options-media.php\n add_action('admin_init', array($this, 'register_media_settings'));\n }", "public function addFileAsMediaItem($filename, $options = array())\n {\n $reuseDuplicates = isset($options['reuseDuplicates']) ? $options['reuseDuplicates'] : sfConfig::get('app_aMedia_reuse_duplicates');\n $title = isset($options['title']) ? $options['title'] : null;\n $mimeTypes = aMediaTools::getOption('mime_types');\n // It comes back as a mapping of extensions to types, get the types\n $extensions = array_keys($mimeTypes);\n $mimeTypes = array_values($mimeTypes);\n \n $type = isset($options['type']) ? $options['type'] : false;\n // What we are selecting to add to a page\n if (!$type)\n {\n $type = aMediaTools::getType();\n }\n if (!$type)\n {\n // What we are filtering for \n $type = aMediaTools::getSearchParameter('type');\n }\n if ($type)\n {\n // This supports composite types like _downloadable\n $infos = aMediaTools::getTypeInfos($type);\n $extensions = array();\n foreach ($infos as $info)\n {\n if ($info['embeddable'])\n {\n // This widget is actually supplying a thumbnail - allow gif, jpg and png\n $info['extensions'] = array('gif', 'jpg', 'png');\n }\n foreach ($info['extensions'] as $extension)\n {\n $extensions[] = $extension;\n }\n }\n $mimeTypes = array();\n $mimeTypesByExtension = aMediaTools::getOption('mime_types');\n foreach ($extensions as $extension)\n {\n // Careful, if we are filtering for a particular type then not everything\n // will be on the list\n if (isset($mimeTypesByExtension[$extension]))\n {\n $mimeTypes[] = $mimeTypesByExtension[$extension];\n }\n }\n }\n // Make the validator aware of the minimum dimensions for\n // the selection operation in progress unless overridden by options\n \n if (isset($options['constraints']))\n {\n $minimumWidth = $options['constraints']['minimumWidth'];\n $minimumHeight = $options['constraints']['minimumHeight'];\n } \n elseif (isset($options['noConstraints']) && $options['noConstraints'])\n {\n $minimumWidth = null;\n $minimumHeight = null;\n }\n else\n {\n $minimumWidth = null;\n $minimumHeight = null;\n if (aMediaTools::isSelecting())\n {\n $minimumWidth = aMediaTools::getAttribute('minimum-width');\n $minimumHeight = aMediaTools::getAttribute('minimum-height');\n }\n }\n $options = array(\"mime_types\" => $mimeTypes,\n 'validated_file_class' => 'aValidatedFile',\n \"required\" => true);\n if ($minimumWidth)\n {\n $options['minimum-width'] = $minimumWidth;\n }\n if ($minimumHeight)\n {\n $options['minimum-height'] = $minimumHeight;\n }\n $vfp = new aValidatorFilePersistent($options,\n array(\"mime_types\" => \"The following file types are accepted: \" . implode(', ', $extensions)));\n\n $pathinfo = pathinfo($filename);\n $guid = aGuid::generate();\n try\n {\n $vf = $vfp->clean(\n array(\n 'newfile' => \n array('tmp_name' => $filename, 'name' => $pathinfo['basename']), \n 'persistid' => $guid)); \n } catch (Exception $e)\n {\n return array('status' => 'failed', 'error' => $e->getMessage());\n }\n\n $item = new aMediaItem();\n $item->title = is_null($title) ? aMediaTools::filenameToTitle($pathinfo['basename']) : $title;\n if (!strlen($item->title))\n {\n return array('status' => 'failed', 'error' => 'Filename does not have a basename');\n }\n // The preSaveImage / save / saveImage dance is necessary because\n // the sluggable behavior doesn't kick in until save and the image file\n // needs a slug based filename.\n if (!$item->preSaveFile($vf))\n {\n // this shouldn't happen, but just in case\n return array('status' => 'failed', 'error' => 'Pre-save operations failed');\n }\n if ($reuseDuplicates)\n {\n $existing = $this->findOneByMd5($item->md5);\n if ($existing)\n {\n return array('status' => 'ok', 'item' => $existing);\n }\n }\n $item->save();\n if (!$item->saveFile($vf))\n {\n $item->delete();\n return array('status' => 'failed', 'error' => 'Save operation failed (out of space?)');\n }\n return array('status' => 'ok', 'item' => $item);\n }", "protected function registerFileSystem() {\n\t\t$this->app->bindShared('files', function() {\n\t\t\treturn new Filesystem;\n\t\t});\n\t}", "public function handle() {\n\n (new VideoUpload)->handle();\n\n }", "public function boot()\n {\n Storage::extend(self::DRIVER_NAME, function ($app, $config) {\n $connectionString = sprintf(\n 'DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s',\n $config['storageAccount'],\n $config['storageAccessKey']\n );\n\n $driverConfig = [\n 'endpoint' => $connectionString,\n 'container' => $config['fileShareName'],\n 'disableRecursiveDelete' => !empty($config['disableRecursiveDelete']),\n ];\n\n $fileService = FileRestProxy::createFileService(\n $connectionString,\n [] // $optionsWithMiddlewares\n );\n\n $directoryPrefix = '';\n\n if (! empty($config['driverOptions'])) {\n // If a string, then treat it like a prefix for legacy support.\n\n if (is_string($config['driverOptions'])) {\n $directoryPrefix = $config['driverOptions'];\n }\n\n if (is_array($config['driverOptions'])) {\n $driverConfig = array_merge($driverConfig, $config['driverOptions']);\n }\n }\n\n if (! empty($config['root']) && is_string($config['root'])) {\n $directoryPrefix = $config['root'];\n }\n\n $adapter = new AzureFileAdapter(\n $fileService,\n $config['fileShareName'],\n $driverConfig,\n $directoryPrefix,\n );\n\n return new FilesystemAdapter(\n new Filesystem($adapter, $config),\n $adapter,\n $config,\n );\n });\n }", "public function __invoke(Event $event) {\n\n\t\t$file = $event->getObject();\n\t\tif (!$file instanceof MediaFile) {\n\t\t\treturn;\n\t\t}\n\n\t\t$album_guid = get_input('album_guid');\n\t\t$album = get_entity($album_guid);\n\n\t\tif ($album instanceof MediaCollection) {\n\t\t\t// only do this for files uploaded into an existing album\n\n\t\t\t$file->access_id = $album->access_id;\n\t\t\t$file->container_guid = $album->container_guid;\n\t\t\t$file->published_status = $album->published_status;\n\t\t\t$file->syncs_with = $album->guid;\n\n\t\t\t$file->save();\n\n\t\t\t$album->addMedia($file);\n\t\t}\n\t}", "public function mount()\n {\n $this->channel = new Channel();\n $this->channel->default = false;\n }", "public function attach($owner) {\n $owner->attachEventHandler('onBeginRequest', array($this, 'handleBeginRequest'));\n }", "public function lifecycleFileUpload()\n {\n $this->uploadImage();\n }", "public function register()\n {\n Storage::extend('ceph', function ($app, $config) {\n $config['endpoint'] = isset($config['base_url']) ? $config['base_url'] : self::CEPH_BASE_URL;\n $config['use_path_style_endpoint'] = true;\n $client = new S3Client($config);\n\n return new Filesystem(new AwsS3Adapter($client, $config['bucket']));\n });\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/upload-image.php', 'upload-image');\n\n $this->app->bind('upload-image', function (Container $app) {\n $config = $app['config']['upload-image']['image-settings'];\n\n return new UploadImage($config);\n });\n }", "public function registerContainer()\n {\n $this->app->singleton('coreplex.meta', function ($app) {\n return new MetaContainer($app['coreplex.meta.renderer'], $app['coreplex.meta.store.driver']);\n });\n\n $this->app->bind('Coreplex\\Meta\\Contracts\\Container', function ($app) {\n return $app['coreplex.meta'];\n });\n }", "public function media() {\n return $this->morphMany(Media::class, 'owner');\n }", "public function registerMediaConversions();", "public function register()\n {\n /*\n * Register the image tag processing callback\n */\n TagProcessor::instance()->registerCallback(function ($input, $preview) {\n if (!$preview) return $input;\n\n return preg_replace('|\\<img src=\"image\" alt=\"([0-9]+)\"([^>]*)\\/>|m',\n '<span class=\"image-placeholder\" data-index=\"$1\">\n <span class=\"upload-dropzone\">\n <span class=\"label\">Click or drop an image...</span>\n <span class=\"indicator\"></span>\n </span>\n </span>',\n $input);\n });\n }", "public function uploadcare_media_upload()\n {\n \\wp_enqueue_script('uc-config');\n \\wp_enqueue_script('admin-js', null, require \\dirname(__DIR__) . '/compiled-js/admin.asset.php');\n $sign = __('Click to upload any file up to 5GB from anywhere', $this->plugin_name);\n $btn = __('Upload via Uploadcare', $this->plugin_name);\n $href = '#';\n\n $scr = \\get_current_screen();\n $isMediaAdd = $scr instanceof \\WP_Screen && $scr->base === 'media' && $scr->action === 'add';\n $styleDef = 'add';\n if (!$isMediaAdd) {\n $href = \\admin_url() . 'media-new.php';\n $sign .= ' <br><strong>' . __('from Wordpress upload page') . '</strong>';\n $styleDef = 'wrap-margin';\n }\n\n echo <<<HTML\n<div class=\"uc-picker-wrapper $styleDef\">\n <p class=\"uploadcare-picker\">\n <a id=\"uploadcare-post-upload-ui-btn\"\n class=\"button button-hero\"\n style=\"background: url('https://ucarecdn.com/assets/images/logo.png') no-repeat 5px 5px; padding-left: 44px;\"\n href=\"$href\">\n $btn\n </a>\n </p>\n <p class=\"max-upload-size\">$sign</p>\n</div>\nHTML;\n }", "public function __construct()\n {\n $this->medias = new ArrayCollection();\n }", "public function addMediaForm(){\n $param = array(\n 'id' => 'add-theme-media-form',\n 'upload' => true,\n 'action' => App::router()->getUri('add-theme-media'),\n 'fieldsets' => array(\n 'form' => array(\n new FileInput(array(\n 'name' => 'medias[]',\n 'multiple' => true,\n 'required' => true,\n 'nl' => false,\n )),\n\n new SubmitInput(array(\n 'name' => 'valid',\n 'icon' => 'upload',\n 'value' => Lang::get($this->_plugin . '.theme-add-media-submit'),\n )),\n )\n ),\n 'onsuccess' => 'app.load(app.getUri(\"theme-medias\"), {selector : \"#admin-themes-medias-tab\"});'\n\n );\n\n return new Form($param);\n }", "public function register()\n {\n TagProcessor::instance()->registerCallback(function($input, $preview) {\n if (!$preview) {\n return $input;\n }\n \n return preg_replace('|\\<img src=\"image\" alt=\"([0-9]+)\"([^>]*)\\/>|m',\n '<span class=\"image-placeholder\" data-index=\"$1\">\n <span class=\"upload-dropzone\">\n <span class=\"label\">Click or drop an image...</span>\n <span class=\"indicator\"></span>\n </span>\n </span>',\n $input);\n });\n }", "public function broadcastOn()\n {\n return ['gi.upload'];\n }", "protected function bindPathsInContainer()\n {\n $this->instance('path.appRoot', $this->appRoot());\n }", "public function register()\n {\n $this->app->bindShared('cameraraw', function () {\n return new CameraRaw();\n });\n }", "public function __construct() {\n\t\n\t\tself::$instance = $this;\n\t\t\n\t\t$this->helper = new Radium_HTML5Media_Helper;\n\t\t\n\t\tadd_shortcode( 'radium_audio', array( $this, 'audio_sc' ) );\n\t\tadd_shortcode( 'radium_video', array( $this, 'video_sc' ) );\n\t\n \t}", "public function store(MediaRequest $request)\n {\n //\n }", "public function uploader(){\r\n\t\treturn $this->module_uploader();\r\n\t}", "public function register()\n {\n $this->app['upload.file'] = $this->app->share(function ($app) {\n return new FileUpload;\n });\n }", "protected function configureMediaLibrary()\n {\n if ( ! config('filesystems.disks.media'))\n config()->set('filesystems.disks.media', config('oxygen.media_disk'));\n\n if ( ! config('medialibrary.disk_name'))\n config()->set('medialibrary.disk_name', config('oxygen.default_media_disk'));\n }", "public function handle_upload()\n {\n }", "public function register()\n {\n $this->app->singleton(UploadableListener::class, function () {\n\n return new UploadableListener();\n });\n }", "public function getUploader(){\n\t\t$uploader = new \\Smally\\Uploader($this->getApplication());\n\t\t$uploader->setUploadPath( (string)$this->getApplication()->getConfig()->smally->upload->path?:ROOT_PATH.'public/data/' ) ;\n\t\treturn $uploader;\n\t}", "public function register()\n {\n $this->app->bind('laravolt.file-manager', function ($app) {\n return new FileManager();\n });\n }", "public function register()\n {\n $this->app->bind(StorageService::class, function ($app) {\n return new ImageStorageService();\n });\n }", "private function registerService()\n {\n $beforeSingle = function (ShortMessage $message) {\n event(new Events\\SendingMessage($message));\n };\n\n $afterSingle = function ($response, ShortMessage $message) {\n event(new Events\\MessageWasSent($message, $response));\n };\n\n $beforeMany = function (ShortMessageCollection $messages) {\n event(new Events\\SendingMessages($messages));\n };\n\n $afterMany = function ($response, ShortMessageCollection $messages) {\n event(new Events\\MessagesWereSent($messages, $response));\n };\n\n $this->app->singleton('sms-media', function ($app) use ($beforeSingle, $afterSingle, $beforeMany, $afterMany) {\n return new SmsMediaService(\n $app->make(SmsMediaClientContract::class),\n new ShortMessageFactory(),\n new ShortMessageCollectionFactory(),\n $beforeSingle,\n $afterSingle,\n $beforeMany,\n $afterMany\n );\n });\n }", "function setContainer($cont) {\n\n $this->container = $cont;\n }", "private function wp_media_uploader( $value ) {\n\t\t$image_stored = isset($this->_saved_options[ $value['id'] ]) ? $this->_saved_options[ $value['id'] ]: null;\n\t\t$this->form_element_start( $value ); \n\t\t// Save Post ID and create function to return first attachment to the post.\n\t\t$id= $value['id'];\n\t\t$post_ID = $this->create_empty_post($value);\n\t\t$button_value = 'Select an Image';\n\t\t?>\n\t\t<div>\n\t\t\t<input type=\"hidden\" option=\"<?php echo $post_ID; ?>\" name=\"<?php echo $id; ?>\" class=\"upload_input\" value=\"<?php echo $image_stored; ?>\"/>\n\t\t\t<div class='upload-image' id='holder-<?php echo $post_ID; ?>' nonce='<?php echo wp_create_nonce( \"set_post_thumbnail-$post_ID\" ); ?>'>\n\t\t\t\t<?php \n\t\t\t\tif( isset( $image_stored ) && false != $image_stored ) {\n\t\t\t\t\t$temp_image = $this->get_upload_image_html( $image_stored );\n\t\t\t\t\tif( false != $temp_image ) {\n\t\t\t\t\t\t$button_value = 'Remove';\n\t\t\t\t\t\techo $temp_image;\n\t\t\t\t\t}\n\t\t\t\t} ?>\n\t\t\t</div>\n\t\t\t<span class=\"submit\"><input name=\"save\" type=\"button\" value=\"<?php echo $button_value;?>\" data=\"<?php echo $value['name']; ?>\" class=\"tk_image_upload button upload_save\" id=\"tkbtn-<?php echo $post_ID; ?>\" rel=\"<?php echo $post_ID; ?>\"/></span>\n\t\t</div>\n\t\t<?php\t\n\t\t$this->form_element_end( $value );\t\n\t}", "public function media_holder() {\r\n\t\t\r\n\t\t$media = $this->tg_el->get_media();\r\n\t\t\r\n\t\tif ($media) {\r\n\t\t\r\n\t\t\t$this->skin_content .= $this->tg_el->get_media_wrapper_start();\r\n\t\t\t$this->skin_content .= $media;\r\n\t\t\t$image = $this->tg_el->get_attachement_url();\r\n\t\r\n\t\t\tif ($image) {\r\n\t\t\t\t\r\n\t\t\t\t$areas = array(\r\n\t\t\t\t\t'media_holder_top',\r\n\t\t\t\t\t'media_holder_center',\r\n\t\t\t\t\t'media_holder_bottom'\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$content = null;\r\n\t\t\t\t\r\n\t\t\t\tforeach ($areas as $area) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$elements = (isset($this->skin_elements[$area])) ? $this->skin_elements[$area] : array();\r\n\t\t\t\t\t$content .= $this->$area($elements);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (isset($this->skin_elements['media_overlay'])) {\r\n\t\t\t\t\t$this->skin_content .= $this->tg_el->get_overlay();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->skin_content .= $content;\r\n\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->skin_content .= $this->tg_el->get_media_wrapper_end();\r\n\t\t\r\n\t\t}\r\n\r\n\t}", "public function registerFilesystem()\n {\n $this->container->singleton('files', function () {\n return new Filesystem();\n });\n }", "public function addMedia(){\n $form = $this->addMediaForm();\n\n if($form->check()) {\n $uploader = Upload::getInstance('medias');\n\n $dir = Theme::getSelected()->getMediasDir();\n if(!is_dir($dir)) {\n mkdir($dir, 0755, true);\n }\n foreach($uploader->getFiles() as $file){\n $uploader->move($file, Theme::getSelected()->getMediasDir());\n }\n\n return $form->response(Form::STATUS_SUCCESS);\n }\n }", "public function MediaManager()\n {\n if (!is_object($this->MediaManagerInstance))\n {\n $this->MediaManagerInstance = new MediaManager($this->bookId);\n }\n return $this->MediaManagerInstance;\n }", "protected function registerFilesystemBindings()\n {\n $this->singleton('filesystem', static function ($app) {\n return $app->loadComponent('filesystems', 'Illuminate\\Filesystem\\FilesystemServiceProvider', 'filesystem');\n });\n\n $this->singleton('filesystem.disk', static function ($app) {\n return $app->loadComponent('filesystems', 'Illuminate\\Filesystem\\FilesystemServiceProvider', 'filesystem.disk');\n });\n\n $this->singleton('filesystem.cloud', static function ($app) {\n return $app->loadComponent('filesystems', 'Illuminate\\Filesystem\\FilesystemServiceProvider', 'filesystem.cloud');\n });\n }" ]
[ "0.6134095", "0.5916855", "0.58648044", "0.58349884", "0.5828895", "0.57410496", "0.57410496", "0.5693286", "0.56301695", "0.5571576", "0.55582714", "0.55495316", "0.5529391", "0.5524607", "0.5504332", "0.54864925", "0.5475324", "0.5467869", "0.5467869", "0.545377", "0.5427458", "0.54116607", "0.5331563", "0.531725", "0.5284182", "0.5258499", "0.52570546", "0.52302957", "0.5228011", "0.52165025", "0.518208", "0.5176509", "0.5162169", "0.5149556", "0.50995636", "0.5089283", "0.5069907", "0.5069907", "0.5061047", "0.50574505", "0.50574505", "0.50574505", "0.5057126", "0.5026675", "0.50263894", "0.50238496", "0.5021095", "0.5008333", "0.50000215", "0.49881235", "0.49767172", "0.49764678", "0.49764422", "0.49739945", "0.4957635", "0.49395743", "0.49340096", "0.49242604", "0.49121863", "0.49105632", "0.49072716", "0.4906337", "0.4901931", "0.4881231", "0.4860411", "0.48558563", "0.48532283", "0.48428833", "0.48416388", "0.48368424", "0.48326802", "0.48278803", "0.48258623", "0.4822315", "0.4804582", "0.47952336", "0.47917238", "0.47833785", "0.47769836", "0.47737312", "0.47735026", "0.47490022", "0.47436807", "0.47435153", "0.47418338", "0.47322577", "0.47177386", "0.4710244", "0.47054574", "0.47046039", "0.46990266", "0.46962354", "0.4686015", "0.46849138", "0.46764815", "0.46764067", "0.46751937", "0.46707225", "0.4669174", "0.46642196" ]
0.74740493
0
Get the total distance of the route.
Получите общую длину маршрута.
public function getTotalDistance() { return $this->totalDistance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRouteTotalCost()\n {\n return $this->route_total_cost;\n }", "public function get_distance()\n {\n return $this->distance;\n }", "public function getRouteDistance($rtid){\n return $this->routes[$rtid]->dist;\n }", "public function getDistance()\r\n\t{\r\n\t\treturn $this->distance;\r\n\t}", "public function getDistance()\n {\n return $this->distance;\n }", "public function getDistance()\n {\n return $this->distance;\n }", "public function getUserRouteDistance()\n {\n return $this->userRouteDistance;\n }", "public function getDistance()\n {\n $context = $this->context();\n\n $from = $context->travel_data->pick_up->location;\n $to = $context->travel_data->drop_off->location;\n\n return \\App\\Models\\Product\\Location::getDistance($from->latitude, $from->longitude, $to->latitude, $to->longitude);\n }", "public function getDistance()\n {\n return $this->_distance;\n }", "public function getDistance() {\n if (!$this->distance) {\n $tourDistance = 0;\n // Trecem prin toate orasele turului\n for ($cityIndex = 0; $cityIndex < $this->tourSize(); $cityIndex++) {\n // Extrage oras curent\n $fromCity = $this->getCity($cityIndex);\n // Orasul urmator\n $destinationCity;\n // Verificam daca suntem la ultimul oras\n // Daca da setam orasul destinatie acelasi cu primul oras\n if ($cityIndex + 1 < $this->tourSize()) {\n $destinationCity = $this->getCity($cityIndex + 1);\n } else {\n $destinationCity = $this->getCity(0);\n }\n // Obtinem distanta dintre cele doua orase\n $tourDistance += $fromCity->distanceTo($destinationCity);\n }\n $this->distance = $tourDistance;\n }\n\n return $this->distance;\n }", "public function getDistance();", "public function distance()\n {\n list($dLat, $dLong, $dPhi) = $this->dLatLongPhi();\n $q = (abs($dPhi) > 0.000000000001) ? $dLat / $dPhi : cos($this->geo->from['radlat']);\n\n return sqrt(pow($dLat, 2) + pow($q, 2) * pow($dLong, 2)) * $this->geo->radius;\n }", "public function getRouteCosts()\n {\n return $this->route_costs;\n }", "public function getDistanceMeters()\n {\n return $this->distance_meters;\n }", "public function getDistanceFromRoot()\n {\n return $this->root ? $this->getDistance() : null;\n }", "private function travelTime($route)\n {\n $travelTime = 0;\n foreach ($route as $route) {\n $travelTime += $route->travel_time;\n }\n\n return $travelTime;\n }", "public function getTotalCharge()\n {\n $result = 0;\n foreach ($this->rentals as $rental) {\n $result += $rental->getMovie()->getCharge($rental->getDaysRented());\n }\n return $result;\n }", "public function distance()\n {\n return $this->buildUnit('distance', Measures\\Distance::class);\n }", "public function getDistance()\n {\n if ($this->distance === null) {\n $this->distance = 0;\n\n $node = $this;\n while (( $node = $node->parent ) !== null) {\n $this->distance++;\n }\n }\n\n return $this->distance;\n }", "public function getDistance(): int\n {\n $distance = 0;\n $input = $this->input->getInput();\n\n foreach ($input as $word) {\n if (\\array_key_exists($word, $this->cache)) {\n $distance += $this->cache[$word];\n\n continue;\n }\n\n $score = $this->distanceFromVocabulary($word);\n\n $this->cache[$word] = $score;\n $distance += $score;\n }\n\n return $distance;\n }", "public function getTotalSize()\n {\n $size = null;\n foreach ($this->getMountPoints() as $mountPoint) {\n $size += $mountPoint->getTotalSize();\n }\n\n return $size;\n }", "public function getOffsetDistance()\n {\n return $this->offsetDistance;\n }", "private function calculateFinalDistance() {\n $finalDistance = abs(0 - $this->currentX) + abs(0 - $this->currentY);\n return $finalDistance;\n }", "public function getTravelTime(Locations $destination) {\n $key = Locations::getGoogleApiKey('directions');\n\n // If google api key is not set up\n if (!$key) {\n $distance = $this->getDistance($destination->lat, $destination->lon);\n $duration = $distance / 40;\n return intval($duration) . 'minutes';\n }\n\n // If google api key is set up\n else if (!empty($this->lat) && !empty($this->lon) && !empty($destination->lat) && !empty($destination->lon)) {\n $cacheKey = 'd' . $this->lat . ',' . $this->lon . ',' . $destination->lat . ',' . $destination->lon;\n $duration = Yii::app()->cache->get($cacheKey);\n if ($duration) {\n return $duration;\n }\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json' .\n '?origin=' . $this->lat . ',' . $this->lon .\n '&destination=' . $destination->lat . ',' . $destination->lon .\n '&key=' . $key;\n $result = RequestUtil::request(array('url' => $url));\n $data = CJSON::decode($result, true);\n if ($data && isset($data['status']) && $data['status'] === 'OK' &&\n array_key_exists('routes', $data) &&\n array_key_exists(0, $data['routes']) &&\n array_key_exists('legs', $data['routes'][0]) &&\n array_key_exists(0, $data['routes'][0]['legs'])\n ) {\n $leg = $data['routes'][0]['legs'][0];\n $duration = $leg['duration']['text'];\n Yii::app()->cache->set($cacheKey, $duration, 60 * 60);\n return $duration;\n }\n }\n }", "public function getDistanceToRoot()\n {\n if ($this->startNode->id == 0) {\n return 0;\n }\n \n return $this->traverse($this->startNode, 1);\n }", "public function getDistanceAttribute();", "public function getItemDistance() {\n return $this->itemDistance;\n }", "public function getTotal(){\n return $this->precio + $this->coordinacion;\n }", "public function getTotalAverageNPath()\n {\n return $this->getTotalNPath() / $this->getTotalLLOC();\n }", "public function getDistanceById($id)\n {\n $distanceData = DB::table('distances')->where([\n ['id', '=', $id]\n ])->get();\n \n return $distanceData[0]->distance;\n }", "private function getDistance($params){\n $origin = $params['start_latitude'] .\",\". $params['start_longitude'];\n $destination = $params['end_latitude'] .\",\". $params['end_longitude'];\n $api = file_get_contents(\"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=\" . $origin . \"&destinations=\" . $destination . \"&key=\" . GOOGLE_API_KEY);\n $data = json_decode($api);\n\n if ($data->rows[0]->elements[0]->status == 'NOT_FOUND' || !$data)\n return false;\n\n return ((int) $data->rows[0]->elements[0]->distance->value / 1000) . ' Km';\n }", "public function getUserRouteDuration()\n {\n return $this->userRouteDuration;\n }", "public function getTotalcost()\n {\n return $this->totalcost;\n }", "public function getTravelledKilometers(): int;", "public function getRouteCount(){\n\t\treturn $this->journey->metadata->routes;\n\t}", "public function getTotalAvgSpeed(){\n\t\treturn $this->journey->stats->avgspeed;\n\t}", "public function getTotalNPath()\n {\n return $this->_iTotalNPath;\n }", "public function getDistance(Coordinate $a, Coordinate $b)\n {\n $dLatitudeRadian = $b->latitudeRadian - $a->latitudeRadian;\n $dLongitudeRadian = $b->longitudeRadian - $a->longitudeRadian;\n if ($dLatitudeRadian == 0) {\n return 0;\n }\n\n //google maps里面实现的算法\n $distance = 2 * asin(sqrt(pow(sin($dLatitudeRadian / 2), 2) + cos($a->latitudeRadian) * cos($b->latitudeRadian) * pow(sin($dLongitudeRadian / 2), 2))); //google maps里面实现的算法\n // $distance = $distance * Coordinate::EARTH_RADIUS;\n $distance = $distance * $a->localEarthRadius;\n\n return $distance;\n }", "function GetTotalPoint() {\n return $this->posnetResponse->totalPoint;\n }", "public function getTotalAmount() : float\n {\n $amount = 6; # shipping costs\n foreach ($this->getItems() as $item) {\n $amount += ($item->getAmount() * $item->getPrice());\n }\n return $amount;\n }", "public function total()\n {\n return (double) $this->orderData->order_total;\n }", "public function getDiameter(){\n return ($this->radius * 2);\n }", "public function getDistance($waypoint0, $waypoint1){\n $app_id = config('hereapp.app_id');\n $app_code = config('hereapp.app_code');\n\n $uri = 'https://route.api.here.com/routing/7.2/calculateroute.json';\n\n $client = new Client(); //GuzzleHttp\\Client\n $result = $client->request('GET', $uri, [\n 'query' => [\n 'waypoint0' => $waypoint0,\n 'waypoint1' => $waypoint1,\n 'mode' => 'fastest;car;traffic:enabled',\n 'app_id' => $app_id,\n 'app_code' => $app_code,\n 'departure' => 'now'\n ]\n ]);\n\n return $result;\n }", "public function getUserDistanceAttribute()\n {\n $lat = session('lat');\n $lng = session('lng');\n if(!empty($lat) && !empty($lng) && !empty($this->latitude) && !empty($this->longitude))\n {//if we have coordinates for this user and this place, we can calculate distance\n return $this->calculateDistance($lat, $lng, $this->latitude,$this->longitude);\n }\n\n return null;\n }", "public function distance($value) {\n return $this->setProperty('distance', $value);\n }", "function getDistance($latitude, $longitude) {\n if ($this->getLocation()->getLatitude() != 0 && $this->getLocation()->getLongitude() != 0) {\n // convert from degrees to radians\n $latFrom = deg2rad($latitude);\n $lonFrom = deg2rad($longitude);\n $latTo = deg2rad($this->getLocation()->getLatitude());\n $lonTo = deg2rad($this->getLocation()->getLongitude());\n \n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n \n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) + cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n return $angle * 6371000; // angle * earth radius in m\n } else {\n return 100;\n }\n }", "public function getTotalLLOC()\n {\n return $this->_iTotalLLOC;\n }", "public function totalCost()\n {\n return $this->tickets->sum('price');\n }", "public function getWorstDestinationsDistance(Location $avgDestination): float\r\n {\r\n $distance = 0;\r\n\r\n /** @var Route $route */\r\n foreach ($this->storage as $route) {\r\n $destination = $route->getCurrentLocation();\r\n $x = $avgDestination->getX() - $destination->getX();\r\n $y = $avgDestination->getY() - $destination->getY();\r\n\r\n $hypotenuse = hypot($x, $y);\r\n $distance = max($distance, $hypotenuse);\r\n }\r\n\r\n return floatval($distance);\r\n }", "public function getUserRouteSpeed()\n {\n return $this->userRouteSpeed;\n }", "public function get_distance($from, $to) {\n $retval = $this->get_info_between_points($from, $to);\n\n if ($retval === ERROR) {\n return \"<strong>An error has shown up</strong>\";\n } else if ($retval->Status->code == 602) {\n return \"<strong>Wrong address</strong>\";\n }\n\n return $this->distanceToType($retval->Directions->Distance->meters);\n }", "public function calculateDistance(Position $position);", "public function getDist()\n {\n return $this->dist;\n }", "public function getDuration()\n {\n $time = round($this->getDistance() / 40 * 60);\n return \\Carbon\\Carbon::now()->diffForHumans(\\Carbon\\Carbon::now()->subMinutes($time), true);\n }", "public function get_total_sum()\n {\n return $this->sum;\n }", "public function getTotal() {\r\n if (!$this->statsOk) {\r\n $this->calcStats();\r\n }\r\n return $this->total;\r\n }", "public function getRouteSpeedLimit(): int {\n\t\treturn ($this->routeSpeedLimit);\n\t}", "function GetTotalPointAmount() {\n return $this->posnetResponse->totalPointAmount;\n }", "public function getTotalSpace() {\n return $this->space_total;\n }", "protected function getRoute()\n {\n return (int) $this->route;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->_total;\n }", "public function getTotal()\n {\n return $this->_total;\n }", "public function getTotalDolares()\n\t{\n\t\treturn $this->totalDolares;\n\t}", "public function getShortestDistance() {\n return $this->shortestDistance;\n }", "public function get_total_shipping()\n {\n }", "public function setDistanceAttribute($input)\n {\n //$this->attributes['distance'] = $input ? $input : null;\n\n if ($this->attributes['route_id'] == 1) {\n $this->attributes['distance'] = 1124.7 + 100;\n }\n else if ($this->attributes['route_id'] == 2) {\n $this->attributes['distance'] = 863 + 100;\n }\n else if ($this->attributes['route_id'] == 3) {\n $this->attributes['distance'] = 818.22 + 100;\n }\n else if ($this->attributes['route_id'] == 4) {\n $this->attributes['distance'] = 1577.4 + 100;\n }\n else if ($this->attributes['route_id'] == 5) {\n $this->attributes['distance'] = 1887.3 + 100;\n }\n else if ($this->attributes['route_id'] == 6) {\n $this->attributes['distance'] = 544.5 + 100;\n }\n else if ($this->attributes['route_id'] == 7) {\n $this->attributes['distance'] = 1343.1 + 100;\n }\n else if ($this->attributes['route_id'] == 8) {\n $this->attributes['distance'] = 567.6 + 100;\n }\n else if ($this->attributes['route_id'] == 9) {\n $this->attributes['distance'] = 1123.5 + 100;\n }\n else if ($this->attributes['route_id'] == 10) {\n $this->attributes['distance'] = 434.8 + 100;\n }\n else if ($this->attributes['route_id'] == 11) {\n $this->attributes['distance'] = 386.3 + 100;\n }\n else if ($this->attributes['route_id'] == 12) {\n $this->attributes['distance'] = 495.2 + 100;\n }\n else if ($this->attributes['route_id'] == 13) {\n $this->attributes['distance'] = 805.1 + 100;\n }\n else if ($this->attributes['route_id'] == 14) {\n $this->attributes['distance'] = 1137.2 + 100;\n }\n else if ($this->attributes['route_id'] == 15) {\n $this->attributes['distance'] = 575.9 + 100;\n }\n else if ($this->attributes['route_id'] == 16) {\n $this->attributes['distance'] = 1679.6 + 100;\n }\n else if ($this->attributes['route_id'] == 17) {\n $this->attributes['distance'] = 863 + 100;\n }\n else if ($this->attributes['route_id'] == 18) {\n $this->attributes['distance'] = 434.8 + 100;\n }\n else if ($this->attributes['route_id'] == 19) {\n $this->attributes['distance'] = 182.5 + 100;\n }\n else if ($this->attributes['route_id'] == 20) {\n $this->attributes['distance'] = 795 + 100;\n }\n else if ($this->attributes['route_id'] == 21) {\n $this->attributes['distance'] = 1104.8 + 100;\n }\n else if ($this->attributes['route_id'] == 22) {\n $this->attributes['distance'] = 1021.3 + 100;\n }\n else if ($this->attributes['route_id'] == 23) {\n $this->attributes['distance'] = 869.5 + 100;\n }\n else if ($this->attributes['route_id'] == 24) {\n $this->attributes['distance'] = 1417.7 + 100;\n }\n else if ($this->attributes['route_id'] == 25) {\n $this->attributes['distance'] = 818.22 + 100;\n }\n else if ($this->attributes['route_id'] == 26) {\n $this->attributes['distance'] = 386.3 + 100;\n }\n else if ($this->attributes['route_id'] == 27) {\n $this->attributes['distance'] = 182.5 + 100;\n }\n else if ($this->attributes['route_id'] == 28) {\n $this->attributes['distance'] = 755.6 + 100;\n }\n else if ($this->attributes['route_id'] == 29) {\n $this->attributes['distance'] = 1065.5 + 100;\n }\n else if ($this->attributes['route_id'] == 30) {\n $this->attributes['distance'] = 882.3 + 100;\n }\n else if ($this->attributes['route_id'] == 31) {\n $this->attributes['distance'] = 687.5 + 100;\n }\n else if ($this->attributes['route_id'] == 32) {\n $this->attributes['distance'] = 1381.1 + 100;\n }\n else if ($this->attributes['route_id'] == 33) {\n $this->attributes['distance'] = 1577.4 + 100;\n }\n else if ($this->attributes['route_id'] == 34) {\n $this->attributes['distance'] = 495.2 + 100;\n }\n else if ($this->attributes['route_id'] == 35) {\n $this->attributes['distance'] = 795 + 100;\n }\n else if ($this->attributes['route_id'] == 36) {\n $this->attributes['distance'] = 755.6 + 100;\n }\n else if ($this->attributes['route_id'] == 37) {\n $this->attributes['distance'] = 316.9 + 100;\n }\n else if ($this->attributes['route_id'] == 38) {\n $this->attributes['distance'] = 1584.2 + 100;\n }\n else if ($this->attributes['route_id'] == 39) {\n $this->attributes['distance'] = 1071.2 + 100;\n }\n else if ($this->attributes['route_id'] == 40) {\n $this->attributes['distance'] = 2133.2 + 100;\n }\n else if ($this->attributes['route_id'] == 41) {\n $this->attributes['distance'] = 1887.3 + 100;\n }\n else if ($this->attributes['route_id'] == 42) {\n $this->attributes['distance'] = 805.1 + 100;\n }\n else if ($this->attributes['route_id'] == 43) {\n $this->attributes['distance'] = 1104.8 + 100;\n }\n else if ($this->attributes['route_id'] == 44) {\n $this->attributes['distance'] = 1065.5 + 100;\n }\n else if ($this->attributes['route_id'] == 45) {\n $this->attributes['distance'] = 316.9 + 100;\n }\n else if ($this->attributes['route_id'] == 46) {\n $this->attributes['distance'] = 1892.7 + 100;\n }\n else if ($this->attributes['route_id'] == 47) {\n $this->attributes['distance'] = 1379.7 + 100;\n }\n else if ($this->attributes['route_id'] == 48) {\n $this->attributes['distance'] = 2442 + 100;\n }\n else if ($this->attributes['route_id'] == 49) {\n $this->attributes['distance'] = 544.5 + 100;\n }\n else if ($this->attributes['route_id'] == 50) {\n $this->attributes['distance'] = 1137.2 + 100;\n }\n else if ($this->attributes['route_id'] == 51) {\n $this->attributes['distance'] = 1021.3 + 100;\n }\n else if ($this->attributes['route_id'] == 52) {\n $this->attributes['distance'] = 882.3 + 100;\n }\n else if ($this->attributes['route_id'] == 53) {\n $this->attributes['distance'] = 1584.2 + 100;\n }\n else if ($this->attributes['route_id'] == 54) {\n $this->attributes['distance'] = 1892.7 + 100;\n }\n else if ($this->attributes['route_id'] == 55) {\n $this->attributes['distance'] = 1067.5 + 100;\n }\n else if ($this->attributes['route_id'] == 56) {\n $this->attributes['distance'] = 599.6 + 100;\n }\n else if ($this->attributes['route_id'] == 57) {\n $this->attributes['distance'] = 1343.1 + 100;\n }\n else if ($this->attributes['route_id'] == 58) {\n $this->attributes['distance'] = 575.9 + 100;\n }\n else if ($this->attributes['route_id'] == 59) {\n $this->attributes['distance'] = 869.5 + 100;\n }\n else if ($this->attributes['route_id'] == 60) {\n $this->attributes['distance'] = 687.5 + 100;\n }\n else if ($this->attributes['route_id'] == 61) {\n $this->attributes['distance'] = 1071.2 + 100;\n }\n else if ($this->attributes['route_id'] == 62) {\n $this->attributes['distance'] = 1379.7 + 100;\n }\n else if ($this->attributes['route_id'] == 63) {\n $this->attributes['distance'] = 1067.5 + 100;\n }\n else if ($this->attributes['route_id'] == 64) {\n $this->attributes['distance'] = 1645.8 + 100;\n }\n else if ($this->attributes['route_id'] == 65) {\n $this->attributes['distance'] = 567.6 + 100;\n }\n else if ($this->attributes['route_id'] == 66) {\n $this->attributes['distance'] = 1679.6 + 100;\n }\n else if ($this->attributes['route_id'] == 67) {\n $this->attributes['distance'] = 1417.7 + 100;\n }\n else if ($this->attributes['route_id'] == 68) {\n $this->attributes['distance'] = 1381.1 + 100;\n }\n else if ($this->attributes['route_id'] == 69) {\n $this->attributes['distance'] = 2133.2 + 100;\n }\n else if ($this->attributes['route_id'] == 70) {\n $this->attributes['distance'] = 2442 + 100;\n }\n else if ($this->attributes['route_id'] == 71) {\n $this->attributes['distance'] = 599.6 + 100;\n }\n else if ($this->attributes['route_id'] == 72) {\n $this->attributes['distance'] = 1645.8 + 100;\n }\n else if ($this->attributes['route_id'] == 73) {\n $this->attributes['distance'] = 325.1 + 100;\n }\n else if ($this->attributes['route_id'] == 74) {\n $this->attributes['distance'] = 325.1 + 100;\n }\n else {\n $this->attributes['distance'] = 0.00;\n }\n }", "public function getCost(): float\n {\n return $this->getMetric('getCost');\n }", "public function getTotalCost(): float\n {\n $cost = 0.0;\n\n foreach ($this->products as $product) {\n $cost += $product->getQuantity() * $product->getCost();\n }\n\n return $cost;\n }", "function getTotal() {\n\t\t\tif (is_null($this->total)) {\n\t\t\t\t$this->total = 0;\n\t\t\t}\n\t\t\treturn $this->total;\n\t\t}", "public function total(): int\n {\n return $this->total;\n }", "public function getTotal() : int\n {\n return $this->total;\n }", "public function getDistance($refDimension);", "public function getTotalPrice() {\n return $this->getPrice();\n }", "public function getAvgDestination(): Location\r\n {\r\n $x = [];\r\n $y = [];\r\n\r\n /** @var Route $route */\r\n foreach ($this->storage as $route) {\r\n $route->calculate();\r\n\r\n $destination = $route->getCurrentLocation();\r\n $x[] = $destination->getX();\r\n $y[] = $destination->getY();\r\n }\r\n\r\n $count = count($this->storage);\r\n\r\n $avgX = array_sum($x) / $count;\r\n $avgY = array_sum($y) / $count;\r\n\r\n return new Location($avgX, $avgY);\r\n }", "public function getTotalFeeAttribute()\n {\n return ((int) (($this->fee / 60) * $this->length * (count($this->sessionPlayers) * $this->sessionPlayers->sum('players'))));\n }", "public function getTotalTime(): float\n\t{\n\t\treturn $this->app['send']->getTotalTime();\n\t}", "public function getDistance(Vertex $endVertex)\n {\n return (float)\\count($this->getEdgesTo($endVertex));\n }", "function distance($distance){\n \treturn round($distance, 1) . \" miles\";\n }", "public function getTotal(): float\n {\n $total = 0;\n\n foreach ($this->getItems() as $item) {\n $total += $item->getTotal();\n }\n\n return $total;\n }", "public function total(): int\n {\n return $this->hits()['total'];\n }", "public function getTotal()\n\t{\n\t\treturn $this->total;\n\t}", "public function getTotalCost() \r\n\t{\r\n\t\tif(empty($this->card)) \t\t\t/// if the card is empty we return -1\r\n\t\t{\r\n\t\t\treturn -1;\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$total = 0;\r\n\t\t\tforeach($this->card as $data)\r\n\t\t\t{\r\n\t\t\t\t$total =$total + ($data['price']*$data['qty']);\r\n\t\t\t}\r\n\t\t\tunset($data);\r\n\t\t\treturn $total;\r\n\t\t}\r\n\t}", "public function getMaxDirections(): int\n {\n return $this->object->maxDirection;\n }" ]
[ "0.77349806", "0.75247", "0.7453689", "0.7415888", "0.73855704", "0.73855704", "0.73281527", "0.7322439", "0.7252946", "0.7198157", "0.7126041", "0.66853786", "0.6680643", "0.64995414", "0.6377076", "0.6336832", "0.6217813", "0.6186372", "0.6163189", "0.6153886", "0.61398983", "0.61219096", "0.6115829", "0.6112946", "0.60324544", "0.60178685", "0.6011504", "0.5992132", "0.5959794", "0.5945159", "0.58976823", "0.5866542", "0.5820024", "0.578113", "0.577104", "0.57646245", "0.5745719", "0.57368684", "0.5735309", "0.5695238", "0.5690686", "0.56541264", "0.5647429", "0.5624293", "0.56018555", "0.55992055", "0.55581045", "0.5529233", "0.55133003", "0.5507089", "0.54979205", "0.54932433", "0.5489612", "0.54888266", "0.54724556", "0.54647714", "0.5464592", "0.54524285", "0.5436866", "0.5434659", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5434412", "0.5419007", "0.5417509", "0.5417509", "0.5415087", "0.54124594", "0.54082805", "0.5399069", "0.5398768", "0.539403", "0.539122", "0.53907853", "0.53861403", "0.53845465", "0.538251", "0.5372128", "0.536993", "0.5368863", "0.5366597", "0.53644145", "0.535573", "0.5354139", "0.5349023", "0.5345815", "0.5342293" ]
0.8187838
0
Get the total time of the route.
Получить общее время маршрута.
public function getTotalTime() { return $this->totalTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalTime()\n {\n $totalTime = 0;\n foreach ($this->data['requests'] as $services) {\n $totalTime += $services['time'];\n }\n\n return $totalTime;\n }", "public function total_time() {\n\t\treturn $this->meta( 'wprm_total_time', 0 );\n\t}", "private function travelTime($route)\n {\n $travelTime = 0;\n foreach ($route as $route) {\n $travelTime += $route->travel_time;\n }\n\n return $travelTime;\n }", "public function getTotalTime(): string;", "function total_time()\n\t{\n\t\t$this->total_time = round(($this->end_time-$this->start_time),4);\n\t}", "public function getTotalTime(): float\n\t{\n\t\treturn $this->app['send']->getTotalTime();\n\t}", "public function getRouteTotalCost()\n {\n return $this->route_total_cost;\n }", "public function getUserRouteDuration()\n {\n return $this->userRouteDuration;\n }", "protected function getTotalTime()\n {\n $time = round(array_sum(array_column($this->getQueries(), 'time')), 4);\n return $time;\n }", "public function total_time() {\n\t\treturn $this->session_duration;\n\t}", "public function getTime()\n {\n $time = 0;\n foreach ($this->data['views'] as $view) {\n $time += (float) $view['time'];\n }\n\n return $time;\n }", "public function getTotalTime()\n {\n return $this->_profiler->getTotalElapsedSecs();\n }", "public function getTime()\n {\n return $this->finishTime - $this->startTime;\n }", "public function getTime()\n {\n if (!$this->getRequestcount()) return 0;\n \n $time = 0;\n\n foreach ($this->data['calls'] as $request) {\n $time += $request->time;\n }\n\n return $time;\n }", "public function getUserRouteEndTime()\n {\n return $this->userRouteEndTime;\n }", "public function getUserRouteStartTime()\n {\n return $this->userRouteStartTime;\n }", "public function getTotalTime(): float\n {\n $time = 0.0;\n\n foreach ($this->entries as $entry) {\n $time += $entry->getTime();\n }\n\n return $time;\n }", "public function getTotalTime(): float\n {\n return curl_getinfo($this->ch, CURLINFO_TOTAL_TIME);\n }", "public function get_total_time() {\n if( ! @$this->_is_valid_handle() ) {\n return FALSE;\n }\n $ret = @curl_getinfo( $this->handle_id, CURLINFO_TOTAL_TIME );\n $this->_check_error();\n return $ret;\n }", "public function getTimeElapsed()\n {\n return $this->time_elapsed;\n }", "public function getTravelTime(Locations $destination) {\n $key = Locations::getGoogleApiKey('directions');\n\n // If google api key is not set up\n if (!$key) {\n $distance = $this->getDistance($destination->lat, $destination->lon);\n $duration = $distance / 40;\n return intval($duration) . 'minutes';\n }\n\n // If google api key is set up\n else if (!empty($this->lat) && !empty($this->lon) && !empty($destination->lat) && !empty($destination->lon)) {\n $cacheKey = 'd' . $this->lat . ',' . $this->lon . ',' . $destination->lat . ',' . $destination->lon;\n $duration = Yii::app()->cache->get($cacheKey);\n if ($duration) {\n return $duration;\n }\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json' .\n '?origin=' . $this->lat . ',' . $this->lon .\n '&destination=' . $destination->lat . ',' . $destination->lon .\n '&key=' . $key;\n $result = RequestUtil::request(array('url' => $url));\n $data = CJSON::decode($result, true);\n if ($data && isset($data['status']) && $data['status'] === 'OK' &&\n array_key_exists('routes', $data) &&\n array_key_exists(0, $data['routes']) &&\n array_key_exists('legs', $data['routes'][0]) &&\n array_key_exists(0, $data['routes'][0]['legs'])\n ) {\n $leg = $data['routes'][0]['legs'][0];\n $duration = $leg['duration']['text'];\n Yii::app()->cache->set($cacheKey, $duration, 60 * 60);\n return $duration;\n }\n }\n }", "public function getTravelTimeMinutes(): int;", "public function getRouteUpdateWaitTime()\n {\n return $this->route_update_wait_time;\n }", "public function getFinishTime();", "public function getElapsedTime()\n {\n if (!isset($this->unit)) $this->setUnit();\n return ($this->end * $this->unit) - ($this->start * $this->unit);\n }", "public function getUserRouteSpeed()\n {\n return $this->userRouteSpeed;\n }", "public function getTime(): int\n {\n return $this->time;\n }", "public function getTime(): int\n {\n return $this->time;\n }", "public function time(): float\n {\n return $this->calledEvent->time();\n }", "public function timer() {\n return self::getTime() - $this->startTime;\n }", "public function getTime()\n {\n $start_timex = explode(' ',$this->start_time);\n\n $end_timex = explode(' ',$this->end_time);\n\n if(sizeof($start_timex) != 2 || sizeof($end_timex) != 2)\n {\n return 0;\n }\n\n $seconds = $end_timex[1] - $start_timex[1];\n\n $miceroseconds = $end_timex[0] - $start_timex[0];\n\n $total = ($seconds + $end_timex[0]) - $start_timex[0];\n\n return round($total,3);\n }", "public function getTotalQueryTime()\n\t{\n\t\treturn $this->totalQueryTime;\t\n\t}", "public function getTotalElapsedSeconds(){ }", "public function getTimeTo()\n {\n return $this->timeTo;\n }", "public function get() {\n // stop timer if it is still running\n if($this->_running !== false) {\n trigger_error('Forcing timer to stop', E_USER_NOTICE);\n $this->stop();\n }\n\n list($s, $ms) = explode('.', $this->_elapsed);\n $time = '0.'.$ms;\n if($s != 0) {\n $m = (int)($s / 60);\n $time = $s.'.'.$ms;\n }\n if($m != 0) {\n $s -= $m * 60;\n $h = (int)($m / 60);\n $time = $m.':'.$s.'.'.$ms;\n }\n if($h != 0) {\n $m -= $h * 60;\n $time = $h.':'.$m.':'.$s.'.'.$ms;\n }\n\n return $time;\n }", "public function receivingTime(): float\n {\n if (0 < $this->starttransfer_time) {\n return $this->total_time - $this->starttransfer_time;\n }\n\n return 0.0;\n }", "public function getArriveTime()\n {\n return $this->arriveTime;\n }", "public function getTime() {\n $now = microtime(TRUE);\n $time = $now - $this->timerStart;\n return $time;\n }", "public function getTime() {\r\n\t\tif ( $this->mustCalculateTime ) {\r\n\t\t\t$this->calculateTime();\r\n\t\t}\r\n\t\treturn $this->time;\r\n\t}", "public function getEstimatedFlightTime()\n {\n return $this->_estimatedFlightTime;\n }", "public function getTime() {\n return $this->time;\n }", "public function getTime() {\n return $this->time;\n }", "public function getElapsedTime()\n {\n\n // Currently running - get up-to-date duration\n if ($this->_state == self::STOPWATCH_STATE_RUNNING && !empty($this->_start_time)) {\n $elapsed = microtime(true) - $this->_start_time;\n return $elapsed + $this->_elapsed_time;\n }\n\n return $this->_elapsed_time;\n }", "public function getRouteCosts()\n {\n return $this->route_costs;\n }", "public function timeRunning(){\r\n return (date('U') - $this->args['serverTime']);\r\n }", "public function getTurnaroundTime()\n\t{\n\t\t$startTime = new DateTime($this->time_started);\n\t\t$endTime = new DateTime($this->time_completed);\n\t\t$interval = $startTime->diff($endTime);\n\n\t\t$turnaroundTime = ($interval->days * 24 * 3600) + ($interval->h * 3600) + ($interval->i * 60) + ($interval->s);\n\t\treturn $turnaroundTime;\n\t}", "public function getATime(): int\n {\n return $this->decorated->getATime();\n }", "protected function getTimeToComplete() {\n\t\t\treturn $this->time_to_complete;\n\t\t}", "public function getTimeToFinish(): int;", "public function elapsed() {\n\t\tif (!$this->_start) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$elapsed = time() - $this->_start;\n\t\treturn $elapsed;\n\t}", "public function getElapsed()\n {\n return $this->_elapsed;\n }", "public function getTime() {\n\t\treturn $this->time;\n\t}", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTotalPracticetime() {\n\t\t\t\n\t\t$seconds = $this->getTotalPracticetimeInSeconds();\n\t\t$hours = floor($seconds / 3600);\n\t\t$minutes = floor(($seconds / 60) % 60);\n\t\t$seconds = $seconds % 60;\n\t\t\n\t\treturn sprintf(\"%2d hours and %2d:%02d min\", $hours, $minutes, $seconds);\n\t\t\n\t\t\t\t\n\t\t/*$t = microtime(true);\n\t\t$micro = sprintf(\"%06d\",($seconds) * 1000000); // TODO remove unused code\n\t\t$d = new \\DateTime( 'Y-m-d H:i:s.'.$micro ); \n\t\t\t\t\t\n\t\treturn $d->format(\"Y-m-d H:i:s.u\"); */\n\t}", "public function getSpentTime() {\n\t\treturn $this->time;\n\t}", "public function getDuration()\n {\n return $this->getElapsedTime();\n }", "public function getTimeNeeded()\n\t{\n\t\treturn $this->timeNeeded;\n\t}", "public function getTime()\n {\n return $this->time;\n }", "public function getTime(){\n\t\treturn($this->time);\n\t}", "public function getRouteDistance($rtid){\n return $this->routes[$rtid]->dist;\n }", "public function getAddSpeedTime()\n {\n $value = $this->get(self::ADD_SPEED_TIME);\n return $value === null ? (integer)$value : $value;\n }", "public function getTime()\n {\n return $this->_time;\n }", "public function getTime()\n {\n return $this->_time;\n }", "public function getTime()\n\t{\n return $this->time;\n\t}", "public function getAddTime()\n {\n return $this->add_time;\n }", "public function getAddTime()\n {\n return $this->add_time;\n }", "public function getRequestTime() {\n return $this->getInfo(CURLINFO_TOTAL_TIME);\n }", "public function getAccessTime() {\n $status = $this->getStat();\n return $status[8];\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTiming();", "function duration()\n\t{\n\t\t//Difference\n\t\t$startTime = strtotime($this->startTime);\n\t\t\n\t\tif(is_null($this->endTime))\n\t\t\t$endTime = time();\n\t\telse \n\t\t\t$endTime = strtotime($this->endTime);\n\t\t\n\t\t//Return the number of seconds\n\t\treturn $endTime - $startTime;\n\t}", "public function getFinishTime()\n {\n return $this->finish_time;\n }", "public function getResponseTime()\n {\n return $this->status[self::STATUS_REQUEST_TIME];\n }", "public function getTime(): float\n {\n return $this->duration;\n }", "public function outputTotalTime()\n {\n self::out(\"Total time : \".$this->totalTime.\" \".$this->textUnit.\" used\");\n }", "public function getTime()\n\t{\n\t\treturn $this->time;\n\t}", "public function getTime()\n\t{\n\t\treturn $this->time;\n\t}", "public function getTotalWorked() :int\n {\n $seconds = 0;\n foreach ($this->times as $time) {\n \n if ($time->start && $time->end) {\n $seconds += ($time->end - $time->start);\n }\n }\n\n return $seconds;\n }", "protected function getHitTime()\n\t\t{\n\t\t\treturn time() - $this->time;\n\t\t}", "public function getUserRouteDistance()\n {\n return $this->userRouteDistance;\n }", "function getTotalTime($task_id) {\n\t\tglobal $sql;\n\t\t$total_time = $sql->getOne(\"SELECT SUM(UNIX_TIMESTAMP(to_time)-UNIX_TIMESTAMP(from_time)) FROM Duration \"\n\t\t\t\t\t\t\t\t\t. \"WHERE task_id=$task_id AND to_time!='0000-00-00 00:00:00' GROUP BY task_id\");\n\t\treturn $total_time;\n\t}", "public function time()\n {\n return $this->httpRequest(\"v3/time\");\n }", "public function getTimeSpent()\n {\n $start = new Carbon($this->created_at);\n $end = new Carbon($this->finished_at);\n // return $start->diffForHumans($end);\n return $start->diffInHours($end) . ':' . $start->diff($end)->format('%I:%S');;\n }", "public function getElapsed()\n {\n return microtime(true) - $this->start;\n }", "function elapsedOverall(){\n $oaTime = $this->getMicroTime() - $this->initTime;\n return($oaTime);\n }", "public function getTotalExecutionTime()\n {\n return round($this->totalExecutionTime * 1000, 2);\n }", "public function getMoveTimeTo(){\n\t\treturn $this->_moveTimeTo;\n\t}", "public function getRequestTime(): float\n {\n return $this[$this::TIME] ?? 0.0;\n }", "public function getOverallTime():float;", "public function getTotalTimeMs(): int\n {\n return (int)round($this->getTotalTime() * 1000);\n }", "public function getGetTime()\n {\n $value = $this->get(self::GET_TIME);\n return $value === null ? (integer)$value : $value;\n }", "public function ExecutionTime()\n\t\t{\n\t\t\treturn $this->totaltime;\n\t\t}" ]
[ "0.7448094", "0.74213004", "0.7414481", "0.72786444", "0.72262895", "0.7184281", "0.7090729", "0.7007694", "0.7007397", "0.6927438", "0.6919316", "0.69157743", "0.6779001", "0.6757148", "0.6724403", "0.66339254", "0.6511829", "0.6510296", "0.6484311", "0.64688116", "0.6465382", "0.6450948", "0.6400838", "0.630837", "0.6275448", "0.6255525", "0.6242463", "0.6242463", "0.62261856", "0.6221647", "0.62200314", "0.6214858", "0.61964667", "0.61864465", "0.61602545", "0.6152541", "0.61443174", "0.61195123", "0.6116301", "0.61157703", "0.6108497", "0.6108497", "0.61067224", "0.61058587", "0.6104718", "0.61042017", "0.61021626", "0.6086878", "0.6084899", "0.60756487", "0.607257", "0.6070239", "0.6067061", "0.6067061", "0.6067061", "0.6067061", "0.6067061", "0.6067061", "0.6067061", "0.6067061", "0.6065678", "0.60650206", "0.60599965", "0.60588455", "0.6046968", "0.6042087", "0.6034774", "0.6032447", "0.6027576", "0.6027576", "0.60214484", "0.6018059", "0.6018059", "0.60042596", "0.6004228", "0.600332", "0.60031575", "0.60031265", "0.60004246", "0.5994654", "0.59883827", "0.59782153", "0.5967908", "0.5967908", "0.596741", "0.59661776", "0.5963161", "0.59584236", "0.59583706", "0.59563047", "0.5954291", "0.59425014", "0.5925464", "0.5925112", "0.5917891", "0.5912064", "0.59091115", "0.59024596", "0.59015095" ]
0.7610155
0
Test cache expire / duration
Тестирование истечения срока действия кэша / продолжительности
public function testCacheExpire() { $this->cache->set('test-expire', 'test-value', 2); # assert existing cache $this->assertTrue($this->cache->has('test-expire')); sleep(3); # assert for expire cache $this->assertFalse($this->cache->has('test-expire')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCachePageExpire()\n {\n \n //SiteAuditCheckCachePageExpire:\n \n //default: no expiration set\n $this->drush('audit:cache');\n $json = $this->getOutputFromJSON();\n $this->assertEquals('Expiration of cached pages not set!', $json['checks']['SiteAuditCheckCachePageExpire']['result']);\n \n //pass: drush config:set system.performance cache.page.max_age 1000\n $this->drush('config:set', ['system.performance', 'cache.page.max_age', 1000]);\n $this->drush('audit:cache');\n $json = $this->getOutputFromJSON();\n $this->assertEquals('Expiration of cached pages is set to 17 min.', $json['checks']['SiteAuditCheckCachePageExpire']['result']);\n\n //fail: drush config:set system.performance cache.page.max_age 0\n $this->drush('config:set', ['system.performance', 'cache.page.max_age', 100]);\n $this->drush('audit:cache');\n $json = $this->getOutputFromJSON();\n $this->assertEquals('Expiration of cached pages only set to 2 min.', $json['checks']['SiteAuditCheckCachePageExpire']['result']);\n\n // reset\n $this->drush('config:set', ['system.performance', 'cache.page.max_age', 100]);\n }", "public function testExpiration()\n {\n $value = microtime();\n $this->adapter->set('expiration_test', $value, time()-1);\n $this->assertFalse($this->adapter->get('expiration_test'));\n }", "public function testGetWithAnExpiredCacheId()\n {\n }", "public function testIsCacheValidExpired(): void\n {\n $domain = 'whatever.io';\n $filename = '0a35602901944a0c6d853da2a5364665c2bda0695120.jpg';\n mkdir(self::$cache . '/thumb/' . $domain, 0755, true);\n $cacheFile = self::$cache . '/thumb/' . $domain . '/' . $filename;\n touch($cacheFile, time() - ConfigManager::get('settings.cache_duration') - 1);\n\n $this->assertFalse(CacheManager::isCacheValid($cacheFile, $domain, CacheManager::TYPE_THUMB));\n }", "public function testWriteExpiryExpires() {\n\t\t$keys = ['key1' => 'data1'];\n\t\t$expiry = '+5 seconds';\n\t\t$this->XCache->write($keys, $expiry);\n\n\t\t$result = xcache_isset('key1');\n\t\t$this->assertTrue($result);\n\n\t\txcache_unset('key1');\n\t}", "public function testCacheTimeout()\n\t{\n\t\t/** @var Cache_Lite $cacheLiteInstance */\n\t\t$cacheLiteInstance = TestReflection::getValue('JCacheStorageCachelite', 'CacheLiteInstance');\n\t\t$cacheLiteInstance->_lifeTime = 0.1;\n\n\t\t// For parent class\n\t\t$this->handler->_lifetime = &$cacheLiteInstance->_lifeTime;\n\n\t\tparent::testCacheTimeout();\n\t}", "public function testValidTtl()\n {\n $pool = new RedisCachePool();\n $item = $pool->getItem('test');\n\n $dt = new \\DateTime();\n $dt->modify('+10 seconds');\n\n $item->set('value', $dt);\n $item->set('value', null);\n $item->set('value', 10);\n\n $this->assertEquals('value', $item->get());\n }", "public function testExpiration()\n {\n sleep(3);\n\n // Make sure we can't get the expired entry anymore\n $result = self::$sql->getValue('testtype', 'testkey1', 'testkey2');\n $this->assertNull($result);\n\n // Now add a second entry that never expires\n self::$sql->set('testtype', 'testkey1_nonexpiring', 'testkey2_nonexpiring', 'testvalue_nonexpiring', null);\n\n // Expire entries and verify that only the second one is still there\n self::$sql->removeExpired();\n $result = self::$sql->getValue('testtype', 'testkey1_nonexpiring', 'testkey2_nonexpiring');\n $this->assertEquals('testvalue_nonexpiring', $result);\n }", "public function testWriteExpiryTtl() {\n\t\t$keys = ['key1' => 'data1'];\n\t\t$expiry = 5;\n\t\t$this->XCache->write($keys, $expiry);\n\n\t\t$result = xcache_isset('key1');\n\t\t$this->assertTrue($result);\n\n\t\txcache_unset('key1');\n\n\t\t$keys = ['key1' => 'data1'];\n\t\t$expiry = 1;\n\t\t$this->XCache->write($keys, $expiry);\n\t}", "private function cacheExpired(){\n\t\t$path = $this->_cache_folder . $this->generateCacheName();\n\t\tif(file_exists($path)){\n\t\t\t$filetime = filemtime($path);\n\t\t\treturn $filetime < (time() - $this->_cache_ttl);\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public function testCanHandleLotsCache()\n {\n\n }", "public function testInvalidTtl()\n {\n $pool = new RedisCachePool();\n $item = $pool->getItem('test');\n\n $item->set('value', \"hiya!\");\n }", "public function getExpires();", "public function getExpires();", "private function cache_expired()\n\t{\n\t\tif( 0 === $this->last_run || $this->no_cache || $this->force_update_cache || !$this->data )\n\n\t\t\treturn true;\n\n\t\telse\n\n\t\t\treturn $this->time >= strtotime( \"+\" . $this->cache_age, $this->last_run );\n\t}", "protected function getCacheLifetime()\r\n {\r\n return 0;\r\n }", "public function testExpiresValue() : void {\n\t\t$this->assertEquals('Expires', HttpHeader::Expires->value);\n\t}", "public function testCache() {\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = new DateTime('+1 day', new DateTimeZone('UTC'));\n\t\t$response->expires('+1 day');\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y H:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => $time->format('D, j M Y H:i:s') . ' GMT',\n\t\t\t'Cache-Control' => 'public, max-age=' . ($time->format('U') - time())\n\t\t);\n\t\t$response->cache($since);\n\t\t$this->assertEquals($expected, $response->header());\n\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = '+5 day';\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y H:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => gmdate(\"D, j M Y H:i:s\", strtotime($time)) . \" GMT\",\n\t\t\t'Cache-Control' => 'public, max-age=' . (strtotime($time) - time())\n\t\t);\n\t\t$response->cache($since, $time);\n\t\t$this->assertEquals($expected, $response->header());\n\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = time();\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y H:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => gmdate(\"D, j M Y H:i:s\", $time) . \" GMT\",\n\t\t\t'Cache-Control' => 'public, max-age=0'\n\t\t);\n\t\t$response->cache($since, $time);\n\t\t$this->assertEquals($expected, $response->header());\n\t}", "public function testManually()\n {\n $this->cache->set('test-identifier', 'test-value', 120);\n \n # assert existing cache and equal value\n $this->assertEquals('test-value', $this->cache->get('test-identifier'));\n }", "public function getCacheTimeout();", "public function getCacheExpiry()\n {\n return $this->cache_expiry;\n }", "public function getExpire();", "public function getExpire();", "public function getExpire(): int;", "public function get_expiration() ;", "public function get_entry_expire_time();", "public function testCache() {\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = '+1 day';\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => gmdate(\"D, j M Y H:i:s\", strtotime($time)) . \" GMT\",\n\t\t\t'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()),\n\t\t\t'Pragma' => 'cache'\n\t\t);\n\t\t$response->cache($since);\n\t\t$this->assertEquals($response->header(), $expected);\n\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = '+5 day';\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => gmdate(\"D, j M Y H:i:s\", strtotime($time)) . \" GMT\",\n\t\t\t'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()),\n\t\t\t'Pragma' => 'cache'\n\t\t);\n\t\t$response->cache($since, $time);\n\t\t$this->assertEquals($response->header(), $expected);\n\n\t\t$response = new CakeResponse();\n\t\t$since = time();\n\t\t$time = time();\n\t\t$expected = array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Last-Modified' => gmdate(\"D, j M Y G:i:s \", $since) . 'GMT',\n\t\t\t'Expires' => gmdate(\"D, j M Y H:i:s\", $time) . \" GMT\",\n\t\t\t'Cache-Control' => 'public, max-age=0',\n\t\t\t'Pragma' => 'cache'\n\t\t);\n\t\t$response->cache($since, $time);\n\t\t$this->assertEquals($response->header(), $expected);\n\t}", "public function cacheLifeInSec() {\n return $cacheTimeSec = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitemenu.cache.lifetime', 7) * 86400;\n }", "function isCacheExpired($data){\n //Get current DateTime\n $currentDateTime = new DateTime();\n $currentDateTime->format(\"Y-m-d H:i:s\");\n //Get DateTime of cached data\n $cacheDateTime = new DateTime($data[\"DateTimeCached\"][\"date\"]) or die(\"There was an error with the date format of the cached data\");\n if(getMinuteDateDifference($cacheDateTime, $currentDateTime) < getCacheExpiryTime()){\n return FALSE;\n }\n return TRUE;\n}", "function testCache() {\n\t\t$this->assertTrue( is_numeric( self::$sf->ns_key ) );\n\t\t$old_ns = self::$sf->ns_key;\n\n\t\t// clear caches and check that key is increased\n\t\tself::$sf->clear_caches();\n\t\t$this->assertTrue( is_numeric( self::$sf->ns_key ) );\n\t\t$this->assertTrue( self::$sf->ns_key > $old_ns );\n\n\t\t// sf_d( self::$sf->ns_key );\n\n\t\t// check that cache stores and gets things correctly\n\t\t$key = 'simple_fields_unittest_' . self::$sf->ns_key . '_cache_test';\n\t\t$group = \"simple_fields\";\n\t\t$val = rand_str();\n\t\t$this->assertFalse( wp_cache_get( $key, $group), \"Cached value must not exist\" );\n\t\twp_cache_set($key , $val, $group );\n\t\t$cached_val = wp_cache_get( $key, $group);\n\t\t$this->assertEquals( $cached_val, $val, \"Value from cache must be same as orginal value\" );\n\n\t\t// clear caches again and make sure values not in cache anymore\n\t\tself::$sf->clear_caches();\n\t\t$cached_val = wp_cache_get( $key, $group);\n\t\t$this->assertNotEquals( $cached_val, $val, \"Value from cache must no be same as orginal value\" );\n\t\t$this->assertFalse( $cached_val , \"Cached value must not exist\" );\n\n\t }", "public function testClearCacheAllExpired()\r\n {\r\n file_put_contents($this->smarty->getCacheDir() . 'dummy.php', 'test');\r\n touch($this->smarty->getCacheDir() . 'dummy.php', time()-1000);\r\n $this->assertEquals(1, $this->smarty->clearAllCache(500));\r\n }", "public function testCache(): void\n {\n $cachepool = CachePool::getInstance();\n $cacheitem = $cachepool->getItem('foo');\n $cacheitem->set('bar');\n $this->assertEquals(\n 'bar',\n $cacheitem->get()\n );\n }", "public function testCacheDelete()\n {\n Cache::forget(self::$cacheKey);\n\n $this->assertFalse(Cache::has(self::$cacheKey), 'Cache does not have key any more');\n }", "public function getCacheExpiresTime($type) {\n return 50;\n }", "public function getExpires() {\n return \\strtotime($this->date_expires) > \\time();\n }", "private static function IsCacheExpired($cache)\n {\n if (is_null($cache))\n return true;\n\n $refreshTime = 10; //PackageTrackerConfig::Get(PackageTrackerConfig::CACHE_TIME);\n\n if (strtotime($cache['time']) < strtotime(\"-\".$refreshTime.\" minutes\"))\n {\n return true;\n }\n\n return false;\n }", "public function getExpiration() {}", "public function getCacheMaxAge() {\n return 0;\n }", "public function getCacheMaxAge() {\n return 0;\n }", "private function getTtl(): int\n {\n return $this->cacheTtl * 60;\n }", "public function getFeedCacheExpiry()\n {\n $cache = $this->getCacheFactory();\n $metadata = $cache->getMetadatas($this->ID);\n if ($metadata && isset($metadata['expire'])) {\n return $metadata['expire'];\n }\n\n return false;\n }", "public function testGetCache()\n {\n // Remove the following lines when you implement this test.\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "public function getSessionExpires();", "public function testClearCacheAllNotExpired()\r\n {\r\n file_put_contents($this->smarty->getCacheDir() . 'dummy.php', 'test');\r\n touch($this->smarty->getCacheDir() . 'dummy.php', time()-1000);\r\n $this->assertEquals(0, $this->smarty->clearAllCache(2000));\r\n }", "public static function time_get($cache_key){\n\n }", "function cache_url($url, $duration = 3600, $skip_cache = FALSE) {\n\t// settings\n\t$cachetime = $duration;\n\t$where = \"cache\";\n\tif ( ! is_dir($where)) {\n\t\tmkdir($where);\n\t}\n\t\n\t$hash = md5($url);\n\t$file = \"$where/$hash.cache\";\n\t\n\t// check the file\n\t$mtime = 0;\n\tif (file_exists($file)) {\n\t\t$mtime = filemtime($file);\n\t}\n\t$filetimemod = $mtime + $cachetime;\n\t\n\t// if the renewal date is smaller than now, return true; else false (no need for update)\n\tif ($filetimemod < time() OR $skip_cache) {\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_HEADER => FALSE,\n\t\t\tCURLOPT_RETURNTRANSFER => TRUE,\n\t\t\tCURLOPT_USERAGENT => \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0\",\n\t\t\tCURLOPT_FOLLOWLOCATION => TRUE,\n\t\t\tCURLOPT_MAXREDIRS => 5,\n\t\t\tCURLOPT_CONNECTTIMEOUT => 15,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t));\n\t\t$data = curl_exec($ch);\n\n\t\t$returnCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\tif($returnCode !== 200) {\n\t\t\t$data = \"Error: [(\" . $returnCode . \") \" . curl_error($ch) . \"]\";\n\t\t} else {\n\t\t\t// save the file if there's data\n\t\t\tif ($data AND ! $skip_cache) {\n\t\t\t\tfile_put_contents($file, $data);\n\t\t\t}\n\t\t}\n\n\t\tcurl_close($ch);\n\t\t\n\t\t// want to track the return code as well as live or cache\n\t\t$result['code'] = $returnCode;\n\t\t$result['source'] = Sources::LIVE;\n\t} else {\n\t\t$data = file_get_contents($file);\n\t\t$result['code'] = 200;\n\t\t$result['source'] = Sources::CACHE;\n\t}\n\t$result['content'] = $data;\n\t\n\treturn $result;\n}", "public function testExpires() {\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$now = new DateTime('now', new DateTimeZone('America/Los_Angeles'));\n\t\t$response->expires($now);\n\t\t$now->setTimeZone(new DateTimeZone('UTC'));\n\t\t$this->assertEquals($now->format('D, j M Y H:i:s') . ' GMT', $response->expires());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Expires', $now->format('D, j M Y H:i:s') . ' GMT');\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$now = time();\n\t\t$response->expires($now);\n\t\t$this->assertEquals(gmdate('D, j M Y H:i:s', $now) . ' GMT', $response->expires());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Expires', gmdate('D, j M Y H:i:s', $now) . ' GMT');\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$time = new DateTime('+1 day', new DateTimeZone('UTC'));\n\t\t$response->expires('+1 day');\n\t\t$this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->expires());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Expires', $time->format('D, j M Y H:i:s') . ' GMT');\n\t\t$response->send();\n\t}", "public function isExpired(stubCacheContainer $container, $key);", "public function getExpires()\n {\n return $this->_modified + $this->_lifespan;\n }", "public function testCacheHasVaue()\n {\n $retrievedKey = Cache::get(self::$cacheKey);\n\n $this->assertEquals(self::$cacheValue, $retrievedKey, 'Cache has correct value for key');\n }", "public function getCacheMaxAge() {\n return 24 * 60 * 60; // set to 24 hours\n }", "public function getCacheMaxAge() {\n return 0;\n }", "public function getCacheMaxAge() {\n return 0;\n }", "public function getCacheMaxAge() {\r\n return 0;\r\n }", "public function testDestroyCache()\n {\n $c = new Cache('test', $this->lifetime, 'tests/cache');\n $this->assertTrue($c->destroy());\n $this->assertFalse($c->destroy());\n }", "public function getExpiresAt();", "public function setExpires($expires);", "protected function setExpiredCacheItem() {\n cache_set($this->thingy, $this->thingy, $this->bin, (time() - 24*60*60));\n }", "public static function can_expire() {\n return TRUE;\n }", "public function testCacheOutput()\n {\n $c = new Cache('test', $this->lifetime, 'tests/cache');\n \n // Start output buffering\n ob_start();\n\n if (!$c->start()) {\n echo time(); \n $c->end();\n }\n\n // Stop output buffering\n $output = ob_get_clean();\n\n $this->assertEquals(time(), $output);\n\n sleep(2);\n }", "protected function cache_expiration() {\n\t\t/**\n\t\t * Number of seconds to cache plugin upgrade messages for.\n\t\t *\n\t\t * Defaults to one day, which provides a decent balance between efficiency savings\n\t\t * and allowing for the possibility that some upgrade messages may be changed or\n\t\t * rescinded.\n\t\t *\n\t\t * @var int $cache_expiration\n\t\t */\n\t\treturn (int) apply_filters( 'tribe_plugin_upgrade_notice_expiration', DAY_IN_SECONDS, $this->plugin_path );\n\t}", "public function testIsCacheValidInfiniteExistingOneYear(): void\n {\n $domain = 'whatever.io';\n $filename = '0a35602901944a0c6d853da2a5364665c2bda06951200.jpg';\n mkdir(self::$cache . '/thumb/' . $domain, 0755, true);\n $cacheFile = self::$cache . '/thumb/' . $domain . '/' . $filename;\n touch($cacheFile, time() - 3600 * 24 * 31 * 12);\n\n ConfigManager::addFile('tests/resources/settings-infinite-cache.json');\n $this->assertTrue(CacheManager::isCacheValid($cacheFile, $domain, CacheManager::TYPE_THUMB));\n }", "public function testHasCache() {\n $this->assertTrue($this->object->hasCache('key'));\n $this->assertFalse($this->object->hasCache('foo'));\n }", "public static function expire(){\n return time() + (60 * 60 * 24 * 3);}", "public function getCacheLifeTime()\n {\n return $this->cacheLifeTime;\n }", "public function hasExpiretime(){\n return $this->_has(6);\n }", "public function testDuration($ttl, $expected): void\n {\n $engine = new TestAppCacheEngine();\n $engine->setConfig(['duration' => 10]);\n\n $result = $engine->getDuration($ttl);\n\n $this->assertSame($result, $expected);\n }", "function getCacheDuration() {\n $cache = $this->config->get('cache_duration');\n if(!$cache) {\n $cache = 1;\n }\n $data = array(\n 1 => '1 hour',\n 2 => '3 hours',\n 3 => '12 hours',\n 4 => '1 day',\n 5 => '3 days',\n );\n return strtotime(\"+\" . $data[$cache]);\n }", "function getExpiresAt();", "function getExpiresAt();", "private function expireTime()\n {\n return time() + Config::get('jwt.expiry'); // in seconds\n }", "public function hasExpiration(){\n return $this->_has(5);\n }", "public function expire()\n {\n }", "public function isExpired() {}", "public function testCacheIsRead()\n {\n $result = ManagedCache::get($this->data['key']);\n\n $this->assertEquals($this->data['value'], $result);\n }", "public function getExpires(): int\n {\n return $this->expires;\n }", "public function getExpires(): int\n {\n return $this->expires;\n }", "public function testGetValueAfterExpiration($path_file_temp)\n {\n $db = new \\KEINOS\\KVSQLite3\\KVSQLite3($path_file_temp);\n\n $ttl = 3;\n $value = 'bar';\n $key = 'foo';\n $db->set($key, $value, $ttl); // Should expire after $ttl seconds\n\n sleep($ttl + 1); // Let it expire\n\n $expect = 'default dummy value' . hash('md5', strval(microtime()));\n $actual = $db->get($key, $expect);\n $msg_error = 'If the key does not exist then it should return the default value argument.';\n $this->assertSame($expect, $actual, $msg_error);\n }", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function expiresAfter($time): CacheItemInterface;", "function super_session_cache_expire() {\n\t$super_session = SUPER_WP_Session::get_instance();\n\n\treturn $super_session->cache_expiration();\n}", "public function getExpiration() {\n return $this->configFactory->get('elasticsearch_helper_preview.settings')->get('expire');\n }", "public function getCacheLifetime()\n {\n return $this->cache_lifetime;\n }", "public function expiring()\n {\n return $this->refresh < time() && $this->expires > time();\n }", "public function getExpirationTime( );", "public function isExpired(): bool\n {\n return isset($this->ttl, $this->exp) && $this->exp < now()->timestamp;\n }", "private function check_cache() {\n if(file_exists($this->filename)) {\n if(filemtime($this->filename) > time() - $this->cache_time * 24 * 60 * 60) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function getExpires()\n {\n return $this->expires;\n }", "public function getExpires()\n {\n return $this->expires;\n }", "public function getExpires()\n {\n return $this->expires;\n }", "public function is_expired() { return; }", "public function isExpired()\n {\n return ($this->expire ?: static::$cacheExpire) ? $this->storage->isExpired($this->UID) : true;\n }", "public function testGetCache() {\n $this->assertEquals('value', $this->object->getCache('key'));\n $this->assertEquals(null, $this->object->getCache('foo'));\n\n $this->object->setCache('foo', 'bar');\n $this->assertEquals('bar', $this->object->getCache('foo'));\n\n $this->object->toggleCache(false);\n $this->assertEquals(null, $this->object->getCache('foo'));\n\n $this->object->toggleCache(true);\n $this->assertEquals([\n 'key' => 'value',\n 'foo' => 'bar'\n ], $this->object->allCache());\n }", "private function should_expire() {\n\t\t\treturn $this->transient_object->expiration;\n\t\t}", "function expire($key)\n {\n return true;\n }", "public function is_expired()\n {\n }" ]
[ "0.7619506", "0.7564585", "0.7500123", "0.7477303", "0.726132", "0.71512413", "0.7092052", "0.7091983", "0.7081149", "0.70594704", "0.7055793", "0.7038809", "0.6944846", "0.6944846", "0.69361544", "0.6916545", "0.684411", "0.683898", "0.68304616", "0.6826825", "0.68051463", "0.67431915", "0.67431915", "0.67119527", "0.6695534", "0.6679002", "0.6663137", "0.66526765", "0.66363394", "0.6620509", "0.66079915", "0.6603581", "0.6599083", "0.65925395", "0.6590662", "0.656832", "0.6516972", "0.6509383", "0.6509383", "0.64969736", "0.64823204", "0.64806455", "0.6463833", "0.6458821", "0.6456358", "0.6454302", "0.64452296", "0.6437783", "0.64357334", "0.6435245", "0.64102244", "0.6409483", "0.6409483", "0.6408238", "0.6399386", "0.63901675", "0.6374396", "0.63726", "0.636892", "0.6365217", "0.63644886", "0.6354248", "0.6354111", "0.6342675", "0.6339615", "0.6335968", "0.6325875", "0.6324106", "0.63039476", "0.63039476", "0.6288208", "0.6285678", "0.62852377", "0.6274359", "0.62720823", "0.62696934", "0.62696934", "0.6253123", "0.62520146", "0.62520146", "0.62520146", "0.62520146", "0.62520146", "0.6235072", "0.62188077", "0.6215856", "0.62144434", "0.6208357", "0.62026894", "0.61967194", "0.61790216", "0.6171286", "0.6171286", "0.6171286", "0.61668044", "0.6160116", "0.6156947", "0.61555856", "0.61511284", "0.61511123" ]
0.854116
0
Return Crud form object.
Вернуть объект формы Crud.
abstract protected function getCrudForm();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form()\n {\n return $this->scaffoldForm();\n }", "private function createFormCuestionario()\n {\n $form = $this->createFormBuilder()\n ->getForm();\n \n return $form;\n }", "private function createFormCuestionario()\n {\n $form = $this->createFormBuilder()\n ->getForm();\n \n return $form;\n }", "public function form()\n {\n return Factory::create('model');\n }", "function &getForm()\r\n {\r\n if (is_null( $this->_oForm )) {\r\n $this->_oForm =& JModel::getInstance( 'Form', 'FabrikModel' );\r\n $table =& $this->getTable();\r\n $this->_oForm->setId( $table->form_id );\r\n $this->_oForm->getForm();\r\n $this->_oForm->setTableModel( $this );\r\n //ensure joins are loaded\r\n }\r\n return $this->_oForm;\r\n }", "protected function form()\n {\n $form = new Form(new Good);\n $form->select('type','分类')->options(GoodType::all()->pluck('name','id'));\n $form->text('name', '名称');\n $form->text('number', '款号');\n $form->image('img', '图片')->uniqueName()->move('home')->removable();\n $form->multipleImage('images', '多图')->uniqueName()->move('home')->removable();\n $form->switch('state', '状态')->states(Good::STATE_SWITCH)->default(Good::STATE_ON);\n $form->textarea('details', '简介');\n\n return $form;\n }", "protected function getForm(): Form\n { \n return $this->getField()->forms()->create([$this->getField(), $this->getFields(), $this->getFormAction()]);\n }", "public function getForm(): Form\n {\n return $this->form;\n }", "public function getForm(): Form\n {\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Careers());\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new UserModel);\n\n $form->text('openid', 'Openid');\n $form->text('nickname', 'Nickname');\n $form->text('city', 'City');\n $form->text('province', 'Province');\n $form->text('country', 'Country');\n $form->text('headimgurl', 'Headimgurl');\n $form->number('subscribe_time', 'Subscribe time');\n $form->number('sex', 'Sex');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Identity);\n $form->text('name', 'Name');\n $form->text('jobs', 'Jobs');\n $form->textarea('description', 'Description')->rows(5);\n $form->date('birth_date', 'Birth Date');\n $form->mobile('phone_number', 'Phone Number')->options(['mask' => '9999 9999 99999']);\n $form->email('email', 'Email');\n $form->textarea('address', 'Address')->rows(3);\n $form->url('facebook', 'Facebook');\n $form->url('twitter', 'Twitter');\n $form->url('linkedin', 'LinkedIn');\n $form->image('picture_path', 'Picture')->move('/images')->uniqueName();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new AppUser);\n\n $form->text('name', 'Name');\n $form->mobile('phone', 'Phone');\n $form->password('password', 'Password');\n $form->text('unionid', 'Unionid');\n $form->text('position', 'Position');\n $form->textarea('position_text', 'Position text');\n $form->textarea('avatar_url', 'Avatar url');\n $form->switch('home_sum', 'Home sum');\n $form->datetime('last_at', 'Last at')->default(date('Y-m-d H:i:s'));\n $form->switch('is_del', 'Is del');\n $form->switch('member_type', 'Member type');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CaseOrder());\n\n $form->number('user_id', __('User id'));\n $form->number('case_id', __('Case id'));\n $form->textarea('case_info', __('Case info'));\n $form->decimal('prepay_price', __('Prepay price'));\n $form->text('area', __('Area'));\n $form->text('room', __('Room'));\n $form->text('city_code', __('City code'));\n $form->mobile('phone', __('Phone'));\n $form->text('name', __('Name'));\n $form->number('status', __('Status'));\n $form->text('pay_type', __('Pay type'));\n $form->text('out_trade_no', __('Out trade no'));\n $form->text('prepay_id', __('Prepay id'));\n return $form;\n }", "protected function getForm()\n\t{\n\t\t$form = parent::getForm();\n\t\t$form->populateInputs();\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new TestsRecord);\n\n $form->number('home_id', 'Home id');\n $form->text('area', 'Area');\n $form->text('result', 'Result');\n $form->number('disease_item_id', 'Disease item id');\n $form->textarea('picture_path', 'Picture path');\n $form->textarea('picture_record', 'Picture record');\n $form->text('algo_version', 'Algo version');\n $form->text('positionData', 'PositionData');\n $form->text('code', 'Code');\n $form->text('model', 'Model');\n $form->switch('come', 'Come');\n $form->switch('app', 'App');\n $form->switch('state', 'State');\n $form->switch('is_import', 'Is import');\n $form->datetime('create_at', 'Create at')->default(date('Y-m-d H:i:s'));\n $form->datetime('update_at', 'Update at')->default(date('Y-m-d H:i:s'));\n $form->switch('is_del', 'Is del');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order());\n\n return $form;\n }", "public function getForm()\n {\n return new PersonalForm;\n }", "protected function form()\n {\n $form = new Form(new WxUserModel);\n\n $form->number('uid', 'Uid');\n $form->text('openid', 'Openid');\n $form->number('add_time', 'Add time');\n $form->text('nickname', 'Nickname');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->number('subscribe_time', 'Subscribe time');\n $form->text('unionid', 'Unionid');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Profile());\n\n $form->select('user_id', __('User Id'))->options(User::all()->pluck('name', 'id'))->required();\n $form->text('company_name', __('Company name'))->required();\n $form->text('bin', __('Bin'));\n $form->text('address', __('Address'))->required();\n $form->text('phone_number', __('Phone number'))->required();\n $form->text('website', __('Website'));\n $form->textarea('description', __('Description'));\n $form->text('company_logo', __('Company logo'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->text('goods_name', 'Goods name');\n $form->number('goods_price', 'Goods price');\n $form->number('goods_status', 'Goods status');\n $form->number('is_up', 'Is up');\n $form->number('goods_srcoe', 'Goods srcoe');\n $form->number('num', 'Num');\n $form->number('utime', 'Utime');\n $form->image('img_url');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Record());\n if ($form->isCreating()) { // 新增记录时,只使用空房间\n // 在住的房间id\n $isLivingRoomIds = Record::where('is_living', true)->pluck('room_id')->toArray();\n // 所有可以用的空房间\n $roomMapper = Room::where('is_using', true)\n ->whereNotIn('id', $isLivingRoomIds)\n ->pluck('title', 'id');\n } else { // isEditing\n $roomMapper = Room::where('is_using', true)->pluck('title', 'id');\n }\n\n // 存在租期的类型id\n $categoryIdsWithLease = Category::where('has_lease', true)->pluck('id')->toArray();\n\n $form->select('company_id', '公司名称')\n ->options(Company::pluck('company_name', 'id'))\n ->rules('required', [\n 'required' => '必须选择',\n ]);\n $form->select('room_id', '房间号')\n ->options($roomMapper)\n ->rules('required', [\n 'required' => '必须选择',\n ]);\n $form->select('category_id', '所属类型')\n ->options(Category::pluck('title', 'id'))\n ->when($categoryIdsWithLease, function (Form $form) {\n $form->date('lease_start', '租期开始日')\n ->default(null)\n ->rules('required', ['required' => '必须填写']);\n $form->date('lease_end', '租期结束日')\n ->default(null)\n ->rules('required', ['required' => '必须填写']);\n })\n ->rules('required', [\n 'required' => '必须选择',\n ]);\n $form->radio('gender', '性别')\n ->options(['男' => '男&nbsp;&nbsp;&nbsp;', '女' => '女'])\n ->default('男')\n ->rules('required', [\n 'required' => '必须选择',\n ]);\n $form->decimal('deposit_money', '押金')->rules('required', ['required' => '必须填写']);\n $form->decimal('rent', '月租金')->rules('required', ['required' => '必须填写']);\n $form->date('entered_at', '入住时间')\n ->default(date('Y-m-d'))\n ->rules('required', ['required' => '必须填写']);\n\n $form->number('electric_start_base', '入住时电表底数');\n $form->number('water_start_base', '入住时水表底数');\n $form->date('quitted_at', '退房时间');\n $form->number('electric_end_base', '退房时电表底数');\n $form->number('water_end_base', '退房时水表底数');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goods);\n\n $form->select('type', '产品分类')->options('/tenancy/getCateList');\n $form->text('title', '标题');\n// $form->decimal('gys_price', 'Gys price');\n $form->text('image', 'Image');\n $form->select('gys_id', 'Gys id')->options('/tenancy/getGysList');\n $form->radio('is_pass', 'Is pass')->options([0=>'审核中',1=>'审核通过']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WalletRecord);\n\n $form->display('ID');\n $form->text('user_id', 'user_id');\n $form->text('wallet_id', 'wallet_id');\n $form->text('amount', 'amount');\n $form->text('type_id', 'type_id');\n $form->text('change', 'change');\n $form->text('desc', 'desc');\n $form->text('remark', 'remark');\n $form->text('expand_data', 'expand_data');\n $form->display(trans('admin.created_at'));\n $form->display(trans('admin.updated_at'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Check());\n $form->belongsTo('contract_id', SelectContract::class,'Chọn hợp đồng');\n $form->text('month', __('Tháng'))->default(4);\n $form->table('description', function ($table) {\n $table->select('pt', __('Pt'))->options(AuthUser::all()->pluck('name', 'id'));\n $table->number('count');\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Comment);\n\n $form->number('user_id', '用户身份');\n $form->simplemde('body', '内容');\n $form->number('commentable_id', 'Commentable id');\n $form->text('commentable_type', 'Commentable type');\n $form->number('parent_id', 'Parent id');\n $form->number('level', 'Level')->default(1);\n $form->text('is_hidden', 'Is hidden')->default('F');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new AppUser);\n\n $form->display('id', '编号');\n $form->display('nickname', '昵称');\n $form->display('phone', '手机号');\n $form->display('skill', '技能');\n $form->display('address', '地址');\n $form->display('introduce', '自我介绍');\n $form->display('winbidnum', '项目完成数量');\n $form->display('time', '注册时间');\n $form->text('bail','保证金')->rules('numeric');\n $form->switch('plattuijian','季度推荐');\n $form->switch('quartertuijian','平台推荐');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n });\n\n $form->footer(function ($footer) {\n // 去掉`重置`按钮\n $footer->disableReset();\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n\n return $form;\n }", "public function getObjectForm() : \\Dms\\Core\\Form\\IForm;", "protected function form()\n {\n $form = new Form(new StockRecord());\n\n $form->number('contract_id', __('Contract id'));\r\n $form->textarea('Encore\\Admin\\Auth\\Database\\Administrator', __('Encore\\Admin\\Auth\\Database\\Administrator'));\r\n $form->textarea('fuel_type', __('Fuel type'));\r\n $form->textarea('title', __('Title'));\r\n $form->textarea('source_type', __('Source type'));\r\n $form->textarea('quantity', __('Quantity'));\r\n $form->switch('is_add_stock', __('Is add stock'));\r\n $form->number('from_tank_id', __('From tank id'));\r\n $form->number('to_tank_id', __('To tank id'));\r\n $form->textarea('details', __('Details'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Company);\n\n $form->text('mission', __('Mission'));\n $form->text('desired_person', __('Desired person'));\n $form->text('name', __('Name'));\n $form->textarea('desc', __('Desc'));\n $form->text('address', __('Address'));\n $form->number('member_count', __('Member count'))->default(0);\n $form->text('established_at', __('Established at'));\n $form->text('founder', __('Founder'));\n $form->text('hp_url', __('Hp url'));\n $form->text('fb_url', __('Fb url'));\n $form->text('tw_url', __('Tw url'));\n $form->switch('pickup_flag', __('Pickup flag'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Tool);\n\n// $form->number('category_id', 'Category id');\n $form->text('title', '名称');\n // 创建一个选择图片的框\n $form->image('icon', '图片')->move('books/'.date(\"Ym/d\", time()))->uniqueName();\n\n // 添加一个类目字段,与之前类目管理类似,使用 Ajax 的方式来搜索添加\n $form->select('category_id', '类目')->options(function ($id) {\n $category = Category::find($id);\n if ($category) {\n return [$category->id => $category->full_name];\n }\n })->ajax('/'.config('admin.route.prefix').'/api/categories?is_directory=0');\n\n $form->text('url', '超链接');\n// $form->text('icon', '图标');\n $form->textarea('description', '描述');\n $form->number('click_count', '点击率');\n $form->radio('is_show', '是否显示')->options(['1' => 'YES', '0'=> 'NO'])->default('1');\n $form->radio('is_recommend', '是否推荐')->options(['1' => 'YES', '0'=> 'NO'])->default('1');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('title', '分类标题');\n $form->number('parent_id', '上层栏目');\n $form->number('order', '排序');\n $form->icon('icon', trans('admin.icon'))->rules('nullable')\n ->default('fa-bars')\n ->rules('required')->help($this->iconHelp());\n $form->text('udid', '唯一标识');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Enseignant);\n\n $form->display('id','ID');\n $form->text('nom','NOM')->rules('required');\n $form->select('grade','GRADE')->options(Grade::all()->pluck('nom', 'id'))->default(1)->rules('required');\n \n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Recruit());\n\n $form->text('name', __('Name'));\n $form->text('address', __('Address'));\n $form->text('phone', __('Phone'));\n $form->select('recruitoment_id', __('Recruitoment'))->options(\\App\\Models\\Recruitoment::all()->pluck('name', 'id'));\n $form->text('workplace', __('Workplace'));\n $form->text('salary', __('Salary'));\n $form->text('note', __('Note'));\n $form->image('img_path', __('Img path'));->move('recruit_image')->uniqueName();\n $form->text('latitude', __('Latitude'));\n $form->text('longitude', __('Longitude'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WorkRecordModel);\n\n $form->display('id', 'ID');\n\n $form->text('title', 'Title');\n $form->editor('content', 'Content');\n\n// $form->datetime('start_time','Start time');\n// $form->datetime('end_time','End time');\n\n $form->datetimeRange('start_time', 'end_time', '有效期');\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Listing());\n $categoryService = new CategoryService();\n\n $form->display('id', __('ID'));\n $form->text('name', __('Name'))->rules('required');\n $form->number('price', __('Price'))->default(0)->rules('required');\n $form->number('rate')->default(5);\n $form->select('color')->options([\"black\", \"white\", \"red\", \"green\", \"yellow\"])->rules('required');\n $form->switch('visible')->default('1');\n $form->select('categories_id', __('Category'))->options($categoryService->getAvailableAsArray())->rules('required');\n $form->textarea('description', __('Desciption'));\n $form->image('picture_1')->uniqueName();\n $form->image('picture_2')->uniqueName();\n $form->image('picture_3')->uniqueName();\n $form->image('picture_4')->uniqueName();\n $form->display('created_at', __('Created At'));\n $form->display('updated_at', __('Updated At'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n\n //$form->display('id', 'ID');\n $form->select('ad_type', '广告类型')->options(\n [\n '1' => '首页滚动图',\n '2' => '首页3张小图',\n '3' => '右边滚动小图',\n '4' => '首页设计大师',\n '5' => '首页知名设计师',\n '6' => '文章详情页面3个小图',\n '8' => '首页右下小图',\n ]\n );\n $form->text('ad_title', '标题');\n $form->text('ad_url', '跳转地址');\n $form->image('ad_img', '图片')->uniqueName()->move('/public/photo/images/popularize');\n $form->radio('display', '是否启用')->options(['0' => '启用', '-1'=> '隐藏'])->default('0');\n\n $form->text('sort', '排序')->default('0');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new KiotVietInvoiceDetail());\n\n\n $form->select('opsStatus', __('Status'))->options(InvoiceEnum::getStatus());\n $form->select('opsShipper', __('Shipper'))->options(User::query()->pluck('name', 'id')->toArray());\n $form->multipleImage('opsImages', __('Images'));\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LegalBook);\n\n $options = LegalBookSection::where('status', LegalBookSection::NORMAL)->pluck('title', 'id')->toArray();\n $form->select('section_id', trans('admin.section_title'))->options($options)->required();\n $form->editor('detail', trans('admin.detail'));\n\n return $form;\n }", "public function getForm(){\n return $this->form;\n }", "public function getForm()\n {\n if (is_null($this->_form)) {\n $this->_form = new Form(\"scaffold\", $this->getDescriptor());\n }\n return $this->_form;\n }", "protected function form()\n {\n $form = new Form(new CircleAccounts());\n\n $form->select('type', '账号类型')->options(CircleAccounts::$type)->required();\n $form->text('nickname', '账号昵称')->required();\n $form->image('avatar', '头像')->uniqueName()->required();\n $form->radio('status', '状态')->options([0 => '保存', '1'=> '发布'])->default(0)->required();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Reward());\n\n $form->hidden('admin_id', __('Admin id'));\n $form->text('title', 'Judul');\n $form->image('cover_image_url', 'Gambar Cover');\n $form->textarea('description', 'Deskripsi');\n $form->file('file_url', 'File Ebook');\n $form->switch('is_published', 'Tampilkan');\n\n $form->saving(function (Form $form) {\n if ($form->admin_id === null && $form->user_id === null) {\n $form->admin_id = Admin::user()->id;\n }\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new PaperCategory);\n $form->hidden('customer_school_id')->default($this->customer_school_id());\n\n $form->text('name', __('admin.name'));\n $form->number('sort_order', __('admin.order'))->default(50);\n\n\n $form->disableViewCheck()->disableEditingCheck()->disableCreatingCheck();\n $form->tools(function(Form\\Tools $tools){\n $tools->disableView()->disableDelete();//->disableList();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new SiteCategory);\n\n $form->select('parent_id', '父级')->options(SiteCategory::selectOptions())->rules('required');\n $form->text('title', '标题')->rules('required|max:50')->placeholder('不得超过50个字符');\n $form->icon('icon', '图标')->default('fa-star-o')->rules('required|max:20');\n\n $this->disableFormFooter($form);\n return $form;\n }", "public function getForm()\n {\n return $this->factory->createForm(array(\n 'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',\n 'elements' => $this->elements(),\n 'input_filter' => $this->filter()\n ));\n }", "public function getForm()\n {\n return $this->factory->createForm(array(\n 'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',\n 'elements' => $this->elements(),\n 'input_filter' => $this->filter()\n ));\n }", "public function getForm()\n {\n return $this->factory->createForm(array(\n 'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',\n 'elements' => $this->elements(),\n 'input_filter' => $this->filter()\n ));\n }", "protected function form()\n {\n $form = new Form(new Cars());\n\n $form->text('title', __('Titulo'))->disable();\n $form->image('image',__('Imagen'))->disable();\n $form->select('status',\"Status\")->options([1 => \"Publicada\", 2 => \"Borrador\"])->default(1);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new OrderModel);\n\n $form->number('order_id', __('Order id'));\n $form->text('order_no', __('Order no'));\n $form->number('user_id', __('User id'));\n $form->number('bus_id', __('Bus id'));\n $form->decimal('order_amount', __('Order amount'));\n $form->switch('pay_status', __('Pay status'))->default(1);\n $form->switch('order_status', __('Order status'))->default(1);\n $form->number('create_time', __('Create time'));\n $form->switch('status', __('Status'));\n $form->number('pay_time', __('Pay time'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Doctor());\n\n $form->select('parent_id', trans('所属分类'))->options(Doctor::selectOptions());\n $form->text('title', __('医生名字'))->autofocus();\n $form->text('intro', __('医生简介'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n $form->text('username', '用户名');\n $form->text('nickname', '昵称');\n $form->text('password', '修改密码')->placeholder('如果需要修改密码请输入');\n $form->text('mobile', '手机');\n $form->radio('sex', '性别')->options(['0' => '保密', '1' => '男', '2' => '女'])->default('0');\n $form->text('city', '城市');\n $form->text('url', '个人主页');\n $form->text('personal_note', '个人说明');\n $form->select('level', '会员种类')->options(\n [\n '0' => '普通会员',\n '1' => '月会员',\n '2' => '季会员',\n '3' => '年会员',\n '4' => '特邀作者',\n '5' => '公司会员',\n ]\n );\n $form->datetime('expire_time', '到期时间');\n $form->number('points', '积分');\n\n //保存前回调\n $form->saving(function (Form $form) {\n if ($form->password) {\n $form->password = bcrypt($form->password);\n } else {\n $form->password = $form->model()->password;\n }\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ActiveGoods);\n\n $form->image('img', __('奖品图片'));\n $form->text('name', __('奖品名称'));\n $form->hidden('type', __('type'))->default(2);\n $form->decimal('probability', __('中奖几率'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User);\n\n $form->email('email', 'Email');\n $form->password('password', 'كلمة المرور');\n $form->text('name', 'الإسم');\n $form->text('mobile', 'رقم الهاتف')->rules('required');\n $form->number('max', 'الحد الأقصي');\n $form->switch('status', 'Status')->default(-1);\n $form->image('avatar', 'Avatar');\n $form->switch('notify', 'Notify')->default(1);\n $form->switch('blacklist', 'Blacklist');\n $form->switch('verified', 'موثق');\n\n return $form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "protected function form() {\n $form = new Form(app(\"\\App\\Models\\MockBrand\"));\n $form->display('id', 'ID');\n $form->text('name', \"名字\");\n $directors = [\n 1 => '开启',\n 0 => '关闭',\n ];\n $form->select('status', '开关')->options($directors);\n return $form;\n }", "protected function form() {\n\t\t$form = new Form(new Category);\n\n\t\t$form->number('user_id', __('User id'));\n\t\t$form->number('app_id', __('App id'));\n\t\t$form->number('parentid', __('Parentid'));\n\t\t$form->text('name', __('Name'));\n\t\t$form->text('thumb', __('Thumb'));\n\t\t$form->text('description', __('Description'));\n\t\t$form->text('advimg', __('Advimg'));\n\t\t$form->text('advurl', __('Advurl'));\n\t\t$form->number('sort', __('Sort'))->default(100);\n\t\t$form->switch('status', __('Status'))->default(1);\n\t\t$form->switch('isdefault', __('Isdefault'));\n\t\t$form->text('case', __('Case'));\n\t\t$form->switch('spider_type', __('Spider type'));\n\t\t$form->switch('ishome', __('Ishome'));\n\t\t$form->switch('isrecommand', __('Isrecommand'));\n\n\t\treturn $form;\n\t}", "public function getForm()\r\n {\r\n return $this->form;\r\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n $form->text('no', 'No');\n $form->number('user_id', 'User id');\n $form->textarea('address', 'Address');\n $form->number('shop_id', 'Shop id');\n $form->decimal('total_amount', 'Total amount');\n $form->textarea('remark', 'Remark');\n $form->datetime('paid_at', 'Paid at')->default(date('Y-m-d H:i:s'));\n $form->text('payment_method', 'Payment method');\n $form->text('payment_no', 'Payment no');\n $form->text('refund_status', 'Refund status')->default('pending');\n $form->text('refund_no', 'Refund no');\n $form->switch('closed', 'Closed');\n $form->switch('reviewed', 'Reviewed');\n $form->text('ship_status', 'Ship status')->default('pending');\n $form->textarea('ship_data', 'Ship data');\n $form->textarea('extra', 'Extra');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new TmallCar);\n\n $form->display('name', 'Name');\n $form->display('phone', 'Phone');\n $form->display('taobao', 'Taobao');\n $form->display('sex', 'Sex');\n $form->display('path');\n $form->time('car', 'Car')->format('mm:ss:SSS');\n\n return $form;\n }", "public function form()\n {\n return Factory::create('field');\n }", "protected function form()\n {\n $form = new Form(new Post);\n\n $form->text('title', __('标题:'))->rules('required|min:3');\n\n $categories = Category::all()->pluck('name')->toArray();\n $form->select('category_id', __('分类:'))->options($categories);\n\n $form->multipleSelect('tags', '标签')->options(Tag::all()->pluck('name','id'));\n\n $form->simditor('content', __('内容:'));\n\n $form->saving(function (Form $form){\n if (!$form->category_id){\n $form->category_id=1;\n }\n });\n\n return $form;\n }", "public function CreateForm() {\n\t\treturn $this()->formForModel($this->action_name());\n\t}", "protected function form()\n {\n $form = new Form(new Post);\n\n $form->hidden('id', 'ID');\n $form->text('title', '标题')->rules('required');\n $cate = DB::table('categories')->pluck('title', 'id')->toArray();\n $form->select('cate_id', '类型')->options($cate)->rules('required');\n\n $form->textarea('subtitle', '简介')->rows(2);\n $form->image('cover', '封面');\n $form->editor('content', '内容');\n\n $top = ['0' => '不置顶', '1' => '置顶'];\n $form->select('is_top', '置顶')->options($top)->rules('required');\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '修改时间');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Invoice);\n\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n $form->select('type', __('Type'))->options(InvoiceTypeEnum::getInvoiceType())->default(InvoiceTypeEnum::DINING);\n $form->decimal('money', __('Money'));\n $form->number('quantity', __('Quantity'))->default(1);\n $form->textarea('remark', __('Remark'))->default(\"食品\");\n\n $hasInvoiceStates = [\n 'on' => ['value'=> 1, 'text' => 'YES'],\n 'off'=> ['value'=>2, 'text' => 'NO']\n ];\n $form->switch('has_invoice', __('Has invoice'))->states($hasInvoiceStates)->default(HasInvoiceEnum::YES);\n $reimbursedStates = [\n 'on' => ['value'=> 1, 'text' => 'YES'],\n 'off'=> ['value'=>2, 'text' => 'NO']\n ];\n $form->switch(\"reimbursed\")->states($reimbursedStates)->default(ReimbursedEnum::NO);\n $form->text(\"name\")->placeholder(\"reimbursement applicant name\")->default(\"潘飞\");\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Chuanqi);\n\n $form->select('type_id', __('分类'))->options([\n '1' => 'CI 传奇',\n '2' => '欧美 CI 范例',\n '3' => '日本 CI 范例',\n '4' => '港台 CI 范例',\n '5' => '大陆 CI 范例',\n ]);\n $form->text('title', __('标题'));\n $form->simditor('content', '内容')->rules('required',['required'=>'必填项']);\n $form->multipleImage('photos', __('图片上传'))->removable();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->number('goods_id', __('Goods id'));\n $form->text('goods_name', __('Goods name'));\n $form->decimal('goods_selfprice', __('Goods selfprice'));\n $form->decimal('goods_marketprice', __('Goods marketprice'));\n $form->switch('goods_up', __('Goods up'));\n $form->switch('goods_new', __('Goods new'))->default(2);\n $form->switch('goods_best', __('Goods best'))->default(2);\n $form->switch('goods_hot', __('Goods hot'))->default(2);\n $form->number('goods_num', __('Goods num'));\n $form->number('goods_integral', __('Goods integral'));\n $form->text('goods_img', __('Goods img'));\n $form->text('goods_imgs', __('Goods imgs'));\n $form->textarea('goods_desc', __('Goods desc'));\n $form->number('cate_id', __('Cate id'));\n $form->number('brand_id', __('Brand id'));\n $form->number('goods_salenum', __('Goods salenum'));\n $form->number('create_time', __('Create time'));\n $form->text('goods_recommend', __('Goods recommend'));\n $form->number('click_id', __('Click id'))->default(100);\n $form->number('is_del', __('Is del'))->default(1);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new MakeOrder);\n\n $form->number('house_id', 'House id');\n $form->number('agent_id', 'Agent id');\n $form->number('make_id', 'Make id');\n $form->text('make_name', 'Make name');\n $form->text('make_mobile', 'Make mobile');\n $form->text('ID_card', 'ID card');\n $form->date('time', 'Time')->default(date('Y-m-d'));\n $form->switch('time_slot', 'Time slot');\n $form->text('remark', 'Remark');\n\n $form->radio('is_divide', 'Is divide')->options([\n 0 => '未分成',\n 1 => '已分成',\n ]);\n $form->radio('state', 'State')->options([\n 0 => '未看房',\n 1 => '已看房',\n 2 => '已取消',\n 3 => '已买房',\n ]);\n $form->switch('add_schedule', 'Add schedule');\n\n return $form;\n }", "public function getForm()\n\t{\n\t\tif ($this->_form === null and $this->formName !== false) {\n\t\t\tif ($this->formName == '') {\n\t\t\t\t$this->formName = lcfirst($this->masterModelClass).'Fields';\t\t\t\t\n\t\t\t}\n\t\t\tif ($this->controller->model == null) {\n\t\t\t\t$this->controller->model = $this->masterModel;\n\t\t\t}\n\t\t\t$this->_form = $this->controller->loadForm($this->formName);\n\t\t}\n\t\treturn $this->_form;\n\t}", "protected function form()\n {\n $form = new Form(new User);\n \n $form->display('id', 'ID');\n $form->text('name', '用户名')->rules('required', [\n 'required' => '不能为空'\n ]);\n $form->text('phone', '电话号码');\n $form->select('gender', '性别')->options([\n '0' => '女',\n '1' => '男'\n ]);\n $form->number('coins', '金币数量');\n // 密码输入框\n $form->password('password', '密码');\n $form->select('post', '职位')->options([\n 'waiter' => '服务员',\n 'chef' => '后厨',\n 'boss' => '老板'\n ]);\n $form->select('created_by', '推荐人')->options(User::getSelectOptions());\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->model()->pro_password = $form->password;\n $form->password = bcrypt($form->password);\n }\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n\n $form->text('name', trans('message.project.name'))->required();\n $form->number('number', trans('message.project.number'))->default(1)->required();\n $form->select('status', trans('message.project.status'))->options([\n 0 => trans('message.pending'),\n 1 => trans('message.approve'),\n 2 => trans('message.disapprove')\n ]);\n// $form->multipleSelect('categories');\n $form->textarea('description', trans('message.project.description'))->required();\n $form->select('teacher_id', trans('message.project.teacher_name'))->options(User::where('type', 'Teacher')->get()->pluck('name', 'id'))->required();\n $form->multipleSelect('categories',trans('message.topic'))->options(Category::all()->pluck('name', 'id'))->required();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CommentsModel());\n $form->display('id', 'ID');\n $form->text('comment_content','评论内容');\n $form->number('comment_love_count','喜爱数量');\n $form->number('parent_comment_id','评论父级');\n $form->text('user_id','用户id');\n $form->text('user_name','用户昵称');\n $form->text('article_id','文章id');\n $form->switch('status', '发布?');\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function getForm() {\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Product());\n\n $form->text('name', __('Name'));\n $form->select('category_id')->options(AppCategory::all()->pluck('name', 'id')); \n $form->textarea('description', __('Description'));\n $form->number('price', __('Price'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Product());\n\n\n $form->text('name', __('Name'));\n $form->textarea('description', __('Description'));\n $form->decimal('price', __('Price'));\n $form->number('stock', __('Stock'));\n $form->number('discount', __('Discount'));\n $form->multipleSelect('categories','Category')->options(Category::all()->pluck('name','id'));\n \n \n\n return $form;\n }", "function getForm()\n {\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Brand);\n\n $form->display('id', 'ID');\n $form->text(\"name\", \"品牌名称\");\n $form->text(\"description\", \"品牌描述\");\n $form->text(\"img_url\", \"品牌图片地址\");\n $form->text(\"priority\", \"优先级\")->default(10);\n $form->switch(\"is_show\", \"是否展示\")->options([0 => \"否\", 1 => \"是\"])->default(1);\n // $form->text(\"floor_price\", \"品牌底价\");\n $form->switch(\"is_new\", \"是否新品牌\")->options([0 => \"否\", 1 => \"是\"])->default(0);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WeixinUserModel);\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new OrderGoods);\n\n $form->text('order_no', __('Order no'));\n $form->number('user_id', __('User id'));\n $form->text('goods_id', __('Goods id'));\n $form->text('sku', __('Sku'));\n $form->number('property_id', __('Property id'));\n $form->number('product_count', __('Product count'));\n $form->decimal('product_price', __('Product price'));\n $form->decimal('dist_price', __('Dist price'))->default(0.00);\n $form->number('score', __('Score'));\n $form->text('comment', __('Comment'));\n $form->number('refund_product_count', __('Refund product count'));\n $form->decimal('refund_total_amount', __('Refund total amount'))->default(0.00);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Patent);\n $form->text('patent_sn', __('专利号'))->required();\n $form->text('patent_name', __('专利名称'))->required();\n $form->text('patent_person', __('专利权人'))->required();\n $form->select('patent_domain_id', __('技术领域'))->options(PatentDomain::pluck('name','id'))->required();\n $form->select('patent_type_id', __('专利类型'))->options(PatentType::pluck('name','id'))->required();\n $form->select('patent_case_id', __('案件状态'))->options(PatentCase::pluck('name','id'))->required();\n $form->select('patent_cert_id', __('专利状态'))->options(PatentCert::pluck('name','id'))->required();\n $form->datetime('apply_date', __('申请日期'))->format('YYYY-MM-DD')->required();\n $form->hidden('user_id');\n $form->saving(function(Form $form){\n $user = MemberUser::user();\n if($form->model()->user_id && $form->model()->user_id != $user->id){\n return back();\n }\n $form->user_id = $user->id;\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Selects());\n\n $form->text('goods_id', __('Goods id'));\n $form->text('has_coupon', __('Has coupon'));\n $form->text('sales_tip', __('Sales tip'));\n $form->text('min_group_price', __('Min group price'));\n $form->text('search_id', __('Search id'));\n $form->text('coupon_remain_quantity', __('Coupon remain quantity'));\n $form->text('goods_name', __('Goods name'));\n $form->text('goods_image_url', __('Goods image url'));\n $form->text('mall_name', __('Mall name'));\n $form->text('text', __('Text'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Userinfo());\n\n $form->mobile('phone', __('Phone'))->default('18888888888');\n $form->text('name', __('姓名'))->default('123');\n $form->number('age', __('年龄'))->default(20);\n $form->number('sum', __('总分'));\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WxUser);\n\n $form->number('uid', 'Uid');\n $form->text('openid', 'Openid');\n $form->number('add_time', 'Add time');\n $form->text('nickname', 'Nickname');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->number('subscribe_time', 'Subscribe time');\n $form->text('unionid', 'Unionid');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new QuestList);\n\n // $form->number('title_id', 'Title id');\n\n\n \n $form->select(\"title_id\",\"绑定题纲\")->options(function($title_id){\n return QuestionService::getTitleList();\n });\n $form->text('name', 'Name');\n $form->image('image_url', 'Image url');\n $form->text('answer_A', 'Answer A');\n $form->text('answer_B', 'Answer B');\n $form->text('answer_C', 'Answer C');\n $form->text('answer_D', 'Answer D');\n $form->radio('answer_true', 'Answer true')->options(QuestList::ANSWER);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Cooperation);\n\n $form->editor('content', '内容')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Qrcode());\n\n $form->image('image', '二维码');\n $form->select('store_id', '门店')->options(Menu::getSelectOptions())->load('floor', '/api/floor');\n $form->select('floor', '楼层')->load('place', '/api/place');\n $form->select('place', '座位');\n\n //保存前回调\n $form->saving(function (Form $form) {\n if (\\request('place')) {\n $form->model()->link = Image::find(place::find(\\request('place'))->image_id)->link;\n }\n });\n $form->ignore(['store_id', 'floor', 'place']);\n\n return $form;\n }", "public function getForm(){\n\t\treturn $this->form;\n\t}", "protected function form()\n {\n $form = new Form(new Flow);\n\n $form->text('name', '名称')->required();\n $form->text('directory1', '一级目录')\n ->attribute([\"list\" => \"dir1\", \"autocomplete\" => \"off\"])\n ->required();\n $form->text('directory2', '二级目录')\n ->attribute([\"list\" => \"dir2\", \"autocomplete\" => \"off\"])\n ->required();\n\n $form->number('weight', '排序')->help(\"数值大的在前边\");\n\n $form->text('title_fiels', '标题字段')->help(\"字段逗号分隔\");\n\n $form->multipleSelect('can_apply', '权限控制')\n ->options(Member::all()->pluck(\"name\", \"id\"));\n\n $form->footer(function (Footer $footer) {\n $footer->disableViewCheck();\n $footer->disableCreatingCheck();\n $footer->disableEditingCheck();\n });\n $service = new FlowService();\n $form->html($service->buildDataList(\"dir1\", Flow::distinct()->pluck(\"directory1\")->toArray()));\n $form->html($service->buildDataList(\"dir2\", Flow::distinct()->pluck(\"directory2\")->toArray()));\n\n $form->saved(function ($form) {\n $id = $form->model()->id;\n $flow = Flow::find($id);\n if ($flow->forms->count() <= 0) {\n return redirect(\"/admin/flow/$id/edit-form\");\n }\n });\n return $form;\n }", "function getForm() {\n\t\treturn $this->form;\n\t}", "protected function form()\n {\n $form = new Form(new User());\n\n $form->number('parent_id', __('Parent id'));\n $form->text('username', __('Username'));\n $form->password('password', __('Password'));\n\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n\n $form->email('email', __('Email'));\n $form->text('name', __('Name'))->default('爱上无损音乐');\n $form->text('qq', __('Qq'));\n $form->text('wechat', __('Wechat'));\n $form->mobile('phone', __('Phone'));\n $form->number('coin', __('Coin'));\n $form->select('userrole_id',__('用户组'))->options('/'.env('ADMIN_ROUTE_PREFIX').'/api/getuserroles');\n $form->editor('remark', __('Remark'));\n $form->text('path', __('Path'));\n $form->date('expiration_date', __('Expiration date'))->default(date('Y-m-d'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsCategory);\n\n $form->text('name', __('分类名称'))->rules(['required']);\n $form->number('sort', __('分类排序'))->default(255)->rules(['required']);\n $form->select('status', __('分类状态'))->default(20)->options(GoodsCategory::getStatus())->rules(['required']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ActivityDraw());\n\n $form->select('activity_id', '所属活动')->options(Activity::query()->pluck('name', 'id'))->default(1)->help('默认');\n $form->select('user_id', '所属用户')->options([17 => '老刘', 20 => '李源源', 38 => '万玉亮', 42 => '吴涛', 50 => '钟金春'])->default(17);\n $form->text('name', '页面展示姓名')->rules('required', ['姓名不可为空']);\n $form->text('phone', '页面展示手机号')->rules('required|max:11', ['手机号不能为空', '不能超过11位']);\n $form->select('prize', '抽中奖品')->options([\n 1 => '5元现金红包',\n 2 => '10元现金红包',\n 3 => '20元现金红包',\n 4 => '999元现金红包',\n 5 => '50元现金红包',\n 6 => '华为M5平板电脑',\n 7 => '5元现金红包',\n 8 => '10元现金红包',\n 9 => '华为P30 Pro'\n ])->default(5);\n\n return $form;\n }", "protected function getForm()\n {\n if (null === $this->form) {\n $this->form = $this->getFormBuilder()->getForm();\n }\n\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new OtRequest());\n\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n $form->switch('day_type', __('Day type'))->default(1);\n $form->number('employee_id', __('Employee id'));\n $form->text('account', __('Account'));\n $form->number('project_id', __('Project id'));\n $form->text('project_code', __('Project code'));\n $form->datetime('entry_time', __('Entry time'))->default(date('Y-m-d H:i:s'));\n $form->datetime('leave_time', __('Leave time'))->default(date('Y-m-d H:i:s'));\n $form->decimal('ot_time', __('Ot time'))->default(0.00);\n $form->decimal('on_time', __('On time'))->default(0.00);\n $form->textarea('ot_reason', __('Ot reason'));\n $form->number('confirmed_by_id', __('Confirmed by id'));\n $form->number('approved_by_id', __('Approved by id'));\n $form->number('rejected_by_id', __('Rejected by id'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Disc());\n\n $form->text('name', __('Name'));\n $form->text('slug', __('Slug'));\n $form->multipleFile('images','Images')->pathColumn('path')->removable();\n $form->textarea('description', __('Description'));\n $form->decimal('price', __('Price'));\n $form->select('disc_format_id', __('Format'))\n ->options(DiscFormat::all()->pluck('name', 'id'))\n ->rules('required'); \n $form->select('studio_id', __('Studio'))\n ->options(Studio::all()->pluck('name', 'id'))\n ->rules('required'); \n $form->select('category_id', __('Category'))\n ->options(Category::all()->pluck('name', 'id'))\n ->rules('required'); \n $form->number('available_qty', __('Available qty'));\n $form->datetime('released_date', __('Released date'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Brand());\n\n $form->number('sort', __('Sort'))->min(1);\n $form->text('brand_number', __('Brand number'))\n ->creationRules(['required', 'max:30' ,'unique:brands'])\n ->updateRules(['required', 'max:30']);\n $form->text('brand_name', __('Brand name'))->rules('required|max:40');\n $form->switch('enable', __('Enable'))->default(true);\n\n $form->footer(function ($footer){\n //$footer->disableViewCheck();\n $footer->disableEditingCheck();\n //$footer->disableCreatingCheck();\n });\n\n\n\n return $form;\n }", "public function getForm() {\r\n\t\treturn $this->form;\r\n\t}" ]
[ "0.7548153", "0.74721646", "0.74721646", "0.74232996", "0.74200296", "0.7346146", "0.7330075", "0.7315616", "0.7315616", "0.726464", "0.7246966", "0.7241799", "0.72415626", "0.72331345", "0.7226597", "0.7196512", "0.7191639", "0.7177947", "0.714925", "0.7140731", "0.7140658", "0.7140581", "0.7132589", "0.7125474", "0.71138275", "0.71109414", "0.7103688", "0.71028435", "0.7102618", "0.710157", "0.70975846", "0.70959276", "0.7094557", "0.7090341", "0.7089858", "0.707988", "0.7076108", "0.70715946", "0.7063678", "0.70634806", "0.7060884", "0.70560455", "0.70493144", "0.7046282", "0.70452136", "0.7040581", "0.7040581", "0.7040581", "0.7037969", "0.7033891", "0.7023926", "0.70187575", "0.7015401", "0.7002897", "0.700257", "0.700257", "0.700257", "0.700257", "0.7000242", "0.6992665", "0.6991202", "0.6988476", "0.69875383", "0.6978615", "0.6974601", "0.69661474", "0.69660646", "0.6965408", "0.69644326", "0.69636613", "0.69630295", "0.6956624", "0.69528186", "0.69507855", "0.6948883", "0.6946556", "0.6933961", "0.6932442", "0.6930127", "0.6927391", "0.69245404", "0.6924062", "0.6921644", "0.6917981", "0.69179654", "0.69139165", "0.6913465", "0.6910135", "0.6909669", "0.69074976", "0.6900278", "0.68986773", "0.6897267", "0.6897193", "0.68925315", "0.688807", "0.6887016", "0.6884506", "0.68819225", "0.68800586" ]
0.8025035
0
Return Crud Api view class name.
Верните имя класса представления Crud Api.
abstract protected function getApiViewClass(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getViewFileName() {\n return str_replace('Controller', '', get_class($this));\n }", "public function getViewClass(): string\n {\n $answer = \"\";\n if($this->isInstanceFunction(end(explode('::', __METHOD__)))){\n $answer = $this->_function_decorations[end(explode('::', __METHOD__))](func_get_args());\n }\n if(!isset($answer)){\n $answer = \"\";\n }\n return $answer;\n }", "private function guessCrudControllerType(): string\n {\n return sprintf('%s\\%s', str_replace('Models', 'Http\\Controllers', (new \\ReflectionClass($this))->getName()), 'Controller');\n }", "protected function getViewName()\n {\n return sprintf('%s-view', $this->getViewType());\n }", "public function getViewName();", "public function getType()\n {\n return 'view';\n }", "public function controllerClassName()\n {\n return studly_case(str_singular($this->table_name)).\"Controller\";\n }", "protected function defaultControllerClassname()\n {\n return 'RoxController';\n }", "function dbGetView($viewClassname);", "public function getViewName(){\n return $this->_view_name;\n }", "public static function getViewName() {\n return static::$VIEW;\n }", "function getViewName()\n \t{\n \treturn $this->view_name;\n \t}", "public function getViewName(): string\n {\n return $this->sViewName;\n }", "public function getView() {\n if (is_null($this->view)) {\n $cls = explode('\\\\', static::class);\n $name = array_pop($cls);\n $module = array_pop($cls);\n $this->view = snake_case($module) . '.' . \n snake_case(substr($name, 0, -(strlen('Controller'))));\n }\n return $this->view;\n }", "public function getView(): string;", "public function get_view();", "public function getViewClass() {\n\t\treturn $this->_viewClass;\n\t}", "public function getViewName()\n {\n return $this->viewName;\n }", "public function getViewName()\r\n\t{\r\n\t\treturn $this->view;\r\n\t}", "public function model() {\n return \"class\";\n }", "public function getViewName()\n {\n return $this->sViewName;\n }", "public function getViewName()\n {\n return $this->sViewName;\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "public function getViewId()\n {\n }", "protected function getViewName()\n {\n return $this->viewName;\n }", "public function getViewName()\n\t{\n\t\treturn $this->viewName;\n\t}", "protected function getViewPath(): string\n {\n $result = (new ReflectionClass($this))->getShortName();\n if (str_ends_with(strtolower($result), 'controller')) {\n $result = substr($result, 0, -10);\n }\n\n return $result;\n }", "protected function getControllerType()\n {\n return 'api-controller';\n }", "public function model()\n {\n return View::class;\n }", "public function getViewClassId() {\n\t\treturn $this->viewClassId;\n\t}", "protected function getCrudControllerType(): string\n {\n if (property_exists($this, 'controller_type')) {\n return static::$controller_type;\n }\n\n return $this->guessCrudControllerType();\n }", "protected function getViewType()\n {\n return Str::trimEnd($this->getStubName(), '.blade');\n }", "public function getControllerClass() {}", "protected function name() : string\n {\n return ICrudModule::CREATE_ACTION;\n }", "public function getViewId()\n {\n return 'dyn_interface';\n }", "public function getViewKey(): string;", "public static function type()\n {\n return self::c_php_view;\n }", "protected function getViewClass()\n {\n return SerialsCollectionView::class;\n }", "protected function getViewNames()\n {\n return ['pages.bundles.'.$this->object->name().'.createField', 'pages.bundles.createField'];\n }", "public static function modelName()\n {\n return Inflector::pluralize(Inflector::camel2id(StringHelper::basename(get_called_class()), '-'));\n }", "private function getControllerClassName(): string {\n\n\t\t$appInstance = Application::getInstance();\n\t\t$moduleNameSpace = str_replace('/', '\\\\', str_replace($appInstance->getAppRootPath(), '', $appInstance->getModulePath()));\n\t\t$nameSpace = $moduleNameSpace . '\\\\' . $this->convertToConventional($this->controller) . '\\\\controllers';\n\t\treturn MainFunc::isAjax() || $appInstance->getAppType() == Application::APP_TYPE_REST_API ? \"{$nameSpace}\\ServiceController\" : \"{$nameSpace}\\ActionController\";\n\t}", "public function getViewType();", "private function getViewFolder(){\t\n\t\t$child_class = get_called_class();\n\t\t$end_pos = strpos($child_class, 'Controller');\n\t\t$start_pos = strrpos($child_class, '\\\\');\n\t\treturn strtolower(substr($child_class, $start_pos+1, $end_pos-$start_pos-1));\n\t}", "public function getViewActionName()\n {\n return null;\n }", "public function getControllerName(): string;", "public function GetControllerClass ();", "public function getView(): string { return $this->view; }", "protected function getViewName()\n {\n return $this->getResource()->getViewFile();\n }", "public function getControllerName() {}", "public function getControllerName() {}", "public static function getModelName()\n {\n return (new ReflectionClass(get_called_class()))->getShortName();\n }", "public function getCrudController(): AbstractCrudController\n {\n return app($this->getCrudControllerType());\n }", "public function get_full_api_class_path();", "public function getDetailViewName()\n\t{\n\t\treturn 'Detail';\n\t}", "protected function getClassName(): string\n {\n return $this->className = studly_case($this->getNameInput()).'VoyagerPermissionSeeder';\n }", "public function viewPathInController()\n {\n return ucfirst($this->devis->app_name). \".\".$this->the_namespace->name. \".\".$this->model;\n }", "public function index()\n {\n $this->entity = $this->getModelFromClassName(get_called_class());\n $name = explode('\\\\', $this->entity);\n $name = str_plural(strtolower(last($name)));\n if (preg_match('/User/', $this->entity)) {\n $this->entity = User::class;\n }\n $entity = new $this->entity();\n return view($name, [$name => $entity->all()]);\n }", "private function getClassName()\n : string\n {\n if (!Str::contains($this->name, 'Controller')) {\n return $this->name . 'Controller';\n }\n return $this->name;\n }", "public function getName()\n {\n return parent::getName().'class';\n\n }", "function getViewType()\n\t\t{\n\t\tif($this->_viewType == null || \n\t\t\t$this->_viewType == '' ||\n\t\t\t!method_exists($this,$this->_viewType)) $this->setViewType();\n\t\t\t\n\t\treturn $this->_viewType;\n\t\t}", "protected function _view($request) {\n\t\treturn strtolower($this->_class($request));\n\t}", "public function crudActionGet() : object\n {\n $title = \"Movie database | oophp\";\n $page = $this->app->page;\n\n $res = $this->getAll();\n\n $page->add(\"movie/crud\", [\n \"resultset\" => $res,\n ]);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "public static function controller_class_name( $name ) {\n\t\treturn ucfirst( $name ) . CreateController::$outfix;\n\t}", "protected function getClassName(): string\n {\n return BookAuthorModel::class;\n }", "public function getViewFieldName()\n {\n return $this->owner->Name;\n }", "public function create()\n {\n return 'create view';\n }", "public function getName() {\n return api_helpers_class::getBaseName($this);;\n }", "public function getViewType(NULL):string {\n\t\treturn ($this->$pViewType);\n\t}", "abstract public function getModelClass(): string;", "public function getType()\n {\n return 'controller';\n }", "protected function getCalledControllerName()\n\t{\n\t\treturn 'Admin/' . parent::getCalledControllerName();\n\t}", "protected function resolveViewObjectName() {}", "protected function getViewNames(): array\n {\n return ['pages.entities.'.$this->object->identifier().'.delete', 'pages.entities.delete'];\n }", "public function getViewType() {\n \treturn $this->viewType;\n }", "public function getWidgetViewHelperClassName() {}", "protected function previewController(Model $model): string\n {\n return FrontPostsController::class;\n }", "public function getControllerName(): string\n {\n return ucfirst($this->getPluralName());\n }", "protected function getViewClass()\n {\n return SimpleButtonView::class;\n }", "private function guessAppControllerType(): string\n {\n return sprintf('\\App\\Http\\Controllers\\%sController', (new \\ReflectionClass($this))->getShortName());\n }", "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "public function getControllerObjectName() {}", "public function getControllerObjectName() {}", "function cc_crud() {\n\treturn CC_CRUD::single();\n}", "public static function getObjectName(): string\n {\n return Str::snake(static::getModelName());\n }", "function getViewType() \n {//---------------------------------------->> getViewType()\n return $this->_viewType;\n }", "public function getType()\n {\n return strtolower(str_replace('F3\\Models\\\\', '', __CLASS__));\n }", "public function getViewType()\n {\n return $this->viewType;\n }", "protected function RetrieveViewName()\n {\n $this->view = str_replace(\"Action\", \"View\", $this->action);\n }", "public function getView(): string\n\t{\n\t\treturn $this->view;\n\t}", "function view_for_class($object)\n\t{\n\t\tif (is_object($object)) {\n\t\t\t$type = (new \\ReflectionClass($object))->getShortName();\n\t\t} else {\n \t\t\t$class = explode('\\\\', $object);\n\t\t\t$type = array_pop($class);\n\t\t}\n\n\t\t$type = str_plural(strtolower($type));\n\n\t\tswitch ($type) {\n\t\t\tcase 'documents':\n\t\t\t\treturn 'docs';\n\t\t\tdefault:\n\t\t\t\treturn $type;\n\t\t}\n\t}", "public function getControllerObjectName()\n {\n return 'Ecodev\\\\Newsletter\\\\Controller\\\\' . $this->action;\n }" ]
[ "0.66304725", "0.63682127", "0.6337349", "0.633103", "0.63125974", "0.6269235", "0.62529176", "0.62106633", "0.6139402", "0.61107725", "0.61098313", "0.61004615", "0.6096247", "0.60794413", "0.60733557", "0.6029426", "0.60058516", "0.5987978", "0.59757125", "0.597101", "0.5932087", "0.5932087", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.5920859", "0.59128034", "0.59069324", "0.5896505", "0.588895", "0.5888117", "0.58843374", "0.5867119", "0.5818522", "0.5788969", "0.576998", "0.5728635", "0.57196784", "0.5712774", "0.5704489", "0.5699276", "0.5689705", "0.56884164", "0.5686681", "0.56697977", "0.56636184", "0.5652359", "0.56504846", "0.56204873", "0.56204665", "0.5603305", "0.5603305", "0.559257", "0.55872303", "0.55849326", "0.5583932", "0.55828136", "0.556908", "0.5566393", "0.555531", "0.5553228", "0.55518264", "0.554858", "0.5547261", "0.55429304", "0.5541514", "0.5537789", "0.55348337", "0.5527276", "0.5508746", "0.55030996", "0.5497916", "0.5495028", "0.5492312", "0.5490839", "0.54829836", "0.54804647", "0.5475715", "0.54749495", "0.54730195", "0.5469605", "0.54652685", "0.54652685", "0.54652685", "0.54628223", "0.54628223", "0.54608625", "0.5451447", "0.5433057", "0.54296416", "0.5423865", "0.5411246", "0.54076844", "0.5405978", "0.5405513" ]
0.74150044
0
// IsValidDate // IsValidDate() Check the validity of a short date Check the validity of a short date, which should be in the format yyyymmdd
// IsValidDate // IsValidDate() Проверка корректности короткой даты Проверка корректности короткой даты, которая должна быть в формате yyyymmdd
static function IsValidDate($strShortDate) { $dateParts = array(); $ok = preg_match ("/^(?:(\d\d\d\d)\-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))$/", $strShortDate, $dateParts); if (!$ok) { return FALSE; } return checkdate((int)$dateParts[2], (int)$dateParts[3], (int)$dateParts[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function IsValidDateInPast($strShortDate)\n\t{\n\t\t$dateParts = array();\n\t\t$ok = preg_match (\"/^(?:(\\d\\d\\d\\d)\\-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))$/\", $strShortDate, $dateParts);\n\t\tif (!$ok)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t$year = (int)$dateParts[1];\n\t\t$month = (int)$dateParts[2];\n\t\t$day = (int)$dateParts[3];\n\t\t$ok = checkdate($month, $day, $year);\n\t\tif (!$ok)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$yearNow = (int)date(\"Y\");\n\t\t$monthNow = (int)date(\"m\");\n\t\t$dayNow = (int)date(\"d\");\n\t\t\n\t\tif ($year > $yearNow || ($year == $yearNow && ($month > $monthNow || ($month == $monthNow && $day > $dayNow))))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public static function validateDate($date) {\n\t\t\n\t\t//Errors Array\n\t\tself::$errorsArray = array();\n\t\t\n\t\t////////////////////////////////////////////////////////////////////////\n\t\t//Lets try to validate it this way! (checkdate is not realiable)\n\t\t////////////////////////////////////////////////////////////////////////\n\t\tif(!preg_match('/^[0-9]{4}\\/{1}[0-9]{2}\\/{1}[0-9]{2}$/',$date)) { //UK\n\t\t\tif(!preg_match('/^[0-9]{2}\\/{1}[0-9]{2}\\/{1}[0-9]{4}$/',$date)) {\n\t\t\t\tself::$errorsArray[] = 'Please enter a valid date format below. [E1]';\n\t\t\t}\n\t\t}\n\t\t\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//Lets try to validate with checkdate()\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//Replace any / with -\n\t\tself::$date_full = str_replace('/','-',$date);\n\t\t\n\t\t//Convert to Single Values\n\t\tself::$date_day = date('d',strtotime(self::$date_full));\n\t\tself::$date_month = date('m',strtotime(self::$date_full));\n\t\tself::$date_year = date('Y',strtotime(self::$date_full));\n\t\t\n\t\t//Check Date\n\t\tif(!checkdate(self::$date_month, self::$date_day, self::$date_year)) {\n\t\t\tself::$errorsArray[] = 'Please enter a valid date format below. [E1]';\n\t\t}\n\t\t\n\t\t//Return Errors\n\t\tif(count(self::$errorsArray)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\t\t\n\t\t}\n\t}", "public static function isValidDate($date)\n {\n if (preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2})$/\", $date, $matches))\n {\n if (checkdate($matches[2], $matches[3], $matches[1]))\n {\n return true;\n }\n }\n\n return false;\n }", "public function valid_date( $date )\n {\n // If blank, then assume the date is not required\n if ( ! $date ) :\n\n return TRUE;\n\n endif;\n\n // --------------------------------------------------------------------------\n\n $CI =& get_instance();\n\n if ( ! array_key_exists( 'valid_date', $CI->form_validation->_error_messages ) ) :\n\n $CI->form_validation->set_message( 'valid_date', lang( 'fv_valid_date_field' ) );\n\n endif;\n\n $_time = strtotime( $date );\n\n if ( $_time === FALSE ) :\n\n return FALSE;\n\n endif;\n\n $_date = date( 'Y-m-d', $_time );\n\n @list( $_year, $_month, $_day ) = explode( '-', $_date );\n\n return checkdate( (int) $_month, (int) $_day, (int) $_year );\n }", "static function ShortDate($mixDate)\n\t{\n\t\tif ($mixDate == \"00/00/0000\")\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bolValidDateFormat = self::RegexValidate('^(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)[0-9]{2}$^' , $mixDate); \n\t\t\t\n\t\t\tif (!$bolValidDateFormat)\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t// The Date is in the correct format, but now check that it is a proper date\n\t\t\t// IE check that it isn't the 31st of February\n\t\t\t$arrParts = explode(\"/\", $mixDate);\n\t\t\treturn checkdate((int)$arrParts[1], (int)$arrParts[0], (int)$arrParts[2]);\n\t\t}\n\t}", "public function isValidDate ($date) {\r\n $dateParts = explode('-', $date);\r\n return count($dateParts) == 3 && checkdate($dateParts[1], $dateParts[2], $dateParts[0]);\r\n }", "function valid_date($date)\n {\n if (!empty($date))\n {\n if (preg_match(\"/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date, $values))\n {\n\t\t\t$month = $values[2];\n\t\t\t$day = $values[3];\n\t\t\t$year = $values[1];\n\t\t\t\n if (checkdate($month, $day, $year)) // Date actually exists\n {\n\t\t\t\t\t\n return TRUE;\n }\n }\n }\n return FALSE;\n }", "protected function _isValidDate($date)\n\t\t{\n\t\t\t$timestamp = strtotime($date);\n\t\t\t$date_format = strftime(\"%m-%d-%Y\", $timestamp);\n\t\t\t$valid_date = str_replace(\"-\", \",\", $date_format);\n\t\t\t$date_parts = explode(\",\", $valid_date);\n\t\t\t$month = $date_parts[0];\n\t\t\t$day = $date_parts[1];\n\t\t\t$year = $date_parts[2];\n\t\t\treturn checkdate($month, $day, $year) ? true : false;\n\t\t}", "function ecp_is_valid_date( $date ) {\n\t$date_parts = explode( '-', $date );\n\n\treturn checkdate( $date_parts[1], $date_parts[2], $date_parts[0] );\n}", "function validDate($date)\n {\n $valid = true;\n if (!strtotime($date))\n {\n $valid = false;\n }\n return $valid;\n }", "public function valid_date($date) {\n if (!empty($date)) {\n if (preg_match(\"/^(?P<year>[0-9]{4})[-](?P<month>[0-9]{2})[-](?P<day>[0-9]{2})$/\", $date, $matches)) {\n if (checkdate($matches['month'], $matches['day'], $matches['year'])) // Date really exists\n {\n return true;\n }\n }\n }\n $this->set_message('valid_date', \"The %s : \\\"$date\\\" doesn't exist or invalid format. Valid format: yyyy-mm-dd.\");\n\n return false;\n }", "function isValidDateyyyymmdd($date)\r\n\t{\r\n\t\tif(preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2})$/\", $date, $matches))\r\n\t\t{\r\n\t\t\tif(checkdate($matches[2], $matches[3], $matches[1]))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static private function validDate($date) {\n return preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $date);\n }", "function validateDate($date)\r\n{\r\n\t$d = DateTime::createFromFormat('Y-m-d', $date);\r\n\treturn $d && $d->format('Y-m-d') == $date;\r\n}", "private function isValidDate($date)\n\t{\n\t\treturn preg_match(\"/^(19|20)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/\", $date) && date_create($date);\n\t}", "private function isValidDate($date)\n\t{\n\t\treturn preg_match(\"/^(19|20)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/\", $date) && date_create($date);\n\t}", "private function isValidDate($date)\n\t{\n\t\treturn preg_match(\"/^(19|20)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/\", $date) && date_create($date);\n\t}", "private function isValidDate($date)\n\t{\n\t\treturn preg_match(\"/^(19|20)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/\", $date) && date_create($date);\n\t}", "function validateDate($date)\r\n{\r\n $d = DateTime::createFromFormat('Y-m-d', $date);\r\n return $d && $d->format('Y-m-d') === $date;\r\n}", "function validDate($date){\n $d = DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n}", "function validatorDate($date){\n\t$format = 'Y-m-d';\n\n\tif(DateTime::createFromFormat($format, $date) == false){\n\t\treturn false;\n\t}\n\telse\n\t\treturn true;\n}", "function validateDate($date){\n $d = DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') == $date;\n}", "static public function isValidDate($date) {\n $dt = DateTime::createFromFormat(\"Y-m-d\", $date);\n return $dt !== false && !array_sum($dt->getLastErrors());\n }", "function v6_IsValidDate($date)\n{\n if (!isset($date) || $date == \"\") {\n return false;\n }\n if (strlen($date) <> 10) {\n return false;\n }\n $yyyy = substr($date, 0, 4);\n $mm = substr($date, 5, 2);\n $dd = substr($date, 8, 2);\n if ($dd != \"\" && $mm != \"\" && $yyyy != \"\") {\n return checkdate($mm, $dd, $yyyy);\n }\n return false;\n}", "private function isValidDate($date){\r\n return preg_match('#[0-3][0-9]\\/[0-1][0-9]\\/[2][0][0-9][0-9]#', $date)\r\n &&\r\n checkdate((int)substr($date, 3, 2),\r\n (int)substr($date, 0, 2),\r\n (int)substr($date, 6, 4));\r\n }", "public static function isValidDate ($date)\n\t{\n\t\ttry {\n\t\t\tnew \\DateTime($date);\n\t\t\treturn true;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function validate_date($date) {\n $this->parameters[\"date\"] = $date;\n return true;\n }", "public static function checkDate($date)\n {\n if (!preg_match('/^([0-9]{4})\\-(0[1-9]|1[0-2])\\-(0[1-9]|[1-2][0-9]|3[0-1])/i', $date))\n return false;\n\n $dtTest = new DateTime($date);\n return ($dtTest->format('Y-m-d') === $date);\n }", "public static function isValid ($date) {\n if (!is_string($date)) { \n return false;\n }\n $ary = explode('-', $date);\n if (count($ary) == 3) {\n return checkdate ( (int)$ary[1] , (int)$ary[2] , (int)$ary[0]);\n }\n return false;\n }", "function isvalid_date($date){\n $ret = false;\n if($date > date('Y-m-d H:i:s')){\n $ret = true;\n }\n return $ret;\n }", "Function ValidateDate($sDate=\"\")\n {\n static $_mReturn;\n\n if ( preg_match( \"/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/\" , $sDate ) )\n {\n $_mReturn = $sDate;\n }\n else\n {\n $_mReturn = false;\n }\n\n return $_mReturn;\n }", "protected function checkAdDate($date)\n\t{\n\t\t//TODO: even when the date is within our range, check if it's valid (e.g. Feb 30 etc)\n\n\t\t$x=explode('/',$date);\n\t\t$year=(int)($x[2]);\n\t\t$day=(int)($x[1]);\n\t\t$month=(int)($x[0]);\n\n\t\tif(!checkdate ($month , $day , $year ))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif($year > $this->max_ad_date['year'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif($year == $this->max_ad_date['year'])\n\t\t{\n\t\t\tif ($month > $this->max_ad_date['month'])\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telseif ($month == $this->max_ad_date['month'])\n\t\t\t{\n\t\t\t\tif ($day > $this->max_ad_date['day'])\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function ValidDate($dateVisit) {\n\t\tif (in_array($dateVisit->format( 'w' ), $this->closingdays) ) {\n\t\t\treturn false;\n\t\t}\n//pour Visite impossible les jours fériés\n\t\tif ( in_array( $dateVisit->format( 'dd/MM' ), $this->holidays ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "private function valid_date($date) {\n\n $date = explode(\"/\", $date);\n\n if (count($date) != 3) { return false; }\n\n $month = $date[0];\n $day = $date[1];\n $year = $date[2];\n\n if ($month <= 0 || $month > 12) { return false; }\n if ($day < 1 || $day > cal_days_in_month(CAL_GREGORIAN, $month, $year)) { return false; }\n if ($year > date(\"Y\")) { return false; }\n\n return true;\n }", "public function test_validDate_PresentAndValid()\n {\n $validator = new Model_Validator();\n $this->assertTrue($validator->validDate(\"2016-01-02\"),\n \"Validator :: validDate :: True when correctly formatted valid date provided\");\n }", "protected function CheckDate($Date) {\n\t\tif (\\DateTime::createFromFormat('Y-m-d', $Date) == FALSE) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function validateDate($date){\n\t\t$timestamp = strtotime($date);\n\t\treturn $timestamp ? true : false;\n\t}", "public function valid_date($date)\n\t{\n\t\treturn (strtotime($date) !== FALSE);\n\t}", "static public function checkDate($date) {\n if (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date)) {\n return true;\n } else {\n return false;\n }\n }", "function validDate($date){\n return 1;\n }", "function validate_isDate($date)\n{\n if (!preg_match('/^([0-9]{4})-((?:0?[0-9])|(?:1[0-2]))-((?:0?[0-9])|(?:[1-2][0-9])|(?:3[01]))( [0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $date, $matches))\n return false;\n return checkdate((int)$matches[2], (int)$matches[3], (int)$matches[1]);\n}", "function IsDate($date) {\n if (!empty($date) && count(explode('-', $date)) == 3) {\n $dd = null;\n $mm = null;\n $yyyy = null;\n list($dd, $mm, $yyyy) = explode('-', $date);\n\n if (is_numeric($dd) && is_numeric($mm) && is_numeric($yyyy) && intval($yyyy) > 1900 && intval($yyyy) < 2500) {\n return checkdate(intval($mm), intval($dd), intval($yyyy));\n }\n }\n\n return false;\n}", "function validateDate($date) {\n if ($date == '') {\n return true;\n }\n return preg_match('/^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)\\d\\d$/', $date);\n}", "function validate_date($date) {\n $date = DateTime::createFromFormat(\"Y-m-d\", $date);\n return $date !== false && !array_sum($date::getLastErrors());\n}", "function validDate($date) {\n\tif (preg_match(\"/^\\\\d{2}\\\\/\\\\d{2}\\\\/\\\\d{4}$/\", $date)) {return true;}\n\telse {return false;}\n}", "public function isValid($date) {\n if(!$this->isValidFormat($date)) return false;\n\n // check date value\n list($y,$m,$d) = explode(self::DELIMITER, $date);\n return $this->isValidYear($y) && $this->isValidMonth($m) && $this->isValidDay($d, $m,$y);\n\n }", "function isDateValid($date)\n{\n if ($date === \"Aucune\")\n return (false);\n else if ($date === \"1970-01-01\")\n return (false);\n else if ($date === \"0000-00-00\")\n return (false);\n return (true);\n}", "function valid_date($date){\n\t$error = false;\n\t// trim date\n\t$valid_date = trim($date);\n\t// perfect format, return valid_date\n\tif( preg_match('/^\\d\\d-\\d\\d-\\d\\d\\d\\d$/', $valid_date) ){ // valid\n\t\treturn $valid_date;\n\t\n\t// else, validate...\n\t// split numbers by non-number-chars, and pad each to desired length\n\t}elseif( preg_match('/^\\d\\d?[^a-zA-Z0-9]\\d\\d?[^a-zA-Z0-9]\\d\\d\\d?\\d?$/', $valid_date) ){\n\t\t$date_pieces = preg_split('/[^a-zA-Z0-9]+/', $valid_date);\n\t\tif( count($date_pieces) !== 3 ){\n\t\t\t$error = true;\n\t\t}else{\n\t\t\t$day = str_pad($date_pieces[0], 2, \"0\", STR_PAD_LEFT);\n\t\t\t$month = str_pad($date_pieces[1], 2, \"0\", STR_PAD_LEFT);\n\t\t\t$year = str_pad($date_pieces[2], 4, \"20\", STR_PAD_LEFT);\n\t\t\tif($day < 32 && $day > 0 && $month < 13 && $month > 0 && $year > 1){\n\t\t\t\t$valid_date = $day.'-'.$month.'-'.$year;\n\t\t\t}else{\n\t\t\t\t$error = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}else{\n\t\t$error = true;\n\t}\n\tif( $error ){\n\t\treturn false;\n\t}else{\n\t\t//echo '<pre>'.__FUNCTION__.' => '.$valid_date.'</pre>';\n\t\treturn $valid_date;\n\t}\n}", "public function validateDate($stringDate){\n $date_arr = explode('-', $stringDate);\n $date = new DateTime($stringDate);\n $current_date = new DateTime();\n $dateOk = false;\n if (count($date_arr) == 3 && strlen($stringDate) == 10) {\n if (checkdate($date_arr[2],$date_arr[1],$date_arr[0])) {\n if ($date <= $current_date) {\n $dateOk = true;\n }\n }\n }\n return $dateOk;\n }", "public function test_validDate_PresentGoodFormatBadDate_Close()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"2016-02-31\"),\n \"Validator :: validDate :: False when invalid date provided 2016-02-31\");\n }", "function check_date($date)\n{\n\tif(false === strtotime($date) )\n\t\treturn false;\n\t\t\n\telse{\n\t\tlist($month, $day, $year) = explode('/',$date);\n\t\tif(!checkdate($month, $day, $year)) return false;\n\t}\n\t\n\treturn true;\n}", "function validate($date)\n\t{\n\t\treturn checkdate($date['F'], $date['d'], $date['Y']);\n\t}", "function IsDate( $date ){\n\t\t/*$fecha = explode('-', $date);\n\t\tif( count($fecha) != 3 ){\n\t\t\treturn FALSE;\n\t\t}\n\t\t$dd = $fecha[0];\n\t\t$mm = $fecha[1];\n\t\t$yy = $fecha[2];\n\t\t// $Stamp = strtotime( $date );\n\t\t// $Month = date( 'm', $Stamp );\n\t\t// $Day = date( 'd', $Stamp );\n\t\t// $Year = date( 'Y', $Stamp );\n\n\t\t// return checkdate( $Month, $Day, $Year );\n\t\treturn checkdate( $mm, $dd, $yy );\n\t\t*/\n\n\t\t// para probar\n\t\t \n\t $pattern=\"/^(0?[1-9]|[12][0-9]|3[01])[\\/|-](0?[1-9]|[1][012])[\\/|-]((19|20)?[0-9]{2})$/\";\n\n\t if(preg_match($pattern,$date))\n\t {\n\t $values=preg_split(\"[\\/|-]\",$date);\n\t if(checkdate($values[1],$values[0],$values[2]))\n\t return true;\n\t }\n\t return false;\n\t}", "public static function is_date($date) {\n if (!preg_match('@^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$@', $date, $matches)) {\n return false;\n }\n if (!checkdate($matches[2], $matches[3], $matches[1])) {\n return false;\n }\n return true;\n }", "public function isDate($date_str){\n\t\t\n\t\t/*$date = $date_str;\n\t\t$d = DateTime::createFromFormat('Y-m-d', strtotime($date));\n\t\treturn $d && $d->format('Y-m-d') === $date;*/\n\n\t\tif(strlen($date_str) != 10 || strpos($date_str, \"-\") === false){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tlist ( $y, $m, $d ) = explode(\"-\", $date_str);\n\t\t\n\t\tif (checkdate($m, $d, $y)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "function validateDate($date, $format = 'Y-m-d')\n{\n\t$d = DateTime::createFromFormat($format, $date);\n\treturn $d && $d->format($format) == $date;\n}", "function isValidDate($str)\n {\n if (preg_match('/\\b(\\d{4})-(\\d{2})-(\\d{2})\\b/', $str, $matches)) {\n if (checkdate($matches[2], $matches[3], $matches[1])) {\n return true;\n }\n }\n return false;\n }", "public function test_validDate_PresentAndBadFormat_YYYYMMDD()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(20170101),\n \"Validator :: validDate :: False when no hyphens in date\");\n }", "function validateDate($customDate) {\n\tglobal $evenMonthDays, $oddMonthDays;\n\tif(strpos($customDate, \"-\") == false){\n\t\treturn false;\n\t}\n\tlist($d,$m,$y) = explode('-', $customDate);\n\t$error = 0;\n\t$d = intval($d);\n\t$yearDays = 21;\n\tif($y%5 == 0){\n\t\t$yearDays = 20;\n\t}\n\n\tif($d < 0 || (strlen($d) > 2)){\n\t\t$error ++;\n\t}\n\t\n\tif($m < 0 || $m > 13 || (strlen($m) > 2)){\n\t\t$error ++;\n\t}\n\n\t$m = intval($m);\n\t/*Check day as per even or odd month range */\n\n\tif($m%2 == 0){\n\t\tif($d > $evenMonthDays){\n\t\t\t$error++;\n\t\t}\n\t}else{\n\t\t($d > $oddMonthDays);\n\t\tif($d > $oddMonthDays){\n\t\t\t$error++;\n\t\t}\n\t}\n\tif($y < 1990 || (strlen($y) != 4)){\n\t\t$error ++;\n\t}\n\tif($error > 0) return false;\n return true;\n}", "public function check_date($date) {\n\n\t\t// date not required\n\t\tif (empty($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// if set, check\n\t\tif (check_uk_date($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "public function check_date($date) {\n\n\t\t// date not required\n\t\tif (empty($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// if set, check\n\t\tif (check_uk_date($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "public function test_validDate_PresentGoodFormatBadDate_NotClose()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"9999-99-99\"),\n \"Validator :: validDate :: False when invalid date provided in correct format 9999-99-99\");\n }", "public function check_format_date($date)\n {\n if (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date)) {\n return true;\n } else {\n return false;\n }\n }", "function boj_validate_date( $date ) {\n // first test: pattern matching\n if( !preg_match( '!\\d{2}/\\d{2}/\\d{4}!', $date ) )\n return 'wrong pattern';\n \n // second test: is date valid?\n $timestamp = strtotime( $date );\n if( !$ timestamp )\n return 'date invalid';\n \n // third test: is the date from the past?\n if( $timestamp <= time() )\n return 'past date';\n\n // So far, so good\n return true;\n}", "public function date_valid($date)\n {\n //extract the separater\n $sep1 = substr($date,2,1);\n $sep2 = substr($date,5,1);\n\n\n //check if the field is empty or not\n if(empty($date))\n {\n $this->form_validation->set_message('date_valid', 'The Session Date field is required');\n return FALSE;\n }\n\n //check if the separaters match with the one typed\n //to ensure only numerical characters and dash is typed\n if($sep1!='-' || $sep2!='-' || preg_match('/[^0-9\\-]/i',$date))\n {\n $this->form_validation->set_message('date_valid', 'The Session Date field can only have - separater and numeric data');\n return FALSE;\n }\n else\n {\n //convert the non-separater part into an array and convert all elements to an array\n $date1 = explode('-',$date);\n\n\n foreach($date1 as $index=>$value)\n {\n $date1[$index] = (int)$value;\n }\n\n $day = $date1[0];\n $month = $date1[1];\n $year = $date1[2];\n\n $check = checkdate($month, $day, $year);\n\n if($check==FALSE)\n {\n $this->form_validation->set_message('date_valid', 'The Session Date Field does not contain a Valid Date ');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }\n }", "public function checkvaliddate($str)\n {\n $_tmp = explode('-', $str);\n // Not a valid date\n if(count($_tmp) != 3 || empty($_tmp[2]))\n {\n $this->form_validation->set_message('checkvaliddate', 'Date non valide');\n return false;\n }\n\n if(checkdate($_tmp[1], $_tmp[2], $_tmp[0]))\n return true;\n else {\n $this->form_validation->set_message('checkvaliddate', 'Date non valide');\n return false;\n } \n }", "public static function isDate($i_sDate) {\n \n\t\t$blnValid = TRUE;\n \n\t\tif ( $i_sDate == \"0000/00/00\" ) { return $blnValid; }\n \n\t// check the format first (may not be necessary as we use checkdate() below)\n\t\tif(!ereg (\"^[0-9]{4}/[0-9]{2}/[0-9]{2}$\", $i_sDate)) {\n\t\t\t$blnValid = FALSE;\n\t\t} else {\n\t//format is okay, check that days, months, years are okay\n\t\t\t$arrDate = explode(\"/\", $i_sDate); // break up date by slash\n\t\t\t$intMonth = $arrDate[1];\n\t\t\t$intDay = $arrDate[2];\n\t\t\t$intYear = $arrDate[0];\n \n\t\t\t$intIsDate = checkdate($intMonth, $intDay, $intYear);\n \n\t\t\tif(!$intIsDate) {\n\t\t\t\t$blnValid = FALSE;\n\t\t\t}\n\t\t}//end else\n \n\t\treturn ($blnValid);\n\t}", "public function isValidDate($date) {\n return date('Y/m/d', strtotime($date)) != '1970/01/01';\n }", "public function valid_date($sDate, $sFormat)\n {\n // If blank, then assume the date is not required\n if (empty($sDate)) {\n return true;\n }\n\n if (empty($sFormat)) {\n $sFormat = 'Y-m-d';\n }\n\n if (!array_key_exists('valid_date', $this->_error_messages)) {\n $this->set_message('valid_date', lang('fv_valid_date_field'));\n }\n\n try {\n\n $oDate = \\DateTime::createFromFormat($sFormat, $sDate);\n\n if (empty($oDate)) {\n return false;\n }\n\n return $oDate->format($sFormat) == $sDate;\n\n } catch (\\Exception $e) {\n\n return false;\n }\n }", "function validateDate($date, $format = 'Y-m-d') {\n\t $d = DateTime::createFromFormat($format, $date);\n\t return $d && $d->format($format) === $date;\n }", "public static function checkDate(string $date): bool\n {\n return (bool)strtotime($date);\n }", "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "public static function checkDate($date)\n {\n if($date == '0000-00-00' or $date == '0000-00-00 00:00:00') return true;\n $stamp = strtotime($date);\n if(!is_numeric($stamp)) return false;\n return checkdate(date('m', $stamp), date('d', $stamp), date('Y', $stamp));\n }", "function validateDate($date, $format = 'Y-m-d H:i:s')\r\n\t\t{\r\n\t\t $d = DateTime::createFromFormat($format, $date);\r\n\t\t return $d && $d->format($format) == $date;\r\n\t\t}", "function validateDate($date, $format = 'Y-m-d')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) === $date;\n}", "public static function isValidDate( $date ) {\r\n \t\r\n \t$parts = explode('/', $date);\r\n \t\r\n \tif ( count($parts) == 3 ) { \t\t\r\n \t\tif ( checkdate($parts[1], $parts[0], $parts[2]) ) {\r\n \t\t\t$timestamp = mktime(0,0,0,$parts[1],$parts[0], $parts[2]);\r\n \t\t\treturn $timestamp;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t} \t\t\r\n \t} else {\r\n \t\treturn false;\r\n \t} \t\r\n }", "function verifyDate($date, $add_doctor='') {\n\n // if date not in the format YYY-MM-DD\n if (!preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $date)) {\n\techo \"<p style='color: red;'>\" . \"<b>Error: Invalid Date</b>\" . \"</p>\";\n\treturn False;\n }\n\n // check if individual parts of date are valid\n $date_array = explode('-', $date);\n\n if (!empty($add_doctor)) { // if adding a doctor, check if their licence date is not above current year\n if ($date_array[0] > gmdate(\"Y\")){\n \techo \"<p style='color: red;'>\" . \"<b>Error: Invalid Date</b>\" . \"</p>\";\n \treturn False;\n }\n }\n\n if ($date_array[1] > 12) return False; // if month is greater than 12, then invalid date\n if ($date_array[2] > 31) return False; // if date is greater than 31, invalid date\n return True;\n}", "function validateDate($date, $format = 'd/m/Y'){\n\t\t\t\t\t$d = DateTime::createFromFormat($format, $date);\n\t\t\t\t\treturn $d && $d->format($format) === $date;\n\t\t\t\t\t}", "public static function isDateTimeStringValid($sDateString) {\n return (strlen($sDateString) >= 6 ? (bool)strtotime($sDateString) : FALSE);\n }", "public function isValidDateFormat($pDate)\n\t{\n\t\t//YYYY-MM-DD\n\t\tif(preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$pDate))\n\t\t//if(preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/',$pDate))\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}", "public function validateDateEntry($inDate) {\n $isItEmpty = self::cannotBeEmpty($inDate);\n if ($isItEmpty) {\n return false;\n } else {\n if (self::isValidDate($inDate)) {\n return true;\n } else {\n return false;\n }\n }\n }", "protected function verifyDate($date) {\n $dateFormat = \\DateTime::createFromFormat($this->dateFormat, $date);\n if (!$dateFormat instanceof \\DateTime) {\n return false;\n }else{\n return true;\n }\n }", "public function validateDate($date, $format = 'Y-m-d H:i:s') {\n\t $d = DateTime::createFromFormat($format, $date);\n\t return $d && $d->format($format) == $date;\n\t}", "function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function validateDate($date, $format = 'Y-m-d H:i:s') {\n\t $d = \\DateTime::createFromFormat($format, $date);\n\t return $d && $d->format($format) == $date;\n\t}", "function check_date($date){\n if (ereg('^([0-9]{4})[-,/]([0-9]{2})[-,/]([0-9]{2})$',$date)){\n $dateArr = split('[-,/]',$date);\n $m=$dateArr[1]; $d=$dateArr[2]; $y=$dateArr[0];\n $isVaild = checkdate($m,$d,$y);\n }\n if (!$isVaild){\n return false;\n }\n else{\n return True;\n }\n }", "function validateDate($date,$format ='Y-m-d'){\n$d = dateTime::createFromFormat($format,$date);\n\nif($d && $d->format($format) == $date){\nreturn true;\n } else {\n return false;\n }\n}", "public function validate_startdate() {\n return $this->validate_date('Aloituspäivämäärän', $this->startdate);\n }", "public function test_validDate_PresentAndBadFormat_MM_DD_YYYY()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"03-30-2017\"),\n \"Validator :: validDate :: False when MM-DD-YYYY date format provided\");\n }", "function validDate($date){\n if (preg_match(\"/^(1[0-2]|0{0,1}[1-9])\\/(3[0-1]|[0-2]{0,1}[1-9])\\/[0-9]{4,4}$/\",$date) !== 1 || $date != htmlspecialchars($date)) {\n return false;\n }\n return true;\n}", "function VerifyDate( $date )\n{\n\t$date_exploded = ExplodeDate( (string) $date );\n\n\treturn checkdate(\n\t\t(int) $date_exploded['month'],\n\t\t(int) $date_exploded['day'],\n\t\t(int) $date_exploded['year']\n\t);\n}", "function validateDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }", "public function CheckSimpleDate($date) {\n\n \t\t$string = explode(' of ', $date);\n \t\t$day = intval($string[0]) < 10 ? '0'.intval($string[0]) : intval($string[0]);\n \t\t$date = $this->year.'-'.$this->CheckMonth($string[1]).'-'.$day;\n\n \t\treturn $date;\n \t}", "static public function IsDate($date)\n {\n if (!preg_match('/^(\\d{4})[\\/-]?(\\d{1,2})[\\/-]?(\\d{1,2})(\\s(\\d{1,2}):(\\d{1,2}):(\\d{1,2}))?$/', $date, $matches)) {\n return false;\n }\n\n // 支持0000-00-00格式\n if (0 == intval($matches[1])) $matches[1] = 1970;\n if (0 == intval($matches[2])) $matches[2] = 1;\n if (0 == intval($matches[3])) $matches[3] = 1;\n\n return checkdate($matches[2], $matches[3], $matches[1]);\n }", "public function validateDate($date, $format = 'Y-m-d') {\n $d = DrupalDateTime::createFromFormat($format, $date);\n // The Y ( 4 digits year ) returns TRUE for any integer with any number of\n // digits so changing the comparison from == to === fixes the issue.\n return $d && $d->format($format) === $date;\n }", "function _isValidStartDate()\n {\n if (strtotime($this->data[$this->name]['redemption_start_date']) >= strtotime(date('Y-m-d'))) {\n return true;\n }\n return false;\n }", "function epfl_scheduler_validate_date( string $date, string $format = 'Y-m-d' ): bool {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public static function isDate($date){\n $timestamp = strtotime($date);\n if(!is_numeric($timestamp)){\n return false;\n }\n $month = date('m', $timestamp);\n $day = date('d', $timestamp);\n $year = date('Y', $timestamp);\n if(checkdate($month, $day, $year)){\n return true;\n }\n return false;\n }", "public static function validateDate($string)\n {\n// $date = new DateTime($string);\n $date = date_create_from_format(\"d.m.Y\", $string);\n \n if ($date && $string && $date->format(\"Y\") > 1970)\n {\n return true;\n }\n \n return false;\n }", "function validatorDateTime($date){\n\t$format = 'Y-m-d H:i:s';\n\t\t\n\tif(DateTime::createFromFormat($format, $date) == false){\n\t\treturn false;\n\t}\n\telse\n\t\treturn true;\n}" ]
[ "0.74197954", "0.6969477", "0.6894445", "0.6841316", "0.6837362", "0.6815581", "0.67970324", "0.67744076", "0.6716108", "0.67120326", "0.6704664", "0.6684145", "0.66765654", "0.667356", "0.6622271", "0.6622271", "0.6622271", "0.6622271", "0.65815616", "0.6576226", "0.656074", "0.65571743", "0.65554196", "0.6542876", "0.6526341", "0.6507509", "0.64871657", "0.6474752", "0.6451433", "0.64497584", "0.64244777", "0.6399856", "0.63827205", "0.63471884", "0.6345551", "0.6342811", "0.63337064", "0.6330427", "0.6306668", "0.6306234", "0.62997484", "0.6275054", "0.6265658", "0.6242991", "0.62421584", "0.62409616", "0.62216645", "0.62046444", "0.6195822", "0.61857945", "0.6173338", "0.6162166", "0.61456627", "0.610889", "0.6101825", "0.60991085", "0.60937506", "0.6090757", "0.60822827", "0.6077809", "0.6077809", "0.60724443", "0.60685223", "0.6059261", "0.6037355", "0.6036159", "0.6028921", "0.60201806", "0.6012127", "0.6004955", "0.5993192", "0.5983729", "0.59818566", "0.59807277", "0.59705883", "0.595352", "0.59395355", "0.59387285", "0.5930821", "0.591917", "0.59148127", "0.59108794", "0.5910495", "0.5905403", "0.5903793", "0.59018576", "0.5897728", "0.5893647", "0.5878663", "0.5860384", "0.58580863", "0.58570427", "0.5840684", "0.5840337", "0.58386695", "0.58365244", "0.5828104", "0.582679", "0.58220273", "0.5820231" ]
0.8272387
0
// IsNotNull // IsNotNull() Returns TRUE if the value is not NULL Returns TRUE if the value is not NULL This will return TRUE if $mixValue == 0
// IsNotNull // IsNotNull() Возвращает TRUE, если значение не равно NULL Возвращает TRUE, если значение не равно NULL Этот метод вернет TRUE, если $mixValue == 0
static function IsNotNull($mixValue) { // take care of the special case where $mixValue == 0 if (is_numeric($mixValue)) { // if the value is a number then it can't be NULL return TRUE; } return (bool)($mixValue != NULL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNull($value = null)\n{\n return \\is_null($value);\n}", "public function isNotNull()\n {\n return !$this->isNull();\n }", "static function NonZeroInteger($mixValue)\n\t{\n\t\tif ((int)$mixValue != 0 && (string)(int)$mixValue == (string)$mixValue)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "static function IsNotEmptyString($mixValue)\n\t{\n\t\t$mixValue = trim($mixValue);\n\t\treturn (strlen($mixValue) > 0)? TRUE : FALSE;\n\t}", "function not_null($value) {\n\t\tswitch(gettype($value)){\n\t\t\tcase 'boolean':\n\t\t\tcase 'object':\n\t\t\tcase 'resource':\n\t\t\tcase 'integer':\n\t\t\tcase 'double':\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\tif (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)){\n\t\t\t\t return true;\n\t\t\t\t} else {\n\t\t\t\t return false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'array':\n\t\t\t\tif (sizeof($value) > 0){\n\t\t\t\t return true;\n\t\t\t\t} else {\n\t\t\t\t return false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'NULL':\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function isnotnull($value) {\n return $this->setProperty('isnotnull', $value);\n }", "public function isnotnull($value) {\n return $this->setProperty('isnotnull', $value);\n }", "public function isNotNull() : bool\n {\n return $this->notNull;\n }", "public function isNull($value)\n {\n return \\is_null($value);\n }", "private function _isNotNull($value)\n\t{\n\n\t\tif ($value != null && $value != \"\")\n\t\t\treturn TRUE;\n\n\t\treturn false;\n\t}", "function buckys_not_null($value)\r\n{\r\n if( is_array($value) )\r\n {\r\n if( sizeof($value) > 0 )\r\n {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }else{\r\n if( (is_string($value) || is_int($value)) && ($value != '') && (strlen(trim($value)) > 0) )\r\n {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n}", "public function isNullValue($value) {\n\t\treturn is_null($value);\n\t}", "public function notNull();", "function isNull($value)\n {\n return ($value === '' || is_null($value));\n }", "function not_null($input) {\n return !is_null($input);\n}", "public static function isNotNull($value): void\n {\n assert(\n Validate::isNotNull($value),\n static::error('isNotNull', ['value' => $value])\n );\n }", "function nnr_not_null( $value ){\n\t\tif ( is_array( $value ) ){\n\t\t\tif ( sizeof( $value ) > 0 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\tif ( ( $value != '') && ( strtolower( $value ) != 'null') && ( strlen( trim( $value ) ) > 0) ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function not_null($value): bool {\n if (is_string($value)) {\n $new_value = trim_if_string($value);\n return $new_value !== '';\n }\n\n return $value !== null && !empty($value);\n}", "public static function isRequiredNull($value)\n {\n return is_null($value);\n }", "public function isNull()\n {\n return is_null($this->_value);\n }", "public function isnull($value) {\n return $this->setProperty('isnull', $value);\n }", "public function isnull($value) {\n return $this->setProperty('isnull', $value);\n }", "public function isNull(): bool\n\t{\n\t\treturn $this->value === null;\n\t}", "static function UnsignedNonZeroInteger($mixValue)\n\t{\n\t\tif ((int)$mixValue > 0 && (string)(int)$mixValue == (string)$mixValue)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function isNull()\n {\n return $this->_array === null && $this->_scalar === null;\n }", "public function isNull();", "public function isNullableSetToNull(string $property): bool;", "public function isNotNull($field);", "function strictIsset($test, $notZero = FALSE, $notEmptyString = TRUE, $notNull = TRUE) {\n if (!isset($test))\n return FALSE;\n if ($notZero && is_numeric($test) && intval($test) === 0)\n return FALSE;\n if ($notEmptyString && $test == \"\")\n return FALSE;\n if ($notNull && $test == null)\n return FALSE;\n return TRUE; \n}", "public function isNullable($field);", "function isNullValid()\n {\n return $this->getProperty('null');\n }", "final protected function shouldBeNull ($value) {\n\t\t$arguments = func_get_args();\n\t\tforeach ($arguments as $argument) {\n\t\t\tif (!is_null($argument)) {\n\t\t\t\treturn $this->fail();\n\t\t\t}\n\t\t}\n\t\treturn $this->pass();\n\t}", "function is_null($var)\n{\n return false;\n}", "function is_null($var)\n{\n\treturn false;\n}", "public static function isNullable(string $property): bool;", "function nullval($value)\r\n{\r\n if (is_null($value) || $value == \"\") {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "protected function isNotNull($var)\n {\n return\n false !== $var &&\n null !== $var &&\n '' !== $var &&\n !((is_array($var) || is_object($var)) && empty($var));\n }", "function jsonkit_is_value($mixed = null)\n {\n if(is_null($mixed))\n {\n return false;\n }\n if(is_bool($mixed) && $mixed === false)\n {\n return false;\n }\n if(is_array($mixed) && empty($mixed))\n {\n return false;\n }\n if(is_string($mixed) && $mixed === '')\n {\n return false;\n }\n return true;\n }", "function jsonkit_is_value($mixed = null)\n {\n if(is_null($mixed))\n {\n return false;\n }\n if(is_bool($mixed) && $mixed === false)\n {\n return false;\n }\n if(is_array($mixed) && empty($mixed))\n {\n return false;\n }\n if(is_string($mixed) && $mixed === '')\n {\n return false;\n }\n return true;\n }", "function estNull($var) {\n if (!isset($var) || empty($var) || $var == null) {\n return true;\n } else {\n return false;\n }\n}", "public function isNullable(): bool\n {\n return !empty($this->metadata['nillable']) || $this->isGenerated();\n }", "public static function isRequiredNotNull($value)\n {\n return ! is_null($value);\n }", "public function isValidWithNull()\n {\n $this->notEmptyValidator->setValue(null);\n $this->assertSame(false, $this->notEmptyValidator->isValid());\n }", "function isNull($field);", "private function notEmptyOrNull($value = null)\n {\n return (!is_null($value) && ($value !== ''));\n }", "public function isNull($field);", "function checkValue($val)\n {\n return !empty($val) && !is_null($val);\n }", "static function IsValidInteger($mixValue)\n\t{\n\t\tif ((string)(int)$mixValue == (string)$mixValue)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function isTypeNullable(): bool\n {\n return $this->type->isNullable();\n }", "public function isNull()\n {\n return false;\n }", "public function isNull() : bool\n {\n return $this->isNull;\n }", "function HasPresence($value) { \r return isset($value) && $value !== \"\";\r }", "public function isNull() {\n return false;\n }", "function presenceVal($value) {\n return !isset($value) || $value !== \"\";\n }", "public function isNullable()\n {\n return $this->isNullable;\n }", "function estNullOuVide($var) {\n if (!isset($var) || empty($var) || $var == null || $var == \"\") {\n return true;\n } else {\n return false;\n }\n}", "public function isNullable()\n {\n return $this->special === SpecialRole::nullable();\n }", "function EmptyNull($value){\n\t\tif(empty($value))\n\t\t\t$this->errors(\"empty\");\n\t\telse\n\t\t\treturn true;\n\t}", "public function containsValue($mixValue)\n {\n if (!is_scalar($mixValue)) {\n throw new DataTypeException(\"Only scalars can be checked!\");\n }\n foreach ($this->_value_ as $v) {\n if (mixValue==$v) {\n return true;\n }\n }\n return false;\n }", "public function isNull()\n {\n return (bool) ($this->getValueType()===ValueType::TYPE_NULL);\n }", "public function ifNull($val){\n if($val == null || $val == '')\n return true;\n else\n return false;\n }", "static function strHasValue($str) {\n return $str!==null && $str!=='';\n }", "private function checkAllowsNull(): bool\n {\n if ( ! $type = $this->reflectionProperty->getType()) {\n return true;\n }\n\n return $type->allowsNull();\n }", "function isNullOrEmpty($value) {\r\n return NULL === $value || '' === $value;\r\n}", "public static function isNull($value): void\n {\n assert(\n Validate::isNull($value),\n static::error('isNull', ['value' => $value])\n );\n }", "public function isValid($mixValue){\n\t\tif(is_null($mixValue)){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(is_object($mixValue)){\n\t\t\tif($this->hasOption('class')){\n\t\t\t\t$strClass = $this->options()->class;\n\n\t\t\t\tif($mixValue instanceof $strClass){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\tthrow new ClassException($mixValue, $strClass);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isNull()\n {\n if ($this->Name == 'NULL' || $this->Name == 'null') {\n return true;\n }\n\n return false;\n }", "public function fieldHasValue()\n {\n return $this->attributes->isSet('value');\n }", "public static function not_empty($var){\n\t\tif (isset($var) && !is_null($var)) return true;\n\t\telse return false;\n\t}", "public function passes($attribute, $value) // phpcs:ignore Squiz.Commenting.FunctionComment.ScalarTypeHintMissing\n\t{\n\t\treturn $value === null;\n\t}", "protected function hasNullCheckboxWithPlaceholder() : bool {}", "final public static function boolNull($value)\n {\n $return = null;\n\n if($value === null)\n $return = 'NULL';\n\n elseif($value === true)\n $return = 1;\n\n elseif($value === false)\n $return = 0;\n\n return $return;\n }", "public function isNullable()\n\t{\n\t\treturn $this->nullable;\n\t}", "public function nullable();", "protected function hasNullCheckboxButNoPlaceholder() : bool {}", "function hasPresence($value) {\r\n return !isBlank($value);\r\n }", "function has_presence($value){\n return isset($value) && $value !== \"\";\n}", "public function filterNullValues($value): bool\n {\n return !is_null($value);\n }", "public function isNone(): bool;", "public function hasValue() {\n return !is_null($this->value);\n }", "static function IsValidFNN($mixValue)\n\t{\n\t\treturn IsValidFNN($mixValue);\n\t}", "function ifnull($input, $alternative)\n{\n return (!isset($input) || is_null($input) || trim($input) == \"\" || trim($input) == \"undefined\" || trim($input) == \"null\") ? $alternative : $input;\n}", "public function isNotNull($expression)\n {\n return $expression.' IS NOT NULL';\n }", "function isNil($nil)\n{\n return preg_match(\"/^nil@nil$/\", $nil); //ok\n}", "abstract public function isNone($value);", "function IsNullOrEmpty($question)\n{\n return (!isset($question) || trim($question)==='');\n}", "public function isNil();", "static function IsMoneyValue($mixValue)\n\t{\n\t\t// remove whitespace and the $ if they are present\n\t\t$mixValue = trim($mixValue);\n\t\t$mixValue = ltrim($mixValue, \"$\");\n\t\t\n\t\t//check that the value is a float\n\t\tlist($fltValue, $strAppendedText) = sscanf($mixValue, \"%f%s\");\n\t\t\n\t\tif ($strAppendedText)\n\t\t{\n\t\t\t// there was some text after the float\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn (is_numeric($fltValue));\n\t}", "public function testNullEqualsFalseWhenAllowNullIsFalse()\n {\n $arguments = [null];\n\n $return = $this->call(StringValidation::create()->setAllowNull(false), $arguments);\n\n $this->assertEquals(false, $return);\n }", "function removeNullsFromArray(&$arrmixValues) {\n foreach ($arrmixValues as $mixKey => $mixValue) {\n if (true == is_array($mixValue)) {\n removeNullsFromArray($arrmixValues[$mixKey]);\n }\n\n if (true == is_null($mixValue)) {\n unset($arrmixValues[$mixKey]);\n }\n }\n}", "public static function isNan($value)\n {\n return is_nan($value);\n }", "function is_nan($val)\n{\n return true;\n}", "public function _required($value)\n {\n $passed = !($value === '' || $value === null);\n\n return (bool) $passed;\n }", "static function UnsignedFloat($mixValue)\n\t{\n\t\tif ((float)$mixValue >= 0 && (string)(float)$mixValue == (string)$mixValue)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function ju_nes($v):bool {return is_null($v) || '' === $v;}", "public function testAcceptableNullValue()\n {\n }", "public function isZero(): bool {\n return gmp_cmp($this->value, 0) === 0;\n }", "public function isEmpty($value = null): bool\n {\n return empty($value ?? $this->value);\n }", "function issetNE($var) {\n return isset($var) && !empty($var);\n}", "public static function not_empty($value) {\n\t\t// NOTE: we cannot use empty(), because '0' will be empty, but it can be in user input and it's not empty input.\n\t\treturn $value != '' && $value != [];\n\t}" ]
[ "0.6138052", "0.60997266", "0.60764426", "0.59772414", "0.5969182", "0.5948857", "0.5948857", "0.58857113", "0.58242804", "0.5819009", "0.57519394", "0.5742671", "0.57363707", "0.5722936", "0.5722163", "0.5707536", "0.56073886", "0.5599908", "0.5571832", "0.5567101", "0.5558026", "0.5558026", "0.55384946", "0.5536274", "0.5474984", "0.5453584", "0.545254", "0.54483205", "0.54009014", "0.53746116", "0.5368944", "0.53465986", "0.5334999", "0.5324381", "0.5305397", "0.527895", "0.5261202", "0.52574736", "0.52574736", "0.5256913", "0.52496433", "0.52485216", "0.52319795", "0.52190435", "0.52189904", "0.5169816", "0.5159209", "0.515266", "0.5113102", "0.50922", "0.50858486", "0.5082801", "0.50593317", "0.5053028", "0.50508153", "0.5047177", "0.50463194", "0.5045579", "0.5044053", "0.503513", "0.50190973", "0.4994058", "0.49647653", "0.49442244", "0.4942443", "0.4940403", "0.4920717", "0.490911", "0.4905485", "0.4890585", "0.48888388", "0.48831233", "0.48756862", "0.48626393", "0.4853602", "0.4831932", "0.48229396", "0.48170048", "0.481359", "0.48126695", "0.47972304", "0.47915715", "0.47827232", "0.47787628", "0.47763819", "0.47648838", "0.47642845", "0.47446066", "0.47240582", "0.47132474", "0.4698896", "0.46968427", "0.46859556", "0.46826917", "0.46785632", "0.46624064", "0.46590543", "0.46490872", "0.46458408", "0.46375182" ]
0.8068408
0
// IsValidFNN // IsValidFNN() Returns TRUE if the value is a valid FNN Returns TRUE if the value is a valid FNN Wrapper for the function IsValidFNN found in framework/functions.php
// IsValidFNN // IsValidFNN() Возвращает TRUE, если значение является допустимым FNN Возвращает TRUE, если значение является допустимым FNN Обертка для функции IsValidFNN, найденной в framework/functions.php
static function IsValidFNN($mixValue) { return IsValidFNN($mixValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NIF_check($NIF) {\n if (isValidNIF($NIF)) {\n return true;\n } else {\n return false;\n }\n }", "public function isValidNif($nif)\n {\n if (!is_numeric($nif) || strlen($nif) != 9) {\n return false;\n }\n\n $narray = str_split($nif);\n\n if ($narray[0] != 1 && $narray[0] != 2 && $narray[0] != 5 && $narray[0] != 6 && $narray[0] != 8 && $narray[0] != 9) {\n return false;\n }\n\n $checkbit = $narray[0] * 9;\n\n for ($i=2; $i<=8; $i++) {\n $checkbit += $nif[$i-1] * (10 - $i);\n }\n\n $checkbit = 11 - ($checkbit % 11);\n\n if ($checkbit >= 10) {\n $checkbit = 0;\n }\n\n if ($nif[8] == $checkbit) {\n return true;\n }\n\n return false;\n }", "function validarnfe($xmlnfe){\n\n\t\tswitch($this->versaoapi){\n\t\t\tcase \"4.0.0\":\n\t\t\t\t$resp = $this->nfeTools->validarXml($xmlnfe);\n\t\t\t\tbreak;\n\t\t\tcase \"5.0.0\":\n\t\t\t\t$resp = TRUE; //$this->nfeTools->isValid($this->versaonfe, $xmlnfe, \"nfe\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(!$resp){\n\t\t\t$_SESSION[\"ERROR\"] = \"Estrutura do XML da NFe contem erros --- <br>\";\n\t\t\t$err = \"\";\n\t\t\t$linhaslog[] .= \"Houve erro na validaçao da NF\";\n\t\t\tforeach($this->nfeTools->errors as $erro){\n\t\t\t\tforeach($erro as $msgerro){\n\t\t\t\t\t$linhaslog[] .= $erro;\n\t\t\t\t\t//$err .= $erro.'<br>';\n\t\t\t\t\t$err .= $msgerro.\"<br>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$_SESSION[\"ERROR\"] .= $err;\n\t\t\tif($gravarlog){\n\t\t\t\tfile_put_contents(\"../temp/log\".date(\"Y-m-d H:i:s\").\".txt\", implode(\"\\r\\n\", $linhaslog));\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "protected function validateNif ($nif /*$check*/) {\n $nif_codes = 'TRWAGMYFPDXBNJZSQVHLCKE';\n\n // $nif = strtoupper (array_pop ($check));\n\n $sum = (string) $this->getCifSum ($nif);\n $n = 10 - substr($sum, -1);\n\n if (preg_match ('/^[0-9]{8}[A-Z]{1}$/', $nif)) {\n // DNIs\n $num = substr($nif, 0, 8);\n\n return ($nif[8] == $nif_codes[$num % 23]);\n } elseif (preg_match ('/^[XYZ][0-9]{7}[A-Z]{1}$/', $nif)) {\n // NIEs normales\n $tmp = substr ($nif, 1, 7);\n $tmp = strtr(substr ($nif, 0, 1), 'XYZ', '012') . $tmp;\n\n return ($nif[8] == $nif_codes[$tmp % 23]);\n } elseif (preg_match ('/^[KLM]{1}/', $nif)) {\n // NIFs especiales\n return ($nif[8] == chr($n + 64));\n } elseif (preg_match ('/^[T]{1}[A-Z0-9]{8}$/', $nif)) {\n // NIE extraño\n return true;\n }\n\n return false;\n }", "public function isValidFEN($string)\n {\n return preg_match(\"#^(([a-z0-8]{1,8})/){7}([a-z0-8]{1,8}) (w|b) ((k|q){4}|-) - ([0-9]+) ([0-9]+)$#i\", $string);\n }", "function dni_check($dni) {\n\n $numerosDNI = substr($dni, 0, 8);\n $letraDNI = substr($dni, 8, 1);\n $letraDNI = strtoupper($letraDNI);\n\n if (is_numeric($numerosDNI) && ($letraDNI == dni_LetraNIF($dni))) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "function is_US_SSN($ssn){\n\n\tif (preg_match('/^(00[1-9]|0[1-9][0-9]|[1-6][0-9][0-9]|7[0-6][0-9]|77[0-2]\\-\\d{2}\\-\\d{4})$/', $ssn) ){\n\t\t\n\t\treturn true;\t\n\t}\n\telse{\n\t\n\t\treturn false;\n\t}\n}", "public static function validateNarration($narration) {\n if (preg_match(\"/^[a-zA-Z0-9\\.\\s!@$&():;\\'\\\",-]{4,300}$/\", $narration)) {\n return true;\n } else {\n return false;\n }\n }", "public function is_nif_used($nif)\n {\n $query = $this->db->get_where('account', array('nif' => $nif));\n if($query->num_rows() == 1)\n return true;\n return false;\n }", "protected static function isValidRuntimeFunctionName(string $fn): bool {\n\t\treturn (bool) preg_match(\"/^[a-zA-Z][a-zA-Z0-9_.]*[a-zA-Z0-9_]$/\", $fn);\n\t}", "function validFname(String $fname) {\n\t\t\t\t\t\t\tglobal $errCtr;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (empty($fname)) {\n\t\t\t\t\t\t\t\techo \"<script>alert('Nothing was entered for firstname');</script>\";\n\t\t\t\t\t\t\t\t$errCtr++;\n\t\t\t\t\t\t\t} else if (is_numeric($fname)) {\n\t\t\t\t\t\t\t\techo \"<script>alert('$fname is invalid, firstname should not contain numbers');</script>\";\n\t\t\t\t\t\t\t\t$fname = \"\";\n\t\t\t\t\t\t\t\t$errCtr++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $fname;\n\t\t\t\t\t\t}", "public function setFaxnbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->faxnbr !== $v) {\n $this->faxnbr = $v;\n $this->modifiedColumns[CarthedTableMap::COL_FAXNBR] = true;\n }\n\n return $this;\n }", "protected function validaCPF($cpf = null) {\n if (empty($cpf)) {\n return false;\n }\n $cpf = preg_replace('/[^[:digit:]]/', '', $cpf);\n $cpf = str_pad($cpf, 11, '0', STR_PAD_LEFT);\n if (strlen($cpf) != 11) {\n return false;\n }\n else if ($cpf == '00000000000' ||\n $cpf == '11111111111' ||\n $cpf == '22222222222' ||\n $cpf == '33333333333' ||\n $cpf == '44444444444' ||\n $cpf == '55555555555' ||\n $cpf == '66666666666' ||\n $cpf == '77777777777' ||\n $cpf == '88888888888' ||\n $cpf == '99999999999') {\n return false;\n } else {\n for ($t = 9; $t < 11; $t++) {\n for ($d = 0, $c = 0; $c < $t; $c++) {\n $d += $cpf{$c} * (($t + 1) - $c);\n }\n $d = ((10 * $d) % 11) % 10;\n if ($cpf{$c} != $d) {\n return false;\n }\n }\n return true;\n }\n }\n\n /**\n * <b>PROTECTED FUNCTION</b>\n * <br>Validador de documento de CNPJ.\n * <protected>\n * \n * @param string $cnpj CNPJ informado\n * @return boolean OK|ERRO\n * @link https://www.todoespacoonline.com/w/2014/08/validar-cnpj-com-php/\n * @author Manoel Louro <manoel.louro@redetelecom.com.br>\n * @date 17/06/2021\n */\n protected function validaCNPJ($cnpj) {\n $cnpj = preg_replace('/[^0-9]/', '', $cnpj);\n $cnpj = (string) $cnpj;\n $cnpj_original = $cnpj;\n $primeiros_numeros_cnpj = substr($cnpj, 0, 12);\n if (!function_exists('multiplica_cnpj')) {\n function multiplica_cnpj($cnpj, $posicao = 5) {\n $calculo = 0;\n for ($i = 0; $i < strlen($cnpj); $i++) {\n $calculo = $calculo + ( $cnpj[$i] * $posicao );\n $posicao--;\n if ($posicao < 2) {\n $posicao = 9;\n }\n }\n return $calculo;\n }\n }\n $primeiro_calculo = multiplica_cnpj($primeiros_numeros_cnpj);\n $primeiro_digito = ( $primeiro_calculo % 11 ) < 2 ? 0 : 11 - ( $primeiro_calculo % 11 );\n $primeiros_numeros_cnpj .= $primeiro_digito;\n $segundo_calculo = multiplica_cnpj($primeiros_numeros_cnpj, 6);\n $segundo_digito = ( $segundo_calculo % 11 ) < 2 ? 0 : 11 - ( $segundo_calculo % 11 );\n $cnpj = $primeiros_numeros_cnpj . $segundo_digito;\n if ($cnpj === $cnpj_original) {\n return true;\n }\n }\n\n /**\n * <b>PROTECTED FUNCTION</b>\n * <br>Efetua conexão webservice para obter endereço atraves do cep informado.\n * <protected>\n * \n * @param string $cep CEP informado\n * @return string XML de retorno do <b>VIA CEP</b>\n * @link https://www.youtube.com/watch?v=MxXUyqzXSwE\n * @author Manoel Louro <manoel.louro@redetelecom.com.br>\n * @date 17/06/2021\n */\n protected function getEnderecoViaCep($cep) {\n $cep = preg_replace(\"/[^0-9]/\", \"\", $cep);\n $url = \"http://viacep.com.br/ws/$cep/xml/\";\n $xml = simplexml_load_file($url);\n return $xml;\n }\n \n}", "function verifNom($fnom) {\n\t\tif (!preg_match('/^[a-zA-Z ]*$/', $fnom) || strlen($fnom) < 2 || strlen($fnom) > 25) { return FALSE; }\n\t\telse { return TRUE; }\n\t}", "public function validate_fax_number($number)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (preg_match(\"/([:;\\/#!@])/\", $number))\n return lang('contact_extension_fax_number_is_invalid');\n }", "public function isFqdn() : bool {\n\t\treturn (\n\t\t\t$this->isValid() &&\n\t\t\t(! empty($this->suffix) || $this->isIp(false))\n\t\t);\n\t}", "public function hasOntologyFSN()\n {\n return $this->ontologyFSN != null;\n }", "static function valid_issn( $issn ) {\n\n if(preg_match('#^[0-9]{4}-[0-9]{3}[0-9X]$#u', $issn) !== 1)\n return false;\n $issn_without_dash = mb_substr($issn, 0, 4) . mb_substr($issn, 5, 4);\n $check = 0;\n for($i=8; $i>=2 ; $i--)\n {\n $check += $issn_without_dash[8-$i]*$i;\n }\n $check = $check % 11;\n if($check !== 0)\n $check = 11-$check;\n if($check === 10)\n $check = 'X';\n else\n $check = (string)$check;\n\n return $check === $issn[8];\n }", "public function validate(): bool\n {\n if (! preg_match('/^[0-9]{10}$/', $this->number)) {\n throw new InvalidNhsNumberException('An NHS number must be numeric and 10 characters long.');\n }\n\n $total = $this->getChecksumTotal();\n $checkNumber = (int) substr($this->number, 9, 1);\n\n if ($total !== $checkNumber) {\n throw new InvalidNhsNumberException('The NHS number\\'s check digit does not match.');\n }\n\n return true;\n }", "public function validateBankNoteAmount($amount,$nFifties){\n if ($nFifties > 0){\n if ($amount % ($nFifties * self::FIFTIES) == 0){\n\n $this->fifties-= $nFifties;\n return true;\n }\n }\n\n\n $diff = $amount - ($nFifties * self::FIFTIES);\n\n\n $nTwenties = $this->precalculateTwenties($diff,$nFifties);\n //var_dump(sprintf(\"diff %s : twenties %s: fifties %s and dif/20 %s\",$diff,$nTwenties,$nFifties,$diff % self::TWENTIES));\n\n if ($nTwenties !== false){\n\n if ($diff % self::TWENTIES === 0){\n\n $this->fifties-= $nFifties;\n $this->twenties-= $nTwenties;\n return true;\n } elseif ($nFifties == 0) {\n\n throw new \\Exception('ATM dispense only 50 / 20 notes');\n } else {\n\n $nFifties--;\n return $this->validateBankNoteAmount($amount,$nFifties);\n }\n\n } else {\n throw new \\Exception ('Lack of 20ties notes in ATM');\n }\n\n }", "public function validar_dni($dni){\n $letra = substr($dni, -1);\n $letra = strtoupper($letra);\n $numeros = substr($dni, 0, -1);\n settype($numeros, \"integer\");\n if(settype($numeros, \"integer\")){\n if ( substr(\"TRWAGMYFPDXBNJZSQVHLCKE\", $numeros % 23, 1) == $letra && strlen($letra) == 1 && strlen ($numeros) == 8 ){\n return true;\n }else{\n return false;\n }\n }\n return false;\n }", "public function isValid($value)\n\t{\n\t\t$phoneUtil = PhoneNumberUtil::getInstance();\n\t\ttry\n\t\t{\n\t\t\t$phoneNumber = $phoneUtil->parse($value, 'FR');\n\t\t\treturn $phoneUtil->isValidNumber($phoneNumber);\n\t\t}\n\t\tcatch (NumberParseException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public static function check_nyc_phone_number($full_phone) {\n\t\tif (strpos($full_phone, '+1') === 0) {\n\t\t\t$full_phone = substr($full_phone, 2);\n\t\t}\n\n\t\tif ($full_phone[0] == '1') {\n\t\t\t$full_phone = substr($full_phone, 1);\n\t\t}\n\n\t\t$phone = preg_replace('/[^0-9]+/', '', $full_phone);\n\n\t\tif (strlen($phone) < 10) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function is_valid_fqdn( $subdomain )\n\t{\n\t\treturn preg_match(\"/^[a-z0-9][a-z0-9\\-\\.]+[a-z]$/i\", $subdomain ); \n\t\t\n\t}", "function comprobarTelefonoSinException(string $tlfno): bool{\r\n if(!preg_match(\"/^[0-9]{9}$/\", $tlfno)){\r\n return false;\r\n }\r\n return true;\r\n }", "function ssn($ssn, $high_groups = null)\n {\n // remove any dashes, spaces, returns, tabs or slashes\n $ssn = str_replace(array('-','/',' ',\"\\t\",\"\\n\"), '', $ssn);\n\n // check if this is a 9-digit number\n if (!is_numeric($ssn) || !(strlen($ssn) == 9)) {\n return false;\n }\n $area = intval(substr($ssn, 0, 3));\n $group = intval(substr($ssn, 3, 2));\n $serial = intval(substr($ssn, 5, 4));\n\n if (is_null($high_groups)) {\n $high_groups = Validate_US::ssnGetHighGroups();\n }\n return Validate_US::ssnCheck($area, $group, $serial, $high_groups);\n }", "function verifMail($fmail) {\n\t\tif (!filter_var($fmail, FILTER_VALIDATE_EMAIL)) { return FALSE; }\n\t\telse { return TRUE; }\n\t}", "public function isValid(): bool\n {\n try {\n $this->validate();\n } catch (InvalidNhsNumberException $e) {\n return false;\n }\n\n return true;\n }", "public static function validateFloat($floatVariable)\n\t{\n\t\tif ($floatVariable != '' && is_float($floatVariable))\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}", "protected static function isValidApiFunctionName(string $fn): bool {\n\t\treturn (bool) preg_match(\"/^[a-zA-Z_-][a-zA-Z0-9_-]+$/\", $fn);\n\t}", "function validName($fname)\n {\n if (empty($fname) || !ctype_alpha($fname)) {\n $this->_f3->set(\"errors['fname']\", \"Invalid First Name\");\n return false;\n }\n return true;\n }", "function requiredFieldValidation($fn, $ln, $email, $pass1, $pass2)\n\t{\n\n\t\tif($fn == \"\" || $ln == \"\" || $email == \"\" || $pass1 == \"\" || $pass2 == \"\" )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function _validateNCName($token) {\r\n\t\r\n preg_match(\"/[a-zA-Z_]+[a-zA-Z_0-9.\\-]*/\", $token, $match);\r\n if (isset($match[0]) && $match[0] == $token)\r\n \treturn TRUE;\r\n return FALSE;\t\r\n}", "function nnr_not_null( $value ){\n\t\tif ( is_array( $value ) ){\n\t\t\tif ( sizeof( $value ) > 0 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\tif ( ( $value != '') && ( strtolower( $value ) != 'null') && ( strlen( trim( $value ) ) > 0) ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function valid_gb_phone_number($phonenumber) {\n // Check if number entered matches a valid format\n if (!valid_gb_phone_pattern($phonenumber)) {\n return FALSE;\n } else {\n // Extract number parts: prefix, NSN, extension\n $phonenumberPartsArray = (extract_gb_phone_parts($phonenumber));\n if (empty($phonenumberPartsArray)) {\n return FALSE;\n } else {\n $phonenumberNSN = $phonenumberPartsArray['NSN'];\n // Check if NSN entered is in a valid range\n if (!valid_gb_phone_range($phonenumberNSN)) {\n return FALSE;\n } else {\n return TRUE;\n }\n }\n }\n}", "function checkName ( $n )\n\t{\n\t\tif ( !preg_match ( '`^[[:alnum:]]{1,32}$`' , $n ) )\n\t\t{\n\t\t\treturn false ;\n\t\t} else {\n\t\t\treturn true ;\n\t\t}\n\t}", "public function testPhonePostalSsnPass() {\n\t\t$this->assertTrue ( Validation::postal ( 'text', null, 'testNl' ) );\n\t\t$this->assertTrue ( Validation::phone ( 'text', null, 'testDe' ) );\n\t\t$this->assertTrue ( Validation::ssn ( 'text', null, 'testNl' ) );\n\t}", "private function FRcheck($number)\n {\n // Valid for 32-bit systems\n if (4 === PHP_INT_SIZE) {\n return true;\n }\n\n if (0 === preg_match('/^\\d{11}$/', $number)) {\n return true;\n }\n\n // Extract the last nine digits as an integer.\n $total = (int) substr($number, -9);\n\n // Establish check digit.\n $total = (100 * $total + 12) % 97;\n\n // Compare it with the last character of the VAT number. If it's the same, then it's valid.\n return (int) substr($number, 0, 2) === $total;\n }", "function valid_gb_phone_range($phonenumberNSN) {\n // RegEx to define valid ranges for NSN by initial digits and length\n $patternGBvalidrange = '/^';\n $patternGBvalidrange .= '(';\n $patternGBvalidrange .= '(1[1-9]|2[03489]|3[0347]|5[56]|7[04-9]|8[047]|9[018])\\d{8}';\n $patternGBvalidrange .= '|';\n $patternGBvalidrange .= '(1[2-9]\\d|[58]00)\\d{6}';\n $patternGBvalidrange .= '|';\n $patternGBvalidrange .= '8(001111|45464\\d)';\n $patternGBvalidrange .= ')';\n $patternGBvalidrange .= '$/x';\n // Test NSN to see if it matches a valid number range\n if (preg_match($patternGBvalidrange, $phonenumberNSN)) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function nsn($nsn)\n {\n return $this->setProperty('nsn', $nsn);\n }", "function check_dni($dni){\r\n\t\tif($this->Cliente_modelo->existe_dni($dni)){\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else return true;\r\n\t}", "function _hosting_valid_fqdn($fqdn) {\n // Regex is an implementation of RFC1035, a little relaxed to allow\n // commonly registered hostnames (e.g. domaines starting with digits).\n return preg_match(\"/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.?)+$/i\", $fqdn);\n}", "function filecabinet_condition_document_fnid_is($document, $fnid) {\n return ($document->fnid == $fnid);\n}", "public function validate_feestypename()\n {\n $this->CI =& get_instance();\n $this->CI->load->model('model_feestype');\n $validate = $this->CI->model_feestype->validate_feestypename();\n if($validate === true) {\n $this->CI->form_validation->set_message->set_message('validate_feestypename', 'The {field} already exists');\n return false; \n }\n else {\n return true;\n }\n }", "public function field_is_null( $field_number ) {\n\t\t\n\t\t$flags= $this->field_flags( $field_number );\n\t\t\n\t\t$not_null = strpos($flags,\"not_null\");\n\t\tif ( $not_null ===false)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "private function FIcheck($number)\n {\n // Checks the check digits of a Finnish VAT number.\n\n $total = 0;\n $multipliers = [7, 9, 10, 5, 8, 4, 2];\n\n // Extract the next digit and multiply by the counter.\n for ($i = 0; $i < 7; ++$i) {\n $total += (int) $number[$i] * $multipliers[$i];\n }\n\n // Establish check digit.\n $total = 11 - $total % 11;\n if (9 < $total) {\n $total = 0;\n }\n\n // Compare it with the last character of the VAT number. If it's the same, then it's valid.\n return (int) $number[7] === $total;\n }", "public function setFUSSBODEN($fUSSBODEN)\n {\n $this->fUSSBODEN = $fUSSBODEN;\n return $this;\n }", "private function validateFirstName($fn){\n \n if( strlen($fn) < 2 || strlen($fn) >25 ){\n array_push($this->errorArray , Constants::$firstNameCharacters) ; \n }\n }", "public function getFaxnbr()\n {\n return $this->faxnbr;\n }", "function TestPRN($prn)\n {\n $body = substr($prn,0,9);\n $dv = substr($prn,9,2);\n $d1 = 0;\n for ($i = 0; $i < 9; $i++)\n {\n $d1 += intval( substr ($body, $i, 1)) * (10 - $i);\n }\n\n $res=TRUE;\n if ($d1 == 0)\n {\n $res=FALSE;\n }\n\n $d1 = 11 - ($d1 % 11);\n if ($d1 > 9)\n {\n $d1 = 0;\n }\n if (substr ($dv, 0, 1) != $d1)\n {\n $res=FALSE;\n }\n\n $d1 *= 2;\n for ($i = 0; $i < 9; $i++)\n {\n $d1 += intval(substr($body, $i, 1)) * (11 - $i);\n }\n $d1 = 11 - ($d1 % 11);\n if ($d1 > 9)\n {\n $d1 = 0;\n }\n if (substr ($dv, 1, 1) != $d1)\n {\n $res=FALSE;\n }\n\n if (!$res)\n {\n $this->ApplicationObj()->AddHtmlStatusMessage(\"CPF \".$prn.\" Inválido!\");\n echo $this->H(5,\"CPF \".$prn.\" Inválido!\");\n }\n\n return $res;\n }", "function isValid() ;", "public function testInvalidFloat_shouldReturnFalse() {\n $validator = new FloatValidator();\n\n $result = $validator->validate(\"invalid value\");\n\n $this->assertFalse($result);\n }", "function check_family_name($fname){\n $query = $this->db->get_where('item_familly', array('name'=>$fname));\n if($query){\n if($query->num_rows() > 0){\n return TRUE; \n }\n return FALSE;\n }else{\n return TRUE;\n }\n }", "public function setUsrcfaxfrst3($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->usrcfaxfrst3 !== $v) {\n $this->usrcfaxfrst3 = $v;\n $this->modifiedColumns[DplusUserTableMap::COL_USRCFAXFRST3] = true;\n }\n\n return $this;\n }", "function ni($ni){\n // remove spaces and uppercase it\n $ni = strtoupper(str_replace(' ', '', $ni));\n $preg = \"/^[A-CEGHJ-NOPR-TW-Z][A-CEGHJ-NPR-TW-Z][0-9]{6}[ABCD]?$/\";\n if (preg_match($preg, $ni)) {\n $bad_prefixes = array('GB', 'BG', 'NK', 'KN', 'TN', 'NT', 'ZZ');\n return (array_search(substr($ni, 0, 2), $bad_prefixes) === false);\n } else {\n return false;\n }\n }", "private function checkProcessNfo()\n\t{\n\t\tif ($this->pdo->getSetting('lookupnfo') == 1) {\n\t\t\t$this->nfoQueryString = \\Nfo::NfoQueryString($this->pdo);\n\t\t\treturn (\n\t\t\t\t$this->pdo->queryOneRow(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t'SELECT r.id FROM releases r WHERE 1=1 %s LIMIT 1',\n\t\t\t\t\t\t$this->nfoQueryString\n\t\t\t\t\t)\n\t\t\t\t) === false ? false : true\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t}", "public static function comprobar_dni($dni) {\n if ((strlen($dni) == 9) & (preg_match('/^([0-9]{7,8})([A-Z])$/i', $dni, $matches) == true)) {\n return true;\n } else {\n return false;\n }\n }", "public function validate($tax_number);", "public static function validate_cpf($cpf) {\n $cpf = str_replace('.', '', $cpf);\n $cpf = str_replace('-', '', $cpf);\n $cpf = str_replace(' ', '', $cpf);\n\n // Verifiva se o número digitado contém todos os digitos\n $cpf = str_pad(preg_replace('[^0-9]', '', $cpf), 11, '0', STR_PAD_LEFT);\n\n // Verifica se nenhuma das sequências abaixo foi digitada, caso seja, retorna falso\n if (strlen($cpf) != 11 || $cpf == '00000000000' || $cpf == '11111111111' || $cpf == '22222222222' || $cpf == '33333333333' || $cpf == '44444444444' || $cpf == '55555555555' || $cpf == '66666666666' || $cpf == '77777777777' || $cpf == '88888888888' || $cpf == '99999999999' || $cpf == '01234567890') {\n return false;\n\n } else { // Calcula os números para verificar se o CPF é verdadeiro\n for ($t = 9; $t < 11; $t++) {\n for ($d = 0, $c = 0; $c < $t; $c++) {\n $d += $cpf{$c} * (($t + 1) - $c);\n }\n\n $d = ((10 * $d) % 11) % 10;\n\n if ($cpf{$c} != $d) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n /**\n * Verify\n *\n * @param $pStrText\n * @return mixed\n */\n public static function tranform_url_on_text($pStrText) {\n // The Regular Expression filter\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/g\";\n\n // Check if there is a url in the text\n if(preg_match($reg_exUrl, $pStrText, $url)) {\n\n // make the urls hyper links\n return preg_replace($reg_exUrl, '<a href=\"'.$url[0].'\" rel=\"nofollow\" target=\"_blank\">'.$url[0].'</a>', $pStrText);\n\n } else {\n\n // if no urls in the text just return the text\n return $pStrText;\n }\n }\n\n\n public static function generate_file_name($nomeArquivo, $sufix = '') {\n $ext = strtolower( end( explode( '.', $nomeArquivo ) ) );\n $nomeSemExt = str_replace( '.'.$ext, '', $nomeArquivo );\n $nomeFinal = self::clean_file_name($nomeSemExt).'-'.$sufix.'.'.$ext;\n return $nomeFinal;\n }\n\n /**\n * Clean a name from a file\n *\n * @param $string\n * @param string $slug\n * @return mixed|string\n */\n public static function clean_file_name($string, $slug = '-') {\n $string = strtolower(iconv('UTF-8', 'ASCII//TRANSLIT', $string));\n if ($slug) {\n $string = preg_replace('/[^a-z0-9]/i', $slug, $string);\n $string = preg_replace('/' . $slug . '{2,}/i', $slug, $string);\n $string = trim($string, $slug);\n }\n return $string;\n }\n}", "public function isFamily() {\n if( $this->tax_rankID == self::C_FAMILY_RANK ) return true;\n \n return false;\n }", "public function isValid($value)\n {\n $cpfValidator = new CpfValidator();\n if ($cpfValidator->isValid($value)) {\n return true;\n }\n $cnpjValidator = new CnpjValidator();\n if ($cnpjValidator->isValid($value)) {\n return true;\n }\n if (strlen($value) != 11) {\n $this->error(self::CPF_INVALID);\n } elseif (strlen($value) != 14) {\n $this->error(self::CNPJ_INVALID);\n }\n return false;\n }", "static public function ctrValidarDNI($validarDNI){\n\n\t\t$datosController = $validarDNI;\n\t\t$respuesta = ModeloPersonas::mdlValidarDNI($datosController, \"Persona\");\n\n\t\tif(count($respuesta[\"DNI\"]) > 0){\n\t\t\t#EL DNI EXISTE POR LO TANTO NO ESTA DISPONIBLE\n\t\t\techo \"false\";\n\t\t}else{\n\t\t\t#EL DNI NO EXISTE Y POR LO TANTO ESTARA DISPONIBLE\n\t\t\techo \"true\";\n\t\t}\n\t\n\t}", "public static function isValidMSISDN($msisdn) {\n global $status;\n $status = false;\n\n try {\n $dblink = new MySQL(\n Config::HOST, Config::USER, Config::PASSWORD, Config::DATABASE,\n Config::PORT\n );\n\n $sql = \"SELECT numberRuleRegex FROM networks WHERE \"\n . \"numberRuleRegex <> ''\";\n $result = DatabaseUtilities::executeQuery(\n $dblink->mysqli, $sql\n );\n\n $total = count($result);\n\n for ($i = 0; $i < $total; $i++) {\n $rule = $result[$i]['numberRuleRegex'];\n if (preg_match(\"/$rule/\", $msisdn)) {\n $status = true;\n break;\n }\n }\n } catch (SQLException $e) {\n $status = false;\n return $status;\n }\n\n return $status;\n }", "function ssn($ssn)\n {\n return ni($ssn);\n }", "private function isValidNonce() {\n\t\tif ( isset( $_POST[ $this->metaBoxConfig['meta_key'] . '_nonce' ] ) ) {\n\t\t\treturn wp_verify_nonce( $_POST[ $this->metaBoxConfig['meta_key'] . '_nonce' ], $this->metaBoxConfig['meta_key'] . '_save' );\n\t\t}\n\n\t\treturn false;\n\t}", "function isValid(): bool;", "function isFibonacci($n) \r\n{ \r\n // n is Fibinacci if one of \r\n // 5*n*n + 4 or 5*n*n - 4 or \r\n // both is a perferct square \r\n return isPerfectSquare(5 * $n * $n + 4) || \r\n isPerfectSquare(5 * $n * $n - 4); \r\n}", "function isFibonacci($n)\r\n{\r\n // n is Fibonacci if one of\r\n // 5*n*n + 4 or 5*n*n - 4 or\r\n // both is a perferct square\r\n return isPerfectSquare(5 * $n * $n + 4) ||\r\n isPerfectSquare(5 * $n * $n - 4);\r\n}", "function validateFLOAT($float) {\n if (filter_var($float, FILTER_VALIDATE_FLOAT) || $float == 0)\n return true;\n else\n return false; \n }", "static function IsValidABN($strValue)\n\t{\n\t\t// 1. If the length is 0, it is invalid\n\t\tif (strlen($strValue) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// 2. Check that the item has only Numbers and Spaces\n\t\t// The ereg function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0.\n\t\t// if (ereg(\"/[^\\d\\s]/g\", $strValue) != FALSE)\n\t\tif(!preg_match(\"/^[\\d\\s]+$/\", $strValue))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// The ereg function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0.\n\t\t// $strABN_without_spaces = ereg_replace(\" \",\"\", $strValue);\n\t\t$strABN_without_spaces = preg_replace(\"/\\s/\",\"\", $strValue);\n\t\t\n\t\t// 3. Check there are 11 integers\n\t\tif ((strlen($strABN_without_spaces) > 11) || (strlen($strABN_without_spaces) < 11))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\n\t\t// 4. ABN Calculation\n\t\t// http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htm&pc=001/003/021/002/001&mnu=610&mfp=001/003&st=&cy=1\n\t\t\n\t\t// 1. Subtract 1 from the first (left) digit to give a new eleven digit number\n\t\t// 2. Multiply each of the digits in this new number by its weighting factor\n\t\t// 3. Sum the resulting 11 products\n\t\t// 4. Divide the total by 89, noting the remainder\n\t\t// 5. If the remainder is zero the number is valid\n\t\t$arrWeights = Array(10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19);\n\t\t\n\t\t// 1. Subtract 1 from the first (left) digit to give a new eleven digit number\n\t\t$intFirstDigitABN = substr($strABN_without_spaces, 0, 1) - 1;\n\t\t$intNewABN =$intFirstDigitABN .= substr($strABN_without_spaces, 1);\n\t\t\n\t\t// 2. Multiply each of the digits in this new number by its weighting factor\n\t\t// 3. Sum the resulting 11 products\n\t\t$intNumberSum = 0;\n\t\t\n\t\tfor ($i = 0; $i < 11; $i ++)\n\t\t{\n\t\t\t$intNumberSum += substr($intNewABN,$i,1) * $arrWeights[$i];\n\t\t}\n\t\t\n\t\t// 4. Divide the total by 89, noting the remainder\n\t\t// 5. If the remainder is zero the number is valid\n\t\t\n\t\tif ($intNumberSum % 89 != 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "private function pfValidServerConfirmation($pfParamString) {\n try {\n $client = new Client(['base_uri' => PayFastPayment::$baseUrl.'/']);\n $response = $client->request('POST', 'eng/query/validate', [\n 'headers' => ['content-type' => 'application/x-www-form-urlencoded'],\n 'body' => $pfParamString\n ]);\n if ((string)$response->getBody() === 'VALID') {\n return true;\n }\n PayFastPayment::$errorMsg[] = 'Invalid server confirmation';\n return false;\n } catch (ClientException $e) {\n $response = $e->getResponse();\n throw new InvalidRequestException($response->getBody()->getContents(), 400);\n } catch (GuzzleException $e) {\n throw new RuntimeException($e);\n }\n }", "public function validate() : bool\n {\n if (preg_match($this->patterns[0], $this->number) === 1) {\n return $this->validateNationalJuridicEntity();\n }\n\n if (preg_match($this->patterns[1], $this->number) === 1) {\n return $this->validateNonNationalJuridicEntity();\n }\n\n if (preg_match($this->patterns[2], $this->number) === 1) {\n return $this->validatePersonalEntity();\n }\n\n return false;\n }", "function validFName($fname, $f3) {\r\n if (!empty($fname)) {\r\n # fname in not empty so check if its all alphabetic\r\n if (ctype_alpha($fname)) {\r\n # set a session variable to the input\r\n //$_SESSION['fname'] = $fname;\r\n # set a f3 variable to the input\r\n $f3->set(\"fname\", $fname);\r\n return true;\r\n } # input is not alphabetic, set an f3 to appropriate error\r\n else {\r\n $f3->set(\"errors['fname']\", \"Fist name must be alphabetic\");\r\n }\r\n } # input is empty, set an f3 variable to appropriate error\r\n else {\r\n $f3->set(\"errors['fname']\", \"First name is required\");\r\n }\r\n }", "public function hasFreightRateCode() {\n\t\treturn empty($this->freightratecode) === false;\n\t}", "public function isFee(){\r\n return (bool) preg_match('/Fee/', $this->getTaxName());\r\n }", "public function setNbDsnEvtFinContratFact($nbDsnEvtFinContratFact) {\n $this->nbDsnEvtFinContratFact = $nbDsnEvtFinContratFact;\n return $this;\n }", "static function IsValidPhoneNumber ($strNumber)\n\t{\n\t\treturn preg_match (\"/^\\+?[\\d\\s]{10,}$/\", $strNumber);\n\t}", "function format_gb_nsn($phonenumberNSN) {\n // Trim NSN\n $phonenumberNSN = trim($phonenumberNSN);\n // Find NSN string length\n $phonenumberNSNLength = strlen($phonenumberNSN);\n // RegEx patterns to define formatting by length and initial digits\n // [2+8] 2d, 55, 56, 70, 76 (not 7624)\n $pattern28 = '/^(?:2|5[56]|7(?:0|6(?:[013-9]|2[0-35-9])))/';\n $capture28 = '/^(\\d{2})(\\d{4})(\\d{4})$/';\n // [3+7] 11d, 1d1, 3dd, 80d, 84d, 87d, 9dd\n $pattern37 = '/^(?:1(?:1|\\d1)|3|8(?:0[08]|4[2-5]|7[0-3])|9[018])/';\n $capture37 = '/^(\\d{3})(\\d{3})(\\d{4})$/';\n // [5+5] 1dddd (12 areas)\n $pattern55 = '/^(?:1(?:3873|5(?:242|39[456])|697[347]|768[347]|9467))/';\n $capture55 = '/^(\\d{5})(\\d{5})$/';\n // [5+4] 1ddd (1 area)\n $pattern54 = '/^(?:16977[23])/';\n $capture54 = '/^(\\d{5})(\\d{4})$/';\n // [4+6] 1ddd, 7ddd (inc 7624) (not 70, 76)\n $pattern46 = '/^(?:1|7(?:[1-5789]|624))/';\n $capture46 = '/^(\\d{4})(\\d{6})$/';\n // [4+5] 1ddd (40 areas)\n $pattern45 = '/^(?:1(?:2(?:0[48]|54|76|9[78])|3(?:6[34]|8[46])|4(?:04|20|6[01]|8[08])|5(?:27|6[26])|6(?:06|29|35|47|59|95)|7(?:26|44|50)|8(?:27|37|84)|9(?:0[05]|35|49|63|95)))/';\n $capture45 = '/^(\\d{4})(\\d{5})$/';\n // [3+6] 500, 800\n $pattern36 = '/^([58]00)/';\n $capture36 = '/^(\\d{3})(\\d{6})$/';\n // Format numbers by leading digits and length\n if ($phonenumberNSNLength == 10 && preg_match($pattern28, $phonenumberNSN)) {\n if (preg_match($capture28, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'] . \" \" . $matches['3'];\n }\n } else if ($phonenumberNSNLength == 10 && preg_match($pattern37, $phonenumberNSN)) {\n if (preg_match($capture37, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'] . \" \" . $matches['3'];\n }\n } else if ($phonenumberNSNLength == 10 && preg_match($pattern55, $phonenumberNSN)) {\n if (preg_match($capture55, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'];\n }\n } else if ($phonenumberNSNLength == 9 && preg_match($pattern54, $phonenumberNSN)) {\n if (preg_match($capture54, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'];\n }\n } else if ($phonenumberNSNLength == 10 && preg_match($pattern46, $phonenumberNSN)) {\n if (preg_match($capture46, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'];\n }\n } else if ($phonenumberNSNLength == 9 && preg_match($pattern45, $phonenumberNSN)) {\n if (preg_match($capture45, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'];\n }\n } else if ($phonenumberNSNLength == 9 && preg_match($pattern36, $phonenumberNSN)) {\n if (preg_match($capture36, $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'];\n }\n } else if ($phonenumberNSNLength > 5) {\n // Default format for non-valid numbers (shouldn't ever get here)\n if (preg_match(\"/^(\\d)(\\d{4})(\\d*)$/\", $phonenumberNSN, $matches)) {\n $phonenumberNSN = $matches['1'] . \" \" . $matches['2'] . \" \" . $matches['3'];\n }\n }\n return $phonenumberNSN;\n}", "function check_validation($f3, $create_mode) {\n $error = '';\n\n if ($f3->get(\"POST.FirstName\") == \"\") {\n $error = \"Please fill in your first name.\";\n } else if (is_numeric($f3->get(\"POST.FirstName\"))) {\n $error = \"Please enter a valid first name.\";\n } else if (is_numeric($f3->get(\"POST.MiddleName\"))) {\n $error = \"Please enter a valid middle name.\";\n } else if ($f3->get(\"POST.LastName\") == \"\") {\n $error = \"Please fill in your last name.\";\n } else if (is_numeric($f3->get(\"POST.LastName\"))) {\n $error = \"Please enter a valid last name.\";\n } else if ($f3->get(\"POST.UserName\") == \"\") {\n $error = \"Please fill in your user name.\";\n } else if ($create_mode && $this->Users->is_exist_username($f3->get(\"POST.UserName\")) > 0) {\n $error = \"User name is already exist.\";\n } else if ($f3->get(\"POST.Email\") == \"\") {\n $error = \"Please fill in your email.\";\n } else if (!filter_var($f3->get(\"POST.Email\"), FILTER_VALIDATE_EMAIL)) {\n $error = \"Please enter a vaild email\";\n } else if ($f3->get(\"POST.Password\") == \"\") {\n $error = \"Please enter your password.\";\n } else if (strlen($f3->get(\"POST.Password\")) < 1) {\n $error = \"Password is too short.\";\n } else if (strlen($f3->get(\"POST.Password\")) > 15) {\n $error = \"Password is too long.\";\n } else if ($f3->get(\"POST.Password\") != ($f3->get(\"POST.Password_c\"))) {\n $error = \"Passwords don't match.\";\n } else if ($f3->get(\"POST.day\") == \"\") {\n $error = \"Please enter your Date of Birth.\";\n } else if ($f3->get(\"POST.month\") == \"\") {\n $error = \"Please enter your Date of Birth.\";\n } else if ($f3->get(\"POST.year\") == \"\") {\n $error = \"Please enter your Date of Birth.\";\n }\n\n return $error;\n }", "function verifSujet($fsujet) {\n\t\tif (strlen($fsujet) < 2 || strlen($fsujet) > 50) { return FALSE; }\n\t\telse { return TRUE; }\n\t}", "function validate_float ( $sValue )\n{\n return is_numeric($sValue) and ($sValue == (float) $sValue);\n}", "public function setFone( $str_fone )\n\t\t{\n\t\t\t$this->str_fone = $str_fone;\t\t\t\n\t\t}", "function _vcnuser_register_zip_validation($form, &$form_state) {\r\n\r\n\t$zipcode = trim($form['zipcode']['#value']);\r\n\t$zipcode_validation = vcn_zipcode_validation($zipcode);\r\n\t\r\n\tif ((strlen($zipcode) != 5) || !(is_numeric($zipcode)) || (!$zipcode_validation)) {\r\n\t\tform_set_error('zipcode', t('Please enter a valid US ZIP Code.'));\r\n\t}\r\n\r\n}", "public function isFriday()\n {\n return $this->dayOfWeek === static::FRIDAY;\n }", "function validFirstName($fname)\r\n {\r\n return !empty(trim($fname)) && ctype_alpha($fname);\r\n }", "public function is_female() {\n\t\tif ($this->clean['gender'] == \"F\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function is_valid_cc_number( $card_number ) {\n\t\t$firstnumber = substr( $card_number, 0, 1 );\n\n\t\t// Make sure it is the correct amount of digits. Account for dashes being present.\n\t\tswitch ( $firstnumber ) {\n\t\t\tcase 3:\n\t\t\t\t$is_valid = preg_match( '/^3\\d{3}[ \\-]?\\d{6}[ \\-]?\\d{5}$/', $card_number );\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$is_valid = preg_match( '/^4\\d{3}[ \\-]?\\d{4}[ \\-]?\\d{4}[ \\-]?\\d{4}$/', $card_number );\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$is_valid = preg_match( '/^5\\d{3}[ \\-]?\\d{4}[ \\-]?\\d{4}[ \\-]?\\d{4}$/', $card_number );\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$is_valid = preg_match( '/^6011[ \\-]?\\d{4}[ \\-]?\\d{4}[ \\-]?\\d{4}$/', $card_number );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$is_valid = false;\n\t\t}\n\n\t\t$this->validate_luhn_algorithm( $card_number, $is_valid );\n\n\t\treturn $is_valid;\n\t}", "function isFirstNameValid($firstName)\n {\n \treturn preg_match('/\\A[A-Za-z\\-\\.\\s]+\\Z/', $firstName);\n }", "function is_isbn_valid($isbn) {\n\tif (is_string($isbn)) {\n\t\t$isbn = preg_replace('/[^0-9xX]+/', '', $isbn);\n\t\t\n\t\t$len = strlen($isbn);\n\t\t\n\t\tif ($len == 10) {\n\t\t\treturn is_isbn_10_valid($isbn) ? 10 : false;\n\t\t} else if ($len == 13) {\n\t\t\treturn is_isbn_13_valid($isbn) ? 13 : false;\n\t\t}\n\t} \n\t\n\treturn false;\n}", "public function validateDniAndEmail($dni, $email)\n {\n $register = true;\n\n $result = $this->conn->query(\"SELECT * FROM qn_user WHERE email='$email' OR dni='$dni'\") or die($this->conn->error);\n \n if ($result->num_rows == 1) \n {\n $register = false;\n }\n\n return $register;\n }", "public function isValid () : bool;", "function esFechaValida($fchFecha) {\n if (trim($fchFecha) != \"\") {\n list( $ano, $mes, $dia ) = split(\"[\\/-]\", $fchFecha);\n if (!@checkdate($mes, $dia, $ano)) {\n return false;\n }\n return true;\n } else {\n return false;\n }\n}", "public function setNbDsnEvtFinContrat($nbDsnEvtFinContrat) {\n $this->nbDsnEvtFinContrat = $nbDsnEvtFinContrat;\n return $this;\n }", "public function check_fed_id() {\n\n $company = Companies::model()->find('Company_Fed_ID=:Fed_ID',\n array(':Fed_ID'=>$this->Fed_ID));\n if($company != null) {\n $this->addError('Fed_ID','Company with this Fed ID already exists');\n } else if (!preg_match('/^(\\d{2}\\-\\d{7})|(\\d{3}\\-\\d{2}\\-\\d{4})$/', $this->Fed_ID)) {\n $this->addError('Fed_ID','Invalid Fed ID, correct formatting: xx-xxxxxxx');\n }\n }", "function validateFirstName($_fname){\r\n //Check the first name is within the size range and only consists of alphanumeric characters\r\n if(!preg_match('/^[a-zA-Z-]{1,75}$/',$_fname)){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n }", "public function testIsNumberMatchShortNsnMatches()\n {\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('+64 3 331-6005', '331 6005'));\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('+64 3 331-6005', 'tel:331-6005;phone-context=abc.nz')\n );\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('+64 3 331-6005', 'tel:331-6005;isub=1234;phone-context=abc.nz')\n );\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('+64 3 331-6005', 'tel:331-6005;isub=1234;phone-context=abc.nz;a=%A1')\n );\n\n // We did not know that the \"0\" was a national prefix since neither number has a country code,\n // so this is considered a SHORT_NSN_MATCH.\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('3 331-6005', '03 331 6005'));\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('3 331-6005', '331 6005'));\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('3 331-6005', 'tel:331-6005;phone-context=abc.nz')\n );\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('3 331-6005', '+64 331 6005'));\n\n // Short NSN match with the country specified.\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('03 331-6005', '331 6005'));\n $this->assertEquals(MatchType::SHORT_NSN_MATCH, $this->phoneUtil->isNumberMatch('1 234 345 6789', '345 6789'));\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('+1 (234) 345 6789', '345 6789')\n );\n // NSN matches, country calling code omitted for one number, extension missing for one.\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch('+64 3 331-6005', '3 331 6005#1234')\n );\n // One has Italian leading zero, one does not.\n $italianNumberOne = new PhoneNumber();\n $italianNumberOne->setCountryCode(39)->setNationalNumber(1234)->setItalianLeadingZero(true);\n $italianNumberTwo = new PhoneNumber();\n $italianNumberTwo->setCountryCode(39)->setNationalNumber(1234);\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch($italianNumberOne, $italianNumberTwo)\n );\n // One has an extension, the other has an extension of \"\".\n $italianNumberOne->setExtension('1234')->clearItalianLeadingZero();\n $italianNumberTwo->setExtension('');\n $this->assertEquals(\n MatchType::SHORT_NSN_MATCH,\n $this->phoneUtil->isNumberMatch($italianNumberOne, $italianNumberTwo)\n );\n }", "function IsImportantNumber($n)\n\t{\n\t\tif($n == 10 || $n == 25 || $n % 50 == 0)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public function dniExists($dni_nif) {\n $sql = $this->db->prepare(\"SELECT count(dni_nif) FROM cliente_externo where dni_nif=?\");\n $sql->execute(array($dni_nif));\n\n if ($sql->fetchColumn() > 0) {\n return true;\n }\n }", "public function setInfCTeNormInfDocInfNFNDoc($infCTeNorm_infDoc_infNF_nDoc)\n {\n $this->infCTeNorm_infDoc_infNF_nDoc = $infCTeNorm_infDoc_infNF_nDoc;\n\n return $this;\n }", "public function isValid(string $value): bool;" ]
[ "0.6207302", "0.6158566", "0.5815785", "0.56427914", "0.56054974", "0.55636793", "0.5520766", "0.5500099", "0.54428357", "0.5260668", "0.525978", "0.52458245", "0.52091426", "0.52031887", "0.5166895", "0.510996", "0.5091624", "0.5066398", "0.50531644", "0.5026028", "0.502045", "0.5001105", "0.49989286", "0.4976247", "0.49729988", "0.49602345", "0.49580956", "0.49511823", "0.4948937", "0.49363223", "0.4923758", "0.4920333", "0.49132246", "0.48992187", "0.48670495", "0.48651883", "0.486349", "0.48536506", "0.48444983", "0.48403734", "0.48309547", "0.4830601", "0.48299137", "0.47927037", "0.47894078", "0.47605285", "0.47598866", "0.47323737", "0.47242245", "0.47218177", "0.47175223", "0.4709246", "0.47074074", "0.47020173", "0.4700666", "0.4689172", "0.46874478", "0.46825305", "0.46639997", "0.46594757", "0.46592605", "0.46492463", "0.46444798", "0.46440148", "0.4602158", "0.45983773", "0.45978686", "0.45956635", "0.45904705", "0.45793456", "0.45745587", "0.4574467", "0.45693192", "0.45639005", "0.45575732", "0.4557308", "0.45399603", "0.45332885", "0.45319846", "0.45316803", "0.45274886", "0.45272872", "0.4522793", "0.45165282", "0.4515629", "0.4512826", "0.45082927", "0.45028797", "0.44968405", "0.44940057", "0.44927794", "0.44898844", "0.44864455", "0.4477313", "0.44760174", "0.44706064", "0.44684732", "0.44662583", "0.44640926", "0.44640833" ]
0.7023941
0
/ Function to get consultant skill by id return result of array
Функция для получения навыка консультанта по идентификатору возвращает результат массива
function getConsultantSkillById($params = array()){ $qry = 'CALL getConsultantSkillById(%d)'; $qry = $this->db->prepareQuery($qry,$params['skillUpateId']); $recordSet = $this->db->multiQuery($qry); $rslt = $recordSet[0]; if($rslt){ $rslt['consultantSkillData'] = $recordSet[0][0]; $rslt['consultantSkillItems'] = $recordSet[1][0]; } return $rslt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_skill(){\n $q = $this->db->get('personal_skill');\n if ($q->num_rows() > 0){\n return $q->result();\n }return array();\n }", "function getSkill($idSkill) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM VariousSkills WHERE idSkill = :idSkill\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idSkill' => $idSkill\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll();\n}", "function get_behaviours_skill($id)\n {\n return $this->db->get_where('behaviours_skills',array('id'=>$id))->row_array();\n }", "public function getSkills();", "public function getAllSkills() :?array\n {\n $pdo = $this->getPdo();\n $request = $pdo->prepare('SELECT * FROM skill');\n $request->execute();\n\n\n $results = [];\n\n while ($row = $request->fetch(PDO::FETCH_ASSOC)){\n\n $skill = new Skill();\n $skill->setId($row['id']);\n $skill->setName($row['name']);\n $skill->setLevel($row['level']);\n $results[] = $skill;\n }\n\n return $results;\n }", "public function readPetSkills($id) {\n $petQuery = 'SELECT skill0_index, skill1_index, skill2_index, skill3_index FROM pet WHERE pet_id = :id';\n $petStmt = $this->db->prepare($petQuery);\n $petStmt->bindValue(':id', $id, PDO::PARAM_INT);\n $petStmt->execute();\n return $petStmt->fetch(PDO::FETCH_ASSOC);\n }", "function members_get_skill_petal($skillid){\n\t$sql = \"SELECT skill_category_id FROM skills WHERE skill_id='$skillid'\";\n\t$rst = mysql_query($sql) or die(mysql_error());\n\t$row = mysql_fetch_assoc($rst);\n\treturn $skillpetal = $row['skill_category_id'];\n}", "public function read_qualification_skill_information($id) {\n\t\t$condition = \"type_id =\" . \"'\" . $id . \"' AND type_of_module='qualification_skill'\";\n\t\t$this->db->select('*');\n\t\t$this->db->from('xin_module_types');\n\t\t$this->db->where($condition);\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $query->result();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getSkillById(int $id): SkillDomainModel;", "public function all_sSkills($id)\n {\n // the token is valid and we have found the user via the sub claim\n\n try {\n\n $profile = Profile::findOrFail($id);\n //$profile->industry_id;\n $specific_skills = Specific_skill::where('industry_id', '=', $profile->industry_id)\n ->select('id', 'slug', 'name', 'description')\n ->get();\n\n if(!$specific_skills) {\n return response()->json(['error' => 'Empty List'], 404);\n }\n\n return response()->json(compact('specific_skills'));\n\n } catch(ModelNotFoundException $e) {\n return response()->json(['error' => 'profile does not exist'], 404);\n }\n \n }", "function members_get_skills_by_petal($userid, $petalno){\n\t\n\t$skills = array();\n\t$sql = \"SELECT skill_id, grade, description FROM member_skills WHERE user_id = '$userid'\";\n\t$rst = mysql_query($sql) or die(mysql_error());\n\twhile ($row = mysql_fetch_assoc($rst)){\n \t\t $skillid = $row['skill_id'];\n\t\t $skillpetal = members_get_skill_petal($skillid);\n\t\t$skill = array();\n\t\tif ($skillpetal == $petalno){\n\t\t\t$skill['id']=$skillid;\n\t\t\t$skill['name'] = members_get_skill_name($skillid);\n\t\t\t$skill['description'] = $row['description'];\n\t\t\t$skill['grade'] = $row['grade'];\n\t\t\t$skill['petal']= $skillpetal;\n\t\t\t$skill['petalname'] = get_petal_name($skillpetal);\n\t\t\t$skills[] = $skill;\n\t\t}\n\t}\n\treturn $skills;\n}", "public static function getAllSkills() :array {\n\n \tglobal $base, $login, $password;\n\n $skillGW = new SkillGateway(new Connection($base, $login, $password));\n $results = $skillGW->getAllSkills();\n $data = array();\n foreach ($results as $row){\n $data[] = new Skill ($row['ID'], $row['category'], $row['details']);\n }\n return $data;\n }", "function getConsultantBySkill($params = array()){\n $qry = 'CALL getConsultantBySkill(%d,%d,%d)';\n $qry = $this->db->prepareQuery($qry,$params['serviceIdIp'],$params['sessionClientId'],$params['formStatus']);\n $rslt = $this->db->getResultSet($qry);\n\t\treturn $rslt;\n }", "public function SkillsSet(){\n $ret = [];\n $ret[] = $this->background()->skill1;\n $ret[] = $this->background()->skill2;\n if ($this->race()->id == 2 || $this->race()->id == 8) {\n $ret[] = ((new floatingModel('abilities_skills'))->where('name',str_replace('Skill: ', '', $this->race()->prof['prof'][0]))->first())->id;;\n }\n return $ret;\n }", "public function getAllSkills() {\n $query = \"SELECT * FROM skill_tab\";\n //echo $query;die();\n $result = $this->db->query($query);\n if ($result->num_rows() <= 0) {\n $response = array(\n 'status' => 500,\n 'status_message' => 'No data found.');\n } else {\n $response = array(\n 'status' => 200,\n 'status_message' => $result->result_array());\n }\n return $response;\n }", "public function showProfile($id)\n {\n // $emp = Employee::find($id);\n $skill = Skill::where('emp_id',$id)->get();\n\n return $skill;\n }", "public function show($id)\n {\n\t$skill = Skill::with('group')->find($id);\n\t\n return $skill;\n }", "function getConsultantSkillList($params = array()){\n\t\t$start = 0;\n\t\t$limit = 50;\n\t\t$page = ($params['page']) ? $params['page'] : 1;\n\t\tif($params['fromDate']!='' && $params['toDate'] !='') {\n\t\t\t$fromDate = convertDateToYMD($params['fromDate']);\n\t\t\t$toDate = convertDateToYMD($params['toDate']);\n\t\t}\n\t\tif($params['recCount']){\n\t\t\t$limit = (int) $params['recCount'];\n\t\t\t$start = ($page-1)* $limit;\n\t\t}\n\t\t$sortBy = 'DESC';\n\t\t$sorting=\"\";\n if($params['orderId'] && $params['sortId'] == 1) {\n $sortOrder = $params['orderId'];\n $sortBy = 'ASC';\n\t\t\t$sorting= $sortOrder.' '.$sortBy;\n } elseif($params['orderId'] && $params['sortId'] == 2) {\n $sortOrder = $params['orderId'];\n $sortBy = 'DESC';\n\t\t\t$sorting= $sortOrder.' '.$sortBy;\n }\n\t\t$qry = 'CALL getConsultantSkillList(%d,%d,%d,\"%s\",\"%s\",%d,%d,\"%s\",%d,%d,%d)';\n\t\t$qry = $this->db->prepareQuery($qry, $params['userId'], $params['skillFilterBy'],$params['filterRoleId'],$fromDate, $toDate, $start, $limit, $sorting,$params['writerId'],$params['sessionClientId'],$params['skillFilterSkillId']);\n\t\t$recordSet = $this->db->multiQuery($qry);\n\t\t$rslt = $recordSet[1];\n\t\tif($rslt){\n\t\t\t$rslt[0]['totalRows'] = $recordSet[0][0]['total'];\n\t\t\t$rslt['consultantSkillList'] = $recordSet[1];\n\t\t\t$rslt['consultantSkillListItems'] = $recordSet[2];\n\t\t}\n\t\treturn $rslt;\n\t}", "public function get_bio_medical_waste_hosipital($id){\n\t\t$this->db->select('*')->from('hospital_list');\n\t\t$this->db->where('hospital_list.h_id', $id);\n\t\treturn $this->db->get()->row_array();\n\t}", "public function read($id)\n {\n MyLogger2::info(\"Entering SkillDataService.read()\");\n try{\n // select statement to search through database using ID passed in\n $stmt = $this->db->prepare(\"SELECT * FROM SKILLS WHERE id = :id\");\n // variable to store sql statment and connection to database\n $stmt->bindParam(':id', $id);\n $stmt->execute();\n \n $profileInfo = null;\n \n // while loop to continue to fetch information until no more information can be fetched\n if ($stmt->rowCount() == 1) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $profileInfo = new SkillsModel($id, $row['DESCRIPTION'], $row['RATING'], $row['USERS_ID']);\n }\n // return skill\n MyLogger2::info(\"Exiting SkillDataService.create()\");\n return $profileInfo;\n }catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n }", "public function showEditProfile($id)\n {\n $skill = Skill::where('emp_id',$id)->get();\n\n return $skill;\n }", "function getSkillList()\n {\n return $this->skills;\n }", "public function getOne($id) {\n $q = 'SELECT * FROM susanneni_portfolio.education WHERE id =' . $id;\n // $q = 'SELECT * FROM suni_portfolio.education WHERE id =' . $id;\n\n $stmt = $this->connect()->prepare($q);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if(!$result) {\n $result = array();\n }\n return $result;\n }", "public function get_allSkills() {\n $path = base_url();\n $url = $path . 'api/Dashboard_api/get_allSkills';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n return $response;\n }", "public function actionGetSkills($id)\n {\n $model=new HireInfo();\n $skills = VendorInfo::model()->getSkills($id);\n //echo\"<pre>\";print_r($states);die;\n $skill = CHtml::listData($skills, 'id', 'name');\n $editValues=HireInfo::model()->findByAttributes(['hire_id'=>$id]);\n $return=$_POST;\n//echo\"<pre>\";print_r($city);die;\n echo \\yii\\helpers\\Json::encode([\n 'html' => $this->renderPartial('skilldropdown', [\n 'skill' => $skill,\n\n //'finalMerged' => $finalMerged,\n ], true),\n 'resStatus' => \"ok\"\n ]);\n die;\n\n\n }", "function getSkillsListUser($idUser) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM VariousSkills WHERE idSkill IN (SELECT idSkill FROM has WHERE idUser = :idUser)\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idUser' => $idUser\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll();\n}", "public function skill(){\n \treturn $this->hasOne('App\\Skill', 'id', 'skills');\n }", "public function show($id)\n {\n return $this->response->collection(Skill::where('id', '=', $id)->where('user_id', '=', Auth::user()->id)->first(), new SkillTransformer);\n }", "public function get($id)\n {\n $search = $this->resource->search('information');\n\n $search->innerJoinUsing('information_profile', 'information_id');\n $search->innerJoinUsing('profile', 'profile_id');\n\n $search->filterByInformationId($id);\n\n $results = $search->getRow();\n\n if(!$results) {\n return $results;\n }\n\n if($results['information_skills']) {\n $results['information_skills'] = json_decode($results['information_skills'], true);\n } else {\n $results['information_skills'] = [];\n }\n\n // get the experience\n $results['information_experience'] = $this->resource->search('experience')\n ->innerJoinUsing('experience_information', 'experience_id')\n ->filterByInformationId($results['information_id'])\n ->filterByExperienceActive(1)\n ->getRows();\n\n // get the education\n $results['information_education'] = $this->resource->search('education')\n ->innerJoinUsing('education_information', 'education_id')\n ->filterByInformationId($results['information_id'])\n ->filterByEducationActive(1)\n ->getRows();\n\n // get the accomplishment\n $results['information_accomplishment'] = $this->resource->search('accomplishment')\n ->innerJoinUsing('accomplishment_information', 'accomplishment_id')\n ->filterByInformationId($results['information_id'])\n ->filterByAccomplishmentActive(1)\n ->getRows();\n\n return $results;\n }", "public function readall($users_id)\n {\n MyLogger2::info(\"Entering SkillDataService.readall()\");\n try{\n // select statement to search through database using ID passed in\n $stmt = $this->db->prepare(\"SELECT * FROM SKILLS WHERE USERS_ID = :users_id\");\n // variable to store sql statment and connection to database\n $stmt->bindParam(':users_id', $users_id);\n $stmt->execute();\n \n // create new education array\n $education_array = array();\n $profileInfo = null;\n // while loop to continue to fetch information until no more information can be fetched\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n // create new person for each time a person is found\n $profileInfo = new SkillsModel($row['id'], $row['DESCRIPTION'], $row['RATING'], $users_id);\n array_push($education_array, $profileInfo);\n }\n MyLogger2::info(\"Exiting SkillDataService.readall()\");\n return $education_array;\n } catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n }", "public function getSkill($skillId)\n\t{\n\t\t$this->domain('accountConfigReadOnly');\n\t\t\n\t\t$url = \"https://{$this->domain}/api/account/{$this->account}/configuration/le-users/skills/{$skillId}?v=4.0\";\n\t\t\n\t\treturn new Skill((array) $this->request->V2($url, 'GET'));\n\t}", "function getskill($itemID,$type) {\r\n\r\n\t$query = \"SELECT * FROM dgmTypeAttributes WHERE typeID = '\".$itemID.\"' AND attributeID = '\".$type.\"'\";\r\n\t$res_att = MySQL_QUERY($query);\r\n\tif($arr_att = MySQL_FETCH_ARRAY($res_att)) {\r\n\t\treturn($arr_att[\"valueInt\"]);\r\n\t}\r\n\treturn(0);\r\n}", "function get_user_skill_sets($userid)\n{\n\t\n\t$data= array();\n\t$qry=\"SELECT * FROM entrp_user_skills \n\t\t\tWHERE user_id=\".$userid.\" \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$data\t\t=\tjson_decode(strtolower($row['skills'])); \t\t\t\t\t\n\t\t}\n\t} \n\treturn $data;\t\n\t\n\t\n}", "function getExperienceAppraisal($id_exp)\n\n\t{\n\n\t\t// $q \t\t= $this->db->query($str);\n\n\t\t// $dtExp = $q->row_array();\n\n\t\t# code...\n\n\t\t$str\t = \"select * from experiences_appraisal where id_experience = '$id_exp'\";\n\n\t\t$q \t\t= $this->db->query($str);\n\n\t\treturn $f = $q->row_array();\n\n\t}", "public function getExperience($id)\n {\n }", "public function getUserBySkill($id)\n {\n $skill = Skills::find($id);\n\n $users = $skill->users()->get();\n\n return $users->toArray();\n }", "public function getSkillById(int $id) :?Skill\n {\n $pdo = $this->getPdo();\n $request = $pdo->prepare(\n 'SELECT * FROM skill WHERE id = :id'\n );\n $request->bindValue(':id', $id);\n $request->execute();\n\n $row = $request->fetch(PDO::FETCH_ASSOC);\n\n $skill = new Skill();\n $skill->setId($row['id']);\n $skill->setName($row['name']);\n $skill->setLevel($row['level']);\n\n return $skill;\n }", "function getSkillsList() {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM VariousSkills\");\n\n\ttry {\n\t\t$request->execute();\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll();\n}", "public function getSkillId()\n {\n return $this->skill_id;\n }", "function get_persona($id)\n {\n return $this->db->get_where('persona',array('id'=>$id))->row_array();\n }", "function getQuestion($id) {\n\tglobal $db;\n\n\t// Make sure the entered value is an integer.\n\t$id = (int) $id;\n\n\t// Empty array for the question.\n\t$question = array();\n\n\t// Prepare the db query.\n\t$statement = $db->prepare('SELECT * FROM questions WHERE id = :id');\n\n\t// Execute query statement with the supplied id.\n\t$statement->execute(array('id' => $id));\n\n\t// Since we only expect to get one result we don't loop over the results.\n\t$question[] = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t// Gett answers for the questions\n\t$question = getQuestionAnswers($question);\n\n\t// We should only have one result in the array so we only return the first\n\t// question in the array.\n\treturn $question[0];\n}", "function getAllSkills(){\n $skills = [];\n require \"includes/dbh-inc.php\";\n $sql = \"SELECT Skill_Name FROM Skills;\";\n \n $result = $conn->query($sql);\n //print_r($result);\n \n if ($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n array_push($skills,$row['Skill_Name']);\n }\n }\n //echo \"<br>Skills array<br>\";\n //print_r($skills);\n return $skills;\n}", "function getOneExperience($pdo,$id)\n{\n $res = $pdo->prepare('SELECT * FROM experience WHERE id = :id');\n $res->execute(['id'=> $id]);\n return $res->fetch();\n}", "public function skills(){\n return $this->skills;\n }", "public function get_student_data($id) {\n //the term data are used to know whether it is a student of the current term or not!\n $query=$this\n ->db\n ->select(array('registration.surname','registration.name','registration.id', 'term.name as termname', 'term.active'))\n ->from('registration')\n ->join('term', 'registration.term_id=term.id')\n ->where('registration.id',$id)\n ->limit(1)\n ->get();\n\n if ($query->num_rows() > 0) \n {\n \n return $query->row_array(); \n }\n else \n {\n return false;\n }\n\n }", "public function getSkillsAction() {\n $skills = $this->getDoctrine()->getRepository('ObjectsInternJumpBundle:Skill')->getSkills($this->getRequest()->get('term'), $this->container->getParameter('skills_autocomplete_number'));\n $data = array();\n foreach ($skills as $skill) {\n $data [] = $skill['title'];\n }\n return new Response(json_encode($data), 200, array('Content-type' => 'application/json'));\n }", "public function keyskill() {\n $json = [];\n $where = \"type='1' AND status='1'\";\n\n //$this->load->database('aileensoul');\n\n if (!empty($this->input->get(\"q\"))) {\n $this->db->like('skill', $this->input->get(\"q\"));\n $query = $this->db->select('skill_id as id,skill as text')\n ->where($where)\n ->limit(10)\n ->get(\"skill\");\n $json = $query->result();\n }\n\n\n echo json_encode($json);\n }", "public function all_qualification_skill() {\n\t\t$query = $this->db->query(\"SELECT * from xin_module_types where type_of_module='qualification_skill'\");\n\t\treturn $query->result();\n\t}", "public function showSkillByUserID($id)\n {\n if (UserController::userExist($id))\n {\n $skills = Skill::where('userId', $id)->get(['note', 'name', 'type', 'userId']);\n return ($skills->isEmpty()) ? response()->json(\"Skill not found\", 404) : response()->json($skills, 200);\n }\n return response()->json('User not found', 404);\n }", "function members_get_skill_name($skillid){\n\t$sql = \"SELECT skill FROM skills WHERE skill_id='$skillid'\";\n\t$rst = mysql_query($sql) or die(mysql_error());\n\t$row = mysql_fetch_assoc($rst);\n\treturn $name = $row['skill'];\n}", "function getPersonalityById($ujian_id){\n $this->db->limit(null, null);\n $where = array('id_ujian' => $ujian_id);\n $query = $this->db->get_where('personalitipekerja', $where);\n return $query->result();\n }", "public function read_work_experience_information($id) {\n\t\t$condition = \"work_experience_id =\" . \"'\" . $id . \"'\";\n\t\t$this->db->select('*');\n\t\t$this->db->from('xin_employee_work_experience');\n\t\t$this->db->where($condition);\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $query->result();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function keyskill() {\n $json = [];\n $where = \"type='2' AND status='1'\";\n\n\n\n if (!empty($this->input->get(\"q\"))) {\n $this->db->like('skill', $this->input->get(\"q\"));\n $query = $this->db->select('skill_id as id,skill as text')\n ->where($where)\n ->limit(10)\n ->get(\"skill\");\n $json = $query->result();\n }\n\n\n echo json_encode($json);\n }", "public function findById($Id)\n\t{\n\t\t$Sql=\"SELECT S.i_Id,s_Name ,S.t_Description ,S.i_CoolDown ,S.i_NeededLevel \n\t\t\tFROM `tbl_skills` as S\n\t\tWHERE i_Id = \".$Id.\" ORDER BY `i_NeededLevel` ASC\";\t\n\t\treturn $this->doload($this->executeQuery($Sql))->getByIndex(0);\t\n\t}", "public function getQuestion($id);", "public function get($id = null) {\n $this->db->select()->from('exam_results');\n if ($id != null) {\n $this->db->where('id', $id);\n } else {\n $this->db->order_by('id');\n }\n $query = $this->db->get();\n if ($id != null) {\n return $query->row_array();\n } else {\n return $query->result_array();\n }\n }", "function getFeedbackAssessment($id) {\n \n $sql = \" SELECT u.name,u.email,u.user_id,au.assessment_id FROM d_user u \n INNER JOIN (SELECT r.sub_role_name ,et.user_id,et.assessment_id FROM `h_assessment_external_team` et \n INNER JOIN d_user_sub_role r ON et.user_sub_role = r.sub_role_id AND et.user_role!=3 \n UNION SELECT r.role_name ,et.user_id ,et.assessment_id\n FROM `h_assessment_user` et INNER JOIN d_user_role r ON et.role = r.role_id \n AND et.role!=3 AND et.isFilled!=1) au ON au.user_id = u.user_id ORDER by au.assessment_id\";\n \n /*$sql = \"SELECT r.sub_role_name ,et.user_id FROM `h_assessment_external_team` et \n INNER JOIN d_user_sub_role r ON et.user_sub_role = r.sub_role_id \n UNION SELECT r.role_name ,et.user_id \n FROM `h_assessment_user` et INNER JOIN d_user_role r ON et.role = r.role_id \";*/\n \n $res=$this->db->get_results($sql);\n return $res?$res:array();\n }", "public function getItem($id)\r\n\t{\r\n\t\t$sqlQuery =\"SELECT * \";\r\n\t\t$sqlQuery .=\"FROM medicalrecords\";\r\n\t\t$sqlQuery .=\" WHERE questionid=$id\";\r\n\t\t$result =$this->getDbManager()->executeSelectQuery($sqlQuery);\r\n\t\treturn $result;\r\n\t}", "public function getSkill()\n {\n return $this->skill;\n }", "public function getByIdExam($idExam);", "function addConsultantSkill($params = array()) {\n\t\t$qry = 'CALL addConsultantSkill(%d,%d,%d,%d,\"%s\")';\n\t\t$qry = $this->db->prepareQuery($qry,$params['userId'],$params['sessionClientId'],$params['skillUpdateId'],$params['cons_user_id'],DB_DATE_TIME);\n\t\t$rslt = $this->db->getSingleRow($qry);\n\t\t$this->addConsultantSkillItems($rslt['skillId'],$params['cons_service_type_id']);\n\t\treturn $rslt;\n }", "public function getSkill() {\n return $this->skill;\n }", "function get_person($person_id)\n {\n return $this->db->get_where('person',array('person_id'=>$person_id))->row_array();\n }", "function addConsultantSkillItems($skillId,$serviceTypeIds) {\n\t\t$qry = 'CALL addConsultantSkillItems(%d,\"%s\")';\n\t\t$qry = $this->db->prepareQuery($qry,$skillId,$serviceTypeIds);\n\t\t$rslt = $this->db->getSingleRow($qry);\n\t\treturn $rslt;\n }", "public function practisecat_id($id)\n {\n //$this->load->helper('url');\n //Call proccedures \n $query = $this->db->query(\"CALL `getpractisecat_id`($id)\");\n //NO error handling assume everything fine\n $commission_one=array();\n foreach($query->result_array()as $key=>$data){\n $data['questionids'] =json_decode($data['questionids']) ;\n if(json_decode($data['questionids'])){\n $qua=$this->question_By_in_list($data['questionids']);\n }else {\n $qua=[];\n }\n $data['quation_ids'] = $qua ;\n $commission_one[] = $data ;\n }\n //$commission_one[1]['options']=1;\n return $commission_one[0];\n }", "function read_question($question_id){\n $query1 = \"SELECT survey_id AS 'survey_id'\n FROM questions\n WHERE questions.id = ?\n LIMIT 1\";\n $survey_id = $this->db->query($query1,array($question_id))->row_array();\n\n\n $query2 = \"SELECT questions.question, questions.instructions, questions.question_type_id\n FROM questions\n WHERE questions.id = ?\n AND questions.survey_id = ?\";\n $values = array($question_id, $survey_id['survey_id']);\n return $this->db->query($query2, $values)->row_array();\n }", "function getSkillUserInformation($idUser, $idSkill) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM has WHERE idUser = :idUser AND idSkill = :idSkill\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idUser' => $idUser,\n\t\t\t'idSkill' => $idSkill\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll()[0];\n}", "public function getProjectSkills($project_id) {\n $path = base_url();\n $url = $path . 'api/View_Project_api/getProjectSkills?project_id='.$project_id;\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n return $response;\n }", "function get_laboratorist($id){\n $result = $this->db->get_where('laboratorist',array('id'=>$id))->row_array();\n\t\t$db_error = $this->db->error();\n\t\tif (!empty($db_error['code'])){\n\t\t\techo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n\t\t\texit;\n\t\t}\n\t\treturn $result;\n }", "public function getPatientOfDoctor($id) {\n\t\t\t$stmt = $this->con->prepare(\"SELECT * FROM users WHERE my_doctor_id = ?\");\n\t\t\t$stmt->bind_param(\"i\", $id);\n\t\t\t$stmt->execute(); \n\t\t\t$stmt->bind_result($id_p, $email, $p, $t, $name, $sex, $age, $doc, $created_at);\n\t\t\t\n $patients = array(); \n while($stmt->fetch()){ \n\t\t\t\t$patient = array(); \n $patient['id'] = $id_p; \n\t\t\t\t$patient['email'] = $email;\n $patient['name']=$name; \n $patient['sex'] = $sex; \n $patient['age'] = $age; \n\t\t\t\t$patient['created_at'] = $created_at; \n array_push($patients, $patient);\n\t\t\t\t$stmt->bind_result($id_p, $email, $p, $t, $name, $sex, $age, $doc, $created_at);\n \n } \n return $patients; \n\t\t}", "public function skills()\n\t{\n\t\t$this->domain('accountConfigReadOnly');\n\t\t\n\t\t$url = \"https://{$this->domain}/api/account/{$this->account}/configuration/le-users/skills?v=4.0\";\n\t\t\n\t\treturn new Skills($this->request->V2($url, 'GET'));\n\t}", "public function talent($id)\n\t{\n\t\tif ( ! isset($this->info['talents']))\n\t\t{\n\t\t\t// no talents\n\t\t\treturn null;\n\t\t}\n\t\t$talents = $this->info['talents'];\n\t\tif (isset($talents[$id]))\n\t\t{\n\t\t\treturn $talents[$id];\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public function getAllSkills() {\n try {\n $em = $this->em;\n $conn = $em->getConnection();\n\n $stmt = $conn->executeQuery(\"select * from fonctionnalites\");\n $stmt->execute();\n\n return $stmt->fetchAll();\n }\n\n catch(PDOException $e) {\n\n }\n }", "function _getQuestionDataArray($id)\n\t{\n\t\tglobal $ilDB;\n\t\t$result = $ilDB->queryF(\"SELECT svy_question.*, \" . $this->getAdditionalTableName() . \".* FROM svy_question, \" . $this->getAdditionalTableName() . \" WHERE svy_question.question_id = %s AND svy_question.question_id = \" . $this->getAdditionalTableName() . \".question_fi\",\n\t\t\tarray('integer'),\n\t\t\tarray($id)\n\t\t);\n\t\tif ($result->numRows() == 1)\n\t\t{\n\t\t\treturn $ilDB->fetchAssoc($result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "function fetch_all_assigned_employee_to_survey($id){\n $this->db->select(\"emp_id\");\n $this->db->where('s_id', $id);\n $query = $this->db->get(\"survey_of_employee\"); \n if($query->num_rows() > 0){ \n $result = $query->result_array(); \n $result = array_column($result, 'emp_id');\n } else {\n $result = array(); \n }\n return $result; \n }", "function get_teachers_qualification($id)\n {\n return $this->db->get_where('teachers_qualifications',array('id'=>$id))->row_array();\n }", "function GetById($id)\n {\n\t\t$this->db->from('lead');\n\t\t$this->db->where('Id',$id);\n\t\t$query=$this->db->get();\n if ($query->num_rows() == 0) return false; // not found\n\t\treturn $query->row_array();\n }", "function get_by_id($id)\n {\n\t\t$id_patner = $this->session->userdata('DX_id_patner');\n\t\tif($id_patner > 0){\n\t\t\t//$this->db->where('id_patner', $id_patner);\n\t\t}\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "public function skill()\n {\n return $this->hasMany('App\\Models\\Skill','skill_category_id','id');\n }", "function find_salesperson_by_id($id=0) {\n global $db;\n $sql = \"SELECT * FROM salespeople \";\n $sql .= \"WHERE id='\" . $id . \"';\";\n $salespeople_result = db_query($db, $sql);\n return $salespeople_result;\n }", "function get_auditores_equipo( $id ) {\n\t\t// obtiene a los auditores que ya tienen equipo para formar un array\n\t\t$condicion = array(\n\t\t\t'au_equipos.IdAuditoria' => $id,\n\t\t);\n\t\t\n\t\t$this->db->order_by( 'au_equipos.Nombre ASC, au_equipos_usuarios.Tipo DESC' );\n\t\t$this->db->join( 'au_equipos_usuarios', 'au_equipos_usuarios.IdUsuario = ab_usuarios.IdUsuario' );\n\t\t$this->db->join( 'au_equipos', 'au_equipos.IdEquipo = au_equipos_usuarios.IdEquipo' );\n\t\t$this->db->join( 'ab_areas', 'ab_areas.IdArea = ab_usuarios.IdArea' );\n\t\t$this->db->select( 'au_equipos.Nombre as Equipo, au_equipos.IdEquipo, au_equipos_usuarios.Tipo, ab_areas.Area, ab_usuarios.IdUsuario, ab_usuarios.Nombre, ab_usuarios.Paterno, ab_usuarios.Materno');\n\t\t$consulta = $this->db->get_where( 'ab_usuarios', $condicion );\n\t\t\n\t\treturn $consulta;\n\t}", "public function get_exam($id = NULL) {\r\n \r\n // Initialize where clause\r\n $where = array();\r\n \r\n // Create where clause if id is set.\r\n if($id != NULL) {\r\n $where = array(\r\n array('field' => 'examid', 'value' => $id)\r\n );\r\n }\r\n \r\n // Call get_data from utl_model\r\n return $this->util_model->get_data(\r\n 'exams', \r\n array('*'),\r\n $where\r\n );\r\n \r\n }", "public function getByID($id) {\n\t\treturn $this->db->get_where('pengurus',array('id'=>$id))->result_array();\n\t}", "public function skill_get(){\n $param= array(\n 'uid' => $this->input->post('uid'),\n 'deviceId' => $this->input->post('deviceId')\n );\n if (isset($_POST['uid']) && count($_POST) == 2) {\n $data = $this->ProfileModel->getSkill($param);\n echo $data;\n }else {\n $data = array(\n 'status' => 1,\n 'message' => \"invalid\"\n );\n $result = json_encode($data);\n echo $result;\n }\n }", "function get_all_behaviours_skills()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('behaviours_skills')->result_array();\n }", "function get_salario($salario_id)\n {\n return $this->db->get_where('salario',array('salario_id'=>$salario_id))->row_array();\n }", "function getLessonById($lesson_id){\n global $db;\n $lessons = $db->query(\"SELECT * FROM lesson WHERE lesson_id = :lid \",array(\"lid\" => $lesson_id));\n return $lessons[0];\n }", "public function getskills(){\n\t\treturn $this->_skills;\n\t}", "function get_employee($id)\n {\n return $this->db->get_where('employees',array('id'=>$id))->row_array();\n }", "public function getskillbuildertoollist($skillbuilderid) \n\t{\n\t\t$this->writelog(\"getskillbuildertoollist($skillbuilderid) \\n\");\n\t\t$retVal = NULL;\n\t\ttry\n\t\t{\n\t\t\t//Check memcache\n\t\t\t// initialize class member variables\n\t\t\t$this->_client = new SoapClient($_SERVER['SOAP_CLIENT_SUPPORT_URL']);\n\t\t\t$response = $this->_client->getskillbuildertoollist($skillbuilderid);\n\t\t\t$retVal = $response;\t\t\t\t\t\t\n\t\t}\n\t\tcatch (SoapFault $fault) \n\t\t{\n\t\t\t$retVal = \"SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})\";\n\t\t}\n\t\t\n\t\treturn $retVal;\n\t}", "function getSkillType($idSkillType) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM SkillType WHERE idSkillType = :idSkillType\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idSkillType' => $idSkillType\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll()[0];\n}", "public function getRelatedLowongan($id){\n $lowongan_now = $this->getLowongan($id);\n $lowongan_now = json_decode($lowongan_now);\n\n $tipe = $lowongan_now->tipe;\n $divisi= $lowongan_now->divisi;\n\n\n $getrelated_lowongan = DB::table('lowongan')\n ->where('id', '!=', $id)\n ->where(function ($query) use ($tipe, $divisi) {\n $query->where('tipe',$tipe)\n ->orWhere('divisi' , $divisi);\n })\n ->get();\n\n $related_lowongan = json_decode($getrelated_lowongan, true);\n $result = array();\n foreach($related_lowongan as $lowongan){\n $lowongan = (object) $lowongan;\n $lowongan = $this->addRequirementAndResponsibility($lowongan);\n array_push($result, $lowongan);\n }\n $firstThreeElements = array_slice($result, 1, 4);\n return $firstThreeElements;\n\n }", "public function getQuestionNormal($id)\n {\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT aq.id_aq, aq.questionTitle, aq.questionText , aq.questionState,\n u.id_us, u.login, u.email, a.id_ad, a.adName\n FROM AdQuestionsBundle:AdsQuestions aq\n JOIN aq.questionAd a\n JOIN aq.questionAuthor u\n WHERE aq.id_aq = :question\")\n ->setParameter('question', $id); \n $rows = $query->getResult();\n if($rows)\n {\n return $rows[0];\n }\n return array();\n }", "function getStudent($id)\r\n {\r\n try {\r\n $pattern = '/^\\d+$/';\r\n if (preg_match($pattern, $id) != 1) {\r\n return false;\r\n }\r\n\r\n /*You can Add DB */\r\n $arr = array(\r\n 1 => array(\r\n \"Name\" => \"Sita Patel\",\r\n \"Age\" => 12\r\n ),\r\n 2 => array(\r\n \"Name\" => \"Nirali Patel\",\r\n \"Age\" => 15\r\n ),\r\n 3 => array(\r\n \"Name\" => \"Drasti Desai\",\r\n \"Age\" => 13\r\n ),\r\n );\r\n\r\n /**Find student data & return */\r\n foreach ($arr as $k => $v) {\r\n if ($k == $id) {\r\n return $v;\r\n }\r\n }\r\n # default return false\r\n return false;\r\n \r\n } catch (Exception $e) {\r\n return false;\r\n }\r\n }", "public function selectById($id_Experience = \"\") {\n\t\t$this->query = \"SELECT * FROM Experience WHERE id_experience ='$id_Experience'\";\n\t\t$this->get_results_from_query();\n\t\treturn $this->rows[0];\n\t}", "public function getEducation($id) {\n return $this->getEmployeeDao()->getEducation($id);\n }", "public static function get_skills_index(){\n global $db;\n $mmrpg_skills_fields = rpg_skill::get_index_fields(true, 'skills');\n $mmrpg_skills_index = $db->get_array_list(\"SELECT\n {$mmrpg_skills_fields},\n groups.group_token AS skill_group,\n tokens.token_order AS skill_order\n FROM mmrpg_index_skills AS skills\n LEFT JOIN mmrpg_index_skills_groups_tokens AS tokens ON tokens.skill_token = skills.skill_token\n LEFT JOIN mmrpg_index_skills_groups AS groups ON groups.group_class = tokens.group_class AND groups.group_token = tokens.group_token\n WHERE skills.skill_id <> 0 AND skills.skill_token <> 'skill' AND skills.skill_class <> 'system'\n ORDER BY\n groups.group_order ASC,\n tokens.token_order ASC\n ;\", 'skill_token');\n return !empty($mmrpg_skills_index) ? $mmrpg_skills_index : array();\n }", "function getHospital($id){\r\n\r\n $ASL = getInfo('idospedale', 'utentiospedali', 'idutente = ' . $id);\r\n\r\n if(!$ASL) return false;\r\n \r\n return $ASL;\r\n\r\n}", "function getUserById($id){\n $this->db->select('*');\n $this->db->where('idstudents', $id);\n $q = $this->db->get('students');\n $result = $q->result_array();\n return $result;\n }", "function getStudentById($id) {\n\t\t\t$sql = 'SELECT * FROM students WHERE id = ?';\n\t\t\treturn DatabaseService::getInstance()->doQuery($sql, array($id));\n\t\t}" ]
[ "0.72334605", "0.69803184", "0.68083656", "0.6686127", "0.6652845", "0.66138804", "0.65807855", "0.6566748", "0.6554629", "0.6503671", "0.6483226", "0.6431495", "0.64131105", "0.63296074", "0.63198483", "0.6308647", "0.62847805", "0.6254881", "0.6243205", "0.6228653", "0.61553025", "0.61309123", "0.6123952", "0.6106227", "0.60856897", "0.6070122", "0.606827", "0.60448205", "0.60125566", "0.6011472", "0.60040826", "0.5978018", "0.5973041", "0.59681046", "0.5962195", "0.59540707", "0.59539145", "0.5952472", "0.5935236", "0.5926179", "0.5909342", "0.58979565", "0.5896794", "0.5887339", "0.5865401", "0.5853671", "0.5853508", "0.5843192", "0.58383137", "0.58362013", "0.5828162", "0.58265436", "0.5820965", "0.58115506", "0.5809787", "0.57939816", "0.57920843", "0.5782579", "0.5780325", "0.57802343", "0.5771154", "0.57616174", "0.5747105", "0.574379", "0.57379216", "0.57254213", "0.571602", "0.5714082", "0.57111096", "0.5696368", "0.56947666", "0.5694367", "0.56880975", "0.56869006", "0.5683768", "0.56759757", "0.567503", "0.5672476", "0.5665622", "0.5661312", "0.56612647", "0.5660848", "0.5660071", "0.565824", "0.5639477", "0.5638631", "0.56382036", "0.5637989", "0.5637198", "0.5628433", "0.56187946", "0.56114733", "0.55958676", "0.55957", "0.5595463", "0.559342", "0.5580539", "0.55770385", "0.5574452", "0.5573768" ]
0.7402969
0
/ Function to delete consultant skill By Id return result of single row
Функция для удаления навыка консультанта по Id, возвращает результат одной строки
function deleteSkill($params = array()){ $qry = 'CALL deleteSkill(%d,%d,"%s")'; $qry = $this->db->prepareQuery($qry,$params['userId'],$params['skillDeleteId'],DB_DATE_TIME); $rslt = $this->db->getSingleRow($qry); return $rslt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteExpert(Request $req, $skillId)\n {\n $uid = $req->input('user_id');\n $manage = UserExpert::where([['user_id', '=', $uid], ['skill_category_id', '=', $skillId]])->first();\n //제거시 cascade라면 여기서 작업해줘야 한다.\n if ($manage) {\n $manage->delete();\n return response()->json(__('messages.success'));\n }\n return response()->json(__('messages.not_found'), 404);\n }", "function deleteSkillType($idSkillType) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"DELETE FROM SkillType WHERE idSkillType = :idSkillType\");\n\n\t// The delete can be effective only if it is not use in a variousSkill.\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idSkillType' => $idSkillType,\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn \"\";\n}", "function deleteQuestionById($id)\n{\n return DB::queryFirstRow(\"DELETE FROM final_project_question WHERE quId = $id\");\n}", "public function deletePersona(){\n #Se guarda la consulta en una variable\n $sql = \"DELETE FROM persona WHERE id = ?\";\n #se guardan los parametros (datos recogidos) en una variable,como un arreglo\n $params = array($this->idPersona);\n #Retorna el estado que devuelve el metodo executeRow \n return Database::executeRow($sql, $params);\n }", "public function delete(){\r\n $sql_statement = \"DELETE FROM \".$this->table.\" WHERE id = ? \";\r\n return $this->executeQuery( $sql_statement, 'i', array($this->id), true );\r\n }", "public function deletePsychoSkills($id)\n {\n try {\n\n \t\t\t\t\t //EDIT EXAM RECORD\n $sqlStmt = \"DELETE FROM stud_psychomotor_skills WHERE stud_psychomotor_skills.id=?\";\n $this->conn->query($sqlStmt);\n $this->conn->bind(1, $id, PDO::PARAM_INT);\n $this->conn->execute();\n \t\tif ($this->conn->rowCount() == 1)\n \t\t{\n \t\t// action successful\n \t\techo \"ok\";\n \t\t}\n \t\telse\n \t\t{\n \t\techo \"Error removing psychomotor item\";\n \t\t\t}\n\n \t\t}\n\n catch(Exception $e)\n {\n //echo error here\n //this get an error thrown by the system\n echo \"Error:\". $e->getMessage();\n \n }\n }", "function delete_employee_of_survey($id){ \n $this->db->where('s_id', $id);\n $query = $this->db->delete(\"assign_users_to_survey\");\n return 1; \n }", "function delete_employee_survey_data($id){ \n $this->db->where('s_id', $id);\n $query = $this->db->delete(\"survey_of_employee\");\n return 1; \n }", "function deleteExpId($bdd,$idExp){\n $req = $bdd->prepare(\"DELETE FROM experiences WHERE id='$idExp'\");\n $req->execute();\n }", "public function deleteByIdExam($idExam);", "function unassignSkill($idUser, $idSkill) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"DELETE FROM has WHERE idUser = :idUser AND idSkill = :idSkill\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idUser' => $idUser,\n\t\t\t'idSkill' => $idSkill\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn \"\";\n}", "function delete_survey_question($id){ \n $this->db->where('s_id', $id); \n $query = $this->db->delete(\"map_question_to_survey\"); \n return 1;\n }", "public function delete($id)\n { \n MyLogger2::info(\"Entering SkillDataService.delete()\");\n try{ \n // Delete statement where user ID is ID passed in\n $stmt = $this->db->prepare(\"DELETE FROM `SKILLS` WHERE `SKILLS`.`id` = :id\");\n $stmt->bindParam(':id', $id);\n $stmt->execute();\n \n // if result == 1\n if ($stmt->rowCount() == 1){\n MyLogger2::info(\"Exiting SkillDataService.delete()\");\n return true;\n }\n // if result vaiable doesn't find user with entered credentials\n else\n return false;\n } catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n }", "public function delete(){\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE `employee_id` = :id LIMIT 1\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(\":id\", $this->employee_id);\n $stmt->execute();\n\n return $stmt->rowCount();\n }", "public function userRemoveSkillAction($skillId) {\n //check for logrdin user\n if (FALSE === $this->get('security.context')->isGranted('ROLE_USER')) {\n return new Response('faild');\n }\n $em = $this->getDoctrine()->getEntityManager();\n $skillRepo = $em->getRepository('ObjectsInternJumpBundle:Skill');\n\n //get skill object\n $skillObject = $skillRepo->find($skillId);\n //decrement skill user count\n $skillObject->setUsersCount($skillObject->getUsersCount() - 1);\n\n //get logedin user objects\n $user = $this->get('security.context')->getToken()->getUser();\n\n $user->getSkills()->removeElement($skillObject);\n\n //remove this skill from user cvs\n $userCvs = $user->getCvs();\n foreach ($userCvs as $cv) {\n if ($cv->getSkills()->contains($skillObject)) {\n //remove skill points from this cv\n $skillPoints = $this->container->getParameter('skill_point');\n $cv->setSkillsPoints($cv->getSkillsPoints() - $skillPoints);\n $cv->setTotalPoints();\n $cv->getSkills()->removeElement($skillObject);\n }\n }\n\n $em->flush();\n\n return new Response('done');\n }", "public function deleteById($alumnoId);", "public function deleteAffectiveTraits($id)\n {\n \n try {\n //EDIT EXAM RECORD\n $sqlStmt = \"DELETE FROM stud_affective_skills WHERE stud_affective_skills.id=?\";\n $this->conn->query($sqlStmt);\n $this->conn->bind(1, $id, PDO::PARAM_INT);\n $this->conn->execute();\n if ($this->conn->rowCount() == 1)\n {\n // action successful\n echo \"ok\";\n }\n else\n {\n echo \"Error removing affective item\";\n }\n\n }\n\n catch(Exception $e)\n {\n //echo error here\n //this get an error thrown by the system\n echo \"Error:\". $e->getMessage();\n \n }\n }", "function deleteEmployee($id){\n\t$sql=\"delete from employee where employee_id='$id'\";\n\n\treturn $this->query($sql);\n}", "public function delete($practiceId) {\n\t// get database\n\t$db = MySQLDatabase::getInstance();\n\n\t// delete and return affected rows\n\treturn $db->delete(TABLE_NAME, 'practice_id = ?', array($primaryKey));\n }", "public function delete_row($id) \n { \n //data is retrive from this query \n $this->db->where('id', $id);\n $query = $this->db->delete('careers');\n return $query;\n }", "public function delete()\n\t{\n\t\t$sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $this->id . ' = :' . $this->id . ' LIMIT 1;';\n\t\t$input_parameters[':' . $this->id] = $this->record[$this->id];\n\n\t\treturn $this->db->execute($sql, $input_parameters);\n\t}", "public function actionDelete($id,$skill_id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index','skill_id'=>$skill_id));\n\t}", "public function deleteExamItem($id)\n {\n try {\n \t\t\t\t\t //Remove student when supplied with class id\n $sqlStmt = \"DELETE FROM terminal_exam WHERE id=?\";\n $this->conn->query($sqlStmt);\n $this->conn->bind(1, $id, PDO::PARAM_INT);\n $this->conn->execute();\n \t\tif ($this->conn->rowCount() == 1)\n \t\t{\n \t\t// action successful\n \t\techo \"ok\";\n \t\t}\n \t\telse\n \t\t{\n \t\techo \"Error removing EXAM item\";\n \t\t\t}\n\n \t\t}\n\n catch(Exception $e)\n {\n echo \"Error:\". $e->getMessage();\n }\n }", "function deleteStudent($id){\n $query =\"DELETE FROM `student` WHERE `student_id` = :id\" ;\n $params = [\n \"id\" => $id\n ];\n DataBase::getInstance()->deleteRow($query,$params);\n }", "function delete_persona($id)\n {\n return $this->db->delete('persona',array('id'=>$id));\n }", "public function tryDeleteSkill(Skills $skill)\n {\n $servername= config(\"database.connections.mysql.host\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n $dbname = config(\"database.connections.mysql.database\");\n \n //Create connection\n $conn = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $result=$this->PortfolioDataService->deleteSkill($skill);\n return $result;\n\n }", "public function deleteManager(Request $req, $skillId)\n {\n $uid = $req->input('user_id');\n $manage = UserManage::where([['user_id', '=', $uid], ['skill_category_id', '=', $skillId]])->first();\n //제거시 cascade라면 여기서 작업해줘야 한다.\n if ($manage) {\n $manage->delete();\n return response()->json(__('messages.success'));\n }\n return response()->json(__('messages.not_found'), 404);\n }", "function delete_behaviours_skill($id)\n {\n return $this->db->delete('behaviours_skills',array('id'=>$id));\n }", "public function eliminarpersona($id){\n /*Otra forma de hacerlo es */\n $this->db->where('idpersona',$id);\n $this->db->delete('persona');\n}", "function deleteTemp($prdId){\n $this->db->where($this->temp_f[1], $prdId);\n $resultDelete = $this->db->delete($this->temp_tp);\n return $resultDelete;\n }", "public function deleteItem($id)\n {\n $item = PermissionMappingModel::findOrFail($id);\n //$table=$model->getTable()\n //DB::select(\"delete from $table WHERE role_id=$id\");\n return $item->delete();\n }", "public function remove(Request $request){\n\n $input = $request->only('id');\n $rules = ['id' => 'required|exists:skills,id'];\n\n $messages = ['id.required' => 'Please enter skill id.',\n \t\t\t'id.exists' => 'Skill not found.'\n \t\t\t];\n\n $validator = Validator::make($input,$rules,$messages);\n\n // if validation fails\n if($validator->fails()) {\n $code = 406;\n $output = ['error' => ['code'=>$code,'messages'=>$validator->messages()->all()]];\n \n // if validation passes\n } else {\n $response = $this->_repository->deleteById($input['id']);\n\n if($response == 'success') { \n $code = 200;\n $output = ['success'=>['code'=>$code,'messages'=>['Skill has been deleted successfully.']]];\n } else if ($response == 'cannot_delete') {\n $code = 401;\n $output = ['error' => ['code'=>$code,'messages'=>['Sorry you cannot remove this skill as it is associated with some users.']]];\n } else if ($response == 'error') {\n $code = 405;\n $output = ['error' => ['code'=>$code,'messages'=>['An error occur while deleting this skill.']]];\n } else if ($response == 'not_found') {\n $code = 404;\n $output = ['error' => ['code'=>$code,'messages'=>['Skill not found.']]];\n } \n }\n return response()->json($output, $code);\n }", "public function destroy($id)\n {\n $skill = Skill::findOrFail( $id );\n $skill->delete();\n return redirect('/administration/skills')->with('success','Item success successfully!');\n\n }", "public function destroy($id)\n {\n $skill = Skills::find($id);\n $skill->delete();\n session()->flash('success' , 'Skill Deleted Successfully');\n return redirect()->route('admin.skills.index');\n\n }", "public function delete() {\r\n\r\n $input_data = $this->request->getJsonRawBody();\r\n $id = isset($input_data->id) ? $input_data->id : '';\r\n if (empty($id)):\r\n return $this->response->setJsonContent(['status' => false, 'message' => 'Id is null']);\r\n else:\r\n $answers_delete = Answers::findFirstByid($id);\r\n if ($answers_delete):\r\n if ($answers_delete->delete()):\r\n return $this->response->setJsonContent(['status' => true, 'Message' => 'Record has been deleted succefully ']);\r\n else:\r\n return $this->response->setJsonContent(['status' => false, 'Message' => 'Data could not be deleted']);\r\n endif;\r\n else:\r\n return $this->response->setJsonContent(['status' => false, 'Message' => 'ID doesn\\'t']);\r\n endif;\r\n endif;\r\n }", "public function delete_work_experience_record($id){\n\t\t$this->db->where('work_experience_id', $id);\n\t\t$this->db->delete('xin_employee_work_experience');\n\n\t}", "public function delete() {\n global $DB;\n $query = \"DELETE FROM students WHERE id = {$this->id}\";\n $result = $DB->query($query);\n Student::checkResult($result);\n }", "function deleteQuestion($questionid)\n{\n GLOBAL $dbObject;\n GLOBAL $toJsonString; \n\n $dbObject->queryDelete(\"delete from question where id='$questionid'\");\n\n if($dbObject->isDberror())\n {\n return '{\"status\":\"error\",\"results\":\"'.$dbObject->getDberror().'\"}';\n }\n else\n {\n if($dbObject->get_affected_rows() > 0)\n {\n return '{\"status\":\"good\",\"results\":\"The Question was removed!\"}';\n }\n else\n {\n //user does not exisist\n return '{\"status\":\"error\",\"results\":\"No records to remove.\"}';\n }\n } \n}", "public function deletequestion($id)\n {\n $assistant = DB::table('assistant')\n ->join('users', 'assistant.user_doctor', '=', 'users.id')\n ->where('user_assist', Auth::id())\n ->select('assistant.*', 'users.name', 'users.profile_photo', 'users.id as iddr')\n ->get();\n if(count($assistant) > 0){\n $user = User::find(session()->get('asdr'));\n }else{\n $user = User::find(Auth::id());\n }\n\n $question = questions_clinic_history::find($id);\n $answer = DB::table('answers_clinic_history')->where('question', $id)->first();\n $clinic_history = DB::table('clinic_history')->where('question_id', $id)->get();\n\n if(count($clinic_history) == 0){\n if(DB::table('answers_clinic_history')->where('question', $id)->delete())\n DB::table('questions_clinic_history')->where('id', $id)->delete(); \n }else{\n $question->active = false;\n if($question->save())\n $answer->active = false;\n\n }\n return redirect('doctor/doctor/'.$user->id);\n }", "public function delete_advanced_salary($id){\n\nSalary::where(['id'=>$id])->delete();\nreturn redirect('/add_advancedemployees_salary')->with('flash_message_error','Advanced salary delete successfully');\n\n\n }", "function del ($id) {\n\n return $this->exec(\n \"DELETE FROM `exhibitions` WHERE `product_id`=?\",\n [$id]\n );\n }", "function deleteRowById($table,$id) {\n\tglobal $database;\n $database->delete($table, [ \"id\" => $id ]);\n\treturn \"delOK\";\n}", "public function deleteUser($id){\n $query = \"delete from tbl_sample where id='$id'\";\n $smt = $this->conn->prepare($query);\n $smt->execute();\n return $smt;\n }", "public function delete($YId);", "public function testDeleteSkillSuccess() {\n $objSave = $this->createSkill(\"Some Skill\", $this->skillCatId, $this->adminUser);\n $skillId = $objSave->objectId;\n $result = \\Classes\\Skill::DeleteSkill($skillId);\n $this->assertFalse($result->hasError);\n }", "public function delete_question($id, $key)\n\t{\n\t\t$resultat = $this->db->where('idQuestion', $id)\n\t\t\t\t\t\t\t->where('cleFormulaire', $key)\n\t\t\t\t\t\t\t->delete($this->table);\n\t\treturn $resultat;\n\t}", "public function deleteskills($id){\n $skill=DB::table('students_skills as ss')\n ->join('skills as s','s.id','ss.skill_id')\n ->join('siita_db.users as u','u.university_id','ss.user_id')\n ->select('ss.*','s.name')\n ->where('ss.id',$id)\n ->first();\n \n \n //Mostrar la carrera del alumno correspondiente\n $users=DB::table('siita_db.students')\n ->join('siita_db.users','siita_db.students.user_id','=','siita_db.users.id')\n ->join('siita_db.careers','siita_db.careers.id','=','siita_db.students.career_id')\n ->select('siita_db.students.*', 'siita_db.users.*','siita_db.careers.*')\n ->where('siita_db.students.user_id','=',auth()->user()->id)\n ->get();\n \n return view('egresado.deleteskill', compact('users','skill'));\n }", "function deletesp(){\r\n $sql = \"DELETE FROM runner WHERE id= :id\";\r\n $args = [':id'=>$this->id];\r\n return DB::run($sql,$args);\r\n }", "function deleteTodoSheet($sheetID){\n return execute(\"DELETE FROM todosheets WHERE id=:sheetID\",['sheetID' => $sheetID]);\n}", "public function deleteRespon($id){\n $result = false;\n $this->db->where('mpe_respon_id', $id);\n $result = $this->db->delete('mpe_respon');\n return $result;\n }", "function delete($questionId) {\n\t\t$userVerification = new Owner_Model_UserVerification();\n\t\t$userVerification->verifyUserMatchesQuestion($questionId);\n\t\n\t\t$q = Doctrine_Query::create()\n\t\t->select('q.SurveyID, q.QuestionIndex, q.PageID, q.CategoryID')\n\t\t->from('Survey_Model_Question q')\n\t\t->addWhere('q.ID = ?', $questionId);\n\t\t$questions = $q->fetchArray();\n\t\tif (count($questions) < 1) {\n\t\t\tthrow new Zend_Controller_Action_Exception('No question found with requested ID ' . $questionId);\n\t\t} else if (count($questions) > 1) {\n\t\t\tthrow new Zend_Controller_Action_Exception('Multiple questions found with requested ID ' . $questionId);\n\t\t}\n\t\n\t\t$surveyId = $questions[0]['SurveyID'];\n\t\t$index = $questions[0]['QuestionIndex'];\n\t\t$page = $questions[0]['PageID'];\n\t\n\t\t//$conn = Doctrine_Manager::connection();\n\t\t//$conn->beginTransaction('deleteQuestionFromPage');\n\t\n\t\t// remove this question from database\n\t\t$q = Doctrine_Query::create()\n\t\t->delete('Survey_Model_Question q')\n\t\t->addWhere('q.ID = ?', $questionId);\n\t\t$q->execute();\n\t\n\t\n\t\t// update the other indices in this page\n\t\t$surveyMapper = new Owner_Model_SurveyMapper();\n\t\t$surveyMapper->decrementQuestionIndices($surveyId, $userId, $page, $index);\n\t\n\t\tswitch ($questions[0]['CategoryID']) {\n\t\t\tcase enums_QuestionCategory::MultipleChoice:\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->delete('Survey_Model_Multiplechoicequestion m')\n\t\t\t\t->where('m.QuestionID = ?', $questionId);\n\t\t\t\t$q->execute();\n\t\t\t\tbreak;\n\t\t\tcase enums_QuestionCategory::CommentEssayBox:\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->delete('Survey_Model_Essayboxquestion e')\n\t\t\t\t->where('e.QuestionID = ?', $questionId);\n\t\t\t\t$q->execute();\n\t\t\t\tbreak;\n\t\t\tcase enums_QuestionCategory::DescriptiveText:\n\t\t\t\tbreak;\n\t\t\tcase enums_QuestionCategory::MatrixOfChoices:\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->delete('Survey_Model_Matrixofchoicesquestion m')\n\t\t\t\t->where('m.QuestionID = ?', $questionId);\n\t\t\t\t$q->execute();\n\t\n\t\t\t\t// delete child questions\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->delete('Survey_Model_Question q')\n\t\t\t\t->addWhere('q.ParentQuestionID = ?', $questionId);\n\t\t\t\t$q->execute();\n\t\t\t\tbreak;\n\t\t}\n\t\n\t\n\t\t$this->deleteSelections($questionId);\n\t\n\t\t//$conn->commit('deleteQuestionFromPage');\n\t}", "public function delete() {\n\t\t$dbh = static::getInstance();\t\t\n\t\t$sth = $dbh->prepare(\"DELETE FROM \" . static::$table . \" WHERE \" . \n\t\t\tstatic::$id_name . \" = :id\");\n\t\t$sth->bindValue(\":id\", $this->{$class::$id_name});\n\t\treturn $sth->execute();\n\t}", "public function deleteIndonesianId($id, $thid){\n //$indonesian = Indonesian::find($id);\n //$indonesian->delete();\n//end\n\n//hapus di table thtoina\n $th_to_ina = ThtoId::where('indonesian_id',$id)->where('terhah_id',$thid)->delete();\n//end\n\n //return 'kata terhah sudah di hapus';\n return back()->withInput();\n }", "function delete_employee($id)\n {\n $this->db->delete('employees',array('id'=>$id));\n $this->db->where(array('user_id'=>$id,'autorization_id'=>2));\n return $this->db->delete('authentication');\n }", "public function dc_delete() {\n $id = $_POST['id'];\n $this->My_model->delete_data('tb_group_learning_item', array('id' => $id));\n \n \n \n }", "function elm_Data_DeleteRole($roleId){\n GLOBAL $conn;\n $id = stripslashes($roleId);\n $sql = $conn->prepare(\"DELETE FROM elm_role\n WHERE roleid = ?;\");\n $sql->bindParam(1, $id);\n $sql->execute();\n}", "public function eliminarEquipo($id){\n $consultaExistenciaEquipo = $this->db->select(\"SELECT * FROM Equipo \"\n . \"WHERE id = '\" . $id['id'] . \"' \");\n\n if ($consultaExistenciaEquipo != null) {\n $this->db->delete('equipo',\"`id` = '{$id['id']}'\");\n \n } else {\n echo 'Error NO Existe Equipo';\n die;\n \n \n }\n \n }", "function delete_salario($salario_id)\n {\n return $this->db->delete('salario',array('salario_id'=>$salario_id));\n }", "public function delete($id_noty);", "public function deleteWorkExperience(Request $request){\n $reqData = $request->all();\n $response = new ServiceResponse;\n $checkFields = array('id');\n $checkRequiredField = $this->checkRequestData($checkFields,$reqData);\n\n if($checkRequiredField == 'SUCC100'){\n $id = $reqData['id'];\n $record = UserWorkExperience::find($id);\n if(!empty($record)){\n $record->delete();\n $response->IsSuccess = true; \n $response->Message = \"Your education detail has been deleted successfully\";\n }else{\n $response->Message = \"Record not found\";\n }\n }else{\n $response->Message = $checkRequiredField;\n }\n return $this->GetJsonResponse($response);\n }", "public static function Delete($id){ \n $retorno = null; \n $query = \"DELETE FROM `empleado` WHERE id = :id\";\n \n try {\n $db = AccesoDatos::DameUnObjetoAcceso(); \n $sentencia = $db->RetornarConsulta($query);\n $sentencia->bindValue(':id', $id, PDO::PARAM_INT);\n \n $sentencia->execute(); \n \n $retorno = $sentencia->fetch(); \n } catch (PDOException $e) {\n $retorno = -1;\n }\n \n return $retorno;\n }", "function deleteVolunteer($id, $db){\n $query = $db->prepare(\"DELETE FROM volunteer WHERE id = ?\");\n $result = $query->execute([$id]);\n return $result;\n}", "function remove(){\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE id = \" . $this->id;\n // $query = \"DELETE FROM \" . $this->table_name . \" WHERE id = 72\";\n \n // prepare the query\n $stmt = $this->conn->prepare( $query );\n \n // execute the query\n $stmt->execute();\n // get number of rows\n return $stmt->rowCount();\n\n}", "function DELETE()\n{\n \n $sql = \"SELECT * FROM individual WHERE idActividad= '$this->idActividad'\";\n $result = $this->mysqli->query($sql);\n if ($result->num_rows == 1)\n {\n $sql = \"DELETE FROM individual WHERE idActividad= '$this->idActividad'\";\n $this->mysqli->query($sql);\n return \"Borrado correctamente\";\n }\n else\n return \"No existe en la base de datos\";\n}", "function borraMatricula($id){\n $conn = conectar();\n $sql = \"DELETE FROM enrollment WHERE id_enrollment='$id'\";\n $result = mysqli_query($conn, $sql);\n \n desconectar($conn);\n}", "public function employee_education_delete($id){\n $deleteEducation=DB::table('tb_employee_education_info')->where('id',$id)->delete();\n\n Session::flash('delete','Educational Information has been deleted successfully');\n return redirect()->back();\n }", "public function deleteLesson(){\n \t$id = @$_REQUEST['id'];\n \t$user_id = $_SESSION['user_id'];\n \t$this->load->model('m_student');\n \t$res = $this->m_student->deleteLesson($id,$user_id);\n \tif($res){\n \t\tprint json_encode(array('code'=>0,'desc'=>'退课成功'));\n \t} else {\n \t\tprint json_encode(array('code'=>1,'desc'=>'退课失败'));\n \t}\n }", "public function delete_record($id){\r\n\t\t$this->db->where('performance_appraisal_id', $id);\r\n\t\t$this->db->delete('xin_performance_appraisal');\r\n\t\t\r\n\t}", "public function deleteQuestionTagAction() {\n $id = $this->_request->getParam('id');\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(TRUE);\n $result = Repo_QuestionTag::getInstance()->removeRowsBySearch(\"tag_id = '\" . $id . \"'\");\n return Zend_Json::encode(array('success' => 'true'));\n }", "public function deleteDoctor() {\n $where = $this->getAdapter()->quoteInto('id = ?', $this->_id);\n\n return $this->delete($where);\n }", "public function delete($id){\n \n $tdb = new ClientSalarieRepository();\n $tdb->deleteClientSalarie($id);\n return $this->liste();\n}", "function delete($id, $db) {\n\n if(sizeof($db->sql(\"SELECT * from Faculty_User_Relation where faculty_id ='\".$id.\"';\")) > 0)\n {\n $db->sql(\"DELETE from Faculty_User_Relation where faculty_id = '\".$id.\"';\");\n }\n\n if(sizeof($db->sql(\"SELECT * from Faculty_Dept_Relation where faculty_id ='\".$id.\"';\")) > 0)\n {\n $db->sql(\"DELETE from Faculty_Dept_Relation where faculty_id = '\".$id.\"';\");\n }\n\n if(sizeof($db->sql(\"SELECT * from Class where faculty_id ='\".$id.\"';\")) > 0)\n {\n $db->sql(\"DELETE from Class where faculty_id = '\".$id.\"';\");\n }\n\n $db->sql(\"DELETE FROM Faculty WHERE faculty_id = '\".$id.\"';\");\n\n if(sizeof($db->sql(\"SELECT * from Faculty where faculty_id ='\".$id.\"';\")) == 0)\n {\n return \"Faculty Deleted\";\n } else {\n return \"Error Faculty not Deleted\";\n }\n\n }", "public function delete($id_sesi);", "public function deleteWorkExperience($id)\n\t\t{\n\t\t\t$this->db->where('id',$id);\n\t\t\tif($this->db->delete('employee_work_experience')) return \"success\"; else return \"error\";\n\t\t}", "public function delete($id){\n\t\t$sql = 'DELETE FROM workflow_assessmentworkflow WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function delete2(){\n $delete = DB::table('mata_kuliah')->where('id', '<', 3)->delete();\n return $delete;\n }", "public function delete($id){\n\t\t$sql = 'DELETE FROM student_userstanding WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function deleteAbsensiRecord($id){\n tb_m_absensi::where('id',$id)->delete();\n }", "function deleteTourist($touristId){\n global $PDO, $USER_TABLE;\n $touristId = $PDO->quote($touristId);\n $row = $PDO->query(\"SELECT * FROM $USER_TABLE WHERE userid = $touristId\")->fetch();\n if($row && $row['role']==\"tourist\"){\n $PDO->exec(\"DELETE FROM $USER_TABLE WHERE userid = $touristId\");\n return true;\n }\n return false;\n}", "public function delete($id) ;", "function deleteStudy($id)\n {\n $hasil = $this->db->query(\"DELETE FROM study WHERE id='$id'\");\n return $hasil;\n }", "function delete() {\n if( $this->getData('id') ) {\n return Database::getInstance()->getResultats( \"DELETE FROM \" . $this->_table . \" WHERE id = \" . $this->getData('id') );\n }\n return false;\n }", "function delete(){\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE questionId=:questionId;\";\n //Prepare the query\n $stmt = $this->conn->prepare($query);\n \n $stmt->bindParam(\":questionId\", $this->questionId);\n \n if($stmt->execute()){\n return true;\n } else {\n return false;\n }\n }", "public function deletePatient($id){\n $this->makeConnection();\n $selection = $this->database->prepare(\n 'DELETE FROM `patienten` \n WHERE `patienten`.`id` =:id');\n $selection->bindParam(\":id\",$id);\n $result = $selection ->execute();\n return $result;\n }", "public function delete_by_id($id);", "public function delete($id=NULL)\n\t{\n\t\t//delete exam\n\t\t$this->cm->_table_name = \"exam\";\n\t\t$this->cm->_field_name = \"examID\";\n\t\t$this->cm->_primary_key = $id;\n\n\t\t$delete = $this->cm->delete($id);\n\n\t\t//check if deleted or not\n\t\tif($delete)\n\t\t{\n\t\t\techo \"Deleted\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Notdeleted\";\n\t\t}\n\t}", "public function deleteResearch($id){\n $research = research::find($id);\n try{\n $research->active = research::DEACTIVE;\n $research->save();\n }catch (\\Exception $e){\n return redirect(\"admin/listResearch\")->with(\"error\",\"Delete Error\");\n }\n return redirect(\"admin/listResearch\")->with(\"success\",\"Delete Successfully\");\n }", "public function delete($idQuiz, $idPregunta){\r\n\t\t$sql = 'DELETE FROM quizes_has_preguntas WHERE id_quiz = ? AND id_pregunta = ? ';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($idQuiz);\n\t\t$sqlQuery->setNumber($idPregunta);\n\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "public final function delete(){\n $this->clearData();\n $this->where = $this->prepareCondition(func_get_args(),'AND');\n $this->lastQuery = \"DELETE FROM {$this->table} WHERE {$this->where}\";\n return $this->app['DB']->query($this->lastQuery);\n }", "public function delete($salud_pension){\n $id=$salud_pension->getId();\n\n try {\n $sql =\"DELETE FROM `salud_pension` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "function deleteData($db)\n{\n global $_REQUEST;\n global $_SESSION;\n global $arrUserInfo;\n $i = 0;\n if ($_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n $strKriteria = \"\";\n } // bisa hapus semua\n else {\n $strKriteria = \"AND id_employee = '\" . $arrUserInfo['id_employee'] . \"' \"; // hanya punya sendiri\n $strKriteria .= ($arrUserInfo['isDeptHead']) ? \"AND status = 0 \" : \"AND status = 0 \";\n }\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 5) == 'chkID') {\n $i++;\n $id = substr($strIndex, 5, strlen($strIndex) - 5);\n $strSQL = \"DELETE FROM hrd_overtime WHERE id = '$strValue' $strKriteria \";\n $resExec = $db->execute($strSQL);\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}", "public static function deleteID(){\n $idUser = $_REQUEST[\"idUser\"];\n $result = DB::dataManipulation(\"DELETE FROM users WHERE idUser = '$idUser'\");\n return $result;\n }", "public function destroy($id)\n {\n $id =base64_decode($id);\n $data = Skill::find($id); \n $data->delete();\n setMessage('success', 'Skill Has been successfully deleted');\n return redirect()->back();\n }", "public function testDeleteById()\n {\n\n // Existing eligibility\n $this->json('DELETE', '/eligibilities/2')\n ->seeJsonEquals([\n 'status_code' => 200,\n 'status' => 'OK',\n 'message' => 'Resource deleted',\n ])\n ->seeStatusCode(200)\n ->notSeeInDatabase('eligibilities', ['id' => 2]);\n\n }", "function delete_payanalf($id)\n {\n return $this->db->delete('payanalf',array('id'=>$id));\n }", "public function deleteById(int $PersonneId): bool;", "public function deleteByID(){\n $consulta = $this->conexion->prepare(\"DELETE FROM \".$this->table.\" WHERE idadmin = :id\");\n $del = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $this->conexion = null;\n\n return $del;\n }", "function hapus($id){\n global $koneksi;\n mysqli_query($koneksi, \"DELETE FROM siswa where id = $id\");\n return mysqli_affected_rows($koneksi);\n}", "public function del( $id );", "public function delete()\n {\n self::$dbh = DbConnect::getConnection();\n $table = static::$tableName;\n\n $query = \"DELETE FROM $table WHERE id=\" . $this->params['id'];\n $sth = self::$dbh->prepare($query);\n\n return $this->execQuery($sth);\n }" ]
[ "0.7037367", "0.70017236", "0.6898957", "0.68575317", "0.6831635", "0.6789982", "0.67755294", "0.67656326", "0.66721034", "0.6651045", "0.66096646", "0.65226585", "0.6519458", "0.6514184", "0.65041876", "0.6495969", "0.6447932", "0.6423026", "0.64227015", "0.6410273", "0.6405001", "0.63937855", "0.63828975", "0.6381775", "0.63731843", "0.63605917", "0.6347941", "0.6333489", "0.6330548", "0.63159394", "0.6313412", "0.6304085", "0.63027364", "0.6302039", "0.630082", "0.6279273", "0.6271016", "0.6269866", "0.626793", "0.62598294", "0.6253532", "0.6242303", "0.6227936", "0.6220789", "0.62158245", "0.62129825", "0.6212902", "0.6212309", "0.6198632", "0.619837", "0.6196548", "0.6191801", "0.6189349", "0.6185758", "0.61851877", "0.61807173", "0.61787254", "0.6166973", "0.61665344", "0.6160098", "0.6157446", "0.6150412", "0.61492616", "0.6148024", "0.61443716", "0.61405593", "0.6138595", "0.61376446", "0.61356735", "0.61355644", "0.61342174", "0.61310536", "0.61263645", "0.61261004", "0.6121539", "0.6121439", "0.6117927", "0.6116776", "0.61146307", "0.6111522", "0.6101283", "0.6096057", "0.60960007", "0.60954016", "0.60940313", "0.60897344", "0.6089313", "0.6086635", "0.60835946", "0.6081464", "0.60807157", "0.6076499", "0.60760516", "0.6075602", "0.60727084", "0.60712457", "0.60709983", "0.6070042", "0.6069295", "0.6067431" ]
0.7355536
0
Constructs a new StudentExercise
Создает новый StudentExercise
public function __construct($student, $exercise) { $this->student = $student; $this->exercise = $exercise; $this->answered = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(UserExercise $userExercise)\n {\n $this->userExercise = $userExercise;\n }", "function createExercise( $createName, $createArea, $createMuscle, $createDesc, $createInstr, $createAuthor ) {\r\n\r\n // Executes query\r\n try {\r\n\r\n // Adds record to the exercise table\r\n $stmt = $this->dbh->prepare( \"\r\n INSERT INTO exercise\r\n ( exerName, exerArea, exerMuscle, exerDescription, exerInstructions, exerAuthor )\r\n VALUES\r\n ( '{$createName}', {$createArea}, {$createMuscle}, '{$createDesc}', '{$createInstr}', {$createAuthor} )\r\n \" );\r\n $stmt->execute();\r\n\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n } // Ends try catch\r\n\r\n }", "public static function factory($tsRefID, $stdiepyear = 0) {\n\t\treturn new IDEAStudentTXFIE($tsRefID, $stdiepyear);\n\t}", "public function create()\n\t{\n\t\treturn View::make('exercises.create');\n\t}", "function make_dummy_exam() {\n $e = new stdClass;\n $e->id = 0;\n $e->exam_name = '';\n $e->ownerid = 0;\n $e->pathname = '';\n $e->examcode = '';\n $e->examcodehash = '';\n\n return $e;\n}", "public function create()\n {\n return view('dashboard/exercises/create');\n }", "public function create()\n\t{\n\t\treturn View::make('myexercises.create');\n\t}", "public static function factory($tsRefID, $stdiepyear = 0) {\n\t\treturn new IDEAStudentTXARD($tsRefID, $stdiepyear);\n\t}", "public function create()\n {\n return view('admin.exercises.create');\n }", "public function create()\n {\n return view('exercises.exercicesCreate');\n }", "public function create()\n {\n return view('exercises.create')->with(['title' => 'Übung erstellen', 'active' => $this->active]);\n }", "function block_anxiety_teacher_create_exam($courseid) {\n \n global $DB;\n \n $block_course = $DB->get_record('block_anxiety_teacher_course', array('id' => $courseid), '*', MUST_EXIST);\n $course = $DB->get_record('course', array('id' => $block_course->courseid), '*', MUST_EXIST);\n \n $enddate = time() + (7 * 24 * 60 * 60);\n \n //Get the upcoming events for this course\n $events = calendar_get_events(time(), $enddate, false, false, $course->id);\n \n //parse the events\n foreach ($events as $event) {\n \n //get the name\n $name = $event->name;\n \n //parse for exam or test\n if ((stripos($name,'exam') !== false) || (stripos($name,'test') !== false)) {\n \n \n //found an exam! check it doesn't already exist.\n if (!$existing = $DB->get_record('block_anxiety_teacher_exam', array('eventid' => $event->id))) {\n \n //doesn't exist - so create one\n $exam = new object();\n $exam->examdate = $event->timestart;\n $exam->weighting = 75;//????TO DO!\n $exam->courseid = $block_course->id;\n $exam->eventid = $event->id;\n\n //add to DB\n if (!$DB->insert_record('block_anxiety_teacher_exam', $exam)) {\n echo get_string('errorinsertexam', 'block_anxiety_teacher');\n } \n return true;\n }\n }\n }\n return false;\n}", "public function getExerciseInterface();", "public function testExerciseOne() {\n $this->assertEquals(3, Assignment::exerciseOne(1));\n $this->assertEquals(5, Assignment::exerciseOne(2));\n $this->assertEquals(9, Assignment::exerciseOne(3));\n $this->assertEquals(15, Assignment::exerciseOne(4));\n $this->assertEquals(23, Assignment::exerciseOne(5));\n }", "public function actionCreate()\n {\n $model = new ExamStudent();\n\n if ($model->load(Yii::$app->request->post())) {\n $user=\\common\\models\\User::find()->where(['=', 'user.id', Yii::$app->user->id])->one();\n $model->uni_id = $user->uni_id;\n $model->save();\n return $this->redirect(['index', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function __construct(array $exercises)\n {\n $this->exercises = array_map(function (ExerciseInterface $exercise) {\n return $this->validateExercise($exercise);\n }, $exercises);\n }", "public function run()\n {\n Course::factory()\n ->count(10)\n ->state(new Sequence(\n ['classroom' => 'black', 'name' => 'guitar1'],\n ['classroom' => 'red', 'name' => 'guitar2'],\n ['classroom' => 'blue', 'name' => 'guitar3'],\n ['classroom' => 'white', 'name' => 'drums1'],\n ['classroom' => 'green', 'name' => 'drums2'],\n ['classroom' => 'gray', 'name' => 'drums3'],\n ['classroom' => 'yellow', 'name' => 'piano1'],\n ['classroom' => 'purple', 'name' => 'piano2'],\n ['classroom' => 'pink', 'name' => 'piano3'],\n ['classroom' => 'brown', 'name' => 'theory1'],\n ))\n ->hasProfessor()\n ->hasStudents(30)\n ->create();\n }", "function __construct($first_name, $last_name, $email, $street, $state, $zip, $phone,\n\t\t\t$birth_date, $sex, $date_entered, $lunch_cost, $student_id){\t\n\t\t\t// initialise all the objects created (object instantiation)\n\t\t\t$this->first_name = $first_name;\n\t\t\t$this->last_name = $last_name;\n\t\t\t$this->email = $email;\n\t\t\t$this->street = $street;\n\t\t\t$this->city = $city;\n\t\t\t$this->state = $state;\n\t\t\t$this->phone = $phone;\n\t\t\t$this->birth_date = $birth_date;\n\t\t\t$this->sex = $sex;\n\t\t\t$this->date_entered = $date_entered;\n\t\t\t$this->lunch_cost = $lunch_cost;\n\t\t\t$this->student_id = $student_id;\n\t\t\t\n\t\t}", "public function create($subject_id, $exercise_id)\n\t{\n\t\treturn View::make('backend.questions.create')\n\t\t\t\t\t->with('subject_id', $subject_id)\n\t\t\t\t\t->with('exercise_id', $exercise_id)\n\t\t\t\t\t->with('exercise', Exercise::find($exercise_id));\n\t}", "public function create()\n {\n return view('modulos.history_exercises.create');\n }", "public function __construct($student)\n {\n //\n $this->student = $student;\n }", "public function __construct(Lessonhours $lessonhours)\n {\n $this->lessonhours = $lessonhours;\n }", "public function show(Exercise $exercise)\n {\n //\n }", "private function AddExercise() {\n\t\techo \"Add An Exercise\";\n\t\t$exercises = new Exercises();\n\t\t\n\t\t?>\n\t\t<form method=\"post\" action=\"\">\n\t\t<input type=\"hidden\" name=\"addExercise\" value=\"1\">\n\t\t\n\t\t<select name=\"thisExercise\" id=\"thisExercise\">\n\t\t\t<?php $exercises->ShowExercisesSelector();?>\n\t\t</select>\n\t\t\t\n\t\t<?php /* More stuff here */ ?>\n\t\t\t\n\t\t<input type=\"submit\" value=\"Add Exercise\">\n\t\t</form>\t\n\t\t<?php\n\t}", "public function testCreateQuestion()\n {\n }", "public function __construct()\n {\n $this->id = 0;\n $this->exercise = '';\n $this->description = '';\n $this->general_feedback = '';\n $this->type = MULTIPLE_PAGE_TYPE;\n $this->range = 0;\n $this->startDate = date(\"Y-m-d H:i:s\");\n $this->endDate = null;\n $this->tempSave = 0;\n $this->timeConstraint = 0;\n $this->attemptsAllowed = 0;\n $this->random = 0;\n $this->shuffle = 0;\n $this->active = 1;\n $this->public = 1;\n $this->results = 1;\n $this->score = 1;\n $this->ip_lock = null;\n $this->assign_to_specific = 0;\n $this->password_lock = null;\n $this->questionList = array();\n $this->continueTimeLimit = 5; // minutes\n $this->calc_grade_method = 1;\n }", "public function createExerciseMatrixStep1(){\n\n\t\t\n\n\t\t//load model\n\t\t$grades_model = $this->model(\"GradeModel\");\n\t\t$exam_time_model = $this->model(\"ExamTimeModel\");\n\t\t$subjects_model = $this->model(\"SubjectModel\");\n\n\n\t\t$this->view(\"simple2\", [\n\t \"Page\" => \"simple2_teacher_create_exercise_matrix_step1\",\n\t \"title\" => \"Tạo bài tập về nhà\",\n\t \"grades\"\t\t=> $grades_model->getListGrades(),\n\t \"exam_times\"\t=> $exam_time_model->getListExamTime(),\n\t \"subjects\"\t=> $subjects_model->getListSubjects()\n\t ]);\n\t}", "public function findByClassName(string $className): ExerciseInterface\n {\n foreach ($this->exercises as $exercise) {\n if ($className === get_class($exercise)) {\n return $exercise;\n }\n }\n\n throw new InvalidArgumentException(sprintf('Exercise with name: \"%s\" does not exist', $className));\n }", "public function testCreateNewProgramAndInsert(): void\n {\n $expectedExercises = [\n \\App\\Business\\Exercise::fromString(\"exercise1\"),\n \\App\\Business\\Exercise::fromString(\"exercise2\")\n ];\n $user = \\App\\Business\\User::fromName(\"newuser\");\n $program = \\App\\Business\\Program::create(\"programname\", $user, ...$expectedExercises);\n $id = Program::insert($program);\n $this->assertIsInt($id);\n $this->assertGreaterThan(0, $id);\n }", "protected function initialise_essayhelper_question() {\n question_bank::load_question_definition_classes('essay');\n $q = new qtype_essay_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Essay question';\n $q->questiontext = 'Please write a story about a frog.';\n $q->generalfeedback = 'I hope your story had a beginning, a middle and an end.';\n $q->responseformat = 'plain';\n $q->responserequired = 1;\n $q->responsefieldlines = 10;\n $q->officialanswer = 'Once upon a time, a frog.';\n $q->keywords = 'frog';\n $q->language = 'en';\n $q->graderinfo = '';\n $q->graderinfoformat = FORMAT_HTML;\n $q->qtype = question_bank::get_qtype('essayhelper');\n\n return $q;\n }", "public function __construct(eLesson $eLesson = null)\n {\n $this->eLesson = $eLesson;\n }", "public function create()\n {\n $vars['route'] = 'tests.store';\n $vars['title_form'] = Lang::get('tests.title_add');\n $vars['title_button'] = Lang::get('main.add');\n $vars['test'] = new Test();\n// $vars['lessons'] = Lesson::all();\n if (request('lesson_id')) {\n $vars['lesson_id'] = request('lesson_id');\n $lesson = Lesson::with('course')->find(request('lesson_id'));\n Document::setBreadcrumb(Lang::get('courses.title'), route('courses.index'));\n Document::setBreadcrumb($lesson->course->title, route('courses.edit', $lesson->course->id));\n Document::setBreadcrumb(Lang::get('lessons.title'), route('lessons.index'));\n Document::setBreadcrumb($lesson->title, route('lessons.edit', $lesson->id));\n }\n\n $lessons = Lesson::with('course')->get();\n foreach ($lessons as $lesson){\n $vars['lessons'][$lesson->id] = $lesson->course->title . ' -> ' . $lesson->title;\n } //['lessons'] -> массив, в который вкладывается массив -> [$lesson->id]\n\n Document::setBreadcrumb(Lang::get('tests.title_add'), route('tests.create'));\n $this->template = 'trainers.tests.form';\n\n return $this->renderOutput()->with($vars);\n }", "public function run()\n {\n \\App\\Exercise::create([\n 'name' => 'Agachamento unilateral',\n 'description' => '1.Em pé, pernas afastadas uma da outra, alinhadas com a bacia, joelhos ligeiramente fletidos, costas direitas, abdominal contraído, perna de trás apoiada sobre a ponta do pé. Inspirar e ao mesmo tempo descer;\n2.Fletir o joelho da frente mantendo-o alinhado com o calcanhar e aproximar o joelho da perna de trás do chão;\n3.A perna da frente e a coxa de trás devem estar perpendiculares ao chão no final do movimento;\n4.Expirar e ao mesmo tempo voltar à posição inicial empurrando o chão, contraindo sempre o abdominal.',\n 'image' => 'images/agachamento_unilateral.jpg',\n 'duration' => 4,\n 'body_part_id' => 3,\n 'exercise_type_id' => 2,\n 'recipe_id' => 5,\n 'difficulty_id' => 2,\n 'generation_id' => 5,\n 'author_id' => 6,\n ]);\n\n \\App\\Exercise::create([\n 'name' => 'Flexão de Joelhos',\n 'description' => 'Em pé, apoiando as mãos na parede, flexione a perna direita de modo que o calcanhar aproxime-se do glúteo, realize 12 repetições e faça o mesmo o movimento com a perna esquerda. É importante manter o quadril estável e trabalhar somente com a articulação do joelho. Uma forma de aumentar a carga é utilizar caneleiras.',\n 'image' => 'images/agachamento_unilateral.jpg',\n 'duration' => 1,\n 'body_part_id' => 3,\n 'exercise_type_id' => 2,\n 'difficulty_id' => 1,\n 'generation_id' => 4,\n 'author_id' => 2,\n ]);\n }", "public function test_methodcreatesenrolment() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n\n // Validate end time since no other unit test does this for creates.\n $this->assert_student_exists(100, 103);\n $enrolment = $DB->get_record(\\student::TABLE, array('classid' => 100, 'userid' => 103));\n $this->assertEquals(0, $enrolment->endtime);\n }", "public function create ()\n {\n\n $skillcategories = Skillcategory::pluck ('skill_category_name', 'id')->all ();\n $skills = Skill::pluck ('skill_name', 'id')->all ();\n $teacherusers = Auth::user ();\n $questions=$this->myquestionsection();\n $exam=new Exam();\n return view ('exams.create', compact ('skillcategories', 'skills', 'teacherusers', 'questions'))\n ->nest ('nestquestion', 'exams/exercise_question', compact ('questions' , 'exam'));\n }", "public function __construct($studentId, $identityId, $gradeId, $schoolId) {\n $this->studentId = $studentId;\n $this->identity = Identity::findById($identityId);\n $this->school = School::findById($schoolId);\n $this->grade = Grade::findById($gradeId);\n }", "public function createCourse($coursename, $gradelevels, $gradeexempt, $examinable, $shared, $order){\r\n\t\t$rowCourse= $this->createRow();\r\n\r\n\t\tif ($rowCourse){\r\n\t\t\t//update the row values\r\n\t\t\t$rowCourse->cl_coursename = $coursename;\r\n\t\t\t$rowCourse->cl_gradelevels = $gradelevels;\r\n\t\t\t$rowCourse->cl_gradeexempt = $gradeexempt;\r\n\t\t\t$rowCourse->cl_examinable = $examinable;\r\n\t\t\t$rowCourse->cl_shared = $shared;\r\n\t\t\t$rowCourse->cl_courseorder = $order;\r\n\t\t\t$rowCourse->save();\r\n\r\n\t\t\treturn $rowCourse;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Zend_Exception('Could not create user! - contact Administrator');\r\n\t\t}\r\n\t}", "public function create($exam_id, $course_id)\n {\n $course = Course::where('id', $course_id)->first();\n $exam = Exam::where('id', $exam_id)->first();\n return view('terms.create', ['exam' => $exam])->with(['course' => $course]);\n }", "public function run() {\n\t\tfactory( App\\Course_Professor::class, 800 )->create();\n\t}", "public function newAction()\n {\n $entity = new Exercise();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "private function createQuiz() {\n\n $newQuiz = new Quiz();\n $newQuiz->difficulty_level_id = $this->difficulty;\n $newQuiz->num_of_questions = $this->length;\n $newQuiz->save();\n\n $this->quizId = $newQuiz->id;\n }", "public function create()\n {\n $user = \\Auth::user();\n\n $userSubjects = Subject::whereIn('id', $user->subjects())->get();\n \n\n return view('exam.create') ->with('appHeading', 'Create an exam')\n ->with('appSubheading', 'Pick your choices and get started')\n \n ->with('user', $user)\n ->with('userSubjects', $userSubjects);\n }", "public function __construct($inputDifficulty, $inputLength) {\n $this->difficulty = $this->setDifficultyLevel($inputDifficulty);\n $this->length = $inputLength;\n $this->createQuiz();\n $this->createQuestions();\n $this->createWrongAnswers();\n $this->createAnswerChoices();\n //$this->createHints();\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Exercise::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->exercise->create($input);\n\n\t\t\treturn Redirect::route('exercises.index');\n\t\t}\n\n\t\treturn Redirect::route('exercises.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function __construct($quiz) {\n $this->quiz = $quiz;\n }", "function __construct( )\r\n\t{\r\n\t\t$this->testid;\r\n\t\t$this->testname;\r\n\t\t$this->questionids = array(); \r\n\t\t$this->questionobjects = array();\r\n\t}", "public function testCreateCourse() {\n createCoursework('test coursework', 0, '2019-12-12', 10, '2019-12-21');\n $test_coursework = DB::run(\"SELECT * FROM courseworks ORDER BY coursework_id DESC LIMIT 1\")->fetch(PDO::FETCH_ASSOC);\n\n $this->assertSame(\"test coursework\", $test_coursework[\"name\"]);\n $this->assertEquals(0, $test_coursework[\"course_id\"]);\n $this->assertSame(\"2019-12-12\", $test_coursework[\"deadline\"]);\n $this->assertEquals(10, $test_coursework[\"credit_weight\"]);\n $this->assertSame(\"2019-12-21\", $test_coursework[\"feedback_due_date\"]);\n }", "public function create()\n {\n $types = ['by time', 'by number'];\n $gyms = Gym::all();\n return view('exercise.create', compact('types', 'gyms'));\n }", "public function setId_exercice($id_exercice)\n {\n $this->id_exercice = $id_exercice;\n \n return $this;\n }", "public function testCreateQuestionTemplate()\n {\n }", "public function __construct($assessment)\n {\n $this->assessment = $assessment;\n }", "public function run()\n {\n// // Generate default exercise\n//\t $exercice = Exercise::create([\n//\t \t'article_id'=>3,\n//\t\t 'body'=>'Exercices exemples'\n//\t ]);\n//\n//\t Question::create([\n//\t \t'exercise_id' => $exercice->id,\n//\t\t 'position'=>1,\n//\t\t 'body'=> 'Valeur numérique exacte (3)',\n//\t\t 'answer'=> 3,\n//\t\t 'checker'=>'number',\n//\t\t 'checker_options'=>0\n//\t ])->exercise()->associate($exercice);\n//\n//\t Question::create([\n//\t\t 'exercise_id' => $exercice->id,\n//\t\t 'position'=>2,\n//\t\t 'body'=> 'Valeur numérique approx (3.14)',\n//\t\t 'answer'=> 3.14,\n//\t\t 'checker'=>'number',\n//\t\t 'checker_options'=>0.02\n//\t ])->exercise()->associate($exercice);\n//\n//\t Question::create([\n//\t\t 'exercise_id' => $exercice->id,\n//\t\t 'position'=>3,\n//\t\t 'body'=> 'Valeur optionnelle',\n//\t\t 'answer'=> '1',\n//\t\t 'checker'=>'choices',\n//\t\t 'checker_options'=>'$-\\infty$;$0_-$;$0_+$;$+\\infty$'\n//\t ])->exercise()->associate($exercice);\n//\n//\t Question::create([\n//\t\t 'exercise_id' => $exercice->id,\n//\t\t 'position'=>4,\n//\t\t 'body'=> 'Valeur polynome (x+3)(x-2)',\n//\t\t 'answer'=> '(x+3)(x-2)',\n//\t\t 'checker'=>'polynom',\n//\t\t 'checker_options'=>'factor'\n//\t ])->exercise()->associate($exercice);\n//\n//\t Question::create([\n//\t\t 'exercise_id' => $exercice->id,\n//\t\t 'position'=>5,\n//\t\t 'body'=> 'Valeur optionnelle x^2+x-6',\n//\t\t 'answer'=> 'x^2+x-6',\n//\t\t 'checker'=>'polynom',\n//\t\t 'checker_options'=>''\n//\t ])->exercise()->associate($exercice);\n\n\n\t User::create([\n\t \t'name' => 'Basil',\n\t\t 'email' => 'basil@scolcours.ch',\n\t\t 'password' => Hash::make('semidieu'),\n\t\t 'role' => 'admin'\n\t ]);\n }", "public function __construct($exam_user)\n {\n $this->user = $exam_user->user;\n $this->exam = $exam_user->exam;\n $this->exam_user = $exam_user;\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Myexercise::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->myexercise->create($input);\n\n\t\t\treturn Redirect::route('myexercises.index');\n\t\t}\n\n\t\treturn Redirect::route('myexercises.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function createAction(Request $request)\n {\n $entity = new Exercise();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('exercise_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "private function generateMCFExercise(Model $model, User $owner)\n {\n /* On crée l'exercice avec la consigne du model, rien a faire ici donc. */\n $exercise = new Exercise($model->getWording());\n\n\n\n // Documents\n $this->addDocuments($model, $exercise, $owner);\n\n // array to collect all the questions to add\n $modelQuestionToAdd = array();\n\n // get the blocks\n foreach ($model->getQuestionBlocks() as $block) {\n $this->addQuestionsFromBlock($block, $modelQuestionToAdd, $owner);\n }\n\n /*\n * Create and add the exercise questions\n */\n $this->addQuestionsToTheExercise($modelQuestionToAdd, $exercise, $owner);\n\n // shuffle the order of the questions (if needed) and the propositions\n if ($model->isShuffleQuestionsOrder()) {\n $exercise->shuffleQuestionOrder();\n }\n $exercise->shufflePropositionOrder();\n\n $exercise->finalize();\n\n return $exercise;\n }", "public function store(Request $request)\n {\n $validator = $this->validator($request->all());\n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator->errors());\n }\n $exercise = new Exercise;\n $exercise->name = $request->input('name');\n $exercise->description = $request->input('description');\n $exercise->astuce = $request->input('astuce');\n $exercise->difficulte = $request->input('difficulte');\n $exercise->id_teacher = Auth::id();\n $exercise->name_teacher = Auth::user()->name;\n $exercise->save();\n return redirect()->route('test.create', ['id' => $exercise->id])->with('success', 'Exercice créé avec succès !');\n }", "public function __construct() {\r\n\t\t$this->setName( get_class( $this ) );\r\n\t\t$this->getAllTest();\r\n\t\r\n\t\t//\t\t$this->addTest( new CryptoTest() );\r\n\t\r\n\r\n\t}", "public function show(Lession_Exercise $lession_Exercise)\n {\n //\n }", "public function run() \n // Course::create(['title'=>'Learning','description'=>'Learning']);\n // ['instructions','exam_id','answer','marking','marks','question_id','is_correct'];\n\n {\n\n\n //\n DB::table('answers')->insert([\n 'instructions'=>'Suki Spares Admin',\n\t\t\t'exam_id'=>'1',\n\t\t\t'answer'=>'trial',\n\t\t\t'marking'=>'trial',\n\t\t\t'marks'=>'70',\n\t\t\t'question_id'=>'4',\n\t\t\t'is_correct'=>'true'\n\t\t]);\n\n }", "public function __construct()\n {\n $this->create_url = \"/AdditionalCourse\";\n $this->model = $this->model.'\\AdditionalCourse';\n $this->temp = new $this->model;\n $this->title = 'Additional Courses';\n $this->model_title = 'Academic Course';\n }", "public function create()\n {\n $data['religions'] = $this->religion;\n $data['educations'] = $this->education;\n $data['workKinds'] = $this->workKind;\n $data['class'] = StudentClass::pluck('name', 'id');\n return view('student.create', $data);\n }", "public function test_create_instance(): void {\n $this->resetAfterTest(true);\n\n // Fetch generators.\n $generator = \\testing_util::get_data_generator();\n $gradinggenerator = $generator->get_plugin_generator('core_grading');\n\n // Create items required for testing.\n $course = $generator->create_course();\n $module = $generator->create_module('assign', ['course' => $course]);\n $user = $generator->create_user();\n $context = context_module::instance($module->cmid);\n\n // The assignment module has an itemumber 0 which is an advanced grading area called 'submissions'.\n $component = 'mod_assign';\n $area = 'submissions';\n $controller = $gradinggenerator->create_instance($context, $component, $area, 'rubric');\n\n // This should be a rubric.\n $this->assertInstanceOf(gradingform_controller::class, $controller);\n $this->assertInstanceOf(gradingform_rubric_controller::class, $controller);\n\n $this->assertEquals($context, $controller->get_context());\n $this->assertEquals($component, $controller->get_component());\n $this->assertEquals($area, $controller->get_area());\n }", "public function testExerciseThree() {\n $this->assertEquals(5, Assignment::exerciseThree(1));\n $this->assertEquals(25, Assignment::exerciseThree(2));\n $this->assertEquals(325, Assignment::exerciseThree(3));\n $this->assertEquals(4325, Assignment::exerciseThree(4));\n $this->assertEquals(54325, Assignment::exerciseThree(5));\n }", "public static function NewStudent ( $params ) {\n\t\t$params['StudentID'] = self::NewStudentID();\n\t\treturn new self( $params );\n\t}", "public function create()\n {\n $instructors = Instructor::all();\n return view('students.create', compact('instructors'));\n }", "public function create ($opts) {\n $user = auth()->user()->first();\n\n // get the relevant models\n $student = $this->studentRepository->student($opts['student_id']);\n $staffCourse = $this->staffTeachCourseRepository->single($opts['staff_teach_course_id']);\n $semester = $this->semesterRepository->semester($opts['semester_id']);\n $school = $semester->school()->first();\n\n // confirm that the selected course is in the selected semester type\n if (($semester->semester_type_id != $staffCourse->course()->first()->semester_type_id)) {\n throw ValidationException::withMessages([\n 'semester_id' => 'semester_type_id not matching with that of selected course',\n 'staff_teach_course_id' => 'semester_type_id not matching with that of selected semester'\n ]);\n }\n \n return $this->repo()->create($opts);\n }", "public function create()\n {\n return view(Exam::createView());\n }", "public function __construct(Employees $employee)\n {\n $this->employee = $employee;\n }", "public function create()\n {\n $teacher_role = UserRole::where('name','teacher')->first();\n return view('admin.courseEnroll.create')\n ->with('semesters', Semester::pluck('semester','id')->all())\n ->with('exam_times', ExamTime::get())\n ->with('courses', Course::pluck('name','id')->all())\n ->with('teachers', $teacher_role->users);\n }", "public function save($exercise) {\n $stmt = $this->db->prepare(\"INSERT INTO exercise (id, id_user, name, description, type,\n image,video) values (0,?,?,?,?,?,?)\");\n $stmt->execute(array($exercise->getId_User(), $exercise->getName(),\n $exercise->getDescription(), $exercise->getType(), $exercise->getImage(),\n $exercise->getVideo()));\n }", "public function read($id)\n {\n global $course_id;\n\n $object = Database::get()->querySingle(\"SELECT title, description, general_feedback, type, `range`, start_date, end_date, temp_save, time_constraint,\n attempts_allowed, random, shuffle, active, public, results, score, ip_lock, password_lock, \n assign_to_specific, calc_grade_method, continue_time_limit\n FROM `exercise` WHERE course_id = ?d AND id = ?d\", $course_id, $id);\n\n // if the exercise has been found\n if ($object) {\n $this->id = $id;\n $this->exercise = $object->title;\n $this->description = $object->description;\n $this->general_feedback = $object->general_feedback;\n $this->type = $object->type;\n $this->range = $object->range;\n $this->startDate = $object->start_date;\n $this->endDate = $object->end_date;\n $this->tempSave = $object->temp_save;\n $this->timeConstraint = $object->time_constraint;\n $this->attemptsAllowed = $object->attempts_allowed;\n $this->random = $object->random;\n $this->shuffle = $object->shuffle;\n $this->active = $object->active;\n $this->public = $object->public;\n $this->results = $object->results;\n $this->score = $object->score;\n $this->ip_lock = $object->ip_lock;\n $this->password_lock = $object->password_lock;\n $this->assign_to_specific = $object->assign_to_specific;\n $this->calc_grade_method = $object->calc_grade_method;\n $this->continueTimeLimit = $object->continue_time_limit;\n\n $result = Database::get()->queryArray(\"SELECT question_id, q_position, random_criteria\n FROM `exercise_with_questions`\n WHERE exercise_id = ?d\n ORDER BY q_position, question_id\", $id);\n\n // fills the array with the question ID for this exercise\n $k = 1;\n foreach ($result as $row) {\n if (is_null($row->question_id)) {\n $this->questionList[$k] = unserialize($row->random_criteria);\n } else {\n $this->questionList[$k] = $row->question_id;\n }\n $k++;\n }\n // find the total weighting of an exercise\n $this->totalweight = Database::get()->querySingle(\"SELECT SUM(exercise_question.weight) AS totalweight\n FROM exercise_question, exercise_with_questions\n WHERE exercise_question.course_id = ?d\n AND exercise_question.id = exercise_with_questions.question_id\n AND exercise_with_questions.exercise_id = ?d\", $course_id, $id)->totalweight;\n return true;\n }\n // exercise not found\n return false;\n }", "public function run()\n {\n factory(Shoulder::class)->create([\n 'exercise' => 'Elevacao lateral',\n 'description' => 'Elevacao lateral',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Elevacao frontal',\n 'description' => 'Elevacao frontal',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Elevacao diagonal',\n 'description' => 'Elevacao diagonal',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Desenvolvimento',\n 'description' => 'Desenvolvimento',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Encolhimento',\n 'description' => 'Encolhimento',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Remada alta',\n 'description' => 'Remada alta',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Crucifixo invertido',\n 'description' => 'Crucifixo invertido',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Rotacao externa',\n 'description' => 'Rotacao externa',\n ]);\n\n factory(Shoulder::class)->create([\n 'exercise' => 'Rotacao interna',\n 'description' => 'Rotacao interna',\n ]);\n }", "public function model()\n {\n return Exercise::class;\n }", "public function crear ($nombre = \"Juan\", \n $apellido = \"Rodriguez\", \n $dni = 37701467, \n $salario = 5000, \n $sector = \"No especificado\"){\n \n $c = new \\App\\Empleado ($nombre, $apellido, $dni, $salario, $sector);\n return $c;\n }", "public function create()\n {\n $student = new Student();\n $courses = Course::pluck('name', 'id')->toArray();\n return view('student.create', array('courses' => $courses, 'student' => $student));\n }", "function __construct() {\n\t\t$this->sheep = new Sheep;\n\t}", "public function edit(Exercise $exercise)\n {\n //\n }", "public function create()\n {\n return view('exam.create');\n }", "public function _construct()\n {\n $this->_init(\n \\Codelegacy\\Genesis\\Model\\Student::class,\n \\Codelegacy\\Genesis\\Model\\ResourceModel\\Student::class\n );\n }", "public function __construct(HarvestExpertise $expertise)\n {\n\n $this->exp = $expertise;\n\n }", "public function create()\n {\n $awards = Award::lists('name', 'id');\n $courses = Course::lists('name', 'id');\n $enrolment_statuses = Enrolment_Status::lists('name', 'id');\n $funding_types = Funding_Type::lists('name', 'id');\n $modes_of_study = Mode_Of_Study::lists('name', 'id');\n $ukba_status = UKBA_Status::lists('name', 'id');\n\n return view('entities.students.create', compact('modes_of_study', 'awards', 'enrolment_statuses', 'funding_types', 'ukba_status', 'courses'));\n }", "public function create(Student $student, $books)\n {\n \n }", "public function __construct(Quarter $quarter, CourseClass $class, Student $student)\n {\n $this->quarter = $quarter;\n $this->class = $class;\n $this->student = $student;\n }", "public function create()\n {\n return view('students.create', [\n 'schoolSessions' => SchoolSession::select('id', 'session')->get(),\n 'schoolClasses' => SchoolClass::select('id', 'name')->get(),\n 'academicInfo' => null,\n 'student' => new Student\n ]);\n }", "public function run()\n {\n /**\n * @var Collection $exercises\n */\n $exercises = Exercise::all();\n\n /**\n * @var Exercise $exercise\n */\n foreach ($exercises as $exercise) {\n /**\n * @var Collection $eEvaluators\n */\n $eEvaluators = $exercise->evaluators()->where('type', Evaluator::EVALUATOR)->get();\n\n /**\n * @var Collection $eFactors\n */\n $eFactors = $exercise->factors;\n\n /**\n * @var Collection $subjects\n */\n $subjects = $exercise->subjects;\n $sN = $subjects->count();\n\n /**\n * @var Collection $comments\n */\n $comments = $exercise->comments;\n\n /**\n * @var Evaluator $evaluator\n */\n foreach ($eEvaluators as $evaluator) {\n\n /**\n * @var Subject $subject\n */\n foreach ($subjects->random($sN > 2 ? $sN - 1 : $sN) as $subject) {\n\n /**\n * @var Factor $factor\n */\n foreach ($eFactors as $factor) {\n factory(Evaluation::class)->create([\n 'evaluator_id' => $evaluator->id,\n 'subject_id' => $subject->id,\n 'factor_id' => $factor->id,\n 'comment_id' => $comments->random()->id,\n ]);\n }\n }\n }\n }\n }", "public function run()\n {\n Students::factory(10)->create();\n // Subject::factory(20)->create();\n }", "public function run()\n {\n factory(Faculty::class, 5)\n ->create();\n }", "public function __construct()\n {\n //assume that this studentId = 1\n $this->studentId = 1;\n }", "public function testCreateNewQuiz()\n {\n $quizName = \"Test Quiz\";\n $quizDesc = \"Test Quiz Please Ignore\";\n\n $user = factory(User::class)->create();\n factory(Session::class)->create(['user_id' => $user->id]);\n\n $this->browse(function ($browser) use ($user, $quizName, $quizDesc) {\n $browser->loginAs($user->id)\n ->visit('/quizzes')\n ->clickLink('New Quiz')\n ->type('name', $quizName)\n ->type('desc', $quizDesc)\n ->press('Create')\n ->assertSee($quizName)\n ->assertSee($quizDesc)\n ->assertSee('Add Question');\n });\n }", "private function addQuestionsToTheExercise(\n array $modelQuestionToAdd,\n Exercise &$exercise,\n User $owner\n )\n {\n /*\n * TODO BRYAN : LA VERSION ACTUELLE EST TROP TARABSICOTE. UN PEU D'ALGO ET JE DEVRAIS POUVOIR PRODUIRE\n * TODO BRYAN : UNE VERSION PLUS \"simple\", QUI APELLE UNE FONCTION FAITE POUR DANS FORMULASERVICE...\n * */\n /*\n * TODO BRYAN : Bon, ici c est pour la generation d exercice a partir de la ressource generee... */\n /** @var MultipleChoiceFormulaQuestion $modelQuestion */\n foreach ($modelQuestionToAdd as $modelQuestion) {\n $redo = true;\n $it = 0;\n $exerciseQuestion = new Question();\n while($it<10 && $redo == true )\n {\n // initialize the exercise question\n $exerciseQuestion = new Question();\n $exerciseQuestion->setDoNotShuffle($modelQuestion->getDoNotShuffle());\n\n // On genere les valeurs pour l enonce. Cela résoud aussi les inconnues.\n $variables = $this->computeFormulaVariableValues($modelQuestion->getFormulas(), $owner);\n // VU QUE J'AI APPELE CETTE FONCTION, ON SUPPUTE QUE PAR LA SUITE LES VARIABLES SONT DEJA VERIFIEES\n // COMME ETANT VALABLE. SINON, ON AURAIT DEJA EU UN TROW\n\n /* TODO BRYAN : Les valeurs doivent être les mêmes pour chaque formula... */\n /* TODO BRYAN : 1) Récuperer toutes les variables 2) Instancier chacune. 3) Trouver les solutions\n La récuperation de toutes les variables est a prendre en compte avant...\n Il faut faire un tableau avec toutes les variables presentes en une seule fois.\n */\n /* On récupère dans cette array toutes les variables qui existent*/\n $array_variable_unique = array();\n foreach( $modelQuestion->getFormulas() as $local_formula )\n {\n foreach($local_formula->getVariables() as $newVar )\n {\n $array_variable_unique[ $local_formula->getName().\":\".$newVar->getName()] = $newVar;\n }\n }\n\n\n /* TODO BRYAN : On change les valeurs... Si une variable a le même nom que dans l'autre, on remplace la valeur\n TODO BRYAN : Attention ! Cela veut dire qu'il faut que l'autre formule soit quand même valable... */\n foreach ($array_variable_unique as $key => $newVar)\n {\n $var_name = substr($key, strpos($key, ':'));\n foreach($variables as $result_key => $var_value)\n {\n if( $var_name == substr($result_key, strpos($result_key, ':')) )\n {\n $variables[$result_key] = $variables[$key];\n }\n }\n }\n /* TODO BRYAN : On recalcule les inconnues... Il s'agit d'une partie de resolve formula mais sans la partie\n TODO BRYAN : instanciation des variables...*/\n foreach( $modelQuestion->getFormulas() as $local_formula)\n {\n $unknown = $local_formula->getUnknown();\n $unknownName = $unknown->getName();\n\n $equation = $this->formulaService->textExpressionToExpression($local_formula->getEquation());\n /*if ($equation->getExprName() !== Equation::EXPR_NAME)\n {\n throw new InvalidKnowledgeException('The formula is not an equation');\n }*/\n\n /* On reconstruit l'array de valeur correspondant sans les prefixes */\n $values = array();\n foreach($variables as $lkey => $lvar)\n {\n if( ( preg_match( \"/\".$local_formula->getName().\"/i\", $lkey ) == 1 )\n and ( substr($lkey, (strpos($lkey, ':')+1)) != $unknownName ) )\n {\n $values[substr($lkey, (strpos($lkey, ':'))+1)] = $variables[$lkey] ;\n }\n }\n /*TODO BRYAN : On doit recalculer aussi tout ce qui est expression... Attention donc... Si expression..*/\n /*foreach( $variables as $lkey2 => $lvar2)\n {\n if( $array_variable_unique[$lkey2]->getValueType() === Formula\\Variable::EXPRESSION )\n {\n $this->formulaService->instantiateVariableWithExpression($array_variable_unique[$lkey2]->getValueType(), $values);\n }\n }*/\n $unknownValue = $this->formulaService->resolveEquation($equation, $unknownName)->evaluate($values);\n\n // format value\n if ($unknown->getType() === ResourceVariable::INTEGER) {\n if (!is_integer($unknownValue)) {\n throw new InvalidKnowledgeException('The computed answer is not an integer');\n }\n } elseif ($unknown->getType() === ResourceVariable::FLOAT) {\n if ($unknown->getDigitsAfterPoint() > 0) {\n $unknownValue = round($unknownValue, $unknown->getDigitsAfterPoint());\n }\n } elseif ($unknown->getType() === ResourceVariable::SCIENTIFIC) {\n if ($unknown->getDigitsAfterPoint() > 0) {\n $unknownValue = $this->roundSignificantDigits(\n $unknownValue,\n $unknown->getDigitsAfterPoint() + 1\n );\n }\n }\n\n $values[$unknownName] = $unknownValue;\n $variables[$local_formula->getName().':'.$unknownName] = $unknownValue;\n }\n\n /* Une fois que j'ai tout généré, il me faut juste remplacer partout !!\n 1) Je remplace dans la question de QCM les valeurs qui vont bien... */\n $wording = $this->parseStringWithVariablesForMCFQ($modelQuestion->getQuestion(), $variables);\n\n /*\n foreach ($array_variable_unique as $key => $newVar)\n {\n $wording = $wording.\"var : \";\n $wording = $wording.$newVar->getName();\n $wording = $wording.\" , \";\n $wording = $wording.$variables[$key];\n }\n */\n /*\n foreach( $variables as $key => $local_value)\n {\n $wording = $wording.\"var : \";\n $wording = $wording.$key;\n $wording = $wording.\" , \";\n $wording = $wording.$local_value;\n } */\n\n /* TODO BRYAN ! ATTENTION !! DANS LE CAS D'UNE VARIABLE EXPRESSION, ON DOIT RECALCULER >< */\n\n $exerciseQuestion->setQuestion($wording);\n $exerciseQuestion->setComment($modelQuestion->getComment());\n $exerciseQuestion->setOriginResource($modelQuestion->getOriginResource());\n\n // organise the propositions ids\n $forcedRightId = array();\n $forcedWrongId = array();\n $rightId = array();\n $wrongId = array();\n\n /*\n * TODO BRYAN : Pour chaque proposition, recuperer les variables et les remplacer !\n * */\n foreach ($modelQuestion->getPropositions() as $key => $proposition) {\n if ($modelQuestion->getForceUse()[$key] === true) {\n if ($modelQuestion->getRight()[$key] === true) {\n $forcedRightId[] = $key;\n } else {\n $forcedWrongId[] = $key;\n }\n } else {\n if ($modelQuestion->getRight()[$key] === true) {\n $rightId[] = $key;\n } else {\n $wrongId[] = $key;\n }\n }\n }\n // Determine the number of proposition and right proposition to be added in\n $this->numberOfPropositions(\n $modelQuestion,\n $forcedRightId,\n $forcedWrongId,\n $rightId,\n $wrongId,\n $numberOfRAToAdd,\n $numberOfWAToAdd\n );\n\n // add the forced propositions\n $propositionIds = array_merge($forcedWrongId, $forcedRightId);\n\n // add the correct number of right propositions\n for ($ind = 0; $ind < $numberOfRAToAdd; $ind++) {\n $key = array_rand($rightId);\n $propositionIds[] = $rightId[$key];\n unset($rightId[$key]);\n }\n\n // add the correct number of wrong propositions\n for ($ind = 0; $ind < $numberOfWAToAdd; $ind++) {\n $key = array_rand($wrongId);\n $propositionIds[] = $wrongId[$key];\n unset($wrongId[$key]);\n }\n\n // TODO BRYAN : J'ai modifié ici, et je le note pour bien voir où sont mes modifications\n // add the propositions to the exercise question\n sort($propositionIds);\n foreach ($propositionIds as $propId) {\n $exerciseQuestion->addProposition(\n $modelQuestion->getRight()[$propId],\n $this->parseStringWithVariablesForMCFQ($modelQuestion->getPropositions()[$propId], $variables)\n );\n }\n\n // TODO BRYAN : Autre modification ici ! Generation de propositions supplémentaires si pas assez.\n // TODO BRYAN : INCOMPLET... Et cela fait planter !\n $nb_actuel = count($modelQuestion->getPropositions());\n $nb_voulu = $modelQuestion->getMaxNumberOfPropositions() ;\n $nb_a_generer = $nb_voulu - $nb_actuel;\n while($nb_a_generer>0)\n {\n $iteration_actuelle = 100;\n\n\n $nb_a_generer = $nb_a_generer -1;\n }\n /*$wording = $modelQuestion->getGeneratedProposition();\n $nb_proposition = $modelQuestion->getMaxNOfRightPropositions();\n\n $number_total = $nb_proposition - $modelQuestion->getPropositions().length();\n $generate = array();\n $variables_generated = [];\n while($number_total>0)\n {\n\n } */\n\n\n /* Verification que les réponses ne sont pas les memes */\n $nb_propositions = sizeof($exerciseQuestion->getPropositions());\n $redo = false;\n $i=0; $j=0;\n for($i=0; $i<$nb_propositions; $i++ )\n {\n for($j=$i+1; $j<$nb_propositions; $j++)\n {\n if( $exerciseQuestion->getPropositions()[$i]->getText() == $exerciseQuestion->getPropositions()[$j]->getText() )\n {\n $redo = true;\n }\n }\n }\n if($redo){ $it++;}\n\n }\n if($it>=10){return;}\n $exercise->addQuestion($exerciseQuestion);\n }\n }", "public function actionCreate()\n {\n $model = new EofficeExamInvigilate();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'person_id' => $model->person_id, 'exam_date' => $model->exam_date, 'examstart_time' => $model->examstart_time, 'exam_end_time' => $model->exam_end_time]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function education_create(){\n\n try{\n $this->edu->create(1,array(\n 'education_types_id' => '2',\n 'course' => 'Nut',\n 'school' => 'Malayan',\n 'date_from' => '1998-01-01',\n 'date_to' => '2000-01-01',\n 'cities_id' => '50',\n 'address' => 'Talisay Tabunok',\n 'achievements' => 'achievements',\n ));\n echo 'OK';\n }catch(Exception $e){\n die($e->getMessage());\n }\n\n }", "public function run()\n {\n factory(School::class, 5)->create();\n }", "public function actionCreate()\n {\n $model = new StudyRequest();\n $user = Yii::$app->user->getIdentity()->getUser();\n\n $model->fio = $user->surname.' '.mb_substr($user->name, 0, 1).'.';\n $model->invited = false;\n $model->with_docs = false;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'institutions' => Institution::getList(),\n 'specializations' => Specialization::getList(),\n 'invalidTypes' => $this->repository->getInvalidTypes(),\n ]);\n }", "public function __construct(Student $student, $body, $subject, Instructor $instructor)\n {\n $this->student = $student;\n $this->body = $body;\n $this->subject = $subject;\n $this->instructor = $instructor;\n }", "function __construct($firstName, $lastName, $yearOfBirth, $courses, $studyCredits) {\r\n parent::__construct($firstName, $lastName, $yearOfBirth);\r\n $this->courses = $courses;\r\n $this->studyCredits = $studyCredits;\r\n }", "public function execute_submission_notestcase($stu_id, $chapter_id, $item_id, $submission_id) {\t\t\n\t\t\n\t\t$this->load->model('lab_model');\n\t\t$submission = $this->lab_model->get_exercise_submission($submission_id);\n\t\t$exercise_id = $submission['exercise_id'];\n\t\t$number_of_testcase = $this->lab_model->get_num_testcase($exercise_id);\n\t\t\n\t\t//echo '<h3>$lab_content : </h3><pre> testcase nubmer: ',$number_of_testcase,\"<br>\"; print_r($lab_content); echo \"</pre>\"; \n\t\t$submitted_count = $this->student_model->get_student_submission_times($stu_id,$exercise_id);\n\t\t\n\t\t\n\t\trequire_once 'Exercise_test.php';\n\t\t$exercise_test = new Exercise_test();\n\t\t$output = '';\n\n\t\tif($number_of_testcase <=0 ) { \n\t\t\t// the exercise has no testcase\n\t\t\t\n\t\t\t// run output from sample sourcecode for display and compare\n\t\t\t$sourcecode_filename = $this->get_sourcecode_filename($exercise_id);\n\t\t\t$output = $exercise_test->get_result_noinput($sourcecode_filename,'supervisor'); // raw output \t\t\t\t\n\t\t\t$output = $exercise_test->unify_whitespace($output);\t// change TAB and NEWLINE to single space\t\t\t\t\n\t\t\t$output = $exercise_test->insert_newline($output); //insert newline after 80th character of each line\n\t\t\t$output = rtrim($output);\t\t\t\t//remove trailing spaces\n\t\t\t$lab_name = $this->get_lab_name($exercise_id);\n\t\t\t$full_mark = $this->get_fullmark_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t\t//$marking = $this->get_marking_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t\t$marking = 0;\n\t\n\t\t\t$_SESSION['lab_item']=$item_id;\n\t\t\t//echo '<h3>$_SESSION : </h3><pre>'; print_r($_SESSION); echo \"</pre>\"; \n\t\t\t//echo '<h3>$output : </h3><pre>'; print_r($output); echo \"</pre>\"; \n\t\t\t//return ;\n\t\t\tif( $submitted_count > 0 ) {\n\t\t\t\t// the exercise has no testcase and there are some submissions\n\t\t\t\t// take last_submit and do marking ==> update to exercise_submission table\n\t\t\t\t$last_submit = $this->student_model->get_student_last_submission_record($stu_id,$exercise_id);\n\t\t\t\t$submission_id = $last_submit['submission_id'];\n\t\t\t\t$sourcecode_filename = $last_submit['sourcecode_filename']; // ของนักศึกษา\n\t\t\t\t$sourcecode_content = file_get_contents(STUDENT_CFILES_FOLDER.$sourcecode_filename);\n\n\t\t\t\t//run and get output\n\t\t\t\t$output_student = $exercise_test->get_result_noinput($sourcecode_filename,'student');\n\t\t\t\t$output_student = $exercise_test->unify_whitespace($output_student);\n\t\t\t\t$this->lab_model->update_submission_output_and_marking($submission_id,serialize($output_student),$marking);\n\n\t\t\t\t$sample_filename = $this->lab_model->get_lab_exercise_sourcecode_filename($exercise_id);\n\t\t\t\t$output_sample = $exercise_test->get_result_noinput($sample_filename,'supervisor');\n\t\t\t\t$output_sample = $exercise_test->unify_whitespace($output_sample);\n\n\t\t\t\t//compare to exercise sample\n\t\t\t\t$output_result = $exercise_test->output_compare($output_student,$output_sample);\n\t\t\t\tif ($output_result == -1) {\t\t// -1 means OK.\n\t\t\t\t\t$output_student = $exercise_test->insert_newline($output_student);\n\t\t\t\t\t//echo '<h2 style=\"color:red;\">OK: </h2>';\n\t\t\t\t\t$marking = $full_mark;\n\t\t\t\t\t$this->lab_model->update_marking_exercise_submission($stu_id,$submission_id,$marking);\n\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$error_line = $output_result['error_line'];\n\t\t\t\t\t$error_column = $output_result['error_column'];\n\t\t\t\t\t$error_position = $output_result['error_position'];\n\t\t\t\t\techo '<h2 style=\"color:red;\">unmatched_position : ',$error_position,\" line : \", $error_line,\" column : \",$error_column,\"</h2>\";\n\t\t\t\t\t\n\t\t\t\t\t//\tadd a line to output showing where the first error occurs.\n\t\t\t\t\t$output_student = $exercise_test->dispaly_error_in_output($output_student,$error_position); // insert newline is embedded inside the function\n\t\t\t\t}\n\n\t\t\t\t$last_submit['sourcecode_content']\t= $sourcecode_content;\n\t\t\t\t$last_submit['sourcecode_output']\t= $output_student;\t\t\t\n\t\t\t\t$last_submit['submitted_count']\t= $submitted_count;\n\n\t\t\t\t//for icon displayed at top-right panel\n\t\t\t\tif ($full_mark == $marking) {\n\t\t\t\t\t$last_submit['status']='passed';\n\t\t\t\t} else { \n\t\t\t\t\t$last_submit['status']='error';\n\t\t\t\t}\n\n\t\t\t\t//echo '<h3>$last submit : </h3><pre>'; print_r($last_submit); echo \"</pre>\"; \n\t\t\t} \n\t\t}\n\t}", "public function newTicket($department, $contents, $subject)\n\t{\n\t\treturn kyTicket::createNew($department, $this, $contents, $subject);\n\t}", "public function create($inputs)\n {\n $result = Employee::create($inputs);\n return $result;\n }" ]
[ "0.68417674", "0.6155349", "0.5909868", "0.5787374", "0.57584006", "0.5735551", "0.573374", "0.57171893", "0.5707187", "0.56661636", "0.562335", "0.5599553", "0.55448335", "0.55367047", "0.55297285", "0.5480413", "0.547466", "0.54666543", "0.5458481", "0.54258746", "0.5385208", "0.53840715", "0.53685176", "0.5350514", "0.53130716", "0.53062296", "0.52758634", "0.52734995", "0.52716404", "0.5265326", "0.5252688", "0.5246593", "0.52402097", "0.5234414", "0.5229624", "0.5194758", "0.5190615", "0.51782846", "0.51737714", "0.516964", "0.51615894", "0.5158298", "0.5156528", "0.5140927", "0.5132387", "0.51230663", "0.5108221", "0.50857496", "0.508056", "0.5074901", "0.50742686", "0.50731874", "0.50728583", "0.5071125", "0.50577503", "0.50560176", "0.5051137", "0.5050535", "0.5045722", "0.50450295", "0.50444406", "0.5034362", "0.50308186", "0.50225794", "0.5019706", "0.50151324", "0.5009753", "0.49980727", "0.4986062", "0.49855804", "0.4981442", "0.49764416", "0.49762517", "0.49685568", "0.4967265", "0.49657518", "0.49643636", "0.49495855", "0.49488503", "0.49461865", "0.4939631", "0.49315804", "0.49305", "0.4926764", "0.49250203", "0.49233472", "0.49216998", "0.4920787", "0.49171972", "0.49137837", "0.49087134", "0.4905051", "0.49013817", "0.49000221", "0.4899295", "0.4897396", "0.48955452", "0.48933613", "0.48892295", "0.48815373" ]
0.7440047
0
Sets the DB connection used by the cache component.
Устанавливает соединение с БД, используемое компонентом кэширования.
public function setDbConnection($value) { $this->_db=$value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDBConn($value) {\n\t\t\t$this->_dbConn = $value;\n\t\t}", "public function setConnection()\n\t{\n\t\t$connection = $this->configuration->load('database')->use('default');\n\t\t\n\t\tswitch($connection)\n\t\t{\n\t\t\tcase \"mysql\":\n\t\t\t \t$connectionName = \"mysql\";\n\t\t\t \t$database = \"dbname={$this->configuration->use('connections')[$connection]['database']}\";\n\t\t\t \t$host = \"host={$this->configuration->use('connections')[$connection]['host']}\";\n\t\t\t\t$this->connection = new \\PDO(\"{$connectionName}:{$database};{$host}\",\n\t\t\t\t\t$this->configuration->use('connections')[$connection]['username'],\n\t\t\t\t\t$this->configuration->use('connections')[$connection]['password']);\n\t\t\t\tbreak;\n\t\t\tcase \"sqlite\":\n\t\t\t\t$databasePath = !is_dir($this->configuration->use('connections')[$connection]['database']) \n\t\t\t\t\t\t\t\t? root_path().DIRECTORY_SEPARATOR.$this->configuration->use('connections')[$connection]['database']\n\t\t\t\t\t\t\t\t: $this->configuration->use('connections')[$connection]['database'];\n\n\t\t\t\t$this->connection = new \\PDO(\"sqlite:{$databasePath}\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->connection->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n\t\treturn $this;\n\t}", "public static function setToDbConnection()\n\t{\n\t\tself::$_is_db_connection = true;\n\t}", "public function setDbConnection($name = null)\n {\n $this->dbConnection = $name;\n }", "public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}", "public function setInstanceDB() {\n\t\t$this->connect($this->Config['inst']);\n\t}", "function setDb($cn) {\n\t\t$this->db = $cn;\n\t}", "public function setConnection()\n {\n $db = new Mysqli($this->host, $this->user, $this->password, $this->database, $this->port);\n \n return $this->connection = $db;\n }", "protected function SetDB()\r\n\t{\r\n\t\tif(parent::DB())\r\n\t\t\tself::$dbDriver = parent::DB();\r\n\t\telseif(!self::$dbDriver)\r\n\t\t\tself::$dbDriver = new CTM_Driver();\r\n\t\t\t\r\n\t\tif(!self::$dbLibrary)\r\n\t\t\tself::$dbLibrary = new DBClass(\"mssql\");\r\n\t\t\t\r\n\t\treturn $this->DB = self::$dbLibrary;\r\n\t}", "protected function setTableConnection()\n\t{\n\t\tglobal $cman;\n\t\t$this->connection = $cman->getForLogin();\n\t}", "public function setDb(Connection $db): IDatabaseAccessable\n {\n $this->_db = $db;\n return $this;\n }", "function setConnection(DABLPDO $conn = null) {\n\t\t$this->connection = $conn;\n\t}", "public function setCustomerDB() {\n\t\t$this->connect(config::SQL_PREFIX.'page'.page::ID());\n\t}", "public function getDbConnection()\n {\n $this->connection = Yii::app()->db;\n }", "protected function setTableConnection()\n\t{\n\t\tglobal $cman;\n\t\t$this->connection = $cman->getForLogin();\t\t\n\t}", "protected function setTableConnection()\n\t{\n\t\tglobal $cman;\n\t\t$this->connection = $cman->getForLogin();\t\t\n\t}", "public function setDb();", "function &getConnection() \n\t{\n\t\tstatic $db = null;\n\t\tif(is_null($db)) \n\t\t{\n\t\t\t$params =& JCacheStorageMemcache::getConfig();\n\t\t\t$persistent\t= (isset($params['persistent'])) ? $params['persistent'] : false;\n\t\t\t// This will be an array of loveliness\n\t\t\t$servers\t= (isset($params['servers'])) ? $params['servers'] : array();\n\n\t\t\t// Create the memcache connection\n\t\t\t$db = new Memcache;\n\t\t\tforeach($servers AS $server) {\n\t\t\t\t$db->addServer($server['host'], $server['port'], $persistent);\n\t\t\t}\n\t\t}\n\t\treturn $db;\n\t}", "protected function setConnection($name='default') {\n\t\tif($this->_transactionStarted) {\n\t\t\t$name = 'master';\n\t\t}\n\n\t\t$datasource = ConnectionManager::getDataSource($name);\n\n\t\tif(!$datasource->isConnected())\t{\n\t\t\t$datasource->connect();\n\t\t}\n\n\t\t$this->connection = $datasource->connection;\n\t}", "private function _set_db(&$db) {\n\t\t$this->_db = $db;\n\t}", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function getDBConn() {\n\t\tif (!$this->mysql) {\n\t\t\t$this->mysql = DBConnection::getConnection();\n\t\t}\n\t}", "public function getConnection()\r\n {\r\n return $this->_db;\r\n }", "static function set_db (&$db)\n {\n if ($GLOBALS['__CURSOR_SQL_INSTANCE'])\n die_traced ('Connection already set.');\n $GLOBALS['__CURSOR_SQL_INSTANCE'] =& $db;\n }", "public function setConnection($connection);", "public function setGlobalDB() {\n\t\t$this->connect($this->Config['glob']);\n\t}", "public function getConnection()\n {\n return $this->db;\n }", "public function setDB($conn){\r\n\t\t\t$this->conn=$conn;\r\n\t\t}", "public function setConnection($name)\n {\n if (! \\is_null($name)) {\n $this->defaultConnection = $this->resolver->getDefaultConnection();\n }\n\n parent::setConnection($name);\n }", "private function connection(){\n if(is_object($this->_db)) return $this->_db;\n $params = parse_url(MAR_DSN);\n $dsn = sprintf('%s:host=%s;dbname=%s', $params['scheme'], $params['host'], str_replace('/','',$params['path']));\n $this->_db = new PDO($dsn, $params['user'],$params['pass'], array(\n PDO::ATTR_PERSISTENT => true\n ));\n $this->_db->exec(\"SET NAMES '\" . DB_CHARSET . \"';\");\n $this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n }", "public static function ddbConnection()\n\t{\n\t\tDBA::set(json_decode(file_get_contents(\"Library/settings.json\"), true)['database']);\n\t}", "public function setDatabaseConnection(\\PDO $db);", "private function setConn()\n\t{\n\t\treturn\n\t\tis_null($this->cnx)?\n\t\t $this->cnx=new PDO(\"mysql:host=localhost;dbname=prova2\",\"root\",\"root\"):\n\t\t $this->cnx;\n\t\t\n\t\t \n\t}", "public function setDB($dbName) {\n\t\t$this->connect($dbName);\n\t}", "public function setDb(\\Psecio\\Gatekeeper\\DataSource $db)\n {\n $this->db = $db;\n }", "static function setDatabase($db) {\n\t\tself::$db = $db;\n\t}", "function getConn(){\n return $this->dbConn;\n }", "private static function caricaDB() {\n self::$jsonConnectionString = json_decode(file_get_contents(\"../connectionString.json\"), true);\n $databaseKey = $_SESSION[\"databaseKey\"];\n DBConnection::setDBConnection(self::$jsonConnectionString[$databaseKey], $databaseKey);\n }", "public static function setDB($db)\n {\n self::$db = $db;\n }", "protected function getConnection() {\r\n\r\n return $this->db;\r\n }", "public function connect()\n {\n if ( ! is_null($this->connection)) return;\n\n $this->connection = new \\MongoClient($this->host . ':' . $this->port);\n $this->db = $this->connection->{$this->database};\n }", "public function MySQLConnection() {\n $this->db = $this->connect();\n }", "public function setDB($db)\n {\n $this->db = $db;\n }", "public function setDb()\n\t{\n $this->database = 'mysql';\n\t}", "protected function _connect()\n {\n $filename = hash('sha1', $this->_wrapper->getRepositoryPath());\n $dsn = \"sqlite:$this->_cachePath/$filename\";\n $pdo = new PDO($dsn, '', '');\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->_pdo = $pdo;\n }", "public function setConnection( $con )\n {\n $this->con = $con;\n }", "function setDB( $db = '' )\r\n\t{\r\n\t\tif (empty($db))\r\n\t\t{\r\n\t\t\tglobal $db;\r\n\t\t}else\r\n\t\tif (is_string($db))\r\n\t\t{\r\n\t\t\t$db = $GLOBALS[$db];\r\n\t\t}\r\n\t\t$this->db = $db;\r\n\t}", "public function getConnection(){\n return $this->dbConnection;\n }", "protected function dbConnect() {\r\n $db = $this->container['db'];\r\n if (!is_null($this->dbName) && $this->dbName !== $this->container['currentDbName']) {\r\n $db->query(\"USE {$this->dbName};\");\r\n $this->container['currentDbName'] = $this->dbName;\r\n } else if (is_null($this->dbName) && $this->container['currentDbName'] !== $this->container['config']['mysql']['dbname']) {\r\n $db->query(\"USE {$this->container['config']['mysql']['dbname']};\");\r\n $this->container['currentDbName'] = $this->container['config']['mysql']['dbname'];\r\n }\r\n return $db;\r\n }", "public function set_db() {\n if (static::$_db === NULL ) {\n $db_string = static::$_conf->db->home;\n if(isset(static::$_conf->db->home['prefix']))\n static::set_prefix(static::$_conf->db->home['prefix']);\n if(isset($db_string[3]))\n $db = new PDO($db_string[0], $db_string[1], $db_string[2], $db_string[3]);\n else\n $db = new PDO($db_string[0], $db_string[1], $db_string[2], array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n if(isset($db_string[4]))\n $db->setAttribute(PDO::ATTR_ERRMODE, $db_string[4]);\n else\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n static::set_db($db);\n }\n }", "public function setDb($db)\n {\n\n $this->db = $db;\n \n }", "public static function getConnection(){\n if(!self::$_db){\n new self();\n }\n return self::$_db;\n }", "public function connect()\n {\n $this->db = DriverManager::getConnection([\n 'dbname' => $this->dbName,\n 'user' => $this->user,\n 'password' => $this->password,\n 'host' => $this->host,\n 'port' => $this->port,\n 'driver' => $this->driver,\n 'charset' => $this->charset\n ]);\n }", "private static function setDataSourse() {\n try {\n $datasoursename = DBConfig::TYPE . ':host=' . DBConfig::HOST . ';dbname=' . DBConfig::NAME;\n $options = array(\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING,\n );\n\n self::$db = new PDO($datasoursename, DBConfig::USER, DBConfig::PASS, $options);\n } catch (PDOException $e) {\n exit('Database connection could not be established.');\n }\n }", "public function setConnection($connection = null)\n {\n global $config_db;\n \n if ($connection === null)\n $connection = $config_db['default'];\n\n // Store the default connection name\n $this->defaultConnection = $connection;\n\n // Store the default database driver\n $this->driver = $config_db['connections'][$connection]['driver'];\n }", "private static function connect() {\n self::$instance = new Memcache();\n }", "public function setDb($db)\n {\n $this->db = $db;\n }", "public function setDb($db)\n {\n $this->db = $db;\n }", "function setDB($db = '')\r\n\t{\r\n\t\tif (empty($db))\r\n\t\t{\r\n\t\t\tglobal $db;\r\n\t\t}else\r\n\t\tif (is_string($db))\r\n\t\t{\r\n\t\t\t$db = $GLOBALS[$db];\r\n\t\t}\r\n\t\t$this->db = $db;\r\n\t}", "function setDBO(&$db)\r\r\n\t{\r\r\n\t\t$this->_db =& $db;\r\r\n\t}", "public function set_database($db = 'appDB'){\n\t\t$this->db = $db instanceof dbDriver\n\t\t\t? $db\n\t\t\t: db::get($db);\n\t}", "public function setBD($dbname){\n $this->c->setDB($dbname);\n }", "public function setDb( $db )\n\t{\n\t\t$this->db = $db;\n\t}", "private function _connect()\n {\n $this->_db = $GLOBALS['news']->db;\n $this->_write_db = $GLOBALS['news']->write_db;\n }", "public function refresh_connection() {\n parent::close();\n parent::connect();\n $this->db = parent::selectDB($this->options[\"db\"]);\n }", "public function connect() {\n $this->db->setSQLQueries($this->sql_queries);\n $this->db->setDbConnectionSettings($this->db_connection_settings);\n $this->db->setLogger($this->logger);\n $this->db->makeDbConnection();\n }", "public function getConnection()\n {\n if (is_null($this->_connection)) {\n $this->setConnection(\n Agl::app()->getConfig('main/db/host'),\n Agl::app()->getConfig('main/db/name'),\n Agl::app()->getConfig('main/db/user'),\n Agl::app()->getConfig('main/db/password')\n );\n }\n\n return $this->_connection;\n }", "public function getDbConnection() {\r\n\t\treturn $this->dbConn;\r\n\t}", "public function setConnection($name)\n {\n }", "public static function setDb($db)\r\n\t{\r\n\t\tself::$oDb = $db;\r\n\t}", "private function getDbConnectionObject()\n\t{\n\t\tif ($this->_dbConnectionObjectCache === null)\n\t\t{\n\t\t\t$dbConnection = $this->dbConnection;\n\n\t\t\tif (is_string($dbConnection))\n\t\t\t\t$dbConnection = Yii::app()->$dbConnection;\n\t\t\t\n\t\t\t$this->_dbConnectionObjectCache = $dbConnection;\n\t\t}\n\n\t\treturn $this->_dbConnectionObjectCache;\n\t}", "public static function connect() {\n $redis = new Redis();\n $redis->connect(REDIS_HOST, REDIS_PORT);\n if(ONLINE) {\n $redis->auth(REDIS_PASS);\n }\n self::$db = $redis;\n }", "public function setDatabase($db)\n {\n $this->db = $db;\n }", "public function getConnection()\n {\n return Database::instance();\n }", "private function setConnectionInfo()\n {\n $this->dbhost = env('DB_HOST');\n $this->dbname = env('DB_NAME');\n $this->dbuser = env('DB_USERNAME');\n $this->dbpass = env('DB_PASSWORD');\n }", "public static function getConnection(){\n if(self::$instance==null){\n self::$instance = new db_config();\n }\n return self::$db_conn;\n }", "protected static function setDB() {\n\t\tif ( self::$db === null ) {\n\t\t\tself::$db = new DbHelper();\n\t\t}\n\t\tself::$db->from(self::tableName());\n\t\tself::$db->setReturnClass(get_called_class());\n\t}", "public function getDBConnection()\n {\n return $this->dbConnection;\n }", "public function getDBConnection()\n {\n return $this->dbConnection;\n }", "public function setConnection($connection = null)\n {\n $this->connection = $connection ? $connection : DATABASE_CONNECTION_PREFIX . $this->database;\n return $this;\n }", "private function setConnectionLocator()\n {\n $dbs = config()->get('database.databases');\n $default = null;\n $read = [];\n $write = [];\n $types = [];\n\n foreach ($dbs as $k => $v) {\n if (strtolower($k) == 'default') {\n $types['default'] = $v['type'];\n $dsn = $v['dsn'];\n $uName = $v['username'];\n $pass = $v['password'];\n $opts = $v['options'];\n $default = function () use ($dsn, $uName, $pass, $opts) {\n return new ExtendedPdo(\n $dsn,\n $uName,\n $pass,\n $opts\n );\n };\n } elseif (strtolower($k) == 'read') {\n foreach ($k as $k2 => $v2) {\n $types['read'][$k2] = $v2['type'];\n $dsn = $v2['dsn'];\n $uName = $v2['username'];\n $pass = $v2['password'];\n $opts = $v2['options'];\n $read[$k2] = function () use ($dsn, $uName, $pass, $opts) {\n return new ExtendedPdo(\n $dsn,\n $uName,\n $pass,\n $opts\n );\n };\n }\n } elseif (strtolower($k) == 'write') {\n foreach ($k as $k2 => $v2) {\n $types['write'][$k2] = $v2['type'];\n $dsn = $v2['dsn'];\n $uName = $v2['username'];\n $pass = $v2['password'];\n $opts = $v2['options'];\n $write[$k2] = function () use ($dsn, $uName, $pass, $opts) {\n return new ExtendedPdo(\n $dsn,\n $uName,\n $pass,\n $opts\n );\n };\n }\n }\n }\n\n $this->types = $types;\n\n // configure locator at construction time\n $this->locator = new ConnectionLocator($default, $read, $write);\n }", "public function setDb($db){\n $this->db=$db;\n }", "protected function _connect()\n {\n $this->_connection = $this;\n return;\n }", "public function setDb($dbObject){\n $this->dbObject = $dbObject;\n }", "public function setConnection($connection) {\n\t\t$this->connection = $connection;\n\t}", "public function setMemcacheAccess()\n {\n\n $this->memcache_obj = FukuPHPMemcache::getInstance(\n KEY_PREFIX.$this->table_name.'_'.$this->id\n );\n\n }", "function setConnection($connect){\n $this->connectID = $connect;\n }", "public function setDatabaseConnection(array $config)\n {\n global $bb_db;\n $bb_db = new DB($config);\n }", "public function setConnection($connection)\n\t{\n\t\t$this->_connection = $connection;\n\t}", "public function dbConnection()\n {\n $on_heroku = getenv('DATABASE_URL');\n if ($on_heroku) {\n $parts = (parse_url($on_heroku));\n extract($parts);\n $this->host = $parts['host'];\n $this->port = $parts['port'];\n $this->user = $parts['user'];\n $this->password = $parts['pass'];\n $this->dbname = str_replace('/', '', $parts['path']);\n } else {\n $parts = (parse_url(getenv('INSULT_DB_URL')));\n extract($parts);\n $this->host = $parts['host'];\n $this->port = $parts['port'];\n $this->user = $parts['user'];\n $this->password = $parts['pass'];\n $this->dbname = str_replace('/', '', $parts['path']);\n }\n }", "public function set_conn($conn) {\n\t\t$this->conn = $conn;\n\t}", "public function setDB($adodb_handle)\r\n {\r\n $this->db=$adodb_handle;\r\n }", "public function getConnection()\n {\n }", "function setDatabase($value) {\r\n\t\t$this->database = $value;\r\n\t}", "protected function setUpTestDatabaseForConnectionPool()\n {\n // truncate connections so they can be reinitialized with $this->testDatabase\n // when needed\n $connections = new ReflectionProperty(ConnectionPool::class, 'connections');\n $connections->setAccessible(true);\n $connections->setValue(null, []);\n\n $this->originalDatabaseName = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'];\n $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] = $this->testDatabase;\n }", "public function setDatabase($name) {\r\n\t\tif ($this->con) {\r\n\t\t\tif (@mysql_close()) {\r\n\t\t\t\t$this->con = false;\r\n\t\t\t\t$this->results = null;\r\n\t\t\t\t$this->db_name = $name;\r\n\t\t\t\t$this->connect();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getConnection(Mage_Core_Model_Config_Element $config)\n {\n $conn = Mongo_Database::instance((string)$config->config, $config->asCanonicalArray());\n\n // Set profiler\n $conn->set_profiler(array($this, 'start_profiler'), array($this, 'stop_profiler'));\n\n return $conn;\n }", "public static function getConnection()\n {\n if(self::$db === null) {\n self::openConnection();\n }\n\n return self::$db;\n }", "public function init()\n {\n parent::init();\n $this->db = Instance::ensure($this->db, Connection::class);\n if ($this->enableCaching) {\n $this->cache = Instance::ensure($this->cache, Cache::class);\n }\n }", "protected function connect()\n\t{\n\t\tif (!$this->enabled || $this->connected) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->driver = $this->drivers->get($this->app->config->memcache_driver);\n\n\t\t$this->driver->connect($this->host, $this->port);\n\n\t\t$this->connected = true;\n\t}" ]
[ "0.70237446", "0.67704415", "0.670634", "0.6696905", "0.66861904", "0.66574544", "0.6615857", "0.6605817", "0.660232", "0.6405666", "0.6396194", "0.6375787", "0.63332844", "0.63291", "0.6321632", "0.6321632", "0.62915605", "0.6280359", "0.62572825", "0.6253243", "0.6227485", "0.6223965", "0.6222017", "0.6216506", "0.621239", "0.6207431", "0.6192733", "0.61688244", "0.61580896", "0.6148904", "0.6132344", "0.6131658", "0.61278635", "0.6093785", "0.60681576", "0.6066845", "0.60664237", "0.60592496", "0.605052", "0.60365677", "0.60184264", "0.6011683", "0.5997831", "0.59958804", "0.598866", "0.5988653", "0.59692216", "0.5964319", "0.5955576", "0.5952964", "0.5950756", "0.59472865", "0.59397846", "0.59391356", "0.59318966", "0.5923579", "0.5914097", "0.5914097", "0.5911034", "0.5897849", "0.5894676", "0.58932424", "0.5889511", "0.58861214", "0.5883207", "0.5875018", "0.58743155", "0.5865011", "0.5864978", "0.5864272", "0.5843677", "0.58395886", "0.5838233", "0.58362925", "0.5830286", "0.5823411", "0.5811107", "0.5788094", "0.5788094", "0.57831866", "0.5781535", "0.5778652", "0.57728964", "0.5772415", "0.57693535", "0.5767917", "0.57636327", "0.5763235", "0.57625973", "0.5762408", "0.5755514", "0.575185", "0.5745526", "0.5743188", "0.5742652", "0.5741173", "0.573659", "0.57351804", "0.5735094", "0.57295364" ]
0.7205553
0
Function to fetch available user credits February 04,2017
Функция для получения доступных кредитов пользователя 04 февраля 2017 года
function fetchAvailableUserCredits($voffClientID) { //SELECT perm_core_credit FROM entrp_credit_core where client_id=12 $qry="SELECT perm_core_credit FROM entrp_credit_core WHERE client_id=".$voffClientID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $credits = $row['perm_core_credit']; } return $credits; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReadUserCreditUsage() {\n\t\t\t$this->data[sgc_reseller_credit_management_api_params::API_RESELLER_CREDIT_MANAGEMENT_FROM_DATE] = $this->reseller->getFromDate();\n\t\t\t$this->data[sgc_reseller_credit_management_api_params::API_RESELLER_CREDIT_MANAGEMENT_TO_DATE] = $this->reseller->getToDate();\n\t\t\t$this->data[sgc_reseller_credit_management_api_params::API_RESELLER_CREDIT_MANAGEMENT_USER_LOGIN_NAME] = $this->reseller->getUserLoginName();\n\t\t\t$response = new sgc_callapi(sgc_constant::SGC_API, sgc_constant::SGC_ENDPOINT_RESELLER_READ_CREDIT_HISTORY, $this->data, $this->header, sgc_common_api_params::API_COMMON_METHOD_POST, $this->useRestApi);\n\t\t\treturn $response->getResponse();\n\t\t}", "public function get_credits()\n {\n\n $user_id = $this->session->userdata('userid');\n $this->db->select('credits');\n $this->db->from('user');\n $this->db->where('id', $user_id);\n $this->db->limit(1);\n\n $query = $this->db->get();\n \n $credits = \"\";\n foreach ($query->result() as $row) \n {\n $credits = $row->credits;\n }\n return $credits; \n\n }", "public static function getAvailableCredits($userId) {\n $list = ORM::for_table(self::CREDIT_TABLE);\n $list->where('user_id', $userId);\n $list->where_null('used_date');\n $list->where_null('album_id');\n return $list->count();\n }", "function showCreditTransactions() {\n try{\n $response = ClientCreator::getInstance()->request('GET', \"vendors/$this->vendorToken/credits\");\n $response = json_decode($response->getBody(), true); //decodes the resposnce body\n $response = json_encode($response['credit']); // encodes back to json with out the user key\n return $response;\n } catch (GuzzleHttp\\Exception\\ClientException $e) {\n $error = json_decode($e->getResponse()->getBody(), true)['errors'].\"\\n\";\n return $error;\n }\n }", "function _wc_cs_get_credits_from_user_id( $user_id ) {\n\tglobal $wpdb ;\n\n\t$wpdb_ref = &$wpdb ;\n\t$credits_id = absint( $wpdb_ref->get_var(\n\t\t\t\t\t$wpdb_ref->prepare( \"SELECT DISTINCT ID FROM {$wpdb_ref->posts}\n WHERE post_type='wc_cs_credits' AND post_author=%s AND post_status IN ('\" . implode( \"','\", array_map( 'esc_sql', array_keys( _wc_cs_get_credits_statuses() ) ) ) . \"') LIMIT 1\"\n\t\t\t\t\t\t\t, esc_sql( $user_id )\n\t\t\t) ) ) ;\n\n\treturn _wc_cs_get_credits( $credits_id ) ;\n}", "public function get_credits($user_id, $currency)\n {\n $this->db->select('credit_histories.*, credits.amount_used, credits.expired_date');\n $this->db->join('credit_histories', 'credits.id = credit_histories.credit_id');\n $this->db->where('user_id', $user_id);\n $this->db->where('currency', $currency);\n $this->db->where('credit_histories.debit > 0');\n $this->db->where('credits.expired_date >=', date('Y-m-d', strtotime('today')));\n $this->db->order_by('credit_histories.created_at', 'ASC');\n $query = $this->db->get('credits');\n\n return $query->result();\n }", "public function getCredits() {\n\t\tif(!$this->_configId) throw new Exception(lang('error_66'));\n\t\tif(!$this->_identifier) throw new Exception(lang('error_66'));\n\t\t\n\t\t// get configs\n\t\t$config = $this->showConfigs(true);\n\t\t\n\t\t// choose database\n\t\t$database = ($config['config_database'] == \"MuOnline\" ? $this->muonline : $this->memuonline);\n\t\t\n\t\t// build query\n\t\t$data = array(\n\t\t\t'identifier' => $this->_identifier\n\t\t);\n\t\t$variables = array('{TABLE}','{COLUMN}','{USER_COLUMN}');\n\t\t$values = array($config['config_table'], $config['config_credits_col'], $config['config_user_col']);\n\t\t$query = str_replace($variables, $values, \"SELECT {COLUMN} FROM {TABLE} WHERE {USER_COLUMN} = :identifier\");\n\t\t\n\t\t// add credits\n\t\t$getCredits = $database->query_fetch_single($query, $data);\n\t\tif(!$getCredits) throw new Exception(lang('error_89'));\n\t\t\n\t\treturn $getCredits[$config['config_credits_col']];\n\t}", "public static function debitcredits()\n\t{\n\n\t\t$debitcredits = [];\n\t\tforeach (range(0, 12) as $day) {\n\t\t\t$mutable = Carbon::now()->sub($day, 'day');\n\n\t\t\tforeach (range(1, 4) as $user_id) {\n\t\t\t\t$user_ids = array_filter(range(1, 4), function ($value) use($user_id) {\n\t \treturn $value != $user_id;\n\t\t\t\t});\n\t\t\t\t$debit_to = $user_ids[array_rand($user_ids)];\n\t\t\t\t$debitcredits[] = [\n\t\t\t\t\t'credit_to' => $user_id,\n\t\t\t\t\t'debit_to' => $debit_to,\n\t\t\t\t\t'date' => $mutable->toDateString(),\n\t\t\t\t\t'amount' => rand(200, 1000),\n\t\t\t\t\t'more_info' => 'just deposit to some people',\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn $debitcredits;\n\n\t}", "function getCCDetailsOfUser($user_id){\r\n\t\t\r\n\t\t$query = \"select * from cc_details \r\n\t\t\t\t\twhere user_id=$user_id and \r\n\t\t\t\t\t\texp_year >= year(curdate()) and\r\n\t\t\t\t\t\tif(exp_year = year(curdate()),if(exp_month >= month(curdate()),1,0),1) = 1\";\r\n\t\t$result = mysql_query($query);\r\n \r\n $data = array();\r\n if(mysql_num_rows($result) != 0 ) {\r\n \r\n while($row = mysql_fetch_assoc($result)) {\r\n $data[] = $row;\r\n }\r\n \r\n } else {\r\n return false;\r\n }\r\n return $data;\r\n\t\t\r\n\t\t\r\n\t}", "public function getCredits() {\n $this->loadDataFromDegree();\n return $this->data->credits;\n }", "function getAcctInfo($user){\n\n}", "public function getClientsToPayYearly()\n {\n # 1 SQL get yearly customers\n $sql = \"SELECT `ID_cs_start`, `id_service`, `id_customer`, `cs_o_date_start`, `cs_o_active` FROM `customer_service_start` WHERE `cs_o_active` = 0\";\n \n # 2 download payment dates the customer\n # check the first payment\n # check all payments starting from the first\n #\n }", "public function getCredits($data = []) {\n\t\t$this->requestApi('users/credits', 'get', $data);\n\n\t\tif(!$this->isError()) {\n\t\t\treturn $this->getResponseData('credits_remaining', 0);\n\t\t}\n\n\t\treturn false;\n }", "function GetCredit($UID) {\n\t$db = new database ();\n\t$db->connect ();\n\t\n\t$query = \"SELECT `credits` FROM `User` \n\twhere `UID` = ?\";\n\tif ($stmt = $db->prepare ( $query )) {\n\t\t$stmt->bind_param ( \"i\", $UID );\n\t\t\n\t\tif ($stmt->execute ()) {\n\t\t\t$results = array ();\n\t\t\t$result = $stmt->get_result ();\n\t\t\t\n\t\t\tforeach ( $result as $keys => $values ) {\n\t\t\t\t$element;\n\t\t\t\tforeach ( $values as $key => $value ) {\n\t\t\t\t\t$element [$key] = $value;\n\t\t\t\t}\n\t\t\t\tarray_push ( $results, $element );\n\t\t\t}\n\t\t\tif (count ( $results ) == 0) {\n\t\t\t\treturn - 1;\n\t\t\t}\n\t\t\treturn $results [0] ['credits'];\n\t\t}\n\t}\n\treturn - 1;\n}", "public function findAndPayoffOverdueCreditGarant($user_id = null){\r\n $this->load->model('accaunt_model', 'accaunt');\r\n $where_and = array(\r\n 'state' => Base_model::CREDIT_STATUS_ACTIVE,\r\n 'type' => Base_model::CREDIT_TYPE_INVEST,\r\n 'garant' => Base_model::CREDIT_GARANT_ON,\r\n 'overdraft' => Base_model::CREDIT_OVERDRAFT_OFF,\r\n 'direct' => self::DIRECT_OFF,\r\n// 'out_time <' => date('Y-m-d')\r\n );\r\n\r\n if($user_id != null)\r\n $where_and['id_user'] = $user_id;\r\n\r\n $credits = $this->db->where($where_and)\r\n ->order_by('out_time', 'ASC')\r\n ->get($this->tableName)\r\n ->result();\r\n\r\n if(empty($credits))\r\n return 0;\r\n\r\n foreach($credits as $c){\r\n\r\n $res = $this->payoffOverdueCreditGarant($c);\r\n if(FALSE === $res){\r\n echo \"Can't payoff credit id {$c->id}\";\r\n return;\r\n }\r\n }\r\n return 0;\r\n }", "function getUserCards() { \t\n\t\n\t\t$query\t= \"SELECT bi_card_id,vc_billingid,bi_card_num,dt_expiry,i_isPrimary,vc_card_type FROM tbl_creditcard where bi_MemberId= $this->memberid ORDER BY bi_ord_id DESC\";\t\t\n\t\t\n\t\t$dbQry\t= new dbQuery($query, $this->connect->connId);\t\n\t\treturn $this->retrieveCardRowArray($dbQry);\n\t\n}", "function allusers_report($startdt,$enddt){\n global $DB;\n $html = \"\";\n //getting top 4 cards here.\n $html.= allusers_topcards_report($startdt,$enddt,null,null);\n //getting yearwise graphs here.\n $ycomplete = get_user_yearly_completion($startdt,$enddt,null,null);\n $temp1=1;\n $ydata='';\n $ylabel='';\n foreach ($ycomplete as $ykey => $yvalue) {\n if($temp1 == 1){\n $ydata = $yvalue;\n $ylabel = \"'\".$ykey.\"'\";\n }else{\n $ydata = $ydata.','.$yvalue;\n $ylabel = $ylabel.','.\"'\".$ykey.\"'\";\n }\n $temp1++;\n }\n $yenrol=get_enrolled_course_yearly($startdt,$enddt,null,null);\n $temp2=1;\n $crdata='';\n $crlabel='';\n if(!empty($yenrol)){\n foreach ($yenrol as $crkey => $crvalue) {\n if($temp2 == 1){\n $crdata = $crvalue;\n $crlabel = \"'\".$crkey.\"'\";\n\n }else{\n $crdata = $crdata.','.$crvalue;\n $crlabel = $crlabel.','.\"'\".$crkey.\"'\";\n }\n $temp2++;\n }\n }\n $html.= filter_yearly_enrol_completiongraph($crlabel,$crdata,$ylabel,$ydata);\n\n $infoenroll = get_course_enrolled_info($startdt,$enddt,null,null);\n $count = 1;\n $menrol = '';\n foreach ($infoenroll as $mkey => $mvalue) {\n if($count == 1){\n $menrol = $mvalue;\n }else{\n $menrol =$menrol.','.$mvalue;\n }\n $count++;\n }\n $completion=get_course_completion($startdt,$enddt,null,null);\n $temp=1;\n $mcomplete='';\n foreach ($completion as $ckey => $cvalue) {\n if($temp == 1){\n $mcomplete = $cvalue;\n }else{\n $mcomplete =$mcomplete.','.$cvalue;\n }\n $temp++;\n }\n $html.= filter_monthly_enrol_completiongraph($menrol,$mcomplete);\n $usertabledata=userdatatable_report($startdt,$enddt,null,null);\n $usertabledata['siteheading']=get_string('allusertableheading','local_deptrpts');\n $usertabledata['sitehelptxt']=get_string('allusertabletxt','local_deptrpts');\n $html.= site_datatable($usertabledata);\n echo $html;\n}", "function credits_user_main()\n{\n // Security Check\n if (!pnSecAuthAction(0, 'Credits::', '::', ACCESS_READ)) {\n return pnVarPrepForDisplay(_MODULENOAUTH);\n }\n\n // If the user is site admin then get all modules including admin only modules\n if (pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) {\n $mods = pnModGetAllMods();\n $cacheid = 0;\n } else {\n $mods = pnModGetUserMods();\n $cacheid = 1;\n }\n\n // highly unlikely but check if we have no modules returned\n if ($mods == false) {\n return pnVarPrepHTMLDisplay(_CREDITSNOMODS);\n }\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender =& new pnRender('Credits');\n\n // For caching reasons you must pass a cache ID. This could be done as a\n // separate parameter to every method that uses caching (like fetch, is_cached\n // etc.) or by assigning the ID to the cache_id property like it is done in\n // this case.\n // Here the output only changes based on the security check to we use the\n // cacheid flag set earlier\n $pnRender->cache_id = $cacheid;\n\n // check out if the contents are cached.\n // If this is the case, we do not need to make DB queries.\n if ($pnRender->is_cached('credits_user_main.htm')) {\n return $pnRender->fetch('credits_user_main.htm');\n }\n\n $modules = array();\n foreach($mods as $mod) {\n\t\t$f = $mod['directory'];\n\t\t$fos = pnVarPrepForOS($mod['directory']);\n\t\t\n\t\tpnModLangLoad($fos, 'version');\n\t\t\n\t\t// Add applicable actions\n\t\t//$actions = array();\n\t\t$modversion = '';\n\t\t$modversion['displayname'] = $mod['displayname'];\n\t\t$modversion['filename'] = $f;\n\t\t$modversion['name'] = '';\n\t\t$modversion['version'] = '';\n\t\t$modversion['description'] = '';\n\t\t$modversion['credits'] = '';\n\t\t$modversion['help'] = '';\n\t\t$modversion['changelog'] = '';\n\t\t$modversion['license'] = '';\n\t\t$modversion['official'] = 0;\n\t\t$modversion['author'] = '';\n\t\t$modversion['contact'] = '';\n\t\t$modversion['admin'] = 0;\n\t if (file_exists(\"modules/$fos/Version.php\")) {\n include \"modules/$fos/Version.php\";\n \t} else if (file_exists(\"modules/$fos/pnversion.php\")) {\n include \"modules/$fos/pnversion.php\";\n\t } else if (file_exists(\"system/$fos/Version.php\")) {\n include \"system/$fos/Version.php\";\n\t } else if (file_exists(\"system/$fos/pnversion.php\")) {\n include \"system/$fos/pnversion.php\";\n } else {\n $modversion['name'] = $f;\n $modversion['version'] = $mod['version'];\n $modversion['description'] = $mod['description'];\n }\n\n\t\t// check for the existence of the files\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['credits']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['credits'])) {\n\t\t\t$modversion['credits'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['help']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['help'])) {\n\t\t\t$modversion['help'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['changelog']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['changelog'])) {\n\t\t\t$modversion['changelog'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['license']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['license'])) {\n\t\t\t$modversion['license'] = '';\n\t\t}\n\t\n\t\t// explode the contact and author arrays to allow for\n\t\t// multiple authors and contacts\n\t\t$modversion['author'] = explode(',', $modversion['author']);\n\t\t$modversion['contact'] = explode(',', $modversion['contact']);\n\n\t\t// check if an e-mail address is given as the contact\n\t\tforeach($modversion['contact'] as $key => $contact) {\n\t\t\t$contact = trim($contact);\n\t\t\tif (eregi (\"^([a-z0-9_]|\\\\-|\\\\.)+@(([a-z0-9_]|\\\\-)+\\\\.)+[a-z]{2,4}$\", $contact)) {\n\t\t\t\t$modversion['contact'][$key] = 'mailto:' . $contact;\n\t\t\t} else {\n $modversion['contact'][$key] = $contact;\n }\n\t\t}\n\t\t$modules[] = $modversion;\n }\n\n // assign content to user\n $pnRender->assign('modules', $modules);\n\n return $pnRender->fetch('credits_user_main.htm');\n}", "public function fnGetReadyToTalkNowUsers()\n\t{\n\t\t$uid = $this->session->userdata('uid');\n\t\t$setPrfHrate = \", `profile`.`hRate` \"; \n\t\tif ($this->session->userdata('uid')) {\n\t\t\t$resFree = $this->fnGetUser(\"is_eligible\",array(\"id\"=>$this->session->userdata('uid')));\n\t\t\tif ($resFree[0]['is_eligible']==\"1\") {\n\t\t\t\t$setPrfHrate = \", '0.00' as `hRate` \";\n\t\t\t}\n\t\t}\n\t\t$cnd = \" and `user`.`readytotalk` ='1' and (`profile`.`pic` != '') and `quarantine` != '1' and `user`.`id`!='\".$uid.\"' and `user`.`hiddenRole` !='1' \";\n\t\t$sql = \"SELECT `user`.`id`, `profile`.`uid`, `profile`.`firstName`, `profile`.`lastName`, `profile`.`pic`, `user`.`readytotalk`,`profile`.`school_id` $setPrfHrate from `user` JOIN `profile` ON `user`.`id` = `profile`.`uid` WHERE `user`.`roleId` IN (1,2,3) $cnd \";\n\t\t$query = $this->db->query($sql);\n\t\t$result = array();\n\t\tif ($query->num_rows() > 0) {\n\t\t\t$result = $query->result_array();\n\t\t}\n\t\treturn $result;\n\t}", "public function get_once_available()\n\t{\n $this->db->where('expiration_date >', date(\"Y-m-d\"))->limit(1);\n\t\t$query = $this->db->get('coupon');\n\t\treturn $query->result_array();\n\t}", "public function getUserCreditTotal($userId)\n {\n $dql = 'SELECT uc\n FROM NiftyThrifty\\ShopBundle\\Entity\\UserCredits uc\n WHERE uc.userId = :userId\n ORDER BY uc.userCreditsId ASC';\n $params = array('userId' => $userId);\n\n $credits = $this->runQuery($dql, $params);\n\t\t$total = 0;\n\t\t$oldtotalcredits = 0;\n\t\t$negativecredits = array();\n\t\t$positivecredits = array();\n\t\t$today = strtotime('now');\n\n\t\t$testingoutput = \"\";\n\n\t\tif(!empty($credits)){\n\t\t\tfor($i=0;$i<$count=count($credits);$i++){\n\t\t\t\t$userCreditsDate = $credits[$i]->getUserCreditsDate()->getTimestamp();\n\t\t\t\t$userCreditsDateEnd = $credits[$i]->getUserCreditsDateEnd()->getTimestamp();\n\t\t\t\t$userCreditsValue = $credits[$i]->getUserCreditsValue();\n\t\t\t\t$user_id = $credits[$i]->getUserId();\n\n\t\t\t\tif($userCreditsDateEnd>$today){\n\t\t\t\t\t$oldtotalcredits = $oldtotalcredits + $userCreditsValue;\n\t\t\t\t}\n\n\t\t\t\t$thiscreditarray = array(\"userCreditsValue\" => $userCreditsValue, \"userCreditsDate\" => $userCreditsDate, \"userCreditsDateEnd\" => $userCreditsDateEnd, \"beenused\" => \"0\");\n\t\t\t\tif($userCreditsValue<0){\n\t\t\t\t\t$negativecredits[] = $thiscreditarray;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$positivecredits[] = $thiscreditarray;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$positivecount = count($positivecredits);\n\t\t\t$negativecount = count($negativecredits);\n\n\t\t\tif($negativecount>0){\n\t\t\t\tforeach($negativecredits as $creditused){\n\n\t\t\t\t\t$creditsusedtocheck = abs((int)$creditused['userCreditsValue']);\n\t\t\t\t\tfor($i=0; $i<$positivecount; $i++){\n\t\t\t\t\t\tif(($positivecredits[$i]['beenused']==\"0\")&&($positivecredits[$i]['userCreditsDateEnd']>=$creditused['userCreditsDate'])){\n\t\t\t\t\t\t\tif($creditsusedtocheck==0){\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($positivecredits[$i]['userCreditsValue']<=$creditsusedtocheck){\n\t\t\t\t\t\t\t\t$positivecredits[$i]['beenused'] = \"1\";\n\t\t\t\t\t\t\t\t$testingoutput .= \"used<br>\";\n\t\t\t\t\t\t\t\t$creditsusedtocheck = $creditsusedtocheck - $positivecredits[$i]['userCreditsValue'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$positivecredits[$i]['userCreditsValue'] = $positivecredits[$i]['userCreditsValue'] - $creditsusedtocheck;\n\t\t\t\t\t\t\t\t$testingoutput .= \"not used<br>\";\n\t\t\t\t\t\t\t\t$creditsusedtocheck = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor($i=0; $i<$positivecount; $i++){\n\t\t\t\tif($positivecredits[$i]['beenused']==\"0\"){\n\t\t\t\t\t$testingoutput .= $positivecredits[$i]['userCreditsDateEnd'] . \" | \" . $today;\n\t\t\t\t\tif($positivecredits[$i]['userCreditsDateEnd']>=$today){\n\t\t\t\t\t\t$total = (int)$total + (int)$positivecredits[$i]['userCreditsValue'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $total;\n }", "public function creditAvailed(){\n\t\t$memberId = $this->owner->ID;\n\t\treturn DB::query(\"SELECT SUM(Credit) FROM Payment where MemberID = $memberId\")->value();\n\t}", "public function getCredits() {\n $this->renderJson(true, $this->User->getAllCredits(Configure::read('User.id')));\n }", "function allusers_topcards_report($startdt,$enddt){\n global $DB,$USER;\n $context = context_system::instance();\n $managercap = has_capability('local/deptrpts:managerreport',$context);\n $allusercount=0;\n $allbadgecount=0;\n $allcertificatecount=0;\n $allcompletioncount=0;\n //checking for admin.\n if(is_siteadmin()){\n $users=$DB->get_records('user');\n //checking for manager.\n }elseif ($managercap) {\n $users =[];\n $manager=$DB->get_record_sql(\"SELECT id FROM {user_info_field} WHERE shortname='managersemail'\");\n $infodata=$DB->get_records_sql(\"SELECT userid FROM {user_info_data} WHERE fieldid='$manager->id' AND data='$USER->email'\");\n foreach ($infodata as $data1) {\n $username=$DB->get_record_sql(\"SELECT firstname,lastname FROM {user} WHERE id='$data1->userid'\");\n $uobject = new stdClass();\n $uobject->id = $data1->userid;\n $users[] = $uobject;\n }\n }\n foreach ($users as $user) {\n if($user->id != 1){\n $coursecount = user_course_count($user->id,$startdt,$enddt,null);\n $allusercount=$allusercount+$coursecount;\n $badgecount= user_badge_count($user->id,$startdt,$enddt,null);\n $allbadgecount=$allbadgecount+$badgecount;\n $certificatecount=user_course_certificate($user->id,$startdt,$enddt,null);\n $allcertificatecount=$allcertificatecount+$certificatecount;\n $completioncount=user_course_completion($user->id,$startdt,$enddt,null);\n $allcompletioncount=$allcompletioncount+$completioncount;\n }\n }\n $title=array(get_string('enrolledcourses','local_deptrpts'),\n get_string('coursecompletion','local_deptrpts'),\n get_string('badgesearned','local_deptrpts'),\n get_string('certificateearned','local_deptrpts'));\n $icon=array(\"<i class='fa fa-check-square-o' aria-hidden='true'></i>\",\n \"<i class='fa fa-certificate' aria-hidden='true'></i>\",\n \"<i class='fa fa-list' aria-hidden='true'></i>\",\n \"<i class='fa fa-address-card-o' aria-hidden='true'></i>\");\n $color=array(\"gradient-deepblue\",\"gradient-orange\",\"gradient-ohhappiness\",\"gradient-ibiza\");\n $html='';\n $html.=filter_top_cards($icon[0],$title[0],$allusercount,$color[0]);\n $html.=filter_top_cards($icon[1],$title[1],$allcompletioncount,$color[1]);\n $html.=filter_top_cards($icon[2],$title[2],$allbadgecount,$color[2]);\n $html.=filter_top_cards($icon[3],$title[3],$allcertificatecount,$color[3]);\n return $html;\n}", "function get_course_enrolled_info($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timeenrolled FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timeenrolled IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n // here getting enrolement time. \n $information=$DB->get_records_sql($sql);\n $abc=[];\n //here getting single value.\n foreach($information as $info){\n $singleinfo=$info->timeenrolled;\n $abc[]=date(\"m\",$singleinfo);\n }\n // this function is used to count the array value.\n $months = array_count_values($abc);\n $montharray=[];\n $marray = array('Jan','Feb','Mar','Apl','May','Jun','Jul','Aug','Sep','Act','Nov','Dec');\n for ($i=01; $i < 13; $i++) { \n if($i <= 9){\n $i = '0'.$i;\n }\n // this function is used to check whether a specified key is present in an array or not. \n if (array_key_exists($i,$months)){\n $montharray[$marray[$i-1]] = $months[$i];\n }else{\n $montharray[$marray[$i-1]] = 0;\n }\n }\n return $montharray;\n}", "private function getUserCreditAvailable($user_id, $shop_id) {\n $qb = $this->_em->createQueryBuilder();\n $credit_remaining = $qb->select('c.balanceShots, c.balanceGiftCard, c.balanceMomosyCard')\n ->from('WalletManagementWalletBundle:UserShopCredit', 'c')\n ->where('c.shopId = :shop_id')\n ->andWhere('c.userId = :user_id')\n ->setParameter('shop_id', $shop_id)\n ->setParameter('user_id', $user_id)\n ->getQuery()\n ->getResult();\n if (count($credit_remaining) > 0) {\n return $credit_remaining[0];\n } else {\n return null;\n }\n }", "public function getCardholderAccountDate();", "function add_points_for_programs(){ \n $date = date('d');\n if ('01' == $date) {\n $argus = array (\n 'role' => 'subscriber',\n 'fields' => array('ID','user_email') \n );\n $blogusers = get_users($argus);\n foreach ( $blogusers as $user ) {\n $MYM_ID = 3983; \n $NO_MYM_ID = 3985;\n if(userHasAnyTag($user->user_email,$MYM_ID) && !userHasAnyTag($user->user_email,$NO_MYM_ID))\n {\n mycred_add( \"ProgramMYM\", $user->ID, 25 ,\"Points for Monthly MYM Subscription\" , date('')); \n }\n }\n } \n}", "function avail_arr_gen($db_conn, $date) {\r\n\t\t$query = \"SELECT p_code, name FROM project WHERE status = 1\";\r\n\r\n\t\t$result = mysqli_query($db_conn, $query) or (mysqli_info());\r\n\r\n\t\t$available = array();\r\n\r\n\t\twhile($row=mysqli_fetch_row($result)) {\r\n\t\t\t$status = avail_for_atten($row[0], $date, $db_conn);\r\n\t\t\tif($status) {\r\n\t\t\t\t$available[] = array($row[0], $row[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $available;\r\n\t}", "function dgGetAccountStatus() {\n\n\t$value = array();\n\n\t$value['valid_member'] = 0;\n\t$value['has_dduser'] = 0;\n $value['user_type'] = \"\";\n $value['exp_date'] = \"\"; \n $value['exp_date_formatted'] = \"\"; \n\t$value['days_bought'] = 0;\n\t$value['days_used'] = 0;\n\t$value['days_left'] = 0;\n\t$value['mon_created'] = 0;\n\t$value['dduser_id'] = \"\";\n\t$value['dduser_wp_key'] = \"\";\n\t$value['exp_date_text'] = \"\";\n\t$value['user_type_nice'] = \"\"; \n\n\n\tif ( is_user_logged_in() ) {\n\t\t// PLACEHOLDER - CHECK IF USER HAS PAID \n\t\t$current_user = wp_get_current_user();\n\t\t$wp_user = $current_user->user_login;\n\n\t\t$value['wp_user'] = $wp_user;\n\n\t\t$link = getDBLink();\n\n\n\t\t$select = \"select dduser_type, dduser_exp_date, dduser_days_bought, dduser_wp_key, dduser_mon_created from dduser where dduser_id = '$wp_user'\";\n\t\t$result = mysqli_query($link, $select) ;\n\t\tif (mysqli_num_rows($result) > 0){\n\t\t\t\t$row = mysqli_fetch_array($result);\n\t\t\t\t$value['has_dduser'] = 1;\n\t\t $value['user_type'] = $row['dduser_type'];\n \t\t\t$value['mon_created'] = $row['dduser_mon_created'];\n\t\t\t\t$value['dduser_wp_key'] = $row['dduser_wp_key'];\n\n\t\t\t\t$today = date(\"Y-m-d\");\n\t\t\n\t\t\t\tswitch (strtolower($value['user_type'])) {\n\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t$value['user_type_nice'] = \"Lifetime\"; \n\t\t\t\t\t\t$value['exp_date_text'] = \"Never\";\n\t\t\t\t\t\t$value['valid_member'] = 1; \n\t\t\t\t\t\tbreak; \n\t\t\t\t\tcase 'y':\n\t\t\t\t\t\t$value['user_type_nice'] = \"Year\"; \n\t\t\t\t $value['exp_date'] = $row['dduser_exp_date']; \n\t\t\t\t $value['exp_date_formatted'] = \"expires \" . date('Y-m-d', $value['exp_date']); \n\t\t\t\t\t\tif ( $value['exp_date_formatted'] >= $today ) {\n\t\t\t\t\t\t\t$value['valid_member'] = 1; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value['exp_date_text'] = date('dS F Y', $value['exp_date']);\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tcase '6':\n\t\t\t\t\t\t$value['user_type_nice'] = \"Six Month\"; \n\t\t\t\t $value['exp_date'] = $row['dduser_exp_date']; \n\t\t\t\t $value['exp_date_formatted'] = \"expires \" . date('Y-m-d', $value['exp_date']); \n\t\t\t\t\t\tif ( $value['exp_date_formatted'] >= $today ) {\n\t\t\t\t\t\t\t$value['valid_member'] = 1; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value['exp_date_text'] = date('dS F Y', $value['exp_date']);\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tcase '3':\n\t\t\t\t\t\t$value['user_type_nice'] = \"Three Month\"; \n\t\t\t\t $value['exp_date'] = $row['dduser_exp_date']; \n\t\t\t\t $value['exp_date_formatted'] = \"expires \" . date('Y-m-d', $value['exp_date']); \n\t\t\t\t\t\tif ( $value['exp_date_formatted'] >= $today ) {\n\t\t\t\t\t\t\t$value['valid_member'] = 1; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value['exp_date_text'] = date('dS F Y', $value['exp_date']);\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tcase 'db':\n\t\t\t\t\t\t$value['user_type_nice'] = \"Days Bought\";\n\t\t\t\t\t\t$value['days_bought'] = $row['dduser_days_bought']; \n\t\t\t\t\t\t$select = \"select count(DISTINCT dduserdate_date) as used_days from dduserdate where dduser_id = '\".$value['dduser_wp_key'].\"'\";\n\t\t\t\t\t\t$result = mysqli_query($link, $select) ;\n\t\t\t\t\t\tif (mysqli_num_rows($result) > 0){\n\t\t\t\t\t\t\t$rowdays = mysqli_fetch_array($result);\n\t\t\t\t\t\t\t$value['days_used'] = $rowdays['used_days'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value['days_left'] = $value['days_bought'] - $value['days_used'];\n\t\t\t\t\t\tif ( $value['days_left'] >= 0 ) {\n\t\t\t\t\t\t\t$value['valid_member'] = 1; \n\t\t\t\t\t\t\t$value['exp_date_text'] = $value['days_left'] .\" of \".$value['days_bought'].\" days remaining\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$value['exp_date_text'] = \"0 days remaining\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$value['user_type_nice'] = \"UNKNOWN\";\n\t\t\t\t\t\t$value['valid_member'] = 0; /* Not a valid member */\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t}\n\t\tmysqli_close($link);\n\t}\n\treturn $value;\n}", "public function getClientCreditCards() {\r\n $query = 'SELECT * FROM ' . $this->table . ' WHERE user_id = :user_id';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->bindParam(':user_id', $this->user_id);\r\n $stmt->execute();\r\n $result = Utility::stmtToArray($stmt);\r\n return $result;\r\n }", "function get_course_completion($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timecompleted FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timecompleted IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n\n // here getting enrolement time. \n $information=$DB->get_records_sql($sql);\n $abc=[];\n //here getting single value.\n foreach($information as $info){\n $singleinfo=$info->timecompleted ;\n $abc[]=date(\"m\",$singleinfo);\n }\n // this function is used to count the array value.\n $months = array_count_values($abc);\n $montharray=[];\n $marray = array('Jan','Feb','Mar','Apl','May','Jun','Jul','Aug','Sep','Act','Nov','Dec');\n for ($i=01; $i < 13; $i++) { \n if($i <= 9){\n $i = '0'.$i;\n }\n // this function is used to check whether a specified key is present in an array or not. \n if (array_key_exists($i,$months)){\n $montharray[$marray[$i-1]] = $months[$i];\n }else{\n $montharray[$marray[$i-1]] = 0;\n }\n }\n return $montharray;\n}", "public function getAvailablePoints()\r\n {\r\n if(Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\r\n $customerId = $customerData->getId();\r\n \r\n $collectionCredit = Mage::getModel(\"loyalty/loyalty\")->getCollection()\r\n ->addFieldToFilter('customer_id', $customerId);\r\n\r\n $collectionCredit->getSelect()->where(\"(direction = 'credit' AND status = 'approved' AND DATE(expires_at) > DATE(NOW()))\");\r\n\r\n $total = 0;\r\n\r\n $i = 0;\r\n $firstValidCreditId = 0;\r\n foreach($collectionCredit as $item) {\r\n if ($i == 0) {\r\n $firstValidCreditId = $item->getId();\r\n }\r\n $total += $item->getPoints();\r\n $i++;\r\n }\r\n\r\n $collectionDebit = Mage::getModel(\"loyalty/loyalty\")->getCollection()\r\n ->addFieldToFilter('customer_id', $customerId);\r\n $collectionDebit->getSelect()->where(\"(direction = 'debit' AND status != 'canceled' AND id > \".$firstValidCreditId.\")\");\r\n \r\n foreach($collectionDebit as $item) {\r\n $total += $item->getPoints();\r\n }\r\n \r\n return $total;\r\n }\r\n }", "function getCreditLeft($vofClientId) \n{\n\t\n/*\t$query\t=\t\"SELECT * FROM entrp_credit_core WHERE client_id=\".$vofClientId;\n//\techo $query;\n\t$result\t=\tgetData($query);\n\t$count_result = mysqli_num_rows($result);\n\tif($count_result > 0)\n\t{\n\t\n\t while($row = mysqli_fetch_array($result))\n {\n \t/*\t$data['monthly_credit'] \t= $row['monthly_credit']; //1 or 2\n \t\t$data['monthly_core_credit'] \t\t= $row['monthly_core_credit']; //1 or 2\n \t\t$data['total_hours']\t=0.3*$data['monthly_core_credit'];\n \n //1 co-hour \t= \t1 credit = 60 co-minutes\n //1 co-min\t=\t1/60 credit\t=0.017 credits\n //say 18 co-min,0.017*18 =0.306 credits\n \n \t\t$data['creditsUsed'] = 0.017*$time;\n \t\t$data['creditLeft']=$data['monthly_core_credit']-$data['creditsUsed'];*/\n \t\t\n\t\t//}\n\t/*\t$update = \"UPDATE entrp_core_credit SET monthly_credit =\".$data['creditLeft'].\"WHERE entrpID =\".$vofClientId;\n\t\t$update_res =getData($update);\n\t\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n\treturn $data;*/\n\t\n\t$clientfacilitiesquery\t= \"SELECT * \n\t\t\t\t\t\t\t\t\t\t\tFROM client_facilities_core\n\t\t\t\t\t\t\t\t\t\t\tWHERE client_id =\".$vofClientId;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t$resultfacilities\t=\tgetData($clientfacilitiesquery);\t\t\t\t\t\t\t\t\t\n\t\t$count_facilities = mysqli_num_rows($resultfacilities);\t\t\t\t\t\t\t\t\n\t\tif($count_facilities >0)\n\t\t{\n\t\t\twhile($row = mysqli_fetch_array($resultfacilities))\n \t{\n \t\t\t$facilities['co_work_hours_limit']\t\t=\t\t$row['co_work_hours_limit'];\n \t\t\t$facilities['co_work_hours_left']\t\t=\t\t$row['co_work_hours_left'];\n \t}\n\t\t\n\t\t\n\t\t}\t\n\t\telse \n\t\t{\n\t\t\treturn 0;\n\t\t\n\t\t}\n\t\treturn $facilities;\n\t\n\t\n\t\n\t\n}", "function getCredits($plan, $term, $year){\r\n // connect to database\r\n require_once('../bin/Database.php');\r\n $dbUserName = get_current_user() . '_reader';\r\n $whichPass = \"r\"; //flag for which one to use.\r\n $dbName = DATABASE_NAME;\r\n $thisDatabaseReader = new Database($dbUserName, $whichPass, $dbName);\r\n\r\n // now execute query\r\n $query = \"SELECT SUM(fldCredits) FROM tblCourses INNER JOIN tblSemesterPlan\r\n ON tblSemesterPlan.fnkCourseId = tblCourses.fnkCourseId\r\n WHERE tblSemesterPlan.fnkTerm = ? AND tblSemesterPlan.fldYear = ? AND tblSemesterPlan.fnkPlanId = ?\";\r\n $data = array($term, $year, $plan);\r\n $info2 = $thisDatabaseReader->select($query, $data, 1, 2, 0, 0, false, false);\r\n return $info2;\r\n\r\n\r\n }", "function fetch_user_balance($userid = 0)\n{\n global $ilance;\n \n $sql = $ilance->db->query(\"\n SELECT account_number, available_balance, total_balance, income_reported, income_spent\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\".intval($userid).\"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return $res;\n }\n \n return array();\n}", "function getByUser( &$user, $available=true )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $ret = array();\r\n\r\n $userID = $user->id();\r\n\r\n if ( $available )\r\n $db->array_query( $res, \"SELECT ID FROM eZTrade_Voucher WHERE UserID='$userID' AND Available='1' ORDER By Created DESC\" );\r\n else\r\n $db->array_query( $res, \"SELECT ID FROM eZTrade_Voucher WHERE UserID='$userID' ORDER By Created DESC \" );\r\n\r\n foreach( $res as $result )\r\n {\r\n $ret[] = new eZVoucher( $result[$db->fieldName( \"ID\" )] );\r\n }\r\n\r\n return $ret;\r\n }", "public function retrieveCreditCardInfoByUser($user) {\n $user = mysql_real_escape_string($user);\n $result = mysql_query(\"SELECT CARD_TYPE,\n CARD_NUM,\n EXPIRATION_MTH,\n EXPIRATION_YR,\n NM_ON_CARD\n FROM CREDIT_CARD_INFO\n WHERE ACCT_ID = (SELECT ACCT_ID\n FROM USER_ACCT\n WHERE USER_NM = '\" .$user. \"')\");\n if (mysql_num_rows($result) > 0)\n return $result;\n else\n return null;\n mysql_close($con);\n }", "function getCreditCardExpiryFields($row) {\n\n $months = [];\n $years = [];\n\n $dMonth = New DateTime();\n $dYear = New DateTime();\n\n for ($i = 0; $i < 12; $i++) {\n array_push($months, $dMonth->format('F'));\n $dMonth->add(new \\DateInterval('P1M'));\n\n array_push($years, $dYear->format('Y'));\n $dYear->add(new \\DateInterval('P1Y'));\n }\n?>\n <!-- expiry & cvv -->\n <div class=\"input-group\">\n <label for=\"card-expiry\">Expiry/CVV</label>\n\n <select class=\"selectpicker form-control\" style=\"max-width: 800px;\" id=\"card-expiry-month\" name=\"card-expiry-month\" aria-describedby=\"card-expiry-month-help\" <?php echo ($_SESSION['PAGEMODE'] == 'VIEW') ? \" readonly\" : \"\" ?>>\n <option disabled selected>Month</option>\n <?php\n foreach($months as $m) {\n echo '<option>' . $m . '</option>';\n }\n ?>\n </select>\n\n <select class=\"selectpicker form-control\" style=\"max-width: 800px;\" id=\"card-expiry-year\" name=\"card-expiry-year\" aria-describedby=\"card-expiry-year-help\" <?php echo ($_SESSION['PAGEMODE'] == 'VIEW') ? \" readonly\" : \"\" ?>>\n <option disabled selected>Year</option>\n <?php\n foreach($years as $y) {\n echo '<option>' . $y . '</option>';\n }\n ?>\n </select>\n\n <small id=\"card-expiry-year-help\" class=\"form-text text-muted\"></small>\n\n <input type=\"text\" size=\"15\" maxlength=\"15\" style=\"max-width: 50%;\" class=\"form-control\" id=\"card-cvv\" name=\"card-cvv\" aria-describedby=\"card-cvv-help\" placeholder=\"Enter CVV\" value=\"<?php echo $row['card_CVV']; ?>\"<?php echo ($_SESSION['PAGEMODE'] == 'VIEW') ? \" readonly\" : \"\" ?>>\n <small id=\"longitude-help\" class=\"form-text text-muted\"></small>\n </div>\n<?php\n}", "public function get_balance($user_id)\n {\n $this->db->select('SUM(credits.initial_amount - credits.amount_used) as total');\n $this->db->where('user_id', $user_id);\n $currency = $this->session->userdata('currency') == 'Rp' ? 'IDR' : 'SGD';\n $this->db->where('currency', $currency);\n $this->db->where('credits.expired_date >=', date('Y-m-d', strtotime('today')));\n $query = $this->db->get('credits');\n\n return $query->row();\n }", "public function get_my_credit()\n {\n// );\n//\n// return $query->row_array();\n\n $this->db->select('user_credit');\n $this->db->from('user');\n $this->db->where('user_id', $this->session->userdata(\"user_id\"));\n $query = $this->db->get();\n\n return $query->row_array();\n }", "public function getInternationalCredits() {\n $this->renderJson(true, ClassRegistry::init('InternationalNumber')->getAllCredits());\n }", "public static function get_credits($params = array())\n\t{\n\t\t$params['action'] = 'getcredits';\n\t\treturn self::send_request($params);\n\t}", "public function getMonthlyCloudCredits()\n {\n return $this->monthly_cloud_credits;\n }", "public function index()\n {\n return Auth::user()->fluentCredits()->with(['group'])->get();\n }", "function getAvailableAchievements($con, $player_id)\n{\n\n\t$sql = \"SELECT ac.ID FROM ac WHERE ac.ac_visibility = 'Sichtbar' AND NOT EXISTS (SELECT null FROM ac_player WHERE ac_player.player_id = '$player_id' AND ac_player.ac_id = ac.ID)\";\n\t$result = mysqli_query($con,$sql);\n\twhile($row=mysqli_fetch_assoc($result))\n\t{\n\t\t$basic_ac[] = $row[\"ID\"];\n\t}\n\n\treturn $basic_ac;\n}", "public function credits_used()\n\t{\n\t\treturn $this->credits_used;\n\t}", "function getAllOfVisaGranted($fromDay, $toDay, $userid, $aboutus=\"\"){\n\t\t$sql = \"select if(b.Item is null, a.ExItem, b.Item) AS Item, c.AFee, concat(LName, ' ', FName) as Name, d.CID, c.ID, c.r_Status, c.CateID, c.SubClassID from client_visa_process a left join visa_rs_item b on (a.ItemID = b.ITEMID), client_visa c, client_info d\n\t\t where a.CVID = c.ID and c.CID = d.CID and b.Item is not null and a.Done = 1 \";\n\t\tif ($userid > 0) {\n\t\t\t$sql .= \" AND c.AUserID = {$userid} \";\n\t\t}\n\t\tif ($fromDay != \"\" && $toDay != \"\") {\n\t\t\t$sql .= \" AND a.BeginDate >= '{$fromDay}' and a.BeginDate <= '{$toDay}' \";\n\t\t}\t\t\n\n if ($aboutus != \"\") {\n if ($aboutus == 'Others') {\n $sql .= \" AND d.about = '' \";\n }\n else {\n $sql .= \" AND d.about = '{$aboutus}' \";\n }\n }\n\n\t\t//$sql .= \" GROUP BY b.ITEM,c.ID \";\n //echo $sql.\"\\n\";\n\t\t$this->query($sql);\n\t\t$lodge = $grant = $withdraw = $refuse = $cancel = $stop = $declined = 0;\n $visa = array();\n\t\twhile ($this->fetch()) {\n \t\t\t//$comm = round($this->Fee_Recv - $this->Fee_Pay,2);\t\n \n if (preg_match('/^grant/i', $this->Item)){\n\t\t\t\t$_arr['all']['gname' ][$grant] = $this->Name;\n $_arr['all']['gc' ][$grant] = $this->CID;\n $_arr['all']['gv' ][$grant] = $this->ID;\t\t\n\t\t\t\t$visa[$this->ID]['grant'][] = $grant;\n $visa[$this->ID]['profit'] = 0;\n $visa[$this->ID]['has_agreement_fee'] = 0;\n $visa[$this->ID]['receive_fee'] = 0; \n $visa[$this->ID]['spand_fee'] = 0; \n $visa[$this->ID]['gst'] = 0; \n $grant++;\t\t\t\n\t\t\t}\n\n\t\t}\n \n //calc payment\n $grant_0 = $gc_paid = $gc_paid_0 = $gc_free = $gc_free_0 = $grev = $grev_paid = $grev_free = 0;\n\n $comm_l = $comm_g = array();\n if (count($visa) > 0) {\n $sql = \"select a.ID, VisaID, DueAmount, GST, AMOUNT_3RD, GST_3RD, SUM(IF(STEP = 'agreement' AND DueAmount > 0, 1, 0)) AS HAS_AGREEMENT_FEE, Sum(if(b.PaidAmount is null, 0, b.PaidAmount)) as paid from client_account a left join client_payment b on(a.ID = b.AccountID) Where VisaID IN (\".implode(',', array_keys($visa)).\") AND ACC_TYPE = 'visa' and Step in ('agreement', 'extra-agreement') Group by a.ID\";\n $this->query($sql);\n \n while ($this->fetch()){\n $visa[$this->VisaID]['profit'] += ($this->GST == 1? $this->paid/1.1 : $this->paid);\n $visa[$this->VisaID]['has_agreement_fee'] += $this->HAS_AGREEMENT_FEE;\n $visa[$this->VisaID]['receive_fee'] += $this->paid;\n $visa[$this->VisaID]['gst'] = $this->GST;\n } \n \n //Spand\n $sql = \"select a.ID, VisaID, Sum(if(p.PaidAmount is null, 0, p.PaidAmount)) as spand from client_spand p, client_account a where p.AccountID = a.ID and a.ACC_TYPE = 'visa' and a.Step in ('agreement', 'extra-agreement') and a.VisaID IN (\".implode(',', array_keys($visa)).\") Group by a.ID\";\n $this->query($sql);\n while ($this->fetch()){\n $visa[$this->VisaID]['spand_fee'] += $this->spand;\n } \n\n\n foreach ($visa as $vid => $v) {\n if (isset($v['grant'])) {\n foreach ($v['grant'] as $i) {\n $profit_net = $v['gst'] >0? round(($v['receive_fee'] - $v['spand_fee'])/1.1,2) : ($v['receive_fee'] - $v['spand_fee']);\n $grev += $profit_net; \n if ($profit_net <= 0)\n $grant_0++; \n\n if ($v['has_agreement_fee'] > 0) {\n $grev_paid += $profit_net;\n $_arr['all']['gname_paid'][$i] = $_arr['all']['gname'][$i].' $'.$profit_net;\n $gc_paid++;\n if ($profit_net <= 0)\n $gc_paid_0++;\n }\n else {\n $grev_free += $profit_net;\n $_arr['all']['gname_free'][$i] = $_arr['all']['gname'][$i].' $'.$profit_net; \n $gc_free++;\n if ($profit_net <= 0)\n $gc_free_0++;\n }\n //$_arr['all']['gname'][$i] .= ' $'.$v['profit'];\n }\n }\n }\n } \n \n\t\t$_arr['all']['lcnt1'] = $lodge;\n\t\t$_arr['all']['gcnt1'] = $grant;\n $_arr['all']['wcnt1'] = $withdraw;\n $_arr['all']['rcnt1'] = $refuse;\n $_arr['all']['ccnt1'] = $cancel;\n $_arr['all']['scnt1'] = $stop;\n $_arr['all']['dcnt1'] = $declined;\n\n\t\t$_arr['all']['gcnt0'] = $grant_0;\n\n\n\n\t\t$_arr['all']['gfee'] = $grev;\n $_arr['all']['gfee_paid'] = $grev_paid;\n $_arr['all']['gfee_free'] = $grev_free;\n\n $_arr['all']['gc_paid'] = $gc_paid;\n $_arr['all']['gc_paid_0'] = $gc_paid_0;\n $_arr['all']['gc_free'] = $gc_free;\n $_arr['all']['gc_free_0'] = $gc_free_0;\n\t\treturn $_arr;\t\t\t\t\n\t}", "function premium()\n{\n if (isset($_SESSION[\"connectedUser\"])) {\n $pdo = new PDO(\"mysql:host=localhost:3306;dbname=sportify\", \"root\", \"\");\n $premium = $pdo->query('SELECT u.id_premium, date_abo_debut, date_abo_fin FROM utilisateur u JOIN premium ON u.id_premium = premium.id_premium WHERE mail_u = \"' . $_SESSION[\"login\"] . '\"');\n $premium = $premium->fetchAll(PDO::FETCH_ASSOC);\n return $premium;\n }\n}", "public function get_credit($key = 0)\n {\n }", "function get_user_yearly_completion($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timecompleted FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timecompleted IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n\n $year=$DB->get_records_sql($sql);\n $emptyarray=[];\n foreach ($year as $yearcompleted) {\n if(!empty($yearcompleted->timecompleted)){\n $singleyear=$yearcompleted->timecompleted;\n $emptyarray[] = date('Y',$singleyear);\n }\n }\n $years = array_count_values($emptyarray);\n return $years;\n}", "function getCCLastFourOfUser($user_id){\r\n\t\t\r\n\t\t$query = \"select id, concat('xxxx xxxx ', SUBSTRING(card_number,-4),' ',card_logo) as card_number from cc_details \r\n\t\t\t\t\twhere user_id=$user_id and \r\n\t\t\t\t\t\texp_year >= year(curdate()) and\r\n\t\t\t\t\t\tif(exp_year = year(curdate()),if(exp_month >= month(curdate()),1,0),1) = 1\";\r\n\t\t$result = mysql_query($query);\r\n \r\n $data = array();\r\n if(mysql_num_rows($result) != 0 ) {\r\n \r\n while($row = mysql_fetch_assoc($result)) {\r\n $data[] = $row;\r\n }\r\n \r\n } else {\r\n return false;\r\n }\r\n return $data;\r\n\t\t\r\n\t\t\r\n\t}", "private function userFreeTrialAvailable($user_data) {\n // return 2 => abonamento attivo\n // 0 => Abonamento freetrial non disponibile\n // 1 => Abbonamento free trial disponibile!\n\n // UTENTE HA GIA UN ABBONAMENTO ATTIVO\n if($user_data->transation_id_subscr != \"\" && $user_data->date_shop != \"\") {\n return 2;\n }\n // UTENTE HA GIA AVUTO UN ABBONAMENTO, ma in questo momento non ne ha uno attivo\n elseif($user_data->transation_id_subscr == \"\" && $user_data->date_shop != \"\") {\n return 0;\n }\n // UTENTE NON HA MAI AVUTO UN ABBONAMENTO\n elseif($user_data->transation_id_subscr == \"\" && $user_data->date_shop == \"\") {\n // Carica View per Step2\n return 1;\n } elseif($user_data->transation_id_subscr != \"\" && $user_data->date_shop == \"\") {\n // CASO ERRORE\n return 0;\n } else {\n // ALTRO CASO NON CONTROLLATO O ERRORE\n return 0;\n }\n }", "public function getDisplayCredits()\n {\n return $this->displayCredits;\n }", "public function get_contract_expired(){\n\t\treturn $this->db->query(\"select concat(DAY(member_dsc.kontrak_selesai),' ',MONTHNAME(member_dsc.kontrak_selesai), ' ',\n\t\tYEAR(member_dsc.kontrak_selesai))\n\t\tas kontrak_selesai, count(member_dsc.nik) as total\n\t\tfrom member_dsc WHERE member_dsc.kontrak_selesai!=0\n\t\tAND YEAR(member_dsc.kontrak_selesai) >= 2018\n\t\tgroup by kontrak_selesai ORDER BY YEAR(kontrak_selesai), MONTH(kontrak_selesai), DAY(kontrak_selesai) ASC\")->result();\n\t}", "function get_user_monthly_goal(){\n global $dbase;\n $data=array();\n $current_user_id=$this->gStringId($_SESSION['admin_id']);//Current user id\n $user_type=$_SESSION['admin_type']; //Admin level\n\n $manager=\"Manager\"; \n $Supervisor=\"Supervisor\";\n $Operator=\"Operator\";\n\n include(\"admin_tables.php\");\n\n if($user_type==$manager){\n\n $branch_id=$this->getBranchOfAdmin($current_user_id);//Get current users branch\n \n $sql =\"SELECT count(*) FROM adds WHERE reg_date >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND branch_id='\".$branch_id.\"'\";\n\n } else if($user_type==$Supervisor || $user_type==$Operator){\n\n $sql =\"SELECT count(*) FROM \".$table.\",adds WHERE \".$table.\".date_assigned >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND \".$table.\".admin_id='\".$current_user_id.\"' AND \".$table.\".ad_id= adds.id AND \".$table.\".status= adds.status\";\n }\n\n $prevpend=$this->get_previous_months_pending_ads();\n $prev_number=0;\n foreach ($prevpend as $key => $valuep) {\n $prev_number=$valuep['result'];\n }\n\n $result = $dbase->prepare($sql); \n $result->execute(); \n $no = $result->fetchColumn();\n\n $total= array('result' =>$no+$prev_number );\n array_push($data, $total);\n\n return $data;\n\n }", "function courseCredits($course_id){\n //Will edit later.\n return 4;\n }", "function find_cost_item_date($userId, $startDate, $endDate){\n\tglobal $connection;\n\n\tif($startDate && $endDate){\n\t\t$query = \"SELECT * FROM cost WHERE user_id = {$userId} AND costdate >= '{$startDate}' AND costdate <= '{$endDate}' ORDER BY id DESC\";\n\t} else {\n\t\t$query = \"SELECT * FROM cost WHERE user_id = {$userId} AND costdate = '{$startDate}' ORDER BY id DESC\";\n }\n\t$costItem = mysqli_query($connection, $query);\n\tconfirm_query($costItem);\n\treturn $costItem;\n}", "private function line_credit_list(){\n $results = $this->dt->line_credit_list();\n echo $results;\n }", "function showCreditInfo($creditId) {\n try{\n $response = ClientCreator::getInstance()->request('GET', \"vendors/$this->vendorToken/credits/$creditId\");\n $response = json_decode($response->getBody(), true); //decodes the resposnce body\n $response = json_encode($response['credit']); // encodes back to json with out the user key\n return $response;\n } catch(GuzzleHttp\\Exception\\ClientException $e) {\n $error = json_decode($e->getResponse()->getBody(), true)['errors'].\"\\n\";\n return $error;\n }\n }", "protected function _credit() {\n\t\t$affiliates = User::findAllByaffiliate(true, array('fields' => array('_id' => true)));\n\t\t$affiliates = $affiliates->data();\n\n\t\tforeach ($affiliates as $value) {\n\t\t\t$ids[] = (string) $value['_id'];\n\t\t}\n\t\t$conditions = array(\n\t\t\t'status' => 'Accepted',\n\t\t\t'credited' => array('$ne' => true),\n\t\t\t'user_id' => array('$nin' => $ids)\n\t\t);\n\t\t$collection = Invitation::connection()->connection->invitations;\n\t\t$invitations = $collection->find($conditions);\n\t\t$invitations->sort(array('_id' => -1));\n\t\t$invitationCount = Invitation::count(compact('conditions'));\n\t\t$this->out(\"There are currently $invitationCount outstanding invitations.\");\n\t\t$i = 0;\n\t\tforeach ($invitations as $invitation) {\n\t\t\t$this->out(\"Currently processing invitation $i out of $invitationCount\");\n\t\t\tif (!empty($invitation['email'])) {\n\t\t\t\t$user = User::findByemail($invitation['email']);\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'user_id' => (string) $user['_id'],\n\t\t\t\t\t'items.status' => array('$ne' => 'Order Canceled'\n\t\t\t\t));\n\t\t\t\t$order = Order::first(compact('conditions'));\n\t\t\t\tif ($order) {\n\t\t\t\t\t$user = User::find($invitation['user_id']);\n\t\t\t\t\t$invitationCheck = Invitation::find('first', array(\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'email' => $invitation['email'],\n\t\t\t\t\t\t\t'credited' => true\n\t\t\t\t\t)));\n\t\t\t\t\tif (empty($invitationCheck)) {\n\t\t\t\t\t\t$this->out(\"Giving a credit to $invitation[user_id]\");\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'user_id' => $invitation['user_id'],\n\t\t\t\t\t\t\t'description' => \"Invite accepted from: $invitation[email]\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$options = array('type' => 'Invite');\n\t\t\t\t\t\tif (Credit::add($data, $options) && User::applyCredit($data, $options)) {\n\t\t\t\t\t\t\t$updateInvite = Invitation::find('first', array(\n\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t'_id' => $invitation['_id']\n\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t\t$updateInvite->credited = true;\n\t\t\t\t\t\t\t$updateInvite->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t}", "function get_user_credit_card_info($conditions_array){\n\t\t$rows=array();\n\t\t$this->db->from('red_members as m');\n\t\t// $this->db->join('red_member_packages as rmp','rmp.red_member_package_id=m.package_id');\n\t\t$this->db->join('red_member_packages as rmp','rmp.member_id=m.member_id');\n\t\t$this->db->join('red_packages as rp','rmp.package_id=rp.package_id');\n\t\t$this->db->where($conditions_array);\n\t\t$result=$this->db->get();\n\t\t\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t}", "function authpending($user) \n { \n $oaux=new authrequestxuser($this->con);\n $sql=\"select fromuser_id,autrequser_date \"\n \t .\"from authrequestxuser \"\n \t .\"where touser_id='$user' \"\n \t .\"order by autrequser_date,fromuser_id \";\n $rs=&$this->con->execute($sql);\n if($rs->EOF)\n $res=0;\n else \n {\n $res=array();\n $cont=0;\n while(!$rs->EOF)\n {\n \t $res[$cont]=$rs->fields[0];\n \t $cont++;\n \t $rs->next();\n }\n }\n return($res);\n }", "function get_user_monthly_number_ofdeclined_ads(){\n global $dbase;\n $data=array();\n $current_user_id=$this->gStringId($_SESSION['admin_id']);//Current user id\n $user_type=$_SESSION['admin_type']; //Admin level\n\n $manager=\"Manager\"; \n $Supervisor=\"Supervisor\";\n $Operator=\"Operator\";\n\n $status=\"Declined\";\n\n include(\"admin_tables.php\");\n if($user_type==$manager){\n\n $branch_id=$this->getBranchOfAdmin($current_user_id);//Get current users branch\n \n $sql =\"SELECT count(*) FROM adds WHERE reg_date >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND branch_id='\".$branch_id.\"' AND status='\".$status.\"'\";\n\n } else if($user_type==$Supervisor || $user_type==$Operator){\n\n $sql =\"SELECT count(*) FROM \".$table.\",adds WHERE \".$table.\".date_assigned >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND \".$table.\".admin_id='\".$current_user_id.\"' AND \".$table.\".status='\".$status.\"' AND adds.id=\".$table.\".ad_id AND adds.status='\".$status.\"'\";\n }\n\n \n\n $result = $dbase->prepare($sql); \n $result->execute(); \n $no = $result->fetchColumn();\n\n $total= array('result' =>$no );\n array_push($data, $total);\n\n return $data;\n }", "function can_display_financials($userid = 0)\n{\n global $ilance, $myapi;\n $sql = $ilance->db->query(\"\n SELECT displayfinancials\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\".intval($userid).\"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n if ($res['displayfinancials'] > 0)\n {\n return 1;\n }\n }\n return 0;\n}", "public function use_credit()\n {\n if ($this->check_credits()) \n {\n $user_id = $this->session->userdata('userid');\n\n $this->db->set('credits', 'credits-1', FALSE);\n $this->db->where('id', $user_id);\n $this->db->update('user');\n\n }\n }", "protected function get_credit() {\n\t\treturn '<p class=\"cs_credit\">Calendar produced using <a href=\"'\n\t\t\t. 'http://www.analysisandsolutions.com/software/calendar/'\n\t\t\t. '\">Calendar Solution</a></p>' . \"\\n\";\n\t}", "function cac_cc_get_licenses() {\n\treturn array(\n\t\t'by' => sprintf( esc_html__( 'Attribution %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'by-nd' => sprintf( esc_html__( 'Attribution-NoDerivatives %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'by-sa' => sprintf( esc_html__( 'Attribution-ShareAlike %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'by-nc' => sprintf( esc_html__( 'Attribution-NonCommercial %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'by-nc-nd' => sprintf( esc_html__( 'Attribution-NonCommercial-NoDerivatives %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'by-nc-sa' => sprintf( esc_html__( 'Attribution-NonCommercial-ShareAlike %s International', 'cac-creative-commons' ), cac_cc_get_license_version() ),\n\t\t'zero' => sprintf( esc_html__( 'CC0 %s Universal Public Domain Dedication', 'cac-creative-commons' ), cac_cc_get_zero_license_version() )\n\t);\n}", "public function get_total_premium_last_year(){\n $agent_result_set=$this->read_selective_agent(\"WHERE branch_manager_id=\".$_SESSION['id']);\n //generating the agent id constraint\n if($agent_result_set){\n $constraint_id=\" AND (\";\n while($agent_result=$agent_result_set->fetch_assoc()){\n $constraint_id=$constraint_id.\" agent_id=\".$agent_result['id'].\" OR\";\n }\n $constraint_id=substr($constraint_id,0,-2);\n $constraint_id=$constraint_id.\")\";\n }else{\n $constraint_id=\" AND FALSE\";\n }\n\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=($year-1).'-01-01';\n $date2=$year.'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\".$constraint_id);\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "function calculate_churn( $args, $assoc_args ) {\n\t\tlist( $args, $assoc_args ) = $this->parse_args($args, $assoc_args);\n\n\t\t$results = array();\n\n\t\t$month_start = clone $this->options->date;\n\t\t$month_start->setTime(0,0);\n\t\t$month_end = clone $month_start; $month_end->modify('last day of');\n\t\t$month = $month_start->format('Y-m');\n\t\t//$last_month_start = clone $month_start; $last_month_start->modify('first day of last month');\n\t\t//$last_month_end = clone $month_start; $last_month_end->modify('last day of last month');\n\n\t\t/// TODO $wooactive_key = 'wooactive_' . $month;\n\n\t\t$mrr_key = 'mrr_' . $month;\n\t\t$revenue_key = 'revenue_' . $month;\n\t\t$revenue_sub_key = 'revenue_sub_' . $month;\n\t\t$revenue_single_key = 'revenue_single_' . $month;\n\t\t$revenue_shop_key = 'revenue_shop_' . $month;\n\t\t// TODO $columns = array('id', 'cohort', 'first_sub', $wooactive_key, $mrr_key, $revenue_key, $revenue_sub_key, $revenue_single_key, $revenue_shop_key, 'error');\n\t\t$columns = array('id', 'cohort', 'first_sub', $mrr_key, $revenue_key, $revenue_sub_key, $revenue_single_key, $revenue_shop_key, 'error');\n\n\t\tforeach ($args as $user_id) {\n\n\t\t\ttry {\n\t\t\t\tWP_CLI::debug(\"User $user_id.\");\n\t\t\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\t\t\t$registered = new DateTime(get_userdata($user_id)->user_registered);\n\t\t\t\tif ($registered > $month_end) {\n\t\t\t\t\tWP_CLI::debug(\"\\tSkipping, user registered after month end.\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//$is_active = $customer->is_active_during_period($month_start, $month_end);\n\t\t\t\t//$is_active_last = $customer->is_active_during_period($last_month_start, $last_month_end);\n\t\t\t\t$cohort = $customer->earliest_subscription_date()->format('Y-m');\n\t\t\t\t$mrr = $customer->mrr_during_period($month_start, $month_end);\n\t\t\t\t$revenue = $customer->revenue_during_period($month_start, $month_end);\n\n\t\t\t\tif (! $this->options->pretend) {\n\t\t\t\t\t$customer->set_meta('cohort', $registered->format('Y-m'));\n\t\t\t\t\t$customer->set_meta($mrr_key, $mrr);\n\t\t\t\t\t$customer->set_meta($revenue_key, $revenue['total']);\n\t\t\t\t\t$customer->set_meta($revenue_sub_key, $revenue['sub']);\n\t\t\t\t\t$customer->set_meta($revenue_single_key, $revenue['single']);\n\t\t\t\t\t$customer->set_meta($revenue_shop_key, $revenue['shop']);\n\t\t\t\t}\n\n\t\t\t\tarray_push($results, array(\n\t\t\t\t\t'id' => $user_id,\n\t\t\t\t\t'cohort' => $registered->format('Y-m'),\n\t\t\t\t\t'first_sub' => $cohort,\n\t\t\t\t\t$mrr_key => $mrr,\n\t\t\t\t\t$revenue_key => $revenue['total'],\n\t\t\t\t\t$revenue_sub_key => $revenue['sub'],\n\t\t\t\t\t$revenue_single_key => $revenue['single'],\n\t\t\t\t\t$revenue_shop_key => $revenue['shop'],\n\t\t\t\t\t'error' => NULL,\n\t\t\t\t));\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\tWP_CLI::debug(\"\\tError: \" . $e->getMessage());\t\n\t\t\t\tarray_push($results, array(\n\t\t\t\t\t'id' => $user_id,\n\t\t\t\t\t'cohort' => isset($registered) ? $registered->format('Y-m') : NULL,\n\t\t\t\t\t'first_sub' => isset($cohort) ? $cohort : NULL,\n\t\t\t\t\t$mrr_key => isset($mrr) ? $mrr : NULL,\n\t\t\t\t\t$revenue_key => isset($revenue) ? $revenue : NULL,\n\t\t\t\t\t$revenue_sub_key => isset($revenue) ? $revenue['sub'] : NULL,\n\t\t\t\t\t$revenue_single_key => isset($revenue) ? $revenue['single'] : NULL,\n\t\t\t\t\t$revenue_shop_key => isset($revenue) ? $revenue['shop'] : NULL,\n\t\t\t\t\t'error' => $e->getMessage(),\n\t\t\t\t));\n\t\t\t\tif ($this->options->verbose)\n\t\t\t\t\tvar_dump($e->getTrace());\n\t\t\t}\n\n\t\t}\n\t\tWP_CLI\\Utils\\format_items($this->options->format, $results, $columns);\n\t}", "function advinvsys_task_givecredit() {\r\n global $db, $mybb, $plugins;\r\n\r\n // care este unitatea de timp dorita?\r\n $invs_type = intval($mybb->settings['advinvsys_setting_timeonlinetype']) * 3600;\r\n\r\n // cate invitatii se acorda pe unitatea de timp\r\n $invs_howmany = abs(number_format(floatval($mybb->settings['advinvsys_setting_timeonlinehow']), 2));\r\n\r\n // daca valoarea setarii e 0 atunci se dezactiveaza aceasta caracteristica\r\n if ($invs_howmany == 0)\r\n return 0;\r\n\r\n $plugins->run_hooks('advinvsys_task_timeonline');\r\n\r\n // totul se va face dintr-o singura interogare\r\n // ne asiguram ca nu se depaseste numarul maxim de invitatii per group!\r\n $db->write_query(\"UPDATE \" . TABLE_PREFIX . \"users u \r\n INNER JOIN \" . TABLE_PREFIX . \"usergroups AS g ON u.usergroup = g.gid SET \r\n u.invitations = IF(g.max_invitations > -1,\r\n LEAST(g.max_invitations, u.invitations + {$invs_howmany} * (GREATEST(0, u.timeonline - u.last_timeonline) DIV {$invs_type})),\r\n u.invitations + {$invs_howmany} * (GREATEST(0, u.timeonline - u.last_timeonline) DIV {$invs_type})\r\n ), u.last_timeonline = u.last_timeonline + {$invs_type} * (GREATEST(0, u.timeonline - u.last_timeonline) DIV {$invs_type}) \r\n WHERE u.timeonline >= u.last_timeonline + {$invs_type}\");\r\n // nu putem realiza si log-uri in pacate daca facem ceva dintr-o singura interogare\r\n // in schimb functia va returna numarul de randuri actualizate\r\n return $db->affected_rows();\r\n}", "function get_paid_user_from_beginning(){\n\t\treturn $this->db->query(\"select count( distinct user_id) as usr from red_member_transactions t1 inner join red_members t2 on t1.user_id=t2.member_id where gateway IN ('AUTHORIZE','PayPal') and t1.status='SUCCESS' and amount_paid > 0\")->row()->usr;\n\t\t\n\t}", "public function getFreebusy($user, array $options = array()) { }", "function rcp_check_for_expired_users() {\n\t\n\tglobal $wpdb;\n\n\t$current_time = date( 'Y-m-d H:i:s', strtotime( '-1 day' ) );\n\n\t$query = \"SELECT ID FROM $wpdb->users \n\t\tINNER JOIN $wpdb->usermeta ON ($wpdb->users.ID = $wpdb->usermeta.user_id)\n\t\tINNER JOIN $wpdb->usermeta AS mt1 ON ($wpdb->users.ID = mt1.user_id)\n\t\tINNER JOIN $wpdb->usermeta AS mt2 ON ($wpdb->users.ID = mt2.user_id)\n\t\tWHERE 1=1 AND ( ($wpdb->usermeta.meta_key = 'rcp_expiration' \n\t\t\tAND CAST($wpdb->usermeta.meta_value AS DATETIME) < '$current_time')\n\t\t\tAND (mt1.meta_key = 'rcp_expiration' \n\t\t\t\tAND CAST(mt1.meta_value AS CHAR) != 'none')\n\t\t\tAND (mt2.meta_key = 'rcp_status' \n\t\t\t\tAND CAST(mt2.meta_value AS CHAR) = 'active') ) \n\t\tORDER BY user_login ASC LIMIT 9999\";\n\n\t$expired_members = $wpdb->get_results( $query );\n\t$expired_members = wp_list_pluck( $expired_members, 'ID' );\n\n\tif( $expired_members ) {\n\t\tforeach( $expired_members as $key => $member_id ) {\n\n\t\t\t$expiration_date = rcp_get_expiration_timestamp( $member_id );\n\t\t\tif( $expiration_date && strtotime( '-1 day', current_time( 'timestamp' ) ) > $expiration_date ) {\n\t\t\t\trcp_set_status( $member_id, 'expired' );\n\t\t\t}\n\t\t}\n\t}\n}", "function getFreeTrialDaysLeft($user_id)\n\t\t{\t\n\t\t\t$freetrialstr=\"\";\n\t\t\t$query = \"select trial_date from clinic c,clinic_user cu where c.clinic_id=cu.clinic_id and c.trial_status=1 and cu.user_id = \".$user_id;\n $result = mysql_query($query);\n if( mysql_num_rows($result) > 0){\n $row=mysql_fetch_object($result);\n\t\t\t\t$freetrialdate=$row->trial_date;\n\t\t\t\t$freetrial= db::$config['freetrial'];\n\t\t\t\t\t\t\t\tif($freetrialdate !=''){\n\t\t\t\t\t\t\t\t$sqlforfretrial=\"SELECT DATEDIFF(now(),'\".$freetrialdate.\"') as freetrial \";\n\t\t\t\t\t\t\t\t$resultforfretrial = $this->execute_query($sqlforfretrial);\n\t\t\t\t\t\t\t\t$rowforfretrial = $this->fetch_array($resultforfretrial);\n\t\t\t\t$daysleft=30-$rowforfretrial['freetrial'];\n\t\t\t\tif($this->userInfo('therapist_access')==1 && $this->userInfo('admin_access')==1)\n\t\t\t\t\t$action=\"trialperiodprompt\";\n\t\t\t\telse if($this->userInfo('admin_access')==1 && $this->userInfo('therapist_access')!=1)\n\t\t\t\t\t$action=\"headtrialperiodprompt\";\n\t\t\t\telse\n\t\t\t\t\t$action=\"trialperiodprompt\";\t\n\t\t\t\tif($daysleft <= 0)\n\t\t\t\t\t$freetrialstr='<li><a href=\"javascript:void(0);\" onclick=\"freeTrialLeft_handler(\\''.$action.'\\');\" style=\"font-weight:bold;\">Trial Period is over</a></li>';\n\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\t$freetrialstr='<li><a href=\"javascript:void(0);\" onclick=\"freeTrialLeft_handler(\\''.$action.'\\');\" style=\"font-weight:bold;\">'.$daysleft.' days left in trial</a></li>';\n\t\t\t\t}\n }\n\t\t\treturn $freetrialstr;\n }", "function accountsrequests()\r\n\t{\r\n\t\tglobal $conn;\r\n\t\t$sql = \"SELECT * FROM users WHERE status='Pending'\";\r\n\t\t$result = mysqli_query($conn, $sql);\r\n\t\t$accounts_requests = mysqli_fetch_all($result, MYSQLI_ASSOC);\r\n\t\treturn $accounts_requests; \r\n\t}", "function getUserList() {\n\n\t$url = COUCH_DB_HOST.\":\".COUCH_DB_PORT.\"/\".COUCH_DB_NAME.\"/_design/users/_view/checkedin\";\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n\n}", "function allcourse_top_cards_report($startdt,$enddt){\n global $DB,$USER;\n $context = context_system::instance();\n $managercap = has_capability('local/deptrpts:managerreport',$context);\n $totalcount=0;\n $totalbadgecount=0;\n $totalcertificates=0;\n $totalcompletion=0;\n //checking if user as admin.\n if(is_siteadmin()){\n $courses=$DB->get_records('course');\n }else if($managercap){\n $manager=$DB->get_record_sql(\"SELECT id FROM {user_info_field} WHERE shortname='managersemail'\");\n $infodata=$DB->get_records_sql(\"SELECT userid FROM {user_info_data} WHERE fieldid='$manager->id' AND data='$USER->email'\");\n $counter=1;\n $instring=\"\";\n foreach ($infodata as $coursekey => $coursevalue) {\n if($counter == 1){\n $instring=\"'\".$coursekey.\"'\";\n }else{\n $instring = $instring.\",\".\"'\".$coursekey.\"'\";\n }\n $counter++;\n }\n $managercourse=\"SELECT DISTINCT c.fullname,c.id\n FROM mdl_course AS c\n JOIN mdl_context AS ctx ON c.id = ctx.instanceid\n JOIN mdl_role_assignments AS ra ON ra.contextid = ctx.id\n JOIN mdl_user AS u ON u.id = ra.userid\n JOIN mdl_course_categories AS cc ON cc.id = c.category\n WHERE u.id in (\".$instring.\")\";\n $courses = $DB->get_records_sql($managercourse);\n }\n foreach ($courses as $course) {\n if($course->id != 1){\n $listusers = enrolled_users_count_course($startdt,$enddt,null,$course->id);\n $totalcount=$totalcount+$listusers;\n $badgecount= get_badges_earned($startdt,$enddt,null,$course->id);\n $totalbadgecount=$totalbadgecount+$badgecount;\n $certificatecount =get_course_cerficatescount($startdt,$enddt,null,$course->id);\n $totalcertificates=$totalcertificates+$certificatecount;\n $completioncount =course_complition_count($startdt,$enddt,null,$course->id);\n $totalcompletion =$totalcompletion+$completioncount;\n }\n }\n $title=array(get_string('enrolledusers','local_deptrpts'),\n get_string('userscompleted','local_deptrpts'),\n get_string('badges','local_deptrpts'),\n get_string('certificates','local_deptrpts'));\n $icon=array(\"<i class='fa fa-check-square-o' aria-hidden='true'></i>\",\n \"<i class='fa fa-certificate' aria-hidden='true'></i>\",\n \"<i class='fa fa-list' aria-hidden='true'></i>\",\n \"<i class='fa fa-address-card-o' aria-hidden='true'></i>\");\n $color=array(\"gradient-deepblue\",\"gradient-orange\",\"gradient-ohhappiness\",\"gradient-ibiza\");\n $html='';\n $html.=filter_top_cards($icon[0],$title[0],$totalcount,$color[0]);\n $html.=filter_top_cards($icon[1],$title[1],$totalcompletion,$color[1]);\n $html.=filter_top_cards($icon[2],$title[2],$totalbadgecount,$color[2]);\n $html.=filter_top_cards($icon[3],$title[3],$totalcertificates,$color[3]);\n echo $html;\n}", "function fetch_bidcount_today($userid = 0)\n{\n global $ilance, $myapi;\n $bids = fetch_user('bidstoday', intval($userid));\n return (int)$bids;\n}", "function all_enrolled_usersdata_date($courseid){\n global $DB,$CFG;\n $allenrolleduser=enrol_get_course_users($courseid);\n $listofusers =[];\n foreach ($allenrolleduser as $user) {\n $listofusers[] = $user->uetimecreated;\n }\n sort($listofusers);\n return $listofusers;\n}", "public function get_total_premium_this_month(){\n $agent_result_set=$this->read_selective_agent(\"WHERE branch_manager_id=\".$_SESSION['id']);\n //generating the agent id constraint\n if($agent_result_set){\n $constraint_id=\" AND (\";\n while($agent_result=$agent_result_set->fetch_assoc()){\n $constraint_id=$constraint_id.\" agent_id=\".$agent_result['id'].\" OR\";\n }\n $constraint_id=substr($constraint_id,0,-2);\n $constraint_id=$constraint_id.\")\";\n }else{\n $constraint_id=\" AND FALSE\";\n }\n\n $year = date(\"Y\");\n $month=date('m');\n $date1=$year.'-'.$month.'-01';\n $date2=$year.'-'.($month).'-30';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\".$constraint_id);\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "function getUserComissions($data){\n global $conn;\n $stmt = $conn->prepare(\"SELECT affiliate_earns FROM users WHERE id = :userid LIMIT 1\");\n $stmt->bindParam(':userid', $data['uid']);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $affiliate = $stmt->fetchColumn();\n return $affiliate;\n}", "private static function fetchAvailableYears() {\r\n mysql_connect(\r\n Configuration :: db_host,\r\n Configuration :: db_username,\r\n Configuration :: db_password\r\n );\r\n mysql_select_db(Configuration :: db_schema);\r\n\r\n // query available years from database:\r\n $sql = \"SELECT distinct YEAR(datum) FROM leistung_kw ORDER BY 1 desc\";\r\n $result = mysql_query($sql); // XXX hardcoded table name\r\n if (! $result) {\r\n echo \"ERROR: \".mysql_error();\r\n }\r\n $years = array();\r\n\r\n for ($i = 0; ; $i++) {\r\n if ($row = $row = mysql_fetch_array($result, MYSQL_NUM)) {\r\n $years[$i] = $row[0];\r\n continue;\r\n }\r\n break;\r\n }\r\n\r\n return $years;\r\n }", "public function getCredits()\n {\n return $this->Credits;\n }", "function spend_credits( $spend = 1 ) {\n $credits = get_user_meta( get_current_user_id(), \"cja_credits\", true);\n\t$credits = $credits - $spend;\n\tupdate_user_meta( get_current_user_id(), \"cja_credits\", $credits);\n}", "function getAllUserCoin(){\n\tglobal $user;\n\n\t$AllCoin = array();\n\t$ClientCoins = array();\n\ttry {\n\t$result = db_select('ccdev_balance')\n\t\t ->fields('ccdev_balance', array('coin_code', 'coin_name', 'coin_balance'))\n\t\t ->condition('uid', $user->uid, '=')\n\t\t ->range(0,10) //max 10 results\n\t\t ->execute();\n\t } catch (exception $e) {\n\t\t watchdog('ccdev_balance', 'Could not query database: !fault', $e->getMessage());\n\t }\n\twhile ($rows = $result->fetchAssoc()) {\n\t if(is_array($rows) AND count($rows) > 0) { //check that object is array and populated\n\t\t if(isset($rows['coin_balance']) AND isset($rows['coin_code'])) {\n\t\t\t$ClientCoins[$rows['coin_code']]['coin_code'] = $rows['coin_code'];\n\t\t\t$ClientCoins[$rows['coin_code']]['coin_name'] = $rows['coin_name'];\n\t\t\t$ClientCoins[$rows['coin_code']]['coin_balance'] =$rows['coin_balance'];\n\t\t\tarray_push($AllCoin, $ClientCoins[$rows['coin_code']]); \n\t\t\t}\n\t\t}\n\t}\n\treturn $AllCoin;\n}", "public function get_availabilities($event_id, $user_id);", "public static function plannedUsers(){\n global $Database, $Session, $Core, $Logs;\n\n $output = '';\n if($Session->user_level<=UL_RCL){\n $where = $Session->filter_query(\"v.date>='\".date('Y-m-d').\"'\", '', 'pf', 'pf', 'v', 'pf');\n $where = !empty($where) ? 'WHERE '.$where : '';\n\n $q=\"SELECT pf.gender, pf.mandal, pf.region, pf.profile_id, CONCAT_WS(' ',pf.first_name,pf.last_name) AS name, (SELECT region FROM \".DB_PREFIX.\"centers WHERE center=v.center) AS center_region, v.center, v.sabha_type, v.date\n FROM \".DB_PREFIX.\"profiles AS pf LEFT JOIN \".DB_PREFIX.\"vicharans AS v ON pf.profile_id=v.profile_id \n $where \n ORDER BY gender DESC, mandal, region, name, v.date, center_region, center, v.sabha_type\";\n $result = $Database->result(array(__LINE__, __METHOD__, __FILE__), $q);\n\n if(count($result)>0){\n $b=$c=$d=$e=0;\n $old_gender_mandal=$old_region=$old_user='';\n for($a=0; $a<count($result); $a++){\n $row = $result[$a];\n // Mandal\n if($old_gender_mandal!=$row[\"gender\"].$row[\"mandal\"]){\n $output .= ($b>0) ? ']}]}]},' : '';\n $output .= '{\"mandal\":\"'.$Core->mandal_name($row[\"gender\"],$row[\"mandal\"]).'\",\"regions\":[';\n $b++;\n $c=$d=$e=0;\n $old_region=$old_user='';\n }\n // Region\n if($old_region!=$row[\"region\"]){\n $output .= ($c>0) ? ']}]},' : '';\n $output .= '{\"region\":\"'.$row[\"region\"].'\",\"users\":[';\n $c++;\n $d=$e=0;\n $old_user='';\n }\n // User\n if($old_user!=$row[\"profile_id\"]){\n $output .= ($d>0) ? ']},' : '';\n $output .= '{\"name\":\"'.$row[\"name\"].'\",\"planes\":[';\n $d++;\n $e=0;\n }\n $output .= ($e>0) ? ',' : '';\n $e++;\n $output .= '{\n \"region\":\"'.$row[\"center_region\"].'\",\n \"center\":\"'.$row[\"center\"].'\",\n \"date\":\"'.$Core->format_datetime($row[\"date\"],\"M d, Y\").'\",\n \"sabha_type\":\"'.$row[\"sabha_type\"].'\"\n }';\n \n $output .= ($a==(count($result)-1)) ? ']}]}]}' : '';\n $old_gender_mandal = $row[\"gender\"].$row[\"mandal\"];\n $old_region = $row[\"region\"];\n $old_user = $row[\"profile_id\"];\n }\n }\n }\n return '['.$output.']';\n }", "function getLockedUsers($date) {\n\n\t\t$query2 = \"SELECT DISTINCT `user_id_fk`\n\t\t\t\t\t\t\t FROM `approvals`\n\t\t\t\t\t\t\t WHERE locked = :end_date\";\n\n $locked_users = $this->db->select($query2, array( \"end_date\" => $date));\n\n\t\t//Get user names for ids and add to array\n\t\t$guide = new Guide();\n\t\tforeach ($locked_users as $key => $value) {\n\t\t\t$guide->set_guide_id($value['user_id_fk']);\n\t\t\t$name = $guide->getUserName();\n\t\t\t$locked_users[$key]['name'] = $name;\n\t\t}\n\n\t\t///Sort array alphabetically by First name\n\t\tusort($locked_users, function($a, $b) {\n\t return strcasecmp( $a['name'], $b['name'] );\n\t\t});\n\n\t\treturn $locked_users;\n \n\t}", "function checkIfMonthBooked($booking) {\n\n include './include/connect_db.php';\n\n /* User email to compare with the row usr_email on the request */\n $curr_user_email = $_SESSION['SESS_MEMBER_ID'];\n \n /* Query database for ticket requests by the logged user */\n $query = \"SELECT * FROM txs_request where usr_email like '%$curr_user_email%'\";\n\n $result = $conn->query($query);\n if (!$result) die (\"Database access failed: \" . $conn->error);\n\n $rows = $result->num_rows;\n for ($j = 0 ; $j < $rows ; ++$j)\n {\n $result->data_seek($j);\n $row = $result->fetch_array(MYSQLI_NUM);\n if ($booking == $row[1])\n echo \"month_booked\"; \n }\n $result->close();\n $conn->close();\n}", "function getAvailableCount()\n {\n $db = \\UNL\\VisitorChat\\Controller::getDB();\n \n $sql = \"SELECT count(id) as total \n FROM users \n WHERE status = 'AVAILABLE' AND (false \";\n \n foreach ($this->getMembers() as $member) {\n if (!$member->canOperate()) {\n continue;\n }\n \n $sql .= \"OR uid = '\" . $db->escape_string($member->getUID()) . \"' \";\n }\n \n $sql .= \");\";\n \n if ($result = $db->query($sql)) {\n $row = $result->fetch_assoc();\n \n if (isset($row['total'])) {\n return $row['total'];\n }\n }\n \n return 0;\n }", "function getAccountingsBeforeDate($userID, $date) {\n\n $stmt = mysqli_prepare($this->con, \"SELECT * FROM Accounting WHERE UserID = ? AND Date < ?;\");\n $stmt->bind_param(\"is\", $userID, $date);\n $stmt ->execute();\n return $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n }", "function erp_hr_leave_get_balance( $user_id, $date = null ) {\n global $wpdb;\n\n $query = \"select en.id, en.leave_id, en.day_in, en.f_year, fy.start_date, fy.end_date, l.name as policy_name\";\n $query .= \" from {$wpdb->prefix}erp_hr_leave_entitlements as en\";\n $query .= \" LEFT JOIN {$wpdb->prefix}erp_hr_financial_years as fy on fy.id = en.f_year\";\n $query .= \" LEFT JOIN {$wpdb->prefix}erp_hr_leaves as l on l.id = en.leave_id\";\n $query .= \" where user_id = %d and trn_type='leave_policies'\";\n\n if ( $date === null ) {\n $financial_year = erp_hr_get_financial_year_from_date();\n $date = ! empty( $financial_year ) ? $financial_year->id : null;\n }\n\n if ( $date !== null ) {\n $query .= \" and fy.id = \" . absint( $date );\n }\n\n $results = $wpdb->get_results( $wpdb->prepare( $query, $user_id ) );\n\n $balance = [];\n\n if ( ! empty( $results ) ) {\n foreach ( $results as $result ) {\n $days_count = $wpdb->get_row(\n $wpdb->prepare(\n \"SELECT sum(day_in) as day_in, sum(day_out) as day_out FROM {$wpdb->prefix}erp_hr_leave_entitlements WHERE user_id = %d AND leave_id = %d and f_year = %d \",\n array( $user_id, $result->leave_id, $result->f_year )\n ),\n ARRAY_A\n );\n\n if ( is_array( $days_count ) && ! empty( $days_count ) ) {\n $day_in = floatval( $days_count['day_in'] );\n $day_out = floatval( $days_count['day_out'] );\n\n // check for extra leave\n $extra_leave = 0 ;\n $available = $day_in - $day_out;\n if ( $available == 0 ) {\n $extra_leave = $wpdb->get_var(\n $wpdb->prepare(\n \"SELECT sum(day_in) as day_in FROM {$wpdb->prefix}erp_hr_leave_entitlements WHERE user_id = %d AND leave_id = %d and f_year = %d AND trn_type = %s\",\n array( $user_id, $result->leave_id, $result->f_year, 'unpaid_leave' )\n )\n );\n $extra_leave = null === $extra_leave ? 0 : $extra_leave;\n }\n\n // total spent\n $leave_spent = 0;\n if ( $date !== null ) {\n $financial_year = Financial_Year::find( $date );\n $leave_spent = $wpdb->get_var(\n $wpdb->prepare(\n \"SELECT sum(rq.days) FROM {$wpdb->prefix}erp_hr_leave_requests as rq\n WHERE rq.user_id = %d AND rq.leave_id = %d AND rq.last_status = %d AND rq.start_date BETWEEN %d AND %d\",\n array( $user_id, $result->leave_id, 1, $financial_year->start_date, $financial_year->end_date )\n )\n );\n\n\n $leave_spent = null === $leave_spent ? 0 : $leave_spent;\n }\n\n $balance[ $result->leave_id ] = array(\n 'entitlement_id' => $result->id,\n 'days' => $result->day_in,\n 'from_date' => $result->start_date,\n 'to_date' => $result->end_date,\n 'leave_id' => $result->leave_id,\n 'policy_id' => $result->id,\n 'policy' => $result->policy_name,\n 'scheduled' => 0,\n 'entitlement' => $result->day_in,\n 'total' => $day_in,\n 'available' => $available,\n 'extra_leave' => $extra_leave,\n 'day_in' => $day_in,\n 'day_out' => $day_out,\n 'spent' => $leave_spent,\n );\n }\n }\n }\n\n return $balance;\n}", "function get_all_users_info($request) { #API\r\n if(!validate_request($request)) {\r\n return invalid_request_response();\r\n }\r\n\r\n $out = array();\r\n\r\n // Get all the plans (so we can put their names & slugs into the results without looking up each time)\r\n $plans_in = wc_memberships_get_membership_plans();\r\n $plans = array();\r\n foreach($plans_in as $plan)\r\n $plans[$plan->id] = $plan;\r\n\r\n foreach(get_users() as $user) {\r\n $umeta = get_user_meta($user->ID);\r\n $meta = array();\r\n\r\n // List of fields from user metadata that we'd like to pull\r\n$fields = array('nickname','description','wp_capabilities','wp_user_level','ing_phone','ing_email','member_rfid','member_door_code','amt_membership_legal','amt_status_handle','membership_date','membership_agreement_date','liability_waiver_date','has_taken_laser_class','twitter_handle','billing_first_name','billing_last_name','billing_company','billing_address_1','billing_address_2','billing_city','billing_postcode','billing_country','billing_state','billing_phone','billing_email','shipping_first_name','shipping_last_name','shipping_company','shipping_address_1','shipping_address_2','shipping_city','shipping_postcode','shipping_country','shipping_state','account_status','role','_stripe_customer_id','_order_count','_money_spent','paying_customer');\r\n foreach($fields as $field) {\r\n if(isset($umeta[$field]))\r\n if(is_array($umeta[$field]))\r\n $meta[$field] = $umeta[$field][0];\r\n else\r\n $meta[$field] = $umeta[$field];\r\n }\r\n\r\n // List of fields from the user object we'd like to pull\r\n $fields = array('ID','user_login','user_nicename','user_email','user_url','display_name','first_name','last_name');\r\n foreach($fields as $field)\r\n if(isset($user, $field))\r\n $meta[$field] = $user->{$field};\r\n\r\n // Get this guy's WC memberships\r\n $uplans_in = wc_memberships_get_user_memberships($user->ID);\r\n $uplans = array();\r\n\r\n // Pull out the data for each plan that we are interested in\r\n foreach($uplans_in as $uplan_in) {\r\n $uplan = array();\r\n $uplan['id'] = $uplan_in->plan_id;\r\n $uplan['status'] = $uplan_in->get_status();\r\n $uplan['name'] = $plans[$uplan_in->plan_id]->name;\r\n $uplan['slug'] = $plans[$uplan_in->plan_id]->slug;\r\n $uplan['end'] = $uplan_in->get_end_date('timestamp');\r\n $uplans[] = $uplan;\r\n }\r\n\r\n $meta['plans'] = $uplans;\r\n $out[] = $meta;\r\n }\r\n\r\n return $out;\r\n}", "public function get_total_premium_this_year(){\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=$year.'-01-01';\n $date2=($year+1).'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\");\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "public function get_total_premium_this_year(){\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=$year.'-01-01';\n $date2=($year+1).'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\");\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "function courserequest()\r\n\t{\r\n\t\tglobal $conn;\r\n\t\t$sql = \"SELECT * FROM `coursechange`\";\r\n\t\t$result = mysqli_query($conn, $sql);\r\n\t\t$requests = mysqli_fetch_all($result, MYSQLI_ASSOC);\r\n\t\treturn $requests;\r\n\t}", "public function available($user) {\n if($this->locked) {\n return false;\n } else {\n return $user->isPremium() || !$this->premium;\n }\n }", "private function getUserCaches(){\n $rs = $this->db->multiVariableQuery(\n \"SELECT c.cache_id, name, chowner.id AS adoptionOfferId, username AS offeredToUserName\n FROM caches AS c LEFT JOIN chowner\n ON chowner.cache_id = c.cache_id\n LEFT JOIN user ON chowner.user_id = user.user_id\n WHERE c.user_id= :1\n AND status <> 4\n ORDER BY name\",\n $this->loggedUser->getUserId() );\n\n return $this->db->dbResultFetchAll($rs);\n }", "function get_others_pending($user_id)\n{\n}" ]
[ "0.67092943", "0.64648336", "0.6356664", "0.6273839", "0.626176", "0.6161771", "0.61024487", "0.60285026", "0.6015536", "0.59755176", "0.59735906", "0.596426", "0.59549516", "0.58732414", "0.5850787", "0.5813026", "0.58115196", "0.58063614", "0.58050597", "0.5799658", "0.5772536", "0.5768187", "0.5757596", "0.57482624", "0.57333267", "0.57124287", "0.57040185", "0.5702169", "0.5701798", "0.56988066", "0.56817937", "0.56780267", "0.56751764", "0.56678736", "0.5655601", "0.5641122", "0.56317955", "0.56314147", "0.56243384", "0.5620883", "0.5576425", "0.5575805", "0.5568844", "0.556075", "0.5553816", "0.5553708", "0.5552512", "0.5546414", "0.5539331", "0.55196965", "0.551558", "0.55047774", "0.55023867", "0.5493457", "0.549215", "0.548335", "0.5475884", "0.5472003", "0.54548395", "0.5454661", "0.5450059", "0.5443716", "0.54430544", "0.5438692", "0.54386157", "0.543173", "0.54257554", "0.5413368", "0.5407116", "0.5399661", "0.53949857", "0.5388632", "0.53862333", "0.5379888", "0.5378785", "0.5371415", "0.53650594", "0.53457654", "0.5340804", "0.53341556", "0.53294027", "0.5327033", "0.5321275", "0.53192246", "0.5317485", "0.53166044", "0.53035694", "0.5298583", "0.52974254", "0.5292472", "0.52875566", "0.5284078", "0.5283888", "0.5280762", "0.52750576", "0.52750576", "0.52687436", "0.52653164", "0.52572453", "0.52567923" ]
0.7231521
0
Function to fetch user voff id from clientid February 04,2017
Функция для получения идентификатора voff пользователя из clientid 04 февраля 2017 года
function getUserVOfffromENId($userID) { $qry="SELECT vof_clientid FROM entrp_login WHERE clientid=".$userID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['vof_clientid']; } return $id; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserID();", "function getClientID( $client ) {\n\t\tswitch ($client) {\n\t\t\tcase '2':\n\t\t\tcase 'installation':\n\t\t\t\treturn 2;\n\t\t\t\tbreak;\n\n\t\t\tcase '1':\n\t\t\tcase 'admin':\n\t\t\tcase 'administrator':\n\t\t\t\treturn 1;\n\t\t\t\tbreak;\n\n\t\t\tcase '0':\n\t\t\tcase 'site':\n\t\t\tcase 'front':\n\t\t\tdefault:\n\t\t\t\treturn 0;\n\t\t\t\tbreak;\n\t\t}\n\t}", "Public function get_idclient() \r\n \r\n {\r\n Return $this -> idclient;\r\n }", "function vcn_get_cma_userid_ajax_callback(){\r\n\tvcnuser_get_user_cma_info(true);\r\n\r\n\tglobal $user_info;\t\r\n\techo $user_info['vcn_user_id'];\t \r\n}", "public function getApvevendid()\n {\n return $this->apvevendid;\n }", "public function getUserID ();", "function getUserIdfromUserName($userName)\n{\n\t\n\t$qry=\"SELECT clientid FROM entrp_login \n\t\t\tWHERE username='\".$userName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function getVersiondId() {}", "function get_visa_booking_id($visa_id, $year){\n global $app_version;\n $year = ($year == '') ? $app_version : $year;\n return 'VS/'.$year.'/'.$visa_id; \n}", "private function Get_Client_Id()\n\t{\n\t\t$start_date = $this->process_date . '000000';\n\t\t$end_date = $this->process_date . '235959';\n\n\t\t$status_query = \"\n\t\t\tSELECT client_identifier\n\t\t\t FROM ecld_file\n\t\t\t WHERE date_created BETWEEN '{$start_date}'\n\t\t\t AND '{$end_date}'\n\t\t\t\";\n\n\t\t$st = $this->db->query($status_query);\n\n\t\tswitch($st->rowCount())\n\t\t{\n\t\t\tcase 1:\n\t\t\t\treturn $st->fetchColumn(0);\n\t\t\tcase 0:\n\t\t\t\tthrow new Exception( \"Deposit file sent for \" . $this->process_date . \", but no ecld_file entry found!\" );\n\t\t\tdefault:\n\t\t\t\tthrow new Exception( \"More than 1 ecld_file entry found for \" . $this->process_date . '.' );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static function getOfficerID()\r\n\t{\r\n\t\t//find the current logged in user in the tbl_users table\r\n\t\t$_user = Users::model()->findByPk(Yii::app()->user->id);\r\n\t\treturn (int) $_user->officer_id;\r\n\t}", "public function getClientID(){\n return $this->getParameter('clientID');\n }", "function getCurrentUserId() ;", "public function get_id( $user ) {\n \t$connection = parent::connect();\n\t$query = (\"SELECT vdl_user.id\n\t \t\t\tFROM `vdl_user` \n\t \t\t\tWHERE `email` LIKE '$user' OR `nick` LIKE '$user'\");\n\t\t\t \n\t$result = $connection->query($query);\n\t$arresult=array();\n\tif (!$result) {\n\t\t$message = 'Invalid query: ' . mysql_error() . \"\\n\";\n\t\t$message = $message . ' Whole query: ' . $query;\n\t\tdie($message);\n\t\treturn false;\n\t}\n\telse{\n\t\twhile ($row = $result->fetch_array()) {\n\t\t\tarray_push($arresult,$row[0]);\n\t\t}\n\t\treturn $arresult[0];\n\t}\n }", "function ge_vendor_request_id($request_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'VQR/'.$year.'/'.$request_id; }", "function clients_id_getData($ctlData,$clientID) {\t\t\n\treturn $clientID;\n}", "function make_user_id( &$res ) {\n\t\treturn $res->val_user == 0 ? $res->val_ip : $res->val_user;\n\t}", "function get_pilot_callsign($userid) {\n\t\n\t\tif (env('VAMAPI_USER_MAP',false) == \"true\") {\n\n\t\t\t$user = app('db')->select(\"select vam_id from vamapi_user_map where external_id=:pilot\",['pilot'=>$userid]);\n\t\t\treturn $user[0]->vam_id;\n\t\t\n\t\t} else {\n\t\t\n\t\t\treturn $userid;\n\t\t\t\n\t\t}\n\t\n\t}", "function getUserIdFromStatus ()\n\t\t{\n\t\tsession_start();\n\t\t\n\t\t$u = $_POST['user'];\n\t\t\n\t\t\n\t\tFoodNutrientsAnalyzer::oldDb();\n\t\t$result = mysql_query(\"SELECT * FROM user WHERE username='$u'\");\n\t\t\t\t\n\t\t\t\twhile($row = mysql_fetch_array($result))\n\t\t\t\t{ \n\t\t\t\t\n\t\t\t\t $x = $row['id'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $x;\n\t\t\n\t\t}", "function getClientId($username){\r\n\t\r\n\t$sel=\"select staffacc_contact.username from staffacc_contactacc,staffacc_contact where staffacc_contactacc.con_id=staffacc_contact.sno and staffacc_contactacc.username = '\".$username.\"'\";\r\n\t$ressel=mysql_query($sel,$this->db);\r\n\t$rssel=mysql_fetch_row($ressel);\r\n\r\n\t$clSelsql = \"SELECT sno from staffacc_cinfo WHERE type IN ('CUST', 'BOTH') AND username='\".$rssel[0].\"'\";\r\n\t$resselSno=mysql_query($clSelsql,$this->db);\r\n\t$rsselSno=mysql_fetch_row($resselSno);\r\n\t$Cval=$rsselSno[0];\r\n\treturn $Cval;\r\n }", "public function getClientVd()\n {\n return $this->client_vd;\n }", "function getClientById($clientId) {\n $db = phpmotorsConnect();\n $sql = 'SELECT clientId, clientFirstname, clientLastname,\n clientEmail, clientLevel, clientPassword\n FROM clients WHERE\n clientId = :clientId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':clientId',$clientId,PDO::PARAM_INT);\n $stmt->execute();\n $clientData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientData;\n}", "function get_user_id() {\n\n\t\tglobal $wpdb;\n\n\t\t$table = $this->make_table_name();\n\t\t$data = $wpdb->get_results( \"SELECT user_id FROM {$table};\" );\n\t\t\n\t\treturn $data;\n\t}", "public function get_cus_id() {\n $db = GetGlobal('db');\n\t\t$UserName = GetGlobal('UserName');\t\t\n\t\t$user = decode($UserName);\n\n\t $sSQL = \"select id from customers where active=1 and code2=\" . $db->qstr($user);\n\t\t$res = $db->Execute($sSQL,2);\n\t\t\n\t\treturn ($res->fields['id']);\t\t\n\t}", "function getClientById($clientId){\n $db = acmeConnect();\n $sql = 'SELECT clientId, clientFirstname, clientLastname, clientEmail, clientLevel, clientPassword FROM clients WHERE clientId = :clientId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_INT);\n $stmt->execute();\n $clientData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientData;\n}", "abstract protected function getOauthUserId();", "function getUserID(){\n return 1;\n}", "private function generateClientIdentificationNumber() : string {\n return generateUUIDVersion5(env('APP_URL'));\n }", "function getUserId()\n\t{\n\t\t$prism_id = mysql_real_escape_string(getPrismId());\n\t\t$row = getDBResultRecord(\"\n\t\t\tSELECT user_id \n\t\t\tFROM user_table \n\t\t\tWHERE prism_id='$prism_id';\n\t\t\");\n\t\t\n\t\tif(sizeof($row) == 0)\n\t\t{\n\t\t\t$GLOBALS[\"_PLATFORM\"]->sandboxHeader('HTTP/1.1 404 Not Found');\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t$user_id = $row['user_id'];\n\t\treturn $user_id;\n\t}", "function getCompanyName($clientId)\n{\n $sqlCompany = \"SELECT NomSociete FROM webcontrat_client WHERE id='$clientId'\";\n $rowCompany = querySQL($sqlCompany, $GLOBALS['connectionR'], true, true);\n $companyName = $rowCompany['NomSociete'];\n return ($companyName);\n}", "function getEventHostFromEVENTID($eventId)\n{\n\t//SELECT clientid FROM entrp_events WHERE id=1\n\t$qry=\"SELECT clientid FROM entrp_events \n\t\t\tWHERE id='\".$eventId.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getAffiliatedId() {\n\t\t$user = $_SESSION[\"loginAffiliateUser\"];\n\t\treturn $user->getAffiliateId();\n\t}", "function calendarview_getSelectedUserId()\n{\n\t$currentUser = Users_Privileges_Model::getCurrentUserModel();\n\t$onlyForUser = htmlspecialchars(strip_tags(AppRequest::getForSql('onlyforuser')), ENT_QUOTES, AppConfig::main('default_charset'));\n\tif ($onlyForUser == '')\n\t\t$onlyForUser = $currentUser->id;\n\treturn $onlyForUser;\n}", "function getUserId($maxid,$name)\n {\n //$finalString = substr($name,0,2).$mobileNo[8].$firstPart.$mobileNo[0] ;\n $day = date(\"d\"); \n $month = date(\"m\"); \n $finalString = \"HM\".substr($name,0,2).$day.\"\".$month.\"\".$maxid;\n return $finalString; \n }", "function get_appv_user_event($req_id,$wflow_id,$stp_id){\n\t\t$conn = $GLOBALS['conn'];\n\t\t$ug_tbl_app = json_decode(get_appv_members($req_id, $wflow_id, $stp_id));\n\t\t$userTaskapprv = (isset($ug_tbl_app->ug_members)) ? $ug_tbl_app->ug_members : 'xxx';\n\t\t$wrapped='\"'.str_replace(',','\",\"',$userTaskapprv).'\"';\t\n\n\t\t$statuses = array(\"Approved\", \"Confirmed\");\n\t\t$status = '\"' . implode('\",\"', $statuses) . '\"';\n\t\n//\n\t\t$sql = \"SELECT count(id) as cid FROM fs_request_task_approver WHERE \n\t\t rq_no = '$req_id' AND steps_id = '$stp_id' AND approver_id IN($wrapped)\";\n\t\t//echo $sql;\n\t\t$query = $conn->query($sql);\n\t\t$row = $query->fetch_assoc();\n\t\t$countFilter = (isset($row['cid'])) ? $row['cid'] : 0;\n\t\treturn $countFilter; //json_encode($row);\n\t\t$conn->close();\n\t\t//return $genCode;\n}", "function get_user_id() {\n // not pretty but just a proof of concept\n return 1; // just hard code the admin for illustration\n }", "function vcex_unique_id( $id = '' ) {\n\techo vcex_get_unique_id( $id );\n}", "function fetch_info_from_entrp_login($clientid)\n{\n\t$data = array();\t\t\n\t$qry=\"SELECT *\n\t\t\tFROM entrp_login as L\n\t\t\tWHERE L.clientid=\".$clientid.\"\n\t \";\n\t$res = getData($qry);\n $count_res = mysqli_num_rows($res);\n\tif($count_res > 0)\n {\n \twhile($row = mysqli_fetch_array($res))\n {\n \t$data['clientid'] \t= $row['clientid'];\n \t$data['username'] \t= $row['username'];\n \t$data['email'] \t\t= $row['email'];\n \t$data['firstname'] \t= $row['firstname'];\n \t$data['lastname'] \t= $row['lastname'];\n \t$data['voffStaff']\t= $row['voff_staff'];\n\t\t\t$data['vofClientId']\t= $row['vof_clientid'];\t\t\t \t\n\t\t\t\n\t\t\t$data['success'] = 'true';\n\t\t}\n }\n else\n {\n \t$data['success'] = 'false';\n\t}\n return $data;\n}", "function ajan_activity_user_id() {\n\techo ajan_get_activity_user_id();\n}", "public function getClientVdCode()\n {\n return $this->client_vd_code;\n }", "public function getClientId(): string\n {\n return 'CFkMVkzRPM';\n }", "function get_enrolement_date_user($courseid,$userid){\n global $DB,$CFG;\n $allenrolleduser= enrol_get_course_users($courseid);\n\n foreach ($allenrolleduser as $user) {\n if($userid ==$user->id){\n return $user->uetimecreated;\n }\n }\n}", "abstract protected function getUserId() ;", "function getNameDataBaseClient($user,$conn){\r\n $sql = \"SELECT master_cliente.nombre_db FROM master_asign_cliente_user,master_cliente WHERE master_asign_cliente_user.cliente = master_cliente.id_master_cliente AND username = \".$user;\r\n $result = mysqli_query($conn,$sql);\r\n mysqli_data_seek($result,0);\r\n $id_cliente_get = mysqli_fetch_array($result);\r\n $id_cliente = $id_cliente_get['cliente'];\r\n return $id_cliente;\r\n }", "public function getId_client()\n {\n return $this->id_client;\n }", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getClientById($clientId) {\n // Create database connection\n $db = acmeConnect();\n // SQL statement selecting client info matching logged in email address\n $sql = 'SELECT * \n FROM clients \n WHERE clientId = :clientId';\n // Create the prepared statment using the acme connection\n $stmt = $db->prepare($sql);\n // Bind variable to value for email address\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_STR);\n // Execute statement\n $stmt->execute();\n // Set variable matchEmail to the value(s) returned from SQL execution\n $clientData = $stmt->fetch(PDO::FETCH_ASSOC);\n // Close DB connection\n $stmt->closeCursor();\n // Return $clientData values\n return $clientData;\n}", "public function obtenerID();", "public function getClientId(): string;", "public function getCveId()\n {\n return $this->cveid;\n }", "function get_prvdid($uname)\n{\n$aquery = mysql_query(\"Select * FROM tbl_services WHERE sno='$uname'\") or die(\"user check error \".mysql_error());\n$row = mysql_fetch_array($aquery);\n$nrow = mysql_num_rows($aquery);\n$upass = $row['prvd_id'];\n\nreturn $upass;\n}", "function getVerlag(){\n return (int)$this -> data ->field_verlag['und'][0]['uid'];\n }", "public function getClientId();", "public function getClientId();", "public function getClientId();", "function get_forex_booking_id($booking_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'FB/'.$year.'/'.$booking_id; }", "function gnfe_customer($user_id, $client) {\n\t\t$CPF_id = gnfe_config('cpf_camp');\n\t\t$CNPJ_id = gnfe_config('cnpj_camp');\n\t\t$insc_municipal_id = gnfe_config('insc_municipal');\n\n\t\t$insc_customfield_value = 'NF';\n\t\t// insc_municipal\n\t\tif ($insc_municipal_id != 0) {\n\t\t\tforeach (Capsule::table('tblcustomfieldsvalues')->where('fieldid', '=', $insc_municipal_id)->where('relid', '=', $user_id)->get(['value']) as $customfieldvalue) {\n\t\t\t\t$insc_customfield_value = $customfieldvalue->value;\n\t\t\t}\n\t\t}\n\t\t// cpf\n\t\tif ($CPF_id != 0) {\n\t\t\tforeach (Capsule::table('tblcustomfieldsvalues')->where('fieldid', '=', $CPF_id)->where('relid', '=', $user_id)->get(['value']) as $customfieldvalue) {\n\t\t\t\t$cpf_customfield_value = preg_replace('/[^0-9]/', '', $customfieldvalue->value);\n\t\t\t}\n\t\t}\n\t\t//cnpj\n\t\tif ($CNPJ_id != 0) {\n\t\t\tforeach (Capsule::table('tblcustomfieldsvalues')->where('fieldid', '=', $CNPJ_id)->where('relid', '=', $user_id)->get(['value']) as $customfieldvalue) {\n\t\t\t\t$cnpj_customfield_value = preg_replace('/[^0-9]/', '', $customfieldvalue->value);\n\t\t\t}\n\t\t}\n\t\tlogModuleCall('gofas_nfeio', 'gnfe_customer-cpf', $cpf_customfield_value, '', '', '');\n\t\tlogModuleCall('gofas_nfeio', 'gnfe_customer-cnpj', $cnpj_customfield_value, '', '', '');\n\t\tlogModuleCall('gofas_nfeio', 'gnfe_customer-municipal', $insc_customfield_value, '', '', '');\n\n\t\t// Cliente possui CPF e CNPJ\n\t\t// CPF com 1 nº a menos, adiciona 0 antes do documento\n\t\tif (strlen($cpf_customfield_value) === 10) {\n\t\t\t$cpf = '0' . $cpf_customfield_value;\n\t\t}\n\t\t// CPF com 11 dígitos\n\t\telseif (strlen($cpf_customfield_value) === 11) {\n\t\t\t$cpf = $cpf_customfield_value;\n\t\t}\n\t\t// CNPJ no campo de CPF com um dígito a menos\n\t\telseif (strlen($cpf_customfield_value) === 13) {\n\t\t\t$cpf = false;\n\t\t\t$cnpj = '0' . $cpf_customfield_value;\n\t\t}\n\t\t// CNPJ no campo de CPF\n\t\telseif (strlen($cpf_customfield_value) === 14) {\n\t\t\t$cpf = false;\n\t\t\t$cnpj = $cpf_customfield_value;\n\t\t}\n\t\t// cadastro não possui CPF\n\t\telseif (!$cpf_customfield_value || strlen($cpf_customfield_value) !== 10 || strlen($cpf_customfield_value) !== 11 || strlen($cpf_customfield_value) != 13 || strlen($cpf_customfield_value) !== 14) {\n\t\t\t$cpf = false;\n\t\t}\n\t\t// CNPJ com 1 nº a menos, adiciona 0 antes do documento\n\t\tif (strlen($cnpj_customfield_value) === 13) {\n\t\t\t$cnpj = '0' . $cnpj_customfield_value;\n\t\t}\n\t\t// CNPJ com nº de dígitos correto\n\t\telseif (strlen($cnpj_customfield_value) === 14) {\n\t\t\t$cnpj = $cnpj_customfield_value;\n\t\t}\n\t\t// Cliente não possui CNPJ\n\t\telseif (!$cnpj_customfield_value and strlen($cnpj_customfield_value) !== 14 and strlen($cnpj_customfield_value) !== 13 and strlen($cpf_customfield_value) !== 13 and strlen($cpf_customfield_value) !== 14) {\n\t\t\t$cnpj = false;\n\t\t}\n\t\tif (($cpf and $cnpj) or (!$cpf and $cnpj)) {\n\t\t\t$custumer['doc_type'] = 2;\n\t\t\t$custumer['document'] = $cnpj;\n\t\t\tif ($client['companyname']) {\n\t\t\t\t$custumer['name'] = $client['companyname'];\n\t\t\t} elseif (!$client['companyname']) {\n\t\t\t\t$custumer['name'] = $client['firstname'] . ' ' . $client['lastname'];\n\t\t\t}\n\t\t} elseif ($cpf and !$cnpj) {\n\t\t\t$custumer['doc_type'] = 1;\n\t\t\t$custumer['document'] = $cpf;\n\t\t\t$custumer['name'] = $client['firstname'] . ' ' . $client['lastname'];\n\t\t}\n\t\tif ($insc_customfield_value != 'NF') {\n\t\t\t$custumer['insc_municipal'] = $insc_customfield_value;\n\t\t}\n\t\tif (!$cpf and !$cnpj) {\n\t\t\t$error = 'CPF e/ou CNPJ ausente.';\n\t\t}\n\t\tif (!$error) {\n\t\t\treturn $custumer;\n\t\t}\n\t\tif ($error) {\n\t\t\treturn $custumer['error'] = $error;\n\t\t}\n\t}", "public function getClientId()\n {\n // The internal id and the return company id are hard coded\n if($this->internalId == 3) {\n return 348;\n }\n }", "function get_visa_supplier_payment_id($payment_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'VSP/'.'/P/'.$payment_id; }", "function get_current_user_id()\n{\n}", "function get_client_index( $user_id ) {\r\n\t\tfor ( $client_index = 0; $client_index < count( $this->client ); $client_index++ ) {\r\n\t\t\tif ( $this->client[ $client_index ]['user_id'] == $user_id ) {\r\n\t\t\t\treturn $client_index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "function idofuser(){\n\t\tif(isset($_SESSION['useridshop']))\n\t\t\t{$userofid = $_SESSION['useridshop']; return($userofid);}}", "public function getCurrentClientId();", "public static function userID($ippis){\n $user = static::where('payment_number', '=', $ippis)\n ->where('status', '=', 'Active')\n ->first();\n $id = $user->id;\n if($id !='' && $id!=0){\n return $id;\n }else{\n return 0;\n }\n\n }", "protected function getUserId() {}", "public function getId(){\n\t\treturn $this->perfileswebuser->getId_user();\n\t}", "protected function getUserId() {}", "public function getUserCarReservationId()\n {\n return parent::getValue('user_car_reservation_id');\n }", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "public function userId(): int;", "public function getOid();", "function getParticipantId($user_id)\n {\n $db=Frd::getDb(); \n $select=$db->select();\n\n $select->from($this->table,$this->primary);\n $select->where('userId=?',$user_id);\n $select->limit(1);\n\n\n $id= $db->fetchOne($select);\n if($id == false)\n $id=0;\n\n return $id;\n }", "public function getUserid () {\t\t\t\n\t\treturn $this->DataUser['userid'];\t\t\n\t}", "private function getCustomerId()\n {\n $query = $this->db->query(\"SELECT customer_id FROM api_customer_access WHERE customer_security_code = '\".$this->customer_security_code.\"'\");\n if( $query->num_rows!= 0 )\n {\n foreach( $query->rows as $result )\n {\n $this->customer_id = $result['customer_id'];\n }\n }\n\n return $this->customer_id;\n }", "function hosting_get_client_from_user($uid) {\n $clients = array();\n if ($results = db_query(\"SELECT client, contact_type FROM {hosting_client_user} WHERE user = :user\", array(':user' => $uid))) {\n foreach ($results as $result) {\n $clients[$result->client] = explode(',', $result->contact_type);\n }\n }\n return $clients;\n}", "function fetch_project_ownerid($projectid = 0)\n{\n global $ilance, $myapi;\n $sql = $ilance->db->query(\"SELECT user_id FROM \" . DB_PREFIX . \"projects WHERE project_id = '\".intval($projectid).\"' LIMIT 1\", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return $res['user_id'];\n }\n return 0;\n}", "function rfid_for_user( $user_id ) { #API2\r\n // $args = array( 'meta_key' => 'member_rfid', 'user_id' => $user_id );\r\n // $user_query = new WP_User_Query( $args ); \r\n // $rfid = $user_query->results;\r\n $rfid = get_user_meta($user_id, 'member_rfid', true);\r\n return $rfid; \r\n}", "public function getClient_id()\n {\n return $this->client_id;\n }", "function get_passport_booking_id($passport_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'PS/'.$year.'/'.$passport_id; }", "function fetch_user_information_from_id($clientid)\n{\n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\t\n\t$data= array();\t\t\n\t/*\n\tSELECT client_info.clientid,client_info.firstname,client_info.lastname,client_info.city,client_info.country,client_info.email,\n\t\t\t client_profile.avatar,client_profile.cover_pic,client_profile.designation,client_profile.mobile,client_profile.website,client_profile.about_me,\n\t\t\t location_info.location_desc,company_profiles.company_name,company_profiles.description\n\tFROM client_info\n\tLEFT JOIN client_profile ON client_info.clientid=client_profile.clientid\n\tLEFT JOIN location_info ON location_info.id=client_profile.client_location\n\tLEFT JOIN company_profiles ON company_profiles.clientid=client_info.clientid\n\t*/\n\n /*\n $qry=\"SELECT entrp_login.clientid,entrp_login.username,entrp_login.firstname,entrp_login.lastname,client_profile.city,client_profile.country,client_profile.contact_email,\n\t\t\t \t\t client_profile.avatar,client_profile.cover_pic,client_profile.designation,client_profile.mobile,client_profile.website,client_profile.about_me,\n\t\t\t \t\t client_profile.secondary_mobile,\n\t\t\t \t\t location_info.location_desc,\n\t\t\t \t\t company_profiles.company_name,company_profiles.description\n\t\t\tFROM entrp_login\n\t\t\tLEFT JOIN client_profile ON entrp_login.clientid=client_profile.clientid\n\t\t\tLEFT JOIN location_info ON location_info.id=client_profile.client_location\n\t\t\tLEFT JOIN company_profiles ON company_profiles.clientid=entrp_login.clientid\n\t\t\tWHERE entrp_login.clientid=\".$clientid.\"\n\t \";\n\t */\n\t$qry=\"SELECT entrp_login.clientid,entrp_login.username,entrp_login.firstname,entrp_login.lastname,client_profile.city,client_profile.country,client_profile.contact_email,\n\t\t\t \t\t client_profile.avatar,client_profile.cover_pic,client_profile.designation,client_profile.mobile,client_profile.website,client_profile.about_me,\n\t\t\t \t\t client_profile.secondary_mobile,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM entrp_login\n\t\t\tLEFT JOIN client_profile ON entrp_login.clientid=client_profile.clientid\n\t\t\tLEFT JOIN location_info ON location_info.id=client_profile.client_location\n\t\t\tWHERE entrp_login.clientid=\".$clientid.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$data['id']\t\t\t\t=\t$row['clientid'];\n \t\n\t\t\tif(!empty($row['avatar']))\n \t{\n \t\t$data['avatar']\t\t\t\t=\t$row['avatar'];\n \t}\n \telse\n \t{\n \t\t$data['avatar']\t\t\t\t=\t$member_default_avatar;\n \t}\n \t\n\t\t\tif(!empty($row['cover_pic']))\n \t{\n \t\t$data['coverPhoto']\t\t\t=\t$row['cover_pic'];\n \t}\n \telse\n \t{\n \t\t$data['coverPhoto']\t\t\t=\t$member_default_cover;\n \t}\n \t\n\t\t\t$data['firstName'] \t= \t$row['firstname'];\n\t\t\t$data['lastName'] \t= \t$row['lastname'];\n\t\t\t$data['position'] \t= \t$row['designation'];\n\t\t\t$data['city'] \t\t\t= \t$row['city'];\n\t\t\t\n\t\t\t$data['aboutMe'] \t\t= $row['about_me'];\n\t\t\t$data['email'] \t\t= $row['contact_email'];\n\t\t\t$data['website'] \t\t= $row['website'];\n\t\t\t$data['mobile'] \t\t= $row['mobile'];\n\t\t\t$data['tel'] \t\t\t= $row['secondary_mobile'];\n\t\t\t$data['userName']\t\t=\t$row['username'];\n\n\t\t\t$data['success'] = true;\n\t\t\t$data['msg'] = 'Profile fetched';\n\t\t}\n\n\t\t$companyID\t=\tgetCompanyIDFromCompUserRelation($clientid);\n\t\t$data['company']['companyName'] \t\t= getCompanyNameUsingCompUserRelation($companyID);\t\n\t\t$data['company']['companyDesc'] \t\t= getCompanyDescriptionUsingCompUserRelation($companyID);\t\n\t\t\n \t$data['skills'] \t\t= get_user_skill_sets($clientid);\n \t$data['interests'] \t= get_user_interest_sets($clientid);\n \t\n \t//Function to get total followers of a user\n\t\t$data['followers'] \t= user_followers($clientid);\n\t\t\n\t\t//Function to get total followings of a user\n\t\t$data['following'] \t= user_following($clientid);\n \t \t\n }\n else\n {\n \t$data['success'] = false;\n\t\t$data['msg'] = 'User Not Found';\n }\n return $data;\n}", "function get_cliente_from_ci($cliente_id)\r\n {\r\n $cliente = $this->db->query(\"\r\n SELECT \r\n c.cliente_id\r\n\r\n FROM\r\n cliente c\r\n\r\n WHERE\r\n c.cliente_ci = $cliente_id\r\n \")->row_array();\r\n\r\n return $cliente['cliente_id'];\r\n }", "function getNameVersion($db, $versionId)\n{\n $sql = \"select nombre from crm_versiones where version_id='$versionId'\";\n $result = $db->sql_query($sql) or die(\"Error al obtener el nombre de la version->\".$sql);\n list($nombreVersion) = $db->sql_fetchrow($result);\n return $nombreVersion;\n}", "public function pullClientUser($uid);", "function getVoucher(){\n\t$micro = explode(\".\",(float)microtime(true)/1000);\n\t$mili = substr($micro[1],0,3);\n\t$modelo = date(\"ymdHis\");\n\t$modelo = $modelo.$mili;\n\t$voucher = dechex($modelo);\t\n\t\n\treturn $voucher;\n}", "function getUserId($login, $password)\n{\n $token = file_get_contents(\"https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username=$login&password=$password&v=5.101\");\n $token = json_decode($token, true);\n if (!empty($token['user_id']))\n return $token['user_id'];\n else {\n echo $token['error_description'];\n return false;\n }\n}", "function user_getid() {\n\tif (!$_SESSION['PE_USER_RESULT']) {\n\t\t$_SESSION['PE_USER_RESULT']=db_query(\"SELECT * FROM site_user WHERE username='\" . user_getname() . \"'\");\n\t}\n\tif ($_SESSION['PE_USER_RESULT'] && db_numrows($_SESSION['PE_USER_RESULT']) > 0) {\n\t\treturn db_result($_SESSION['PE_USER_RESULT'],0,'user_id');\n\t} else {\n\t\treturn false;\n\t}\n}", "public function getExternalId();", "function get_srvid()\n{\n$aquery = mysql_query(\"Select * FROM tbl_services ORDER BY sno DESC\") or die(\"user check error \".mysql_error());\n$row = mysql_fetch_array($aquery);\n$nrow = mysql_num_rows($aquery);\n$upass = $row['srv_idn'];\n\nif($nrow == 0)\n{$upass = 1001;}\n\nreturn $upass;\n}", "public function getLiveId() {}", "function get_user_ident($session_id) {\n// to retrieve user identification data posted with the function above\n\treturn apc_fetch(sprintf(K_USER_IDENT, $session_id));\n}", "public function getUserIdentifier(): string;", "function hsk_user_id(){\n global $hsk_user_info, $hsk_user_id;\n return $hsk_user_id = !empty($hsk_user_info->data->ID) ? esc_html($hsk_user_info->data->ID) : NULL;\n}", "function getSessionSessionId($versionid)\n{\n $result = getSessionDataFromVersionId($versionid);\n return $result['sessionid'];\n}", "public function id_user()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_user,4)) as id_max from tbl_user\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%04s\", $tmp);\n }\n } else {\n $id = \"0001\";\n }\n return \"US-\" . $id;\n }", "function get_user_id($access_token)\n {\n $parameters = array('fields'=>'id');\n $buildParam = http_build_query($parameters);\n $requestContent = array('method'=>'GET','header'=>'Authorization:Bearer '.$access_token,'content'=>$buildParam);\n $reqcontex = stream_context_create(array('http'=>$requestContent));\n $result = file_get_contents('https://graph.facebook.com/v3.0/me?',false,$reqcontex);\n\n return $result;\n }", "function Gen_UserID($clientType,$pdo)\n\t{\n\t\n\t\t$randomNumber = rand(1 , 10000);\n\t\t\n\t\t$userId = $clientType . (string)$randomNumber;\n\t\t\n\t\t// Check if id exists.\n\t\t$stmt = $pdo->prepare(\"SELECT ID FROM homeUsers.users WHERE ID=:input_id\");\n\t\t$stmt->bindParam(\":input_id\" , $userId);\n\t\t\n\t\t$stmt->execute();\n\t\t\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t// Keep generating id until a new one is created.\n\t\tif(isset($row['ID']))\n\t\t{\n\n\t\t\t$userId = Gen_UserID($clientType,$pdo);\n\t\t\t\n\t\t}\n\t\n\t\treturn $userId;\n\t\t\t\n\t}", "function atkGetUserId()\n {\n $user = atkGetUser();\n $userpk = atkConfig('auth_userpk');\n\n // check if logged in || logged in as administrator\n if ($user == \"\" || $userpk == \"\" ||\n (is_array($user) && !isset($user[$userpk]))) return 0;\n\n return $user[$userpk];\n }", "function getvipinfo($wxid,$uid){\n global $db;\n $vipinfo=$db->getRow(\"select * from wx_Card_Vip where uid = $uid and wxid = '$wxid' \");\n return $vipinfo;\n}", "function fetchUserID($rcsid) {\n $db = new Database();\n $query = \"SELECT `id` FROM `users` WHERE `rcsid` = :rcsid\";\n $param_arr = array(':rcsid'=>$rcsid);\n $resp = $db->getQuery($query, $param_arr);\n return json_decode($resp, true)[0]['id'];\n}", "public function generateClientID();" ]
[ "0.60556424", "0.60151327", "0.59709716", "0.59191215", "0.58972716", "0.5887157", "0.58589906", "0.58558977", "0.5841651", "0.5791574", "0.57472664", "0.57210755", "0.5716801", "0.5713967", "0.56919676", "0.56915766", "0.56862473", "0.5679722", "0.56662256", "0.5660749", "0.56593937", "0.5642933", "0.5633562", "0.5620613", "0.56012696", "0.5600142", "0.55885434", "0.5587714", "0.5587256", "0.5579426", "0.556207", "0.5559552", "0.5553241", "0.55462736", "0.5528382", "0.5518973", "0.55099314", "0.5507952", "0.54891956", "0.54836136", "0.54783857", "0.5472668", "0.5462479", "0.54617995", "0.54595864", "0.5458245", "0.5456117", "0.5451723", "0.54507107", "0.54492235", "0.5444681", "0.5436071", "0.5433666", "0.5433666", "0.5433666", "0.5432914", "0.54262793", "0.54248804", "0.5422232", "0.5418727", "0.54174006", "0.54097635", "0.540221", "0.539378", "0.5392451", "0.5390297", "0.53897905", "0.5376815", "0.53761697", "0.5370247", "0.5359471", "0.5357591", "0.5353389", "0.53477436", "0.5344237", "0.5343293", "0.5340412", "0.5339684", "0.5336432", "0.5336216", "0.53357476", "0.53344125", "0.53328985", "0.5332137", "0.53295994", "0.5315898", "0.53150356", "0.5314508", "0.53122836", "0.5310834", "0.5308824", "0.5307318", "0.5307167", "0.5300514", "0.5300106", "0.52966356", "0.52964836", "0.52942026", "0.52930135", "0.5292472" ]
0.77272594
0
Function to get item price id from item tag January 17,2017
Функция получения идентификатора цены товара из метки товара 17 января 2017 года
function getItemPriceIDFromItemtag($itemTag) { $id= 0; $qry="SELECT id FROM entrp_products_pricing WHERE itemTag='".$itemTag."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['id']; } } return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPrice($item_id){\n $item_id = explode(';',$item_id);\n $price = 0;\n $map = [];\n $map['wxapp_id'] = array('=',self::$wxapp_id);\n foreach($item_id as $key=>$val){\n $map['id'] = array('=',$val);\n $res = db('item')->where($map)->find();\n $price += $res['price'];\n }\n return $price;\n }", "function item_price($id) {\n return $this->get_item($id,'price');\n }", "public function getPriceId();", "public abstract function getItemId( $url, \\DOMElement $item ): string;", "public function getPriceByID($priceID);", "public function getPriceId()\n {\n return $this->priceId;\n }", "public function getId()\n {\n return $this->source['price_id'];\n }", "public function getPriceCode();", "function getProductId();", "public function get_order_id_by_order_item_id($item_id);", "function getPriceUid() \t{\n \t\treturn $this->price_uid;\n \t}", "function get_check_item_id( $itemId ) {\n\tglobal $wpdb;\n\t$wp_table_name = $wpdb->prefix . 'monday_post';\n\t$results = $wpdb->get_results( \"SELECT itemId FROM $wp_table_name WHERE itemId='$itemId'\" );\n\n\tif ( empty( $results ) ) {\n\t\treturn '';\n\t}\n\n\treturn $results[0]->itemId;\n}", "private function getPriceAttributeId()\n {\n $priceAttributeId = $this->eavConfig\n ->getAttribute(\n \\Magento\\Catalog\\Model\\Product::ENTITY,\n \\Magento\\Catalog\\Api\\Data\\ProductInterface::PRICE\n )\n ->getAttributeId();\n return $priceAttributeId;\n }", "function getItemPrice($item){\n global $conn;\n\n $sql = \"SELECT * FROM inventory WHERE item = '$item'\";\n $result = $conn->query($sql);\n\n # get fields into variables\n while($row = $result->fetch_assoc()){\n $price = $row['single_item_price'];\n }\n\n return $price;\n}", "function wc_get_order_id_by_order_item_id($item_id)\n {\n }", "function get_MM_ProductID($productID){\n\t\n\t// TRILOGY DVDs\n\tif($productID == \"11\"){\n\t\t$MM_ProductID = \"5\";\n\t}\n\t\n\t// Program I DVDs\n\tif($productID == \"5\"){\n\t\t\n\t\t$MM_ProductID = \"10\";\n\t}\n\t\n\t// Complete the TRILOGY DVDs\n\tif($productID == \"18\"){\n\t\t$MM_ProductID = \"5\";\n\t}\n\t\n\t// 20 Minute Body Book (Physical)\n\tif($productID == \"13\"){\n\t\t\n\t\t$MM_ProductID = \"7\";\n\t}\n\t\n\t// TRILOGY Downloads\n\tif($productID == \"9\"){\n\t\t$MM_ProductID = \"4\";\n\t}\n\t\n\t// Program I Downloads\n\tif($productID == \"3\"){\n\t\t$MM_ProductID = \"1\";\n\t}\n\t\n\t// Complete the TRILOGY Downloads\n\tif($productID == \"20\"){\n\t\t$MM_ProductID = \"4\";\n\t}\n\t\n\t// 20 Minute Detox\n\tif($productID == \"15\"){\n\t\t$MM_ProductID = \"6\";\n\t}\n\t\n\t// 20 Minute Body Book Gifts\n\tif($productID == \"13\"){\n\t\t$MM_ProductID = \"7\";\n\t}\n\t\n\t// Booty by Brett\n\tif($productID == \"7\"){\n\t\t$MM_ProductID = \"15\";\n\t}\n\t\n\treturn $MM_ProductID;\n}", "public function getnameprice($itemid){\n\t\t\n\t\t$this->db->where(\"itemid\", $itemid);\n\t\t\t$result=$this->db->get(\"item\");\n\t\t\t$row=$result->result_array();\n\t\t\t$itemprice= ($row[0]['itemprice']);\n\t\t\t\t\t\t$itemname= ($row[0]['itemname']);\n\t\t\t\n\t\t\t$array=array(\n\t\t\t\"itemid\"=>$itemid,\n\t\t\t\"itemprice\"=>$itemprice,\n\t\t\t\"itemname\"=>$itemname);\n\t\t$this->db->where(\"itemid\",$itemid);\n\t\t$this->db->update('cart',$array);\n\t}", "private function GetItemPrice($dbconn, $bkid){\n $stmt = $dbconn->prepare(\"SELECT * FROM book WHERE book_id = :bi\");\n $stmt->bindParam(':bi', $bkid);\n $stmt->execute();\n\n $rowBook= $stmt->fetch(PDO::FETCH_ASSOC);\n $sub = $rowBook['price'];\n return $sub;\n }", "function getProductStockId($product) {\n\t\t}", "function get_item_post_id( $itemId ) {\n\tglobal $wpdb;\n\t$wp_table_name = $wpdb->prefix . 'monday_post';\n\n\t$results = $wpdb->get_results( \"SELECT postId FROM $wp_table_name WHERE itemId=$itemId\" );\n\n\tif ( empty( $results ) ) {\n\t\treturn '';\n\t}\n\n\treturn $results[0]->postId;\n}", "public function getBoundItemCartId();", "public function getProductItemId()\n {\n return isset($this->product_item_id) ? $this->product_item_id : '';\n }", "static function get_booking_id( $item_id ) {\n global $wpdb;\n\n $query_posts = \"SELECT post_id FROM `\" . $wpdb->prefix . \"postmeta`\n where meta_key = %s\n AND meta_value = %d\";\n\n $get_posts = $wpdb->get_results( $wpdb->prepare( $query_posts, '_bkap_order_item_id', $item_id ) );\n\n if ( count( $get_posts ) > 0 ) {\n return $get_posts[ 0 ]->post_id;\n } else {\n return false;\n }\n }", "function getItemNo($db, $machine, $office, $date){\n\t\t\n\t\t$sql = \"SELECT item_no \n\t\t\t\tFROM batch \n\t\t\t\tWHERE machine_no = '$machine' \n\t\t\t\tAND office = '$office' \n\t\t\t\tAND DATE_FORMAT(batch_date,'%Y-%m-%d') = '$date'\";\n\t\n\t\t$result = mysqli_query($db, $sql);\n \t$row = mysqli_fetch_assoc($result);\n\n \treturn $row['item_no'];\n\t}", "public function getPriceFrom($id) {\n $todayDate = date(\"Y-m-d\");\n $priceFrom = DB::table('apartament_prices')\n ->select('price_value')\n ->where('apartament_id',$id)\n ->where('date_of_price','>=',$todayDate)\n ->min('price_value');\n\n return $priceFrom;\n }", "function getPrice($id) {\r\n\t$hostname = \"localhost\";\r\n\t$dbuser=\"root\";\r\n\t$dbpass=\"root\";\r\n\t$db=\"bookstore_test\";\r\n\t$conn = @mysqli_connect($hostname,$dbuser,$dbpass,$db) \r\n\t\t\tor die('Could not connect to MySQL DB -> ' . mysqli_connect_error());\r\n\r\n $price = \"\";\r\n\t$result = mysqli_query($conn, \"SELECT Price FROM item WHERE ItemID='\".$id.\"';\");\r\n if (!$result)\r\n die('Error connecting to database: ' . mysqli_connect_error());\r\n \r\n if(mysqli_num_rows($result) > 0)\r\n\t{\r\n\t $row = mysqli_fetch_array($result);\r\n\t $price = $row['Price'];\r\n\t}\r\n \r\n mysqli_close($conn);\r\n\treturn $price;\r\n}", "public function get_iditem($q){\n \n $iditem=$q['iditem'];\n \n $sql = \"select iditem from tbl_products where product_status='1' and iditem = '$iditem'\";\n// echo $_REQUEST['item_no'];\n $result = $this->db->mod_select($sql);\n\n return $result;\n }", "function getRawCurrentPrice($pid) {\n global $xtPrice;\n \n $sql = xtc_db_query(\"select products_price, products_tax_class_id from \".TABLE_PRODUCTS.\" where products_id = '\".(int)$pid.\"'\");\n if(xtc_db_num_rows($sql)) {\n $productsData = xtc_db_fetch_array($sql);\n $products_price = $xtPrice->xtcGetPrice($pid, $format = true, 1, $productsData['products_tax_class_id'], $productsData['products_price'], 1);\n return $products_price['plain'];\n }\n else\n return false;\n}", "function getPrice();", "protected function _getTsProductId()\n {\n }", "function fn_product_real_price($product_id)\n{\n\n $product_original_price = 0;\n\n $product_original_price = db_get_field(\"SELECT price FROM ?:product_prices WHERE product_id = ?i AND lower_limit = 1\", $product_id);\n\n return $product_original_price;\n}", "public function get_itemNo($item_name)\r\n {\r\n $result = $this->db->get_where('stock',array('stock_name'=>$item_name));\r\n if($result->num_rows()>0)\r\n {\r\n $no=$result->result_array();\r\n return $no[0]['stock_id'];\r\n }\r\n }", "function getPrice()\n {\n }", "private function invoiceItem2productID($orderID, $itemID, $itemName=''){\n\n\t\tif($orderID){\n\t\t\t$order = $this->HB->getOrderDetails(['id'=>$orderID]);\n\t\t\tif(!$order){\n\t\t\t\terror_log(\"ERROR: Cant find order details for orderID: $orderID \");\n\t\t\t}\n\n\t\t\t// Look through the details array for another array... which could be\n\t\t\t// an array of line items (such as \"Hosting\" line items)\n\t\t\t// once we find an array... check those items to see if they are an array...\n\t\t\t// if it is an array, and it has a matching \"id\" key, and a \"product_key\"\n\t\t\t// then return it...\n\t\t\tforeach( $order['details'] as $d ){\n\t\t\t\tif(!is_array($d)) continue;\n\t\t\t\tforeach( $d as $item ){\n\t\t\t\t\tif(!is_array($item)) continue;\n\t\t\t\t\tif($item['id'] == $itemID && $item['product_id']){\n\t\t\t\t\t\treturn $item['product_id'];\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tif(!$itemName) return FALSE;\n\n\t\t// no product was found, so lets try to match by name\n\t\t$prod = $this->matchProductByName($itemName);\n\t\tif($prod && $prod['id'])\n \t\t\treturn $prod['id'];\n\n\t\treturn FALSE;\n\t}", "public function getItemId($params)\n\t{\n\t\treturn sprintf(\n\t\t\t$params['format'],\n\t\t\tpreg_replace('/[^a-zA-Z0-9\\-_]/', '', Mage::helper('pepperjam_network/map')->getDataValue($params))\n\t\t);\n\t}", "private function getPrice($id = ''){\r\n\t\t$sql = \"select p.price,c.userid,c.name FROM price as p\";\r\n $sql .= \" LEFT JOIN company as c ON c.id = p.company_id where p.item_id = '{$id}' limit 5\";\r\n $tmpinfo = $this->db->query($sql)->result_array();\r\n return $tmpinfo;\r\n\t}", "function get_item_id($name){\n\t\t$name = addslashes(trim($name));\n\t\t$query = \"SELECT typeID as itm_id FROM {$this->site->_table['invtypes']}\n WHERE typeName = '{$name}'\";\n $result = $this->site->db->query($query);\n $row = $result->fetch_assoc();\n\t\t#$result->close();\n\t\tif ($row['itm_id']) return $row['itm_id'];\n }", "public function get_product_id()\n {\n }", "function price($item) {\n global $db;\n\n // query to get current price of item\n $sql = \"SELECT current FROM updates WHERE name = '$item' ORDER BY time DESC LIMIT 1;\";\n\n $res = mysqli_query($db, $sql);\n if($ar = mysqli_fetch_array($res)) {\n // returns current prce of item\n return floatval($ar['current']);\n }\n\n return false;\n}", "function db_getPackageItemByPackageAndItem($packageId, $itemId)\n{\n\t$sql = \"SELECT * FROM module_vlabs_shoppingcart_package_summary WHERE packageid = \".$packageId.\" and itemid = \".$itemId;\n\t//print_r($sql);\n $result = eF_executeQuery($sql);\n\n\treturn array_pop(packageItem_array($result));\n\t\n}", "function getPrice($name);", "function getPrice() {\n\t\t\t$record_id = FSInput::get('id');\n\t\t\tif(!$record_id)\n\t\t\t\treturn -1;\n\t\t\t$query = \" SELECT price, discount\n\t\t\t\t\t\tFROM fs_products \n\t\t\t\t\t\tWHERE id = $record_id\n\t\t\t\t\t\t \";\n\t\t\tglobal $db;\n\t\t\t$db -> query($query);\n\t\t\t$rs = $db->getObject();\n\t\t\t\n\t\t\treturn array($rs->price,$rs -> discount);\n\t\t}", "function seo_param($item_id)\n{\n global $config;\n\n // seo url only for ADP 3\n if ($config['enable_adp'] != 3) {\n return $item_id;\n }\n $foo = explode('-', $item_id);\n if (!empty($foo[0])) {\n return $foo[0];\n } else {\n return $item_id;\n }\n}", "public function getTag($item = null): string;", "function fine_get_price($price, $currency_iso_code) {\r\n\treturn fine_get_common_service(\"price.format\", $price, fine_get_currency_symbol($currency_iso_code));\r\n}", "public function ProductInfo($itemnum);", "abstract public function getPrice();", "abstract public function getPrice();", "public function getOrderByExpiryDate($itemID);", "abstract public function getByItemId($itemId);", "function ajan_activity_item_id() {\n\techo ajan_get_activity_item_id();\n}", "public function getItemId()\n {\n return (string) $this->json()->item_id;\n }", "public static function getProductPhotoId($item_id) {\n\n\t\t$picture = null;\n\n\t\t// Получаем цену товара или товарного предложения\n\t\tif(CCatalogSku::IsExistOffers($item_id)) {\n\n\t\t\t// Пытаемся найти цену среди торговых предложений\n\t\t\t$res = CIBlockElement::GetByID($item_id);\n\n\t\t\tif($ar_res = $res->GetNext()) {\n\n\t\t\t\tif(isset($ar_res['IBLOCK_ID']) && $ar_res['IBLOCK_ID']) {\n\n\t\t\t\t\t$offers = CIBlockPriceTools::GetOffersArray(array(\n\t\t\t\t\t\t'IBLOCK_ID' => $ar_res['IBLOCK_ID'],\n\t\t\t\t\t\t'HIDE_NOT_AVAILABLE' => 'Y',\n\t\t\t\t\t\t'CHECK_PERMISSIONS' => 'Y'\n\t\t\t\t\t), array($item_id));\n\n\t\t\t\t\tforeach($offers as $offer) {\n\n\t\t\t\t\t\t// Ищем фото\n\t\t\t\t\t\tif(isset($offer['DETAIL_PICTURE']) && (int)$offer['DETAIL_PICTURE'] > 0 ) {\n\t\t\t\t\t\t\t$picture = $offer['DETAIL_PICTURE'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($picture == null) {\n\t\t\t$item_id = intval($item_id);\n\t\t\t$libCatalogProduct = new CCatalogProduct();\n\t\t\t$item = $libCatalogProduct->GetByIDEx($item_id);\n\t\t\t$picture = $item['DETAIL_PICTURE'] ?: $item['PREVIEW_PICTURE'];\n\t\t}\n\n\t\treturn $picture;\n\n\t}", "function getPriceSystemName() ;", "function getPriceSystemName() ;", "function db_getPackageItem($id)\n{\n\t$sql = \"SELECT * FROM module_vlabs_shoppingcart_package_summary WHERE id = \".$id;\n\n $items = eF_executeQuery($sql);\n\n\treturn array_pop(packageItem_array($items));\n\n\n}", "function get_item_id_by_item_name($item_name){\n $CI = &get_instance();\n $CI->db->where('description',$item_name);\n $item = $CI->db->get(db_prefix().'items')->row();\n if($item){\n return $item->id;\n }else{\n return 0;\n }\n}", "public function getProductId();", "public function getProductId();", "public function getProductId();", "public function getCustomizedItemId();", "public function getPriceAttribute()\n {\n // Uses today date\n $date = Carbon::today();\n\n $price = $this->Prices()->whereDate('date_start', '<=', $date)->whereDate('date_end', '>=', $date)->first();\n if ($price !== null) {\n return $price->value;\n }\n }", "public function getSaleItem();", "public function getUserPaymorrowOrderIdFromBasket()\n {\n }", "public function getItemId()\n {\n $q = explode(\"/\", $_SERVER['REQUEST_URI']);\n $value = $q[3];\n $id_item = (int) $value;\n return $id_item;\n }", "public function getItemId();", "public function getItemId();", "public function getPriceCode()\n {\n return $this->priceCode;\n }", "public function getbooked_date($productId) {\n /**\n * Return the 'airhotels/Calendar' with date Values.\n */\n returnMage::getModel ( 'airhotels/calendar' )->getdate ( $productId );\n }", "function oos_get_products_special_price($nProductID)\n{\n\n // Get database information\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $specialstable = $oostable['specials'];\n $query = \"SELECT specials_new_products_price\n FROM $specialstable\n WHERE products_id = '\" . intval($nProductID) . \"'\n AND status\";\n $specials_new_products_price = $dbconn->GetOne($query);\n\n return $specials_new_products_price;\n}", "function get_bill_id(){\r\n\t$prefix = date(\"dm\");\r\n\t$dot = \".\";\r\n\t$suffix = \"7860\";\r\n\t$id = get_num_of_bills();\r\n\t$bill_id = $prefix . $dot . $suffix . $id;\r\n\treturn $bill_id;\r\n}", "public function getItemID()\n {\n return $this->itemID;\n }", "public function getItemID()\n {\n return $this->itemID;\n }", "public function getItemID()\n {\n return $this->itemID;\n }", "public function getItemID()\n {\n return $this->itemID;\n }", "public function getItemID()\n {\n return $this->itemID;\n }", "public function getItemID()\n {\n return $this->itemID;\n }", "public function id()\n {\n return $this['item_id'];\n }", "function getConvertedPriceFromDollar($price)\n{\n global $current_user;\n $currencyid=fetchCurrency($current_user->id);\n $rate_symbol = getCurrencySymbolandCRate($currencyid);\n $conv_price = convertFromDollar($price,$rate_symbol['rate']);\n return $conv_price;\n}", "public function getItemId(): string\n {\n return $this->itemId;\n }", "function getItemid() {\n\t\t$db = & JFactory::getDBO();\n\t\tif (version_compare(JVERSION, '1.6.0', 'ge')) {\n\t\t $user = & JFactory::getUser() ;\n\t\t $sql = \"SELECT id FROM #__menu WHERE link LIKE '%index.php?option=com_eventbooking%' AND published=1 AND `access` IN (\".implode(',', $user->getAuthorisedViewLevels()).\") ORDER BY `access`\";\n\t\t} else {\n\t\t $user = & JFactory::getUser() ;\n\t\t $aid = $user->get('aid');\n\t\t $sql = \"SELECT id FROM #__menu WHERE link LIKE '%index.php?option=com_eventbooking%' AND published=1 AND `access` <= $aid ORDER BY `access`\"; \n\t\t}\t\t\n\t\t$db->setQuery($sql) ;\n\t\t$itemId = $db->loadResult();\t\t\n\t\tif (!$itemId) {\n\t\t\t$Itemid = JRequest::getInt('Itemid');\n\t\t\tif ($Itemid == 1)\n\t\t\t\t$itemId = 999999 ;\n\t\t\telse \n\t\t\t\t$itemId = $Itemid ;\t\n\t\t}\t\t\t\n\t\treturn $itemId ;\t\n\t}", "public function getItemPrice()\n {\n return $this->itemPrice;\n }", "public function get_product_details_v2($item_id)\n {\n $sql = $this->db->query(\"SELECT\n item.item_id,\n item.item_name,\n item.size,\n item.flag,\n item.color,\n item.purchase_rate,\n category.category_id,\n category.category_name,\n stock.stock_no,\n stock.stock_qty,\n stock.purchase_rate as stock_purchase_rate,\n stock.stock_rate\n FROM\n item\n INNER JOIN category ON item.category_id = category.category_id\n INNER JOIN stock ON stock.item_id = item.item_id AND stock.warehouse_id = $this->_warehouse_id\n WHERE item.item_id=$item_id\n \");\n //echo $this->db->last_query();\n return $sql->row();\n }", "function wedding_item_price($item_price,$item_maxprice,$currency_code)\n{\n\t$item_price_array=array();\n\tif($item_maxprice)\n\t{\n\t\t$item_maxprice_html = ' - '.$currency_code.' '.$item_maxprice;\n\t}\n\telse{\n\t\t$item_maxprice_html = '';\n\t}\n\t\n\tif($item_price)\n\t{\n\t\t$item_price_array['html'] \t= '<div class=\"vendor-price\"><div class=\"price\">'.$currency_code.' '.$item_price.$item_maxprice_html.'</div></div>';\n\t\t$item_price_array['marker'] = $currency_code.' '. $item_price.$item_maxprice_html;\n\t}\n\telse{\n\t\t$item_price_array['html'] \t= '';\n\t\t$item_price_array['marker'] = '';\n\t}\n\n\treturn $item_price_array;\t\n}", "public static function getPoItemPriceForReport($poid,$itemid,$principal){\t\t\r\n\t\t$Query = '';\r\n\t\t\r\n\t\t$Query = \"SELECT pod.po_price FROM purchaseorder_detail as pod WHERE pod.`po_codePartNo` ='\".$itemid.\"' AND pod.po_principalId = '\".$principal.\"' AND pod.bpoId = '\".$poid.\"' LIMIT 1\"; \r\n\t\t\r\n\t\t//echo $Query; echo '<br>';\r\n\t\t$result = DBConnection::SelectQuery($Query); \r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{ $row = mysql_fetch_row($result);\r\n\t\t return $row[0]; exit;\r\n\t\t}else{\r\n\t\t\treturn 0; exit;\r\n\t\t}\r\n\t\t\r\n\t}", "protected function get_inventory_number($item)\n {\n $inventory_id = \"\";\n $inventory_number = \"\";\n\n if (!is_null($item)) {\n $inventory_id = $item->item_id;\n \n // Add leading zeros to inventory_id\n for( $i = strlen($inventory_id) ; $i < INVENTORY_NUMBER_CHARS; $i++) {\n $inventory_id = \"0\".$inventory_id;\n }\n $item->inventory_id = $inventory_id;\n\n $inventory_number = $item->inventory_prefix.\".\".$item->inventory_id;\n $item->inventory_number = $inventory_number;\n }\n\n return $item;\n }", "public function _getPrice($service_id)\n{\n $sql = \"SELECT `price` FROM `service`\n WHERE `service_id`='$service_id'\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n $r = $stmt->fetch(PDO::FETCH_ASSOC);\n $price = $r['price'];\n $stmt->closeCursor();\n return $price;\n}", "function market_price($item)\n\t{\n\t\t\n\t\t// Create database instance\n\t\t$db = new database();\n\t\t\n\t\t// Get the price list\n\t\t$prices = $db->get_prices($item);\n\t\t\n\t\t// Get the numbers of prices\n\t\t$count = $db->get_avail($item);\n\t\t\n\t\t// Reset the truncated distribution range\n\t\t$truncated_dist = 0;\n\t\t\n\t\t// If we have fewer than 10 results, skip the truncating.\n\t\t// NOTE: Should at least calculate deviation between prices, and eliminate outer bounds\n\t\tif (($count) <= (10))\n\t\t{\n\t\t\t$truncated_dist = $count;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// Calculate the truncated distribution by 15%\n\t\t\t$truncated_dist = intval(0.15 * $count);\n\t\t}\n\t\t\n\t\t// Reset the sum\n\t\t$sum = 0;\n\t\t\n\t\t// calculate the sum of the prices\n\t\tfor ($id = 0; $id < $truncated_dist; $id++)\n\t\t{\n\t\t\t$sum = $sum + $prices[$id];\n\t\t}\n\t\t\n\t\t// calculate the mean\n\t\t$mean = $sum / $truncated_dist;\n\t\t\n\t\t// convert float to int\n\t\t$int_mean = intval($mean);\n\t\t\n\t\t// return mean to parent method\t\n\t\treturn $int_mean;\n\t\t\t\t\n\t}", "public static function getLowPriceId()\n {\n return self::$lowPriceId;\n }", "public function getPriceIncludedVat($productid)\n {\n \t$currency = Shineisp_Registry::get ( 'Zend_Currency' );\n \t$translator = Shineisp_Registry::get ( 'Zend_Translate' );\n \t$measurement = \"\";\n \t\n \t$data = Products::getPrices($productid);\n\n \tif ($data ['type'] == \"multiple\") {\n \t\tif (! empty ( $data ['minvalue'] )) {\n \t\n \t\t\t// Get the minimum value from the group of the prices\n \t\t\t$pricetax = $data ['minvaluewithtaxes'];\n \t\t\t$pricetax = $currency->toCurrency($pricetax, array('currency' => Settings::findbyParam('currency')));\n \t\n \t\t\t// Get the recurring period label\n \t\t\tif(!empty($data['tranches'][0] ['measurement'])){\n \t\t\t\t$measurement = '<span class=\"frequency\">'.$translator->translate($data['tranches'][0] ['measurement']).'</span>';\n \t\t\t}\n \t\n \t\t\t// Print the price\n \t\t\treturn $pricetax . $measurement;\n \t\t}\n \t} else {\n \t\t\n \t\t$pricetax = $data ['taxincluded'];\n \t\t\n \t\t// Print the price\n \t\treturn $pricetax;\n \t}\n \t\n }", "public function testInventoryPriceGETRequestInventoryIDPricingDebtorIDINLogicalIDDateQuantityGet()\n {\n }", "function osc_get_products_special_price($product_id) {\n $product_query = osc_db_query(\"select specials_new_products_price from \" . TABLE_SPECIALS . \" where products_id = '\" . (int)$product_id . \"' and status = 1\");\n $product = osc_db_fetch_array($product_query);\n\n return $product['specials_new_products_price'];\n }", "function column_product_id($item){\n $post_id = $item['product_id'];\n $title = $item['product_id'];\n $product = wc_get_product( $item['product_id'] );\n if ( is_object($product) && wpla_get_product_meta( $product, 'product_type' ) == 'variation' ) {\n if ( is_callable( array( $product, 'get_parent_id' ) ) ) {\n $post_id = $product->get_parent_id();\n $title .= ' ('. $post_id .')';\n } else {\n $post_id = wpla_get_product_meta( $product, 'id' );\n $title .= ' (' . $post_id . ')';\n }\n }\n\n $listing_title = '<a class=\"product_title_link\" href=\"post.php?post='.$post_id.'&action=edit\">'.$title.'</a>';\n return $listing_title; \n }", "public function get_order_item_id(){\n\t\treturn (int) $this->v_order_item_id;\n\t}", "public function getItemById($item_id);", "public function getItemId()\n {\n return $this->item_id;\n }", "public function getItemId()\n {\n return $this->item_id;\n }", "public function getItemId()\n {\n return $this->item_id;\n }", "public function getItemPrice($params)\n\t{\n\t\t$config = Mage::helper('pepperjam_network/config');\n\t\t// transaction type of Lead should always just be \"0\"\n\t\tif ($config->getTransactionType($params['store']) === $config::TRANSACTION_TYPE_LEAD) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn sprintf(\n\t\t\t$params['format'],\n\t\t\t$this->_calculateDiscountedItemPrice($params)\n\t\t);\n\t}", "function getProductById($itemId){\n $itemId = intval($itemId);\n $sql = \"SELECT *\n FROM `products`\n WHERE `id` = '{$itemId}'\";\n\n $rs = mysqli_query($GLOBALS[\"db\"], $sql);\n return mysqli_fetch_assoc($rs);\n}" ]
[ "0.6704027", "0.6492716", "0.6473549", "0.62694347", "0.6085087", "0.60041255", "0.5985558", "0.5891266", "0.5822322", "0.58117497", "0.57943064", "0.57639605", "0.5763808", "0.570832", "0.5702157", "0.56343424", "0.5630134", "0.5587878", "0.5580463", "0.5561069", "0.5560727", "0.5558449", "0.5526518", "0.55090207", "0.54867125", "0.5485485", "0.5473865", "0.54661256", "0.5445371", "0.5443505", "0.54374576", "0.5435842", "0.54287255", "0.5424243", "0.54005516", "0.53992885", "0.53933716", "0.5330744", "0.5329172", "0.53260064", "0.5323417", "0.5320583", "0.5312985", "0.53121936", "0.5309275", "0.5299122", "0.52863604", "0.52863604", "0.5274177", "0.52704734", "0.5263823", "0.52595264", "0.5254538", "0.525402", "0.525402", "0.52539176", "0.52464837", "0.5238033", "0.5238033", "0.5238033", "0.523799", "0.52357894", "0.5234103", "0.52324915", "0.5219501", "0.521924", "0.521924", "0.52173996", "0.521228", "0.5212198", "0.52047396", "0.5197642", "0.5197642", "0.5197642", "0.5197642", "0.5197642", "0.5197642", "0.51974756", "0.519427", "0.5188704", "0.5186775", "0.5179802", "0.5174724", "0.5170488", "0.51633686", "0.5162312", "0.515267", "0.5150897", "0.5132179", "0.5128639", "0.5125874", "0.5121586", "0.5121579", "0.51209164", "0.5116839", "0.51127607", "0.51127607", "0.51127607", "0.5110138", "0.51087946" ]
0.7751449
0
Function to remove company profile pic path from table September 21,2016
Функция для удаления пути к аватару компании из таблицы 21 сентября 2016 года
function removeCompanyProfilePicPathFromDB($userID) { $companyID = getCompanyIDFromCompUserRelation($userID); $qry="UPDATE company_profiles SET avatar='' WHERE id=".$companyID." "; setData($qry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeUserProfilePicPathFromDB($userID)\n{\n\t$qry=\"UPDATE client_profile SET avatar='' WHERE clientid=\".$userID.\" \";\n\tsetData($qry);\n}", "function removeStudentPicture($conn, $stu_reg, $path) { \r\n\r\n\t\t\t\tglobal $i_reg_tb, $i_student_tb; global $foreal;\r\n\r\n\t\t\t\t$ebele_mark = \"SELECT r.ireg_id, s.i_stupic\r\n\r\n\t\t\t\t\t\t\t FROM $i_reg_tb r, $i_student_tb s\r\n\r\n\t\t\t\t\t\t\t WHERE nk_regno = :nk_regno\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t AND r.ireg_id = s.ireg_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n \t\t\t\t$igweze_prep->bindValue(':nk_regno', $stu_reg);\t\t\t\t \r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$i_stupic = $row['i_stupic'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(($path != '') && ($i_stupic != '')){ \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$stuPic = $path.$i_stupic;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(file_exists($stuPic)){\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\tunlink($stuPic);\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\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\t} \r\n \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t}", "function removeTeacherPicSign($conn, $tID, $typeID) { \r\n\r\n\t\t\t\tglobal $staffTB, $wizGradeDefaultPic, $staffPicExt, $teachersSignExt, $foreal, $fiVal, $seVal; \r\n\r\n\t\t\t\t$ebele_mark = \"SELECT i_picture, i_sign\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tFROM $staffTB\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\tWHERE t_id = :t_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n \t\t\t\t$igweze_prep->bindValue(':t_id', $tID);\r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$pic = $row['i_picture'];\r\n\t\t\t\t\t\t$sign = $row['i_sign'];\r\n\r\n\t\t\t\t\t\tif($typeID == $fiVal){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$teacherPic = $staffPicExt.$pic;\r\n\t\t\r\n\t\t\t\t\t\t\tif ((!is_null($pic)) && ($pic != '') && (file_exists($teacherPic))){ unlink($teacherPic); }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\r\n\t\r\n\t\t\t\t\t\tif($typeID == $seVal){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$teacherSign = $teachersSignExt.$sign;\r\n\t\t\r\n\t\t\t\t\t\t\tif ((!is_null($sign)) && ($sign != '') && (file_exists($teacherPic))){ unlink($teacherSign); }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n \t} \r\n \r\n\t\t}", "function removeAdminPicture($conn, $admiID) {\r\n\r\n\t\t\t\tglobal $adminAccessTB, $wizGradeDefaultPic, $wizGradeAdminPicDir, $foreal; \r\n\r\n\t\t\t\t$ebele_mark = \"SELECT a_picture\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tFROM $adminAccessTB\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\tWHERE admin_id = :admin_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n\t\t\t\t$igweze_prep->bindValue('admin_id', $admiID);\r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$pic = $row['a_picture'];\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$adminPic = $wizGradeAdminPicDir.$pic;\r\n\t\t\r\n\t\t\t\t\tif ((!is_null($pic)) && ($pic != '') && (file_exists($adminPic))){ unlink($adminPic); } \r\n\r\n \t} \r\n \r\n\t\t}", "private function _remove_image(){\n\t\t\n\t\t$image_name = $this->view->user->user_image;\n\t\t\n\t\tif(file_exists(PROFILE_IMAGES_PATH.\"/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/\".$image_name);\n\t\t}\n\t\t\n\t\tif(file_exists(PROFILE_IMAGES_PATH.\"/thumb/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/thumb/\".$image_name);\n\t\t}\n\t\t \n \t\tif(file_exists(PROFILE_IMAGES_PATH.\"/60/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/60/\".$image_name);\n\t\t}\n\t\tif(PROFILE_IMAGES_PATH.\"/160/\".$image_name){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/160/\".$image_name);\n\t\t}\n\t\t\n\t\treturn true ;\n\t\t\n\t}", "public function removeImageProfile ($name) {}", "public function removeProfile () {\n $path = auth()->user()->pic;\n auth()->user()->pic = '';\n auth()->user()->save();\n\n if (file_exists($path)) {\n unlink($path);\n }\n return ['msg' => 'Profile Picture removed successfully'];\n }", "public function remove_company_logo()\n {\n do_action('before_remove_company_logo');\n if (!has_permission('settings', '', 'delete')) {\n access_denied('settings');\n }\n if (file_exists(COMPANY_FILES_FOLDER . '/' . get_option('company_logo'))) {\n unlink(COMPANY_FILES_FOLDER . '/' . get_option('company_logo'));\n }\n update_option('company_logo', '');\n redirect($_SERVER['HTTP_REFERER']);\n }", "function deleteImage($path, $table, $field, $conditon){\r\r\n global $db; \r\r\n $sqldel = \"select \".$field.\" from \".$table.\" where \".$conditon;\r\r\n $db->query($sqldel);\r\r\n $db->next_record();\r\r\n if($db->num_rows()>0){\r\r\n $fieldreuslt = $db->f($field);\r\r\n if($fieldreuslt !=''){\r\r\n $updateArr = array($field => '');\r\r\n $db->updateRec($table,$updateArr, $conditon);\r\r\n unlink($path.$fieldreuslt);\r\r\n }\r\r\n $db->next_record();\r\r\n }\r\r\n }", "function DeleteFilenamePicture( $photoID )\r\n{\r\n\t$q=db_query(\"select filename from \".PRODUCT_PICTURES.\" where photoID=\".\r\n\t\t\t\t$photoID );\r\n\tif ( $filename = db_fetch_row($q) )\r\n\t{\r\n\t\tif ( file_exists(DIR_PRODUCTS_PICTURES.\"/\".$filename[\"filename\"]) )\r\n\t\t\t\tFunctions::exec('file_remove', array(DIR_PRODUCTS_PICTURES.\"/\".$filename[\"filename\"]));\r\n\t\tdb_query(\"update \".PRODUCT_PICTURES.\" set filename=''\".\r\n\t\t\t\t\" where photoID=\".$photoID );\r\n\t}\r\n}", "public function old_pic_remove($user_id='')\r\n\t{\r\n\t\t\t$data = DB::table('users')->find($user_id);\r\n\t\t\t$image = $data->image;\r\n\t\t\t$image_thumb = storage_path('app/public/uploads/users/'.$user_id.'/'.$image);\r\n\t\t\t@unlink($image_thumb);\r\n\t\t return true;\r\n\t}", "public function do_delete_old_image(){\n\t\t$data = $this->get_profile();\n\n\t\t// Delete file\n\t\t$this->load->helper(\"file\");\n\t\t$old_image_path = $data['image'];\n\t\t// Change path when you upload to a live server\n\t\tif ($old_image_path != 'default.gif') {\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT']. 'ci/public/upload/img/profile/thumbnail_' .$old_image_path);\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT']. 'ci/public/upload/img/profile/' .$old_image_path) ;\n\t\t}\n\n\t\t// Remove a file table in upload table\n $this->db->where('id', $this->session->userdata('id'));\n $fetch_image = $this->db->get('user_profiles')->row()->image;\n $this->db->where('file', $fetch_image);\n $this->db->delete('upload');\t\n\n\t\t// Remove filename in profiles table \n\t\t$temp_data = array(\n\t\t\t'image' => 'default.gif'\n\t\t\t);\n\t\t$this->db->where('id', $this->session->userdata('id'));\n\t\t$this->db->update('user_profiles', $temp_data);\t\n\t}", "public function delDetailImage() {\n if (file_exists('../data/detail_img/'.$this->detailImg)) {\n unlink('../data/detail_img/'.$this->detailImg);\n }\n }", "function delete_image($id_value,$table,$field_name,$field_id,$path)\n\t{\n\t\t\t\n\t\t\t$data = array();\n \t$this->db->select($field_name);\n \t$this->db->where($field_id,$id_value);\n\t $Q = $this->db->get($table);\n $image_name =\"default_image.jpg\";\n \tif ($Q->num_rows() > 0)\n\t\t{\n\t \tforeach ($Q->result_array() as $row)\n\t\t {\n \t\t$image_name = $row[$field_name];\n\t \t}\n \t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tif($image_name!=\"default_image.jpg\")\n\t\t{\n\t\t\t$image_default = \"./../images/\".$path.\"/\".$image_name;\n\t\t\t$image_large = \"./../images/\".$path.\"/large/\".$image_name;\n\t\t\t$image_medium = \"./../images/\".$path.\"/medium/\".$image_name;\n\t\t\t$image_small = \"./../images/\".$path.\"/small/\".$image_name;\n\t\t\t$return = @unlink($image_default);\n\t\t\t$return = @unlink($image_large);\n\t\t\t$return = @unlink($image_medium);\n\t\t\t$return = @unlink($image_small);\n\t\t}\n\t}", "function remove_image($image)\n{\n $new_file = \"\";\n $file_content = file_get_contents('./image_registry.csv');\n $lines = explode(\"\\n\",$file_content);\n for ($i=0; $i<count($lines); $i++)\n {\n if ($lines[$i] == \"\") {continue;}\n $details = explode(\",\",$lines[$i]);\n $name_tmp = $details[0];\n $id_tmp = $details[1];\n if ($name_tmp != $image)\n {\n $new_file = $new_file.$lines[$i].'\\n';\n }\n }\n shell_exec('printf \\''.$new_file.'\\' > ./image_registry.csv');\n return \"done\";\n}", "public function removeImage () {}", "function user_photo_delete() {\n\t global $database;\n\t $user_photo = $this->user_photo();\n\t if($user_photo != \"\") {\n\t unlink($user_photo);\n\t $database->database_query(\"UPDATE se_users SET user_photo='' WHERE user_id='\".$this->user_info[user_id].\"'\");\n\t $this->user_info[user_photo] = \"\";\n\t }\n\t}", "function delete_image($id_value,$table,$field_name,$field_id,$path)\n\t{\n\t\t\n\t\t/*$getcategory_url = $this->db->select(\"banner_image\")->from(\"category\")->where(\"id\", $category_id)->get();\n\t\t\t\n\t\t\t$result_object = $getcategory_url->row();\n\t\t\t\n\t\t\t$image_name = $result_object->banner_image;\n\t\t\t*/\n\t\t\t\n\t\t\t$data = array();\n \t$this->db->select($field_name);\n \t$this->db->where($field_id,$id_value);\n\t $Q = $this->db->get($table);\n $image_name =\"default_image.jpg\";\n \tif ($Q->num_rows() > 0)\n\t\t{\n\t \tforeach ($Q->result_array() as $row)\n\t\t {\n \t\t$image_name = $row[$field_name];\n\t \t}\n \t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tif($image_name!=\"default_image.jpg\")\n\t\t{\n\t\t\t$image_default = \"./../images/\".$path.\"/\".$image_name;\n\t\t\t$image_large = \"./../images/\".$path.\"/large/\".$image_name;\n\t\t\t$image_medium = \"./../images/\".$path.\"/medium/\".$image_name;\n\t\t\t$image_small = \"./../images/\".$path.\"/small/\".$image_name;\n\t\t\t$return = @unlink($image_default);\n\t\t\t$return = @unlink($image_large);\n\t\t\t$return = @unlink($image_medium);\n\t\t\t$return = @unlink($image_small);\n\t\t}\n\t}", "function remove_custom_image_header()\n{\n}", "public function deletePicture()\n {\n $this->getPicture()->remove(); \n $this->set('picture','');\n $this->save();\n }", "public function deleteProfilePhoto()\n {\n \\Storage::disk($this->profilePhotoDisk())->delete($this->avatar);\n\n $this->forceFill([\n 'avatar' => null,\n ])->save();\n }", "function DeleteFilenamePicture( $photoID )\n{\n\t$q=db_query(\"select filename from \".PRODUCT_PICTURES.\" where photoID=\".\n\t\t\t\t$photoID );\n\tif ( $filename = db_fetch_row($q) )\n\t{\n\t\tif ( file_exists(\"./products_pictures/\".$filename[\"filename\"]) )\n\t\t\t\tunlink(\"./products_pictures/\".$filename[\"filename\"]);\n\t\tdb_query(\"update \".PRODUCT_PICTURES.\" set filename=''\".\n\t\t\t\t\" where photoID=\".$photoID );\n\t}\n}", "public function unlinkPhotos()\n {\n if ($this->getPhoto() != null) {\n unlink(Category::UPLOAD_PATH_USER_PHOTO .\"/\". $this->getPhoto());\n }\n }", "public function removePhoto()\n {\n $file = $this->dirPhoto() . $this->getPhoto();\n if (file_exists($file) && $this->getPhoto() != 'default.jpg') {\n unlink($file);\n }\n }", "protected function deleteOldUserAvatar()\n {\n if (auth()->user()->avatar) {\n //je le supprime\n Storage::delete('public/' . auth()->user()->avatar);\n }\n }", "function cleanImages($parser=null) {\n $title_hash = md5(getPageTitle($parser));\n $path = getUploadDirectory().\"/uml-\".$title_hash.\"-*.{svg,png,cmapx}\";\n $files = glob($path, GLOB_BRACE);\n foreach ($files as $filename) {\n unlink($filename);\n }\n return true;\n}", "function PasswordImageClean(){\n $dh=@opendir(\"photos\");\n while($file=readdir($dh)){\n if (substr($file,0,3)==\"pw_\" &&\n time() - filemtime(\"photos/\".$file) > 60) {\n unlink(\"photos/\".$file);\n }\n }\n}", "function delete_image($user_email)\n\t{\n\t\t$image_path = 'assets/users/img/' . $user_email . '.png';\n\t\tif(file_exists($image_path))\n\t\t\tunlink($image_path);\n\t}", "function delete_images_pages($path,$imgary,$fieldimg,$isThumb=false)\r\n {\r\n global $CFG;\r\n foreach($imgary as $key=>$value)\r\n {\r\n \r\n if($isThumb)\r\n {\r\n $delthumb=$path.\"/\".str_replace(\".jpg\",\"T.jpg\",$value[$fieldimg]);\r\n unlink($delthumb);\r\n }\r\n $delimg=$path.\"/\".$value[$fieldimg];\r\n unlink($delimg);\r\n } \r\n \r\n }", "public final function remove_header_image()\n {\n }", "public function stripImage () {}", "public function RemovePicture($UserID) {\n $User = $this->GetID($UserID, DATASET_TYPE_ARRAY);\n if ($Photo = $User['Photo']) {\n $ProfilePhoto = ChangeBasename($Photo, 'p%s');\n $Upload = new Gdn_Upload();\n $Upload->Delete($ProfilePhoto);\n \n $this->SetField($UserID, 'Photo', NULL);\n }\n }", "public function delete_profile_img() {\n $this->db->where('user_id', $this->session->userdata('user_id'))->update(DB_PREFIX .'user', array('profile_img' => MEMBERS_GENERIC));\n return $this->db->affected_rows();\n }", "public function deleteImage($field) {\n// foreach($this->fields as $field => $fieldSizes) {\n $this->owner->{$field} = null;\n $filePath = $this->getFilePath();\n $fileName = $this->owner->oldAttributes[$field];\n @unlink($filePath . $fileName);\n foreach($this->fields[$field] as $sizeName => $sizes) {\n if($sizeName != 'saveOriginal') {\n $thumbFileName = preg_replace(\"/(\\.\\S{3,4})$/iu\", \"_$sizeName$1\", $fileName);\n @unlink($filePath . $thumbFileName);\n }\n }\n// }\n }", "public function get_removePhoto()\n\t{\n\t\t// Logged Person\n\t\t$user = Auth::user();\n\t\t$personLoggedId = $user->Person->id;\n\n\t\t$personId = Session::get('personIdPhotonEditing');\n\t\t$input = Input::all();\n\n\t\t$nodePersonToUpdatePhoto = $this->get('NodePerson')->findById($personId);\n\n\t\tif ($nodePersonToUpdatePhoto == null || $nodePersonToUpdatePhoto->ownerId != $personLoggedId) {\n\t\t\treturn Redirect::to('/tree');\n\t\t}\n\n\t\t$person = $this->personRepository->getById($personId);\n\t\t$person->photo = null;\n\n\t\t$this->personRepository->store($person);\n\t\treturn Redirect::to('/tree');\n\t}", "function cleanTrash() {\n\t\t$result = $this->select(\"avatar\", \"status=2\");\n\t\tif ($result)\n\t\tforeach ($result as $image){\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/weblinks/storage/\".$image['avatar']);\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/weblinks/avatar/\".$image['avatar']);\n\t\t}\n\t\t$results = $this->delete(\"status=2\");\n\t\tif ($results)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "public function removeAvatarFromDestination($path)\n {\n $this->avatar ? unlink($path .'/' .$this->avatar->filename) : '';\n }", "private function deleteUserPhoto()\n {\n Storage::disk('local')->delete('public/' . $this->user->photo);\n }", "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "function remove_absolute_path( $html )\n{\n $site_url1 = site_url(); // http://disenodev.linklotus.com/\n $html = str_replace( $site_url1, \"\", $html);\n return $html;\n}", "public function unlink() {\n\t\tif (isset($this->{$this->imageColumn}) && $this->{$this->imageColumn} != '') {\n\t\t\t$service = new FileUploadService($this->fileUpload, $this, $this->{$this->imageColumn});\n\t\t\t$service->unlinkImages();\n\n\t\t\t$this->{$this->imageColumn} = '';\n\t\t\t$this->save();\n\n\t\t\treturn '[]';\n\t\t}\n\t}", "function handle_customer_profile_image_delete($customer_id,$dirname=''){\n do_action('before_delete_customer_customerthumb');\n\n if($dirname==\"\"){\n $dirname = get_upload_path_by_type('customerp') . $customer_id . '/';\n }\n\n if(is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname.\"/\".$file))\n {\n unlink($dirname.\"/\".$file);\n }\n else\n {\n delete_directory($customer_id, $dirname.'/'.$file);\n }\n }\n }\n closedir($dir_handle);\n rmdir($dirname);\n return true;\n}", "function concat_path($row) {\r\n $newPath = base_url() . \"img/pictos/\" . $row[\"imgPicto\"];\r\n $row[\"imgPicto\"] = $newPath;\r\n return $row;\r\n }", "function deletePicture() {\n\t\tglobal $DB_LINK, $db_table_restaurants, $g_rb_database_type, $LangUI;\n\t\t$sql = \"UPDATE $db_table_restaurants SET restaurant_picture='', restaurant_picture_type='' WHERE restaurant_id=\" . $DB_LINK->addq($this->id, get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\tDBUtils::checkResult($rc, NULL, $LangUI->_('There was an error removing the picture'), $sql);\n\n\t\t// Do the postgres cleanup\n\t\tif ($this->picture_oid && $g_rb_database_type==\"postgres\") {\n\t\t\t$rc = $DB_LINK->BlobDelete($this->picture_oid);\n\t\t\t$this->picture_oid=NULL;\n\t\t\tDBUtils::checkResult($rc, NULL, $LangUI->_('There was an error removing the picture'), $sql);\n\t\t}\n\t\treturn TRUE;\n\t}", "function delete() {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t// Require glob support for older php versions (version < 4.3)\r\n\r\n\t\t\trequire_once realpath(dirname(__file__) . '/includes/GlobExtension.script.php');\r\n\r\n\t\t\t// we want to erase all traces of this previously uploaded image:\r\n\t\t\t// first, we delete all generated thumbnails\r\n\r\n\t\t\t$emptyArray = array('');\r\n\t\t\t$exampleThumb = $this->_getUniqueThumbnailName($emptyArray);\r\n\t\t\t$thumbGlob = preg_replace('/(.*\\..*\\.).*(\\.th\\..*)/','$1*$2',$exampleThumb);\r\n\t\t\t$globPattern = YAPB_CACHE_ROOT_DIR . $thumbGlob;\r\n\r\n\t\t\t$allThumbnails = glob($globPattern);\r\n\t\t\tfor ($i=0, $len=count($allThumbnails); $i<$len; $i++) {\r\n\t\t\t\tunlink($allThumbnails[$i]);\r\n\t\t\t}\r\n\r\n\t\t\t// now we delete the original image\r\n\r\n\t\t\t@unlink($this->systemFilePath());\r\n\r\n\t\t\t// at last we clean up the database entries belonging to that image\r\n\r\n\t\t\t$wpdb->query('DELETE FROM ' . YAPB_TABLE_NAME . ' where id = ' . $this->id);\r\n\r\n\t\t}", "public function remove_profile_image ($member_id=0, $coaching_id=0 ) {\n\t\t$user = $this->users_model->get_user ($member_id);\n\t\t$this->users_model->remove_profile_image ($member_id);\n\t\t$this->message->set ('Profile image removed successfully', 'success', true);\n redirect ('student/users/my_account/'.$coaching_id.'/'.$member_id);\n\t}", "function handle_user_profile_image_delete($user_id,$dirname=''){\n do_action('before_delete_user_userthumb');\n\n if($dirname==\"\"){\n $dirname = get_upload_path_by_type('user') . $user_id . '/';\n }\n\n if(is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname.\"/\".$file))\n {\n unlink($dirname.\"/\".$file);\n }\n else\n {\n delete_directory($user_id, $dirname.'/'.$file);\n }\n }\n }\n closedir($dir_handle);\n rmdir($dirname);\n return true;\n}", "private function _removeStoredImage($path){\n if(!unlink(\\Vegans\\Controllers\\Images\\Consts::PUBPATH . $path)){\n throw new Error('ERROR during delete file');\n }\n }", "function DelPicture($id_public = NULL){\n if(empty($id_public) && !empty($this->id)) $id_public = $this->id;\n $tmp_db = DBs::getInstance();\n $q=\"SELECT * FROM `\".TblModPublic.\"` WHERE `id`='\".$id_public.\"'\";\n $res = $tmp_db->db_Query( $q );\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if( !$res OR !$tmp_db->result ) return false;\n $row = $tmp_db->db_FetchAssoc();\n if(!empty($row['img'])){\n $path = SITE_PATH.'/images/mod_public/'.$id_public;\n $this->removeDirRec($path);\n }\n return true;\n }", "private static function db_remove_all_nmuploads_for($path){\n\t\t$query=OC_DB::prepare('DELETE FROM `*PREFIX*mn_uploads` WHERE `path` = ?');\n\t\t$query->execute(array(OC\\Files\\Filesystem::getLocalFile($path)));\n\t}", "function Suppression($table,$valeur){\r\n\t\r\n\t$sql = \"delete from \".$table.\" where id = '\". $valeur .\"'\";\r\n\t \r\n\t$bool = doQuery($sql);\r\n\t \r\n\t //supression de l'image principale de l'element\r\n\tif ($bool){\r\n\t\t$tab_valeur=split(',',$valeur);\r\n\t\t\r\n\t\tforeach($tab_valeur as $val){\r\n\t\t\t$nom_image = $val.\"_\".$table;\r\n\t\t\tforeach (glob(\"galerie/\".$nom_image.\".*\") as $filename) {\r\n\t\t\t\t unlink($filename);\r\n\t\t\t\t \r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t}\t\r\n\t\r\n\treturn $bool;\r\n}", "public function deleteImage(){\n $sql = $this->db->query(\"\n SELECT\n `id`,\n `name`,\n `extension`,\n `path`,\n `relative_id`,\n `relative_table`,\n `form_item`\n FROM\n `images`\n WHERE\n `id` = \".intval($_GET['file_id']).\"\n \");\n\n $f = mysql_fetch_assoc($sql);\n\t\t\t$r1 = explode(';', $_GET['thumbs']);\n\n\t\t\tforeach($r1 as $item){\n\t\t\t\t$r2 = explode(',', $item);\n\n\t\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].'_'.$r2[2].(($f['extension'])?'.'.$f['extension']:false);\n\n\t\t\t\tif(file_exists($file)){\n print $file.' ';\n\t unlink($file);\n\t };\n\t\t\t};\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_list_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $this->db->query(\"DELETE FROM `images` WHERE `id` = \".intval($f['id']));\n\n $this->db->query(\"\n UPDATE\n `\".DB::quote($f['relative_table']).\"`\n SET\n `\".DB::quote($f['form_item']).\"` = `\".DB::quote($f['form_item']).\"` - 1\n WHERE\n `id` = \".intval($f['relative_id']).\"\n \");\n }", "function remove_agriflex_college_logo() {\n\tremove_action( 'agriflex_before_header', 'agriflex_college_logo');\n}", "protected function removeFromDs(array &$dataStructure, $sheetName = '', $removePath = '') {\r\n\t\tforeach ($dataStructure['sheets'][$sheetName]['ROOT']['el'] as $field => $value) {\r\n\t\t\tif (strpos($field, $removePath) === 0) {\r\n\t\t\t\tunset($dataStructure['sheets'][$sheetName]['ROOT']['el'][$field]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function ceres_delete_retina_support_images( $attachment_id ) {\r\n $meta = wp_get_attachment_metadata( $attachment_id );\r\n $upload_dir = wp_upload_dir();\r\n $path = pathinfo( $meta['file'] );\r\n foreach ( $meta as $key => $value ) {\r\n if ( 'sizes' === $key ) {\r\n foreach ( $value as $sizes => $size ) {\r\n $original_filename = $upload_dir['basedir'] . '/' . $path['dirname'] . '/' . $size['file'];\r\n $retina_filename = substr_replace( $original_filename, '@2x.', strrpos( $original_filename, '.' ), strlen( '.' ) );\r\n if ( file_exists( $retina_filename ) )\r\n unlink( $retina_filename );\r\n }\r\n }\r\n }\r\n}", "public function company_profile_picture_upload(){\n\t \n\t \t$log_user_id=get_userLoggedIn(\"id\");\n\t\t\n\t\t/* below code to unlink old image from system 29 nov 2013 */\n\t\t$old_img_path =\"\";\n\t\tif($log_user_id)\n\t\t{\n\t\t\t$user_det=$this->db\n\t\t\t\t\t->get_where(\"user_company uc\",\n\t\t\t\t\t\t\t\tarray(\"uc.uid\"=>$log_user_id)\n\t\t\t\t\t)\n\t\t\t\t\t->row();\n\t\t\t$old_img_path = $user_det->s_logo?ltrim($user_det->s_logo,'/'):\"\";\n\t\t}\n\t\t\n\t\t/* end code to unlink old image from system 29 nov 2013 */\n if($posted[\"h_user_pic\"] = $this->input->post('h_user_pic')){\n $temp_upload= parse_jqUploader($posted[\"h_user_pic\"]);\n $dest= set_realpath(get_themeCompanyLogoDir()).random_string().\".\".$temp_upload[0][\"extension\"];\n if(copy($temp_upload[0][\"upload_path\"],$dest))//make sure to update the logo\n {\n $dml[\"h_user_pic\"]=serverToUrlPath($dest);\n\t\t\t\t\t\n\t\t\t\t\t//image resize option with gd library\n\t\t\t\t\t$this->load->helper('image_resize_helper');\n\t\t\t\t\t$ThumbDir = BASEPATH.'../resources/company/';\n\t\t\t\t\t$thumbfile = 'thumb_'.str_replace('/resources/company/','',$dml[\"h_user_pic\"]);\t\t\t\t\t\n\t\t\t\t\t$s_uploaded_file \t= upload_image_file($temp_upload[0][\"upload_path\"],$ThumbDir,$thumbfile,198,210);\t\t\t\t\t\n\t\t\t\t\tunlink(FCPATH.'resources/company/thumb_'.str_replace('resources/company/','',$old_img_path));\n\t\t\t\t\t\n $this->db->where('id', get_userLoggedIn(\"comp_id\"));\n $this->db->update('user_company', array('s_logo' => $dml[\"h_user_pic\"]));\n unlink($temp_upload[0][\"upload_path\"]);\n\t\t\t\t\tif($old_img_path!=\"\")\n\t\t\t\t\t\tunlink(FCPATH.$old_img_path); // unlink old image from system\n ?>\n <img id=\"profile_img_container\" src=\"<?=base_url();?><?= $dml[\"h_user_pic\"]?>\" width=\"100%\" height=\"100%\" alt=\"pic\" />\n\t\t\t\t\t\n <?php\n }\n \n }\n else {\n $this->render(\"\",true); \n }\n \n\n }", "function removeSlash($url){\n $testUrl = substr($url, 0, 2);\n \n if( $testUrl == \"//\"){\n return substr($url, 2);\n }else{\n return $url;\n }\n}", "function EliminarFotoPerfil($foto) {\r\n\t\tif ($foto !== 'img/perfiles/foto.jpg')\r\n\t\t\tunlink($foto);\r\n\t}", "function pathCompany()\n{\n return 'files/avatar/company/';\n}", "public function removeByPathRemovesCorrectPathDataProvider() {}", "function DeleteEnlargedPicture( $photoID )\n{\n\t$q=db_query(\"select enlarged from \".PRODUCT_PICTURES.\" where photoID=\".\n\t\t\t\t$photoID );\n\tif ( $enlarged=db_fetch_row($q) )\n\t{\n\t\tif ( file_exists(\"./products_pictures/\".$enlarged[\"enlarged\"]) )\n\t\t\t\tunlink(\"./products_pictures/\".$enlarged[\"enlarged\"]);\n\t\tdb_query(\"update \".PRODUCT_PICTURES.\" set enlarged=''\".\n\t\t\t\t\" where photoID=\".$photoID[\"enlarged\"]);\n\t}\n}", "function Suppression($table, $valeur) {\n\n $sql = \"delete from \" . $table . \" where id = '\" . $valeur . \"'\";\n\n $bool = doQuery($sql);\n\n //supression de l'image principale de l'element\n if ($bool) {\n $tab_valeur = split(',', $valeur);\n\n foreach ($tab_valeur as $val) {\n $nom_image = $val . \"_\" . $table;\n foreach (glob(\"galerie/\" . $nom_image . \".*\") as $filename) {\n unlink($filename);\n }\n }\n }\n\n return $bool;\n}", "private function clean() {\n if(!$query=$this->uCore->query(\"uDrive\",\"SELECT\n `file_id`,\n `site_id`,\n `file_mime`,\n `file_hashname`\n FROM\n `u235_files`\n WHERE\n `deleted`='2'\n LIMIT 200\n \")) $this->uCore->error(6);\n while($file=$query->fetch_object()) {\n $this->delete_file($file);\n }\n }", "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete on the update\n $this->temp = $this->image;\n //delete the current image\n $this->image = NULL;\n }\n }", "public function generateRemovePictureURL(int $id, string $albumId, string $pictureId, string $argSeparator): string;", "private function deleteOldLogo($path)\n {\n Storage::disk('public')->delete($path);\n }", "public function elimina_imagen_anterior($id)\r\n\t{\r\n\t\t$query = $this->db->query(\"select * from exam_datos_generales where Id='\".$id.\"'\");\r\n foreach ($query->result() as $x)\r\n {\r\n $imagenx = $x->boleta_pago;\r\n }\r\n /* \r\n $row = $query->row();\r\n */\r\n if($imagenx!=''){ // cuando es mayor que vacio o cero\r\n //unlink('./assets/'.$imagen);\r\n unlink('upload/boleta_cliente/'.$imagenx);\r\n }else{\r\n echo \"\"; \r\n }\r\n\t}", "function delete_related_rows($file_id)\n {\n //Imagen de perfil de usuario\n $arr_row['image_id'] = 0;\n $arr_row['url_image'] = '';\n $arr_row['url_thumbnail'] = '';\n $this->db->where('image_id', $file_id);\n $this->db->update('user', $arr_row);\n }", "function remove_delhivery_table() {\n}", "function Excluir()\n\t\t{\n\t\t\t$sql = \"delete from imagens\t\n\t\t\t\t\twhere codimagem = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array($this->codimagem));\n\t\t}", "protected function _removeOrigFile($attribute)\n {\n $filename = $this->getImagePath($attribute, 'orig');\n $this->_unlinkFile($filename);\n $info = pathinfo($filename);\n $this->_unlinkFile($info['dirname'] . DIRECTORY_SEPARATOR . 'backup_' . $info['basename']); \n }", "public function removeicon($input)\n {\n $setting = $this->query()->get();\n if ($input == 'logo') {\n if ($setting[0]->logo) {\n if (file_exists(public_path().'/img/site_logo/'.$setting[0]->logo)) {\n unlink('img/site_logo/'.$setting[0]->logo);\n }\n $this->query()->update(['logo' => null]);\n }\n } else {\n if ($setting[0]->favicon) {\n if (file_exists(public_path().'/img/favicon_icon/'.$setting[0]->favicon)) {\n unlink('img/favicon_icon/'.$setting[0]->favicon);\n }\n }\n $this->query()->update(['favicon' => null]);\n }\n }", "protected function stripPath($path) {\n\t\t$prefix = '/' . $this->uid . '/files';\n\t\treturn \\rtrim(\\substr($path, \\strlen($prefix)), '/');\n\t}", "public function removeSecondaryImage()\n {\n if ($this->input->is_ajax_request()) {\n $img = '.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'shop_images' . DIRECTORY_SEPARATOR . '' . $_POST['folder'] . DIRECTORY_SEPARATOR . $_POST['image'];\n unlink($img);\n }\n }", "public function deleteOldImage($path)\n {\n if (File::exists(public_path('/images/establishment/main/') . $path)) {\n File::delete(public_path('/images/establishment/main/') . $path);\n }\n if (File::exists(public_path('/images/establishment/middle/') . $path)) {\n File::delete(public_path('/images/establishment/middle/') . $path);\n }\n if (File::exists(public_path('/images/establishment/small/') . $path)) {\n File::delete(public_path('/images/establishment/small/') . $path);\n }\n return true;\n }", "function _remove_sponsor_img( Sponsor $sponsor ) {\n\t// Check if the sponsor image exists\n\tif ( !file_exists( $sponsor->getImgDir(false) ) )\n\t\tthrow new Exception( __(\"The sponsor's image doesn't exists\", 'wp-sfw-plugin') );\n\n\t// Remove the sponsor image from the server\n\t$img_directory = $sponsor->getImgDir(false);\n\tunset( $img_directory );\n\t// Seeting empty for the sponsor image\n\t$sponsor->setImg('');\n\n\t// Loading the SponsorDAO\n\t$dao = new SponsorDAO();\n\t// Saving the sponsor without img and return the sponsor object\n\treturn $dao->save( $sponsor );\n}", "public function delete_avatar()\n {\n if(isset($_POST['delete_avatar']))\n {\n\t\t\t$data['avatar'] = '';\n\t\t\tif($this->currentUser['avatar'] != ''){\n unlink(base_path($this->currentUser['avatar']));\n\t\t\t}\n $this->pdo->update('users', $data, 'id=' . $this->currentUser['id'] );\n lib_redirect();\n\t\t}\n }", "function delfrontphoto(){\n\t\t\tif($this->session->userdata('user')=='admin'){\n\t\t\t\t$data['user']=$this->session->userdata('user');\n\t\t\t\t$pathfoto='';\n\t\t\t\t$datadel=array(\n\t\t\t\t\t\t'frontpage_content' => $pathfoto\n\t\t\t\t);\n\t\t\t\t$this->db->where('id','1');\n\t\t\t\t$this->db->update('frontpage_content', $datadel);\n\t\t\t\t$this->session->set_flashdata('deletesuccess', '<div class=\"success\">delete front photo succesfully!</div>');\n\t\t\t\tredirect('admin/option#opfrontimage');\n\t\t\t}else{\n\t\t\t\tredirect('login');\n\t\t\t}\n\t\t}", "public function removeTimestamp($path);", "function media_no_point($path)\n{\n return str_replace('.', '', $path);\n}", "public function removeImage()\n {\n $piclist = explode(',', $this->piclist);\n if(!in_array($this->_id, $piclist))\n {\n $this->setError($this->output('NOT_IN'));\n\n return false;\n }\n\n $new_piclist = array();\n foreach($piclist as $picid)\n {\n if($picid != $this->_id)\n {\n array_push($new_piclist, $picid);\n }\n }\n\n $query = $this->_db->getQuery(true);\n\n if(!count($new_piclist))\n {\n $new_piclist = null;\n $query->set('piclist = NULL');\n }\n else\n {\n $new_piclist = implode(',', $new_piclist);\n $query->set('piclist = '.$this->_db->q($new_piclist));\n }\n\n if($this->using_database)\n {\n $query->update(_JOOM_TABLE_USERS)\n ->where('uuserid = '.$this->_user->get('id'));\n $this->_db->setQuery($query);\n if(!$this->_db->query())\n {\n $this->setError($this->_db->getErrorMsg());\n\n return false;\n }\n }\n else\n {\n $this->_mainframe->setUserState('joom.favourites.pictures', $new_piclist);\n }\n\n $this->_mainframe->triggerEvent('onJoomAfterRemoveFavourite', array($this->_id));\n\n return true;\n }", "function unlink_old_image($base_path,$img_name){\n\n $file_path = $base_path.$img_name;\n $thumb_path = $base_path.'thumb/'.$img_name;\n if(file_exists($file_path)){\n unlink($file_path);\n }\n\n if(file_exists($thumb_path)){\n unlink($thumb_path);\n }\n\n}", "function handle_assignment_provider_logo_delete($assignment_id,$dirname=''){\n // do_action('before_delete_customer_customerthumb');\n\n if($dirname==\"\"){\n $dirname = get_upload_path_by_type('assignment_provider') . $assignment_id . '/';\n }\n\n if(is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname.\"/\".$file))\n {\n unlink($dirname.\"/\".$file);\n }\n else\n {\n delete_directory($assignment_id, $dirname.'/'.$file);\n }\n }\n }\n closedir($dir_handle);\n rmdir($dirname);\n return true;\n}", "function unlink_orphaned_images($id, $path, $name, $thumb, $ext) {\n if (file_exists($path . $name . '.' . $ext)) {\n unlink($path . $name . '.' . $ext);\n }\n if (file_exists($path . $name . '.' . $thumb . '.' . $ext)) {\n unlink($path . $name . '.' . $thumb . '.' . $ext);\n }\n if (file_exists($path . '.v/' . $name . '.webp')) {\n unlink($path . '.v/' . $name . '.webp');\n }\n if (file_exists($path . '.v/' . $name . '.' . $thumb . '.webp')) {\n unlink($path . '.v/' . $name . '.' . $thumb . '.webp');\n }\n if (file_exists($path . '.v/' . $name . '.avif')) {\n unlink($path . '.v/' . $name . '.avif');\n }\n if (file_exists($path . '.v/' . $name . '.' . $thumb . '.avif')) {\n unlink($path . '.v/' . $name . '.' . $thumb . '.avif');\n }\n return $id.', ';\n}", "function deleteimage($lastfile='',$lastnormal='',$lastsmall='',$dich=''){ \n\n\tglobal $CONFIG;\n\n\tif($dich==''){\n\n\t\t$dich='';\n\n\t}else {\n\n\t\t$dich=$dich;\n\n\t}\n\n\tif ($lastfile||$lastnormal||$lastsmall)\n\n\t{\n\n\t\tif ($lastfile && file_exists($dich.$lastfile))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastfile);\n\n\t\t}\n\n\t\tif ($lastnormal && file_exists($dich.$lastnormal))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastnormal);\n\n\t\t}\n\n\t\tif ($lastsmall && file_exists($dich.$lastsmall))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastsmall);\n\n\t\t}\t\t\t\t\t\t\n\n\t}\n\n}", "final private function ifExist(string $campos,int $iu_img){\n //averiguamos la imagen de portada que se ecuentra actualmente o si es que existe\n $pimage = $this->db->select($campos,'jc_images_users','iu_id_user='.$this->user.' and iu_tipo='.$iu_img.'','LIMIT 1');\n if (false != $pimage) {\n \n if (file_exists($this->route_photos.$pimage[0][0])) {\n unlink($this->route_photos.$pimage[0][0]);\n }\n //eliminamos la imagen de portada anterior\n $this->db->delete('jc_images_users','iu_id='.$pimage[0][1].' and iu_id_user='.$this->user.'');\n }\n }", "public function deleteImage()\n {\n $velsof_spin_wheel = Tools::unSerialize(Configuration::get('SPIN_WHEEL')); //Array from db\n if (isset($velsof_spin_wheel['image_path'])) {\n $extension = explode('.', $velsof_spin_wheel['image_name']);\n unset($velsof_spin_wheel['image_path']);\n unset($velsof_spin_wheel['image_name']);\n unset($velsof_spin_wheel['image_type']);\n unset($velsof_spin_wheel['image_tmp_name']);\n unset($velsof_spin_wheel['image_size']);\n //Update new array and Deleting file from server\n Configuration::updateValue('SPIN_WHEEL', serialize($velsof_spin_wheel));\n unlink(_PS_MODULE_DIR_ . $this->name . '/views/img/admin/uploads/' . $velsof_spin_wheel['logo']);\n } else {\n echo 'No Image Found';\n }\n }", "public function deletePicture($id){\n\t\t\tif($id != 1 && $id != 2){ \n\t\t\t//id 1 : logo \n\t\t\t//id 2: image no profile \n\t\t\t//Cannot delete these two files\n\t\t\t\t$picturePath = $this->getPicture($id);\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'] . $picturePath); //delete image from folder\n\t\t\t\t$STH = $this->_connection->prepare(\"DELETE FROM picture WHERE picture_id = :id\");\n\t\t\t\t$STH->bindParam(':id', $id);\n\t\t\t\t$STH->execute();\n\t\t\t}\n\t\t}", "public function supprimerPhoto($id){\n\n //suppression de la photo de la BDD\n Habitat::deletePhoto($id);\n\n //supprimer la photo du serveur\n //unlink(asset('public/img/photos/habitats/grandes/tipi_1.jpg'));\n\n }", "public function unlinkImage(){\n if ($this->session->userdata('user_login_access') != False) {\n $id = $this->input->get('UN');\n $imgvalue = $this->crud_model->getSingleProImageById($id);\n if (!empty($imgvalue->id)) {\n unlink(\"./assets/img/product/$imgvalue->img_url\");\n $delet = $this->crud_model->deelet_Img($id);\n $response['status'] = 'success';\n $response['message'] = \"Successfully Deleted\";\n $this->output->set_output(json_encode($response));\n }\n \n } else {\n redirect(base_url(), 'refresh');\n }\n }", "function delete_image($filename, $path) {\r\n $path = realpath(APPPATH . $path);\r\n /* Delete Last File Image If Exists */\r\n if ($filename) {\r\n// $this->mith_func->debugVar($path.$filename);\r\n if (file_exists($path . \"/\" . $filename))\r\n unlink($path . \"/\" . $filename);\r\n if (file_exists($path . \"/thumb/\" . $filename))\r\n unlink($path . \"/thumb/\" . $filename);\r\n }\r\n }", "function limpiaDir($pathFileSql){\n $dir =$pathFileSql;\n if (is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (($file = readdir($dh)) !== false) {\n if(filetype($dir.$file)==\"file\"){\n unlink($dir.$file);\n }\n }\n closedir($dh);\n }\n }\n }", "private function deletePreviousData(){\n DB::statement(\"SET foreign_key_checks=0\");\n SiteMeta::truncate();\n Testimonial::truncate();\n AboutContent::truncate();\n AboutSlider::truncate();\n Slider::truncate();\n ClassProfile::truncate();\n TeacherProfile::truncate();\n Event::truncate();\n DB::statement(\"SET foreign_key_checks=1\");\n\n //delete images\n $storagePath = storage_path('app/public');\n $dirs = [\n $storagePath.'/sliders',\n $storagePath.'/about',\n $storagePath.'/class',\n $storagePath.'/teacher',\n $storagePath.'/gallery',\n $storagePath.'/events',\n $storagePath.'/site',\n ];\n\n foreach ($dirs as $dir){\n system(\"rm -rf \".escapeshellarg($dir));\n }\n }", "public function removeCloudinaryImage($args)\n {\n \n //use data given as arguments to try to retrieve public id of image (stored in mysql), \n //which is necessary to remove it from cloudinary database \n $idOfUser = $args['idOfUser'];\n $linkToDB = $args['linkToDB'];\n $query = \"SELECT img_public_id FROM users WHERE id = '$idOfUser' LIMIT 1\";\n $result = mysqli_fetch_assoc(mysqli_query($linkToDB, $query));\n \n //value that will indicate whether image was removed successfully\n //if something goes wrong, will be changed to false\n $success = true;\n \n //Function will also be called when user uploads image (to remove the old one if exists),\n //so first it has to check, whether query gave image public id (whether there already is an image for this user),\n //and only if query gave result, try to remove image from cloudinary\n if ($imageToRemove = $result['img_public_id']) {\n $cloudinaryRemove = \\Cloudinary\\Uploader::destroy($imageToRemove, array(\n invalidate => true\n ));\n if ($cloudinaryRemove['result'] != 'ok') {\n $success = false;\n }\n }\n \n //If user uploads new image, image url and public id will be updated wth the new values, but if he only \n //wants to remove an image, it is necessary to remove url and id from mysql database.\n //Here the function checks whether an argument 'removeFromSQL' exists, which is passed if request is only about \n //removing old image and not uploading a new one. If the argument exists, function sets appropriate fields in \n //mysql database to null\n if ($args['removeFromSQL']) {\n $query = \"UPDATE users SET img_url = NULL, img_public_id = NULL WHERE id = '$idOfUser' LIMIT 1\";\n $mysqlRemove = mysqli_query($linkToDB, $query);\n if (!mysqlRemove) {\n $success = false;\n }\n }\n \n return $success;\n }", "public function excluirFoto($id){\r\n $id_anuncio = 0;\r\n $sql = $this->db->prepare(\"SELECT * FROM anuncios_imagens WHERE id = ?\");\r\n $sql->execute(array($id));\r\n if($sql->rowCount() > 0){\r\n $row = $sql->fetch();\r\n $id_anuncio = $row['id_anuncio'];\r\n unlink(\"assets/imgs/anuncios/\".$row['url']);\r\n }\r\n $sql = $this->db->prepare(\"DELETE FROM anuncios_imagens WHERE id = ?\");\r\n $sql->execute(array($id));\r\n }", "function show_pic_in_table(){\n //if($alledatein = scandir(\"/home/rex/fi3/im16/s75931/public_html/images/\")){\n if($alledatein = scandir(\"./images/\")){\n\n foreach ($alledatein as $datei) {\n\n if(\"$datei\" != \".\" && \"$datei\" != \"..\"){\n echo '<tr>\n <td><img src=images/' .\"$datei\". ' style=\"width:100px; height:100px; margin-left:5px; margin-top:5px; margin-bottom:5px; margin-right:20px;\">\n </td>\n <td><a href=\"images/' . $datei . '\">'.\"$datei\".'</a></td>\n <td text-align:center;\"><input type=\"button\" class=\"btn_delete\" value=\"Löschen\" id=\"'.\"$datei\".'\" /></td>\n </tr>';\n }\n }\n }else{\n echo \"Directory not available!\";\n }\n}", "private function deletePreviousData(){\n DB::statement(\"SET foreign_key_checks=0\");\n $this->deleteUserData();\n AcademicYear::truncate();\n AppMeta::truncate();\n IClass::truncate();\n Employee::truncate();\n Section::truncate();\n \\App\\Subject::truncate();\n \\App\\Student::truncate();\n \\App\\Registration::truncate();\n DB::statement(\"SET foreign_key_checks=1\");\n\n //delete images\n $storagePath = storage_path('app/public');\n $storagePath2 = storage_path('app');\n $dirs = [\n $storagePath.'/admission',\n $storagePath.'/employee',\n $storagePath.'/invoice',\n $storagePath.'/leave',\n $storagePath.'/logo',\n $storagePath.'/payroll',\n $storagePath.'/report',\n $storagePath.'/student',\n $storagePath.'/work_outside',\n $storagePath2.'/student-attendance',\n $storagePath2.'/employee-attendance',\n ];\n\n foreach ($dirs as $dir){\n system(\"rm -rf \".escapeshellarg($dir));\n }\n }", "function remove_xprofile_links() {\n remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );\n}", "function removeAvatar(int $id)\n{\n global $db;\n $sql = \"UPDATE FROM users SET avatar='' WHERE id='$id';\";\n $request = $db->query($sql);\n $results = $request->fetchAll();\n return $results;\n}", "function delete_old_avatar($blog_id)\n\t{\n\t\t$file = $this->get_blog_by_id($blog_id);\n\t\tunlink('./userfiles/blog/' . $file->blog_avatar_name); \n\t}" ]
[ "0.6972489", "0.685564", "0.62205184", "0.6197167", "0.6096044", "0.6090056", "0.605073", "0.6038337", "0.60256237", "0.5970196", "0.59524626", "0.5866881", "0.58423936", "0.5816373", "0.58035326", "0.5800067", "0.5791572", "0.5785607", "0.5772028", "0.57505643", "0.57343614", "0.57308525", "0.5715235", "0.5712496", "0.5668026", "0.5662691", "0.56411", "0.56329155", "0.5631844", "0.56101435", "0.5597458", "0.5576746", "0.5570451", "0.5566101", "0.5548241", "0.55447525", "0.5544584", "0.5540923", "0.5529176", "0.5526166", "0.5504398", "0.5496586", "0.5492593", "0.54773414", "0.545858", "0.5452288", "0.5450127", "0.5434959", "0.54321396", "0.5430705", "0.5419062", "0.5416433", "0.541366", "0.5412624", "0.5403695", "0.5403511", "0.5400806", "0.5400019", "0.5393666", "0.53918755", "0.53901607", "0.5379253", "0.53771794", "0.5377127", "0.53768605", "0.5370286", "0.5368738", "0.5366217", "0.5353559", "0.5352133", "0.53469837", "0.53380734", "0.53317595", "0.53292215", "0.5326332", "0.53202665", "0.53139776", "0.5312112", "0.5310846", "0.53075093", "0.53065646", "0.53040385", "0.52943665", "0.5294016", "0.5293197", "0.52860564", "0.5281438", "0.5258683", "0.5256169", "0.52515656", "0.52434826", "0.5235566", "0.5234246", "0.5227793", "0.5224429", "0.5222318", "0.5220299", "0.5219289", "0.52159846", "0.5215454" ]
0.75128144
0
Function to remove user image path from table September 21,2016
Функция для удаления пути к изображению пользователя из таблицы 21 сентября 2016 года
function removeUserProfilePicPathFromDB($userID) { $qry="UPDATE client_profile SET avatar='' WHERE clientid=".$userID." "; setData($qry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeCompanyProfilePicPathFromDB($userID)\n{\n\t$companyID\t=\tgetCompanyIDFromCompUserRelation($userID);\n\t$qry=\"UPDATE company_profiles SET avatar='' WHERE id=\".$companyID.\" \";\n\tsetData($qry);\n}", "public function old_pic_remove($user_id='')\r\n\t{\r\n\t\t\t$data = DB::table('users')->find($user_id);\r\n\t\t\t$image = $data->image;\r\n\t\t\t$image_thumb = storage_path('app/public/uploads/users/'.$user_id.'/'.$image);\r\n\t\t\t@unlink($image_thumb);\r\n\t\t return true;\r\n\t}", "private function _remove_image(){\n\t\t\n\t\t$image_name = $this->view->user->user_image;\n\t\t\n\t\tif(file_exists(PROFILE_IMAGES_PATH.\"/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/\".$image_name);\n\t\t}\n\t\t\n\t\tif(file_exists(PROFILE_IMAGES_PATH.\"/thumb/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/thumb/\".$image_name);\n\t\t}\n\t\t \n \t\tif(file_exists(PROFILE_IMAGES_PATH.\"/60/\".$image_name)){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/60/\".$image_name);\n\t\t}\n\t\tif(PROFILE_IMAGES_PATH.\"/160/\".$image_name){\n\t\t\tunlink(PROFILE_IMAGES_PATH.\"/160/\".$image_name);\n\t\t}\n\t\t\n\t\treturn true ;\n\t\t\n\t}", "function removeStudentPicture($conn, $stu_reg, $path) { \r\n\r\n\t\t\t\tglobal $i_reg_tb, $i_student_tb; global $foreal;\r\n\r\n\t\t\t\t$ebele_mark = \"SELECT r.ireg_id, s.i_stupic\r\n\r\n\t\t\t\t\t\t\t FROM $i_reg_tb r, $i_student_tb s\r\n\r\n\t\t\t\t\t\t\t WHERE nk_regno = :nk_regno\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t AND r.ireg_id = s.ireg_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n \t\t\t\t$igweze_prep->bindValue(':nk_regno', $stu_reg);\t\t\t\t \r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$i_stupic = $row['i_stupic'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(($path != '') && ($i_stupic != '')){ \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$stuPic = $path.$i_stupic;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(file_exists($stuPic)){\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\tunlink($stuPic);\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\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\t} \r\n \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t}", "function delete_image($user_email)\n\t{\n\t\t$image_path = 'assets/users/img/' . $user_email . '.png';\n\t\tif(file_exists($image_path))\n\t\t\tunlink($image_path);\n\t}", "function user_photo_delete() {\n\t global $database;\n\t $user_photo = $this->user_photo();\n\t if($user_photo != \"\") {\n\t unlink($user_photo);\n\t $database->database_query(\"UPDATE se_users SET user_photo='' WHERE user_id='\".$this->user_info[user_id].\"'\");\n\t $this->user_info[user_photo] = \"\";\n\t }\n\t}", "public function removeImage () {}", "function remove_image($image)\n{\n $new_file = \"\";\n $file_content = file_get_contents('./image_registry.csv');\n $lines = explode(\"\\n\",$file_content);\n for ($i=0; $i<count($lines); $i++)\n {\n if ($lines[$i] == \"\") {continue;}\n $details = explode(\",\",$lines[$i]);\n $name_tmp = $details[0];\n $id_tmp = $details[1];\n if ($name_tmp != $image)\n {\n $new_file = $new_file.$lines[$i].'\\n';\n }\n }\n shell_exec('printf \\''.$new_file.'\\' > ./image_registry.csv');\n return \"done\";\n}", "function removeAdminPicture($conn, $admiID) {\r\n\r\n\t\t\t\tglobal $adminAccessTB, $wizGradeDefaultPic, $wizGradeAdminPicDir, $foreal; \r\n\r\n\t\t\t\t$ebele_mark = \"SELECT a_picture\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tFROM $adminAccessTB\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\tWHERE admin_id = :admin_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n\t\t\t\t$igweze_prep->bindValue('admin_id', $admiID);\r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$pic = $row['a_picture'];\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$adminPic = $wizGradeAdminPicDir.$pic;\r\n\t\t\r\n\t\t\t\t\tif ((!is_null($pic)) && ($pic != '') && (file_exists($adminPic))){ unlink($adminPic); } \r\n\r\n \t} \r\n \r\n\t\t}", "function deleteImage($path, $table, $field, $conditon){\r\r\n global $db; \r\r\n $sqldel = \"select \".$field.\" from \".$table.\" where \".$conditon;\r\r\n $db->query($sqldel);\r\r\n $db->next_record();\r\r\n if($db->num_rows()>0){\r\r\n $fieldreuslt = $db->f($field);\r\r\n if($fieldreuslt !=''){\r\r\n $updateArr = array($field => '');\r\r\n $db->updateRec($table,$updateArr, $conditon);\r\r\n unlink($path.$fieldreuslt);\r\r\n }\r\r\n $db->next_record();\r\r\n }\r\r\n }", "public function unlink() {\n\t\tif (isset($this->{$this->imageColumn}) && $this->{$this->imageColumn} != '') {\n\t\t\t$service = new FileUploadService($this->fileUpload, $this, $this->{$this->imageColumn});\n\t\t\t$service->unlinkImages();\n\n\t\t\t$this->{$this->imageColumn} = '';\n\t\t\t$this->save();\n\n\t\t\treturn '[]';\n\t\t}\n\t}", "protected function deleteOldUserAvatar()\n {\n if (auth()->user()->avatar) {\n //je le supprime\n Storage::delete('public/' . auth()->user()->avatar);\n }\n }", "public function stripImage () {}", "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete on the update\n $this->temp = $this->image;\n //delete the current image\n $this->image = NULL;\n }\n }", "private function deleteUserPhoto()\n {\n Storage::disk('local')->delete('public/' . $this->user->photo);\n }", "function delete_image($id_value,$table,$field_name,$field_id,$path)\n\t{\n\t\t\t\n\t\t\t$data = array();\n \t$this->db->select($field_name);\n \t$this->db->where($field_id,$id_value);\n\t $Q = $this->db->get($table);\n $image_name =\"default_image.jpg\";\n \tif ($Q->num_rows() > 0)\n\t\t{\n\t \tforeach ($Q->result_array() as $row)\n\t\t {\n \t\t$image_name = $row[$field_name];\n\t \t}\n \t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tif($image_name!=\"default_image.jpg\")\n\t\t{\n\t\t\t$image_default = \"./../images/\".$path.\"/\".$image_name;\n\t\t\t$image_large = \"./../images/\".$path.\"/large/\".$image_name;\n\t\t\t$image_medium = \"./../images/\".$path.\"/medium/\".$image_name;\n\t\t\t$image_small = \"./../images/\".$path.\"/small/\".$image_name;\n\t\t\t$return = @unlink($image_default);\n\t\t\t$return = @unlink($image_large);\n\t\t\t$return = @unlink($image_medium);\n\t\t\t$return = @unlink($image_small);\n\t\t}\n\t}", "public function do_delete_old_image(){\n\t\t$data = $this->get_profile();\n\n\t\t// Delete file\n\t\t$this->load->helper(\"file\");\n\t\t$old_image_path = $data['image'];\n\t\t// Change path when you upload to a live server\n\t\tif ($old_image_path != 'default.gif') {\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT']. 'ci/public/upload/img/profile/thumbnail_' .$old_image_path);\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT']. 'ci/public/upload/img/profile/' .$old_image_path) ;\n\t\t}\n\n\t\t// Remove a file table in upload table\n $this->db->where('id', $this->session->userdata('id'));\n $fetch_image = $this->db->get('user_profiles')->row()->image;\n $this->db->where('file', $fetch_image);\n $this->db->delete('upload');\t\n\n\t\t// Remove filename in profiles table \n\t\t$temp_data = array(\n\t\t\t'image' => 'default.gif'\n\t\t\t);\n\t\t$this->db->where('id', $this->session->userdata('id'));\n\t\t$this->db->update('user_profiles', $temp_data);\t\n\t}", "function remove_custom_image_header()\n{\n}", "function cleanImages($parser=null) {\n $title_hash = md5(getPageTitle($parser));\n $path = getUploadDirectory().\"/uml-\".$title_hash.\"-*.{svg,png,cmapx}\";\n $files = glob($path, GLOB_BRACE);\n foreach ($files as $filename) {\n unlink($filename);\n }\n return true;\n}", "function handle_user_profile_image_delete($user_id,$dirname=''){\n do_action('before_delete_user_userthumb');\n\n if($dirname==\"\"){\n $dirname = get_upload_path_by_type('user') . $user_id . '/';\n }\n\n if(is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname.\"/\".$file))\n {\n unlink($dirname.\"/\".$file);\n }\n else\n {\n delete_directory($user_id, $dirname.'/'.$file);\n }\n }\n }\n closedir($dir_handle);\n rmdir($dirname);\n return true;\n}", "public function removeImageProfile ($name) {}", "private function _removeStoredImage($path){\n if(!unlink(\\Vegans\\Controllers\\Images\\Consts::PUBPATH . $path)){\n throw new Error('ERROR during delete file');\n }\n }", "function DeleteFilenamePicture( $photoID )\r\n{\r\n\t$q=db_query(\"select filename from \".PRODUCT_PICTURES.\" where photoID=\".\r\n\t\t\t\t$photoID );\r\n\tif ( $filename = db_fetch_row($q) )\r\n\t{\r\n\t\tif ( file_exists(DIR_PRODUCTS_PICTURES.\"/\".$filename[\"filename\"]) )\r\n\t\t\t\tFunctions::exec('file_remove', array(DIR_PRODUCTS_PICTURES.\"/\".$filename[\"filename\"]));\r\n\t\tdb_query(\"update \".PRODUCT_PICTURES.\" set filename=''\".\r\n\t\t\t\t\" where photoID=\".$photoID );\r\n\t}\r\n}", "function eraseImage(string $image): string\n {\n $image = preg_replace('#<img src=\"\\.\\./themes/images/smiles/(.*?)\\.gif\" alt=\"(.*?)>#', '', $image);\n $image = preg_replace('#<img src=\"\\.\\./themes/images/smiles2/(.*?)\\.gif\" alt=\"(.*?)>#', '', $image);\n $image = preg_replace('#<img src=\"(.*?)\" alt=\"(.*?)>#', '', $image);\n $image = preg_replace('/<img src=\"(.*?)\" width=\"(.*?)\" height=\"(.*?)>/', '', $image);\n $image = preg_replace('/<img class=\"(.*?)\" src=\"(.*?)\" \\/>/', '', $image);\n $image = preg_replace('/<img class=\"(.*?)\" src=\"(.*?)\" alt=\"(.*?)>/', '', $image);\n\n return $image;\n }", "function removeTeacherPicSign($conn, $tID, $typeID) { \r\n\r\n\t\t\t\tglobal $staffTB, $wizGradeDefaultPic, $staffPicExt, $teachersSignExt, $foreal, $fiVal, $seVal; \r\n\r\n\t\t\t\t$ebele_mark = \"SELECT i_picture, i_sign\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tFROM $staffTB\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\tWHERE t_id = :t_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n \t\t\t\t$igweze_prep->bindValue(':t_id', $tID);\r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$pic = $row['i_picture'];\r\n\t\t\t\t\t\t$sign = $row['i_sign'];\r\n\r\n\t\t\t\t\t\tif($typeID == $fiVal){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$teacherPic = $staffPicExt.$pic;\r\n\t\t\r\n\t\t\t\t\t\t\tif ((!is_null($pic)) && ($pic != '') && (file_exists($teacherPic))){ unlink($teacherPic); }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\r\n\t\r\n\t\t\t\t\t\tif($typeID == $seVal){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$teacherSign = $teachersSignExt.$sign;\r\n\t\t\r\n\t\t\t\t\t\t\tif ((!is_null($sign)) && ($sign != '') && (file_exists($teacherPic))){ unlink($teacherSign); }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n \t} \r\n \r\n\t\t}", "function delete_image($id_value,$table,$field_name,$field_id,$path)\n\t{\n\t\t\n\t\t/*$getcategory_url = $this->db->select(\"banner_image\")->from(\"category\")->where(\"id\", $category_id)->get();\n\t\t\t\n\t\t\t$result_object = $getcategory_url->row();\n\t\t\t\n\t\t\t$image_name = $result_object->banner_image;\n\t\t\t*/\n\t\t\t\n\t\t\t$data = array();\n \t$this->db->select($field_name);\n \t$this->db->where($field_id,$id_value);\n\t $Q = $this->db->get($table);\n $image_name =\"default_image.jpg\";\n \tif ($Q->num_rows() > 0)\n\t\t{\n\t \tforeach ($Q->result_array() as $row)\n\t\t {\n \t\t$image_name = $row[$field_name];\n\t \t}\n \t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tif($image_name!=\"default_image.jpg\")\n\t\t{\n\t\t\t$image_default = \"./../images/\".$path.\"/\".$image_name;\n\t\t\t$image_large = \"./../images/\".$path.\"/large/\".$image_name;\n\t\t\t$image_medium = \"./../images/\".$path.\"/medium/\".$image_name;\n\t\t\t$image_small = \"./../images/\".$path.\"/small/\".$image_name;\n\t\t\t$return = @unlink($image_default);\n\t\t\t$return = @unlink($image_large);\n\t\t\t$return = @unlink($image_medium);\n\t\t\t$return = @unlink($image_small);\n\t\t}\n\t}", "public function RemovePicture($UserID) {\n $User = $this->GetID($UserID, DATASET_TYPE_ARRAY);\n if ($Photo = $User['Photo']) {\n $ProfilePhoto = ChangeBasename($Photo, 'p%s');\n $Upload = new Gdn_Upload();\n $Upload->Delete($ProfilePhoto);\n \n $this->SetField($UserID, 'Photo', NULL);\n }\n }", "public function deleteImageFile()\n {\n if ($this->image && file_exists(ROOT_PATH . '/public/upload/users/' . $this->image)) {\n // Delete current file\n unlink(ROOT_PATH . '/public/upload/users/' . $this->image);\n }\n }", "public function unlinkPhotos()\n {\n if ($this->getPhoto() != null) {\n unlink(Category::UPLOAD_PATH_USER_PHOTO .\"/\". $this->getPhoto());\n }\n }", "public function removeSecondaryImage()\n {\n if ($this->input->is_ajax_request()) {\n $img = '.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'shop_images' . DIRECTORY_SEPARATOR . '' . $_POST['folder'] . DIRECTORY_SEPARATOR . $_POST['image'];\n unlink($img);\n }\n }", "public final function remove_header_image()\n {\n }", "public function delDetailImage() {\n if (file_exists('../data/detail_img/'.$this->detailImg)) {\n unlink('../data/detail_img/'.$this->detailImg);\n }\n }", "public function removePhoto()\n {\n $file = $this->dirPhoto() . $this->getPhoto();\n if (file_exists($file) && $this->getPhoto() != 'default.jpg') {\n unlink($file);\n }\n }", "public function get_removePhoto()\n\t{\n\t\t// Logged Person\n\t\t$user = Auth::user();\n\t\t$personLoggedId = $user->Person->id;\n\n\t\t$personId = Session::get('personIdPhotonEditing');\n\t\t$input = Input::all();\n\n\t\t$nodePersonToUpdatePhoto = $this->get('NodePerson')->findById($personId);\n\n\t\tif ($nodePersonToUpdatePhoto == null || $nodePersonToUpdatePhoto->ownerId != $personLoggedId) {\n\t\t\treturn Redirect::to('/tree');\n\t\t}\n\n\t\t$person = $this->personRepository->getById($personId);\n\t\t$person->photo = null;\n\n\t\t$this->personRepository->store($person);\n\t\treturn Redirect::to('/tree');\n\t}", "function delete_image($image){\n\tif(file_exists($image)){\n\t\t$new_name = generateName(getNumber($image), '.deleted');\n\t\trename($image, $new_name);\n\t}\n}", "private function removeUser()\n {\n $databaseAdapter = new Database();\n $userMapper = new UserMapper($databaseAdapter);\n $userImage = $userMapper->getUserImage($this->view->userToRemove());\n\n if($userImage[0][\"profileImage\"] != \"Data/profile_images/default_profile_image.gif\") {\n unlink($userImage[0][\"profileImage\"]);\n }\n\n $this->view->responseAjaxCall($userMapper->removeUser($this->view->userToRemove()));\n }", "function deleteImage($texte)\n{\n\treturn $texte = str_replace(\"http\", \"\", $texte);\n}", "function PasswordImageClean(){\n $dh=@opendir(\"photos\");\n while($file=readdir($dh)){\n if (substr($file,0,3)==\"pw_\" &&\n time() - filemtime(\"photos/\".$file) > 60) {\n unlink(\"photos/\".$file);\n }\n }\n}", "function Suppression($table,$valeur){\r\n\t\r\n\t$sql = \"delete from \".$table.\" where id = '\". $valeur .\"'\";\r\n\t \r\n\t$bool = doQuery($sql);\r\n\t \r\n\t //supression de l'image principale de l'element\r\n\tif ($bool){\r\n\t\t$tab_valeur=split(',',$valeur);\r\n\t\t\r\n\t\tforeach($tab_valeur as $val){\r\n\t\t\t$nom_image = $val.\"_\".$table;\r\n\t\t\tforeach (glob(\"galerie/\".$nom_image.\".*\") as $filename) {\r\n\t\t\t\t unlink($filename);\r\n\t\t\t\t \r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t}\t\r\n\t\r\n\treturn $bool;\r\n}", "private static function db_remove_all_nmuploads_for($path){\n\t\t$query=OC_DB::prepare('DELETE FROM `*PREFIX*mn_uploads` WHERE `path` = ?');\n\t\t$query->execute(array(OC\\Files\\Filesystem::getLocalFile($path)));\n\t}", "public function removeImage()\n {\n if ($this->image !=null)\n {\n Storage::delete('uploads/'.$this->image);\n }\n }", "public function deleteImage($field) {\n// foreach($this->fields as $field => $fieldSizes) {\n $this->owner->{$field} = null;\n $filePath = $this->getFilePath();\n $fileName = $this->owner->oldAttributes[$field];\n @unlink($filePath . $fileName);\n foreach($this->fields[$field] as $sizeName => $sizes) {\n if($sizeName != 'saveOriginal') {\n $thumbFileName = preg_replace(\"/(\\.\\S{3,4})$/iu\", \"_$sizeName$1\", $fileName);\n @unlink($filePath . $thumbFileName);\n }\n }\n// }\n }", "function DeleteFilenamePicture( $photoID )\n{\n\t$q=db_query(\"select filename from \".PRODUCT_PICTURES.\" where photoID=\".\n\t\t\t\t$photoID );\n\tif ( $filename = db_fetch_row($q) )\n\t{\n\t\tif ( file_exists(\"./products_pictures/\".$filename[\"filename\"]) )\n\t\t\t\tunlink(\"./products_pictures/\".$filename[\"filename\"]);\n\t\tdb_query(\"update \".PRODUCT_PICTURES.\" set filename=''\".\n\t\t\t\t\" where photoID=\".$photoID );\n\t}\n}", "public function deleteImage()\n {\n $velsof_spin_wheel = Tools::unSerialize(Configuration::get('SPIN_WHEEL')); //Array from db\n if (isset($velsof_spin_wheel['image_path'])) {\n $extension = explode('.', $velsof_spin_wheel['image_name']);\n unset($velsof_spin_wheel['image_path']);\n unset($velsof_spin_wheel['image_name']);\n unset($velsof_spin_wheel['image_type']);\n unset($velsof_spin_wheel['image_tmp_name']);\n unset($velsof_spin_wheel['image_size']);\n //Update new array and Deleting file from server\n Configuration::updateValue('SPIN_WHEEL', serialize($velsof_spin_wheel));\n unlink(_PS_MODULE_DIR_ . $this->name . '/views/img/admin/uploads/' . $velsof_spin_wheel['logo']);\n } else {\n echo 'No Image Found';\n }\n }", "function get_image_phy_destination_path_user()\n{\t\n\tglobal $upload_folder_path;\n\t$tmppath = $upload_folder_path;\n\t$destination_path = ABSPATH . $tmppath.\"users/\";\n if (!file_exists($destination_path)){\n $imagepatharr = explode('/',$tmppath.\"users\");\n\t $year_path = ABSPATH;\n\t\tfor($i=0;$i<count($imagepatharr);$i++)\n\t\t{\n\t\t if($imagepatharr[$i])\n\t\t {\n\t\t\t$year_path .= $imagepatharr[$i].\"/\";\n\t\t\t if (!file_exists($year_path)){\n\t\t\t\t mkdir($year_path, 0777);\n\t\t\t } \n\t\t\t}\n\t\t}\n\t}\n\t return $destination_path;\n\t\n}", "public function deleteImage(){\n $sql = $this->db->query(\"\n SELECT\n `id`,\n `name`,\n `extension`,\n `path`,\n `relative_id`,\n `relative_table`,\n `form_item`\n FROM\n `images`\n WHERE\n `id` = \".intval($_GET['file_id']).\"\n \");\n\n $f = mysql_fetch_assoc($sql);\n\t\t\t$r1 = explode(';', $_GET['thumbs']);\n\n\t\t\tforeach($r1 as $item){\n\t\t\t\t$r2 = explode(',', $item);\n\n\t\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].'_'.$r2[2].(($f['extension'])?'.'.$f['extension']:false);\n\n\t\t\t\tif(file_exists($file)){\n print $file.' ';\n\t unlink($file);\n\t };\n\t\t\t};\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_list_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $this->db->query(\"DELETE FROM `images` WHERE `id` = \".intval($f['id']));\n\n $this->db->query(\"\n UPDATE\n `\".DB::quote($f['relative_table']).\"`\n SET\n `\".DB::quote($f['form_item']).\"` = `\".DB::quote($f['form_item']).\"` - 1\n WHERE\n `id` = \".intval($f['relative_id']).\"\n \");\n }", "function Suppression($table, $valeur) {\n\n $sql = \"delete from \" . $table . \" where id = '\" . $valeur . \"'\";\n\n $bool = doQuery($sql);\n\n //supression de l'image principale de l'element\n if ($bool) {\n $tab_valeur = split(',', $valeur);\n\n foreach ($tab_valeur as $val) {\n $nom_image = $val . \"_\" . $table;\n foreach (glob(\"galerie/\" . $nom_image . \".*\") as $filename) {\n unlink($filename);\n }\n }\n }\n\n return $bool;\n}", "public function removeProfile () {\n $path = auth()->user()->pic;\n auth()->user()->pic = '';\n auth()->user()->save();\n\n if (file_exists($path)) {\n unlink($path);\n }\n return ['msg' => 'Profile Picture removed successfully'];\n }", "protected function stripPath($path) {\n\t\t$prefix = '/' . $this->uid . '/files';\n\t\treturn \\rtrim(\\substr($path, \\strlen($prefix)), '/');\n\t}", "function delete_images_pages($path,$imgary,$fieldimg,$isThumb=false)\r\n {\r\n global $CFG;\r\n foreach($imgary as $key=>$value)\r\n {\r\n \r\n if($isThumb)\r\n {\r\n $delthumb=$path.\"/\".str_replace(\".jpg\",\"T.jpg\",$value[$fieldimg]);\r\n unlink($delthumb);\r\n }\r\n $delimg=$path.\"/\".$value[$fieldimg];\r\n unlink($delimg);\r\n } \r\n \r\n }", "function removeImage($oldImage, $folder)\n{\n $path = public_path('uploads/images/' . $folder . '/' . $oldImage);\n if (File::exists($path))\n unlink($path);\n}", "function delete_image($filename, $path) {\r\n $path = realpath(APPPATH . $path);\r\n /* Delete Last File Image If Exists */\r\n if ($filename) {\r\n// $this->mith_func->debugVar($path.$filename);\r\n if (file_exists($path . \"/\" . $filename))\r\n unlink($path . \"/\" . $filename);\r\n if (file_exists($path . \"/thumb/\" . $filename))\r\n unlink($path . \"/thumb/\" . $filename);\r\n }\r\n }", "function delete_image($id,$dir){\r\n\t//check to see if current image exists\r\n\t$q = \"SELECT image FROM newsletters WHERE id='$id'\";\r\n\t$res = mysql_query($q);\r\n\t$rec = mysql_fetch_assoc($res);\r\n\tif($rec['image'] != ''){\r\n\t\tif(!unlink($dir.$rec['image'])){\r\n\t\t\t//$error .= 'There was an error deleting the current image.<br />';\r\n\t\t\treturn FALSE;\r\n\t\t}else{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}\r\n}", "function display_admin_tools_clean_images()\r\n\t{\r\n\t\tif($_GET['auto_save'] == 2) {\r\n\t\t\t$this->update_admin_tools_clean_images();\r\n\t\t}\r\n\t\t\r\n\t\t$html = geoAdmin::m();\r\n\t\t$html .= '<fieldset><legend>Remove Orphaned Images</legend>';\r\n\t\t$html .= '<div class=\"page_note\">This tool will search the user images folder for any files that are no longer referenced by listings in the database. Any of these \"orphaned\" listings will be permanently deleted from the server.\r\n\t\tthis will not affect your listings in any way, and is normally not needed, but it may help free up disk space on some server configurations, especially older sites or those with lots of uploaded images. If your server has a large number of uploaded files, this may take a while.\r\n\t\tClick the button below to proceed, but do so with caution, as this action cannot be undone.</div>';\r\n\t\t\r\n\t\t$html .= '<div class=\"center\"><a href=\"index.php?mc=admin_tools_settings&amp;page=admin_tools_clean_images&amp;auto_save=1\" class=\"mini_button lightUpLink\">Remove Orphaned Images</a></div></fieldset>';\r\n\t\tgeoAdmin::getInstance()->display_page($html);\r\n\t\t\r\n\t\t\r\n\t}", "public function unlinkImage(){\n if ($this->session->userdata('user_login_access') != False) {\n $id = $this->input->get('UN');\n $imgvalue = $this->crud_model->getSingleProImageById($id);\n if (!empty($imgvalue->id)) {\n unlink(\"./assets/img/product/$imgvalue->img_url\");\n $delet = $this->crud_model->deelet_Img($id);\n $response['status'] = 'success';\n $response['message'] = \"Successfully Deleted\";\n $this->output->set_output(json_encode($response));\n }\n \n } else {\n redirect(base_url(), 'refresh');\n }\n }", "function unlink_old_image($base_path,$img_name){\n\n $file_path = $base_path.$img_name;\n $thumb_path = $base_path.'thumb/'.$img_name;\n if(file_exists($file_path)){\n unlink($file_path);\n }\n\n if(file_exists($thumb_path)){\n unlink($thumb_path);\n }\n\n}", "function delete() {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t// Require glob support for older php versions (version < 4.3)\r\n\r\n\t\t\trequire_once realpath(dirname(__file__) . '/includes/GlobExtension.script.php');\r\n\r\n\t\t\t// we want to erase all traces of this previously uploaded image:\r\n\t\t\t// first, we delete all generated thumbnails\r\n\r\n\t\t\t$emptyArray = array('');\r\n\t\t\t$exampleThumb = $this->_getUniqueThumbnailName($emptyArray);\r\n\t\t\t$thumbGlob = preg_replace('/(.*\\..*\\.).*(\\.th\\..*)/','$1*$2',$exampleThumb);\r\n\t\t\t$globPattern = YAPB_CACHE_ROOT_DIR . $thumbGlob;\r\n\r\n\t\t\t$allThumbnails = glob($globPattern);\r\n\t\t\tfor ($i=0, $len=count($allThumbnails); $i<$len; $i++) {\r\n\t\t\t\tunlink($allThumbnails[$i]);\r\n\t\t\t}\r\n\r\n\t\t\t// now we delete the original image\r\n\r\n\t\t\t@unlink($this->systemFilePath());\r\n\r\n\t\t\t// at last we clean up the database entries belonging to that image\r\n\r\n\t\t\t$wpdb->query('DELETE FROM ' . YAPB_TABLE_NAME . ' where id = ' . $this->id);\r\n\r\n\t\t}", "public function delete_profile_img() {\n $this->db->where('user_id', $this->session->userdata('user_id'))->update(DB_PREFIX .'user', array('profile_img' => MEMBERS_GENERIC));\n return $this->db->affected_rows();\n }", "public function delete_related_images($column_name = 'image') {\n\t\t$image_name = $this->getOriginal($column_name);\n\t\t// if we don't have previous image then no need to delete it.\n\t\tif ( ! is_null($image_name) && file_exists($this->image_path . $image_name)) {\n\t\t\t$image_path = $this->image_path . $image_name;\n\n\t\t\t$img = Image::make($image_path);\n\t\t\t$mask = $img->filename . '*.*';\n\n\t\t\tarray_map('delete_if_exists', glob(public_path('images/modified/' . $mask)));\n\t\t}\n\t}", "protected function task_remove_recipe_image_file_usage_data() {\n // phpcs:enable\n $this->drupal7DatabaseQuery(\"DELETE file_usage FROM field_data_field_recipe_image INNER JOIN file_usage ON field_data_field_recipe_image.field_recipe_image_fid = file_usage.fid\");\n }", "private function deleteOldImg(String $login, String $img)\n {\n $path_to_file = storage_path('app/public/' . $login . '/' . $img);\n\n if (file_exists($path_to_file))\n unlink($path_to_file);\n }", "public function destroy(){\n if($this->delete()){\n //then remove the file\n $target_path=SITE_ROOT.DS.\"public\".DS.$this->retrive_image();\n //echo $target_path;\n return unlink($target_path)?true:false;\n }else{\n\n }\n //Databse delete failed\n return false;\n}", "public function removeImage($image){\n if(!empty($image)){\n @unlink($this->getUrlImage($image));\n }\n }", "public function deleteOldImage($path)\n {\n if (File::exists(public_path('/images/establishment/main/') . $path)) {\n File::delete(public_path('/images/establishment/main/') . $path);\n }\n if (File::exists(public_path('/images/establishment/middle/') . $path)) {\n File::delete(public_path('/images/establishment/middle/') . $path);\n }\n if (File::exists(public_path('/images/establishment/small/') . $path)) {\n File::delete(public_path('/images/establishment/small/') . $path);\n }\n return true;\n }", "function cleanTrash() {\n\t\t$result = $this->select(\"avatar\", \"status=2\");\n\t\tif ($result)\n\t\tforeach ($result as $image){\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/weblinks/storage/\".$image['avatar']);\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/weblinks/avatar/\".$image['avatar']);\n\t\t}\n\t\t$results = $this->delete(\"status=2\");\n\t\tif ($results)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "public function delete_avatar()\n {\n if(isset($_POST['delete_avatar']))\n {\n\t\t\t$data['avatar'] = '';\n\t\t\tif($this->currentUser['avatar'] != ''){\n unlink(base_path($this->currentUser['avatar']));\n\t\t\t}\n $this->pdo->update('users', $data, 'id=' . $this->currentUser['id'] );\n lib_redirect();\n\t\t}\n }", "private static function sanitizeImgPath($imgPath) {\n $newPath = explode('uploads', $imgPath);\n return ( 'uploads' . $newPath[1] );\n }", "function deleteimage($lastfile='',$lastnormal='',$lastsmall='',$dich=''){ \n\n\tglobal $CONFIG;\n\n\tif($dich==''){\n\n\t\t$dich='';\n\n\t}else {\n\n\t\t$dich=$dich;\n\n\t}\n\n\tif ($lastfile||$lastnormal||$lastsmall)\n\n\t{\n\n\t\tif ($lastfile && file_exists($dich.$lastfile))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastfile);\n\n\t\t}\n\n\t\tif ($lastnormal && file_exists($dich.$lastnormal))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastnormal);\n\n\t\t}\n\n\t\tif ($lastsmall && file_exists($dich.$lastsmall))\n\n\t\t{\n\n\t\t\tunlink($dich.$lastsmall);\n\n\t\t}\t\t\t\t\t\t\n\n\t}\n\n}", "public function deleteImage(){\n if(is_file($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);\n }", "public function despeckleImage () {}", "function remove_user() {\n require_once \"model/dbManager.php\";\n if (!empty(select('id, author', 'articles', ['author' => $_GET['id']]))) {\n $articles = select('id, author', 'articles', ['author' => $_GET['id']]);\n foreach ($articles as $article) update('articles', $article['id'], ['author' => $_SESSION['id']]);\n }\n\n $url = 'view/content/picture';\n $allPictures = scandir($url);\n foreach($allPictures as $picture){\n $file = pathinfo($url. $picture);\n if($file['filename'] == $_SESSION['id']. 'pp'){unlink($url . $file['basename']);}\n }\n\n delete('comment_as_article', ['author' => $_GET['id']]);\n delete('user_as_user', ['user1' => $_GET['id']]);\n delete('user_as_user', ['user2' => $_GET['id']]);\n delete('roles', ['user' => $_GET['id']]);\n delete('comment_as_article', ['author' => $_GET['id']]);\n delete('mark_as_article', ['author' => $_GET['id']]);\n delete('users', ['id' => $_GET['id']]);\n\n $_SESSION['notify'] = \"User has been removed.\";\n header('Location: index.php?action=users');\n die();\n}", "public function unlinkImages()\n {\n if ($this->getPhotoHighlight() != null) {\n unlink(Ad::UPLOAD_PATH_AD_PHOTO .\"/\". $this->getPhotoHighlight());\n }\n }", "function deleteImage($filename){\n $file = FILE_UPLOAD . $filename;\n return unlink($file);\n}", "protected function _removeOrigFile($attribute)\n {\n $filename = $this->getImagePath($attribute, 'orig');\n $this->_unlinkFile($filename);\n $info = pathinfo($filename);\n $this->_unlinkFile($info['dirname'] . DIRECTORY_SEPARATOR . 'backup_' . $info['basename']); \n }", "function ciniki_images_removeImage(&$ciniki, $tnid, $user_id, $image_id) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDelete');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n\n //\n // Get the tenant cache directory\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'cacheDir');\n $rc = ciniki_tenants_cacheDir($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $tenant_cache_dir = $rc['cache_dir'];\n\n //\n // No transactions in here, it's assumed that the calling function is dealing with any integrity\n //\n\n //\n // Double check information before deleting.\n //\n $strsql = \"SELECT ciniki_images.uuid, \"\n . \"ciniki_images.date_added, ciniki_images.last_updated \"\n . \"FROM ciniki_images \"\n . \"WHERE ciniki_images.id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND ciniki_images.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \";\n if( $user_id > 0 ) { \n $strsql .= \"AND ciniki_images.user_id = '\" . ciniki_core_dbQuote($ciniki, $user_id) . \"' \";\n }\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'image');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.114', 'msg'=>'Unable to remove image', 'err'=>$rc['err']));\n }\n if( count($rc['rows']) == 0 ) {\n return array('stat'=>'ok');\n }\n if( !isset($rc['image']) && count($rc['rows']) == 0 ) {\n // If the image is not found, then it was already deleted.\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.115', 'msg'=>'Unable to remove image'));\n }\n $image = $rc['image'];\n $img_uuid = $rc['image']['uuid'];\n\n //\n // Check there are no references to the image before deleting\n //\n $strsql = \"SELECT 'refs', COUNT(*) AS num \"\n . \"FROM ciniki_image_refs \"\n . \"WHERE ciniki_image_refs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_image_refs.ref_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'refs');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['refs']) && $rc['refs']['num'] > 0 ) {\n return array('stat'=>'warn', 'err'=>array('code'=>'ciniki.images.116', 'msg'=>'Image still has references, will not be deleted'));\n }\n\n //\n // Remove all information about the image\n //\n $strsql = \"DELETE FROM ciniki_images \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \";\n $rc = ciniki_core_dbDelete($ciniki, $strsql, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.117', 'msg'=>'Unable to remove image', 'err'=>$rc['err']));\n }\n $strsql = \"DELETE FROM ciniki_image_details \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND image_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \";\n $rc = ciniki_core_dbDelete($ciniki, $strsql, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.118', 'msg'=>'Unable to remove image', 'err'=>$rc['err']));\n }\n\n //\n // Record delete in history and sync delete\n //\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.images', 'ciniki_image_history', \n $tnid, 3, 'ciniki_images', $image_id, '*', '');\n $ciniki['syncqueue'][] = array('push'=>'ciniki.images.image',\n 'args'=>array('delete_uuid'=>$image['uuid'], 'delete_id'=>$image_id));\n\n \n // \n // Remove the image versions\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_image_versions \"\n . \"WHERE image_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'image');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $versions = $rc['rows'];\n foreach($versions as $row_id => $version) {\n $strsql = \"DELETE FROM ciniki_image_versions \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $version['id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND image_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"\";\n $rc = ciniki_core_dbDelete($ciniki, $strsql, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.119', 'msg'=>'Unable to remove image', 'err'=>$rc['err']));\n }\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.images', 'ciniki_image_history', \n $tnid, 3, 'ciniki_image_versions', $version['id'], '*', '');\n $ciniki['syncqueue'][] = array('push'=>'ciniki.images.version',\n 'args'=>array('delete_uuid'=>$version['uuid'], 'delete_id'=>$version['id']));\n }\n\n // \n // Remove the image actions\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_image_actions \"\n . \"WHERE image_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'image');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $actions = $rc['rows'];\n foreach($actions as $row_id => $action) {\n $strsql = \"DELETE FROM ciniki_image_actions \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $action['id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND image_id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"\";\n $rc = ciniki_core_dbDelete($ciniki, $strsql, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.120', 'msg'=>'Unable to remove image', 'err'=>$rc['err']));\n }\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.images', 'ciniki_image_history', \n $tnid, 3, 'ciniki_image_actions', $action['id'], '*', '');\n $ciniki['syncqueue'][] = array('push'=>'ciniki.images.action',\n 'args'=>array('delete_uuid'=>$action['uuid'], 'delete_id'=>$action['id']));\n }\n\n //\n // Remove any cache versions of the image\n //\n $cache_dir = $tenant_cache_dir . '/ciniki.images/'\n . $img_uuid[0] . '/' . $img_uuid;\n if( is_dir($cache_dir) ) {\n $files = array_diff(scandir($cache_dir), array('.','..')); \n foreach ($files as $file) { \n if( is_dir(\"$cache_dir/$file\") ) {\n error_log(\"CACHE-ERR: Unable to remove cache files, directory exists: $cache_dir/$file\");\n }\n unlink(\"$cache_dir/$file\");\n } \n rmdir($cache_dir);\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $tnid, 'ciniki', 'images');\n \n return array('stat'=>'ok');\n}", "public function removeImage($image)\n {\n if (file_exists('upload_image/' . $image)) {\n unlink('upload_image/' . $image);\n }\n }", "function checkOld($path, $db_row)\n {\n $old_image = public_path($path . $db_row);\n if (file_exists($old_image)) {\n unlink($old_image);\n } else {\n return false;\n }\n }", "function deleteImage($path, $conn) {\n\tif (file_exists($path)) {\n\t\tunlink( $path );\n\t} else {\n\t\techo \"File does not exist\";\n\t}\n}", "public function removeCloudinaryImage($args)\n {\n \n //use data given as arguments to try to retrieve public id of image (stored in mysql), \n //which is necessary to remove it from cloudinary database \n $idOfUser = $args['idOfUser'];\n $linkToDB = $args['linkToDB'];\n $query = \"SELECT img_public_id FROM users WHERE id = '$idOfUser' LIMIT 1\";\n $result = mysqli_fetch_assoc(mysqli_query($linkToDB, $query));\n \n //value that will indicate whether image was removed successfully\n //if something goes wrong, will be changed to false\n $success = true;\n \n //Function will also be called when user uploads image (to remove the old one if exists),\n //so first it has to check, whether query gave image public id (whether there already is an image for this user),\n //and only if query gave result, try to remove image from cloudinary\n if ($imageToRemove = $result['img_public_id']) {\n $cloudinaryRemove = \\Cloudinary\\Uploader::destroy($imageToRemove, array(\n invalidate => true\n ));\n if ($cloudinaryRemove['result'] != 'ok') {\n $success = false;\n }\n }\n \n //If user uploads new image, image url and public id will be updated wth the new values, but if he only \n //wants to remove an image, it is necessary to remove url and id from mysql database.\n //Here the function checks whether an argument 'removeFromSQL' exists, which is passed if request is only about \n //removing old image and not uploading a new one. If the argument exists, function sets appropriate fields in \n //mysql database to null\n if ($args['removeFromSQL']) {\n $query = \"UPDATE users SET img_url = NULL, img_public_id = NULL WHERE id = '$idOfUser' LIMIT 1\";\n $mysqlRemove = mysqli_query($linkToDB, $query);\n if (!mysqlRemove) {\n $success = false;\n }\n }\n \n return $success;\n }", "function concat_path($row) {\r\n $newPath = base_url() . \"img/pictos/\" . $row[\"imgPicto\"];\r\n $row[\"imgPicto\"] = $newPath;\r\n return $row;\r\n }", "public function deleteAvatar($user_id) { \n \t\n \t$stmt = $this->conn->prepare(\"SELECT a.filename_full, a.filename_avatar, a.filename_icon, a.id FROM users u LEFT OUTER JOIN avatars a ON u.avatar = a.id WHERE u.id = ? \");\n $stmt->bind_param(\"i\", $user_id);\n \n if ($stmt->execute()) {\n \n\t\t\t$stmt->store_result();\n if($stmt->num_rows==0){\n \treturn 0;\n } \n $stmt->bind_result($filename_full, $filename_avatar,$filename_icon,$avatar_id); \n $stmt->close();\n\t\t\t\n //Unlinking files\n if( file_exists($_SERVER['DOCUMENT_ROOT'].path_fulls.$filename_full)&& ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_fulls.$filename_full);} \t\t\t\t\t\t\n\t\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].path_avatars.$filename_avatar)&& ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_avatars.$filename_avatar);} \t\t\t\t\t\t\n\t\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].path_icons.$filename_icon) && ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_icons.$filename_icon);} \t\t\n\t\t\t\t\n\t\t\t//Update avatar column on users table\n\t\t\t$new_avatar_id = $this->conn->insert_id;\n\t\t\t$stmt = $this->conn->prepare(\"UPDATE `users` SET `avatar` = NULL WHERE `id` = ? \");\n\t\t\t$stmt->bind_param(\"i\", $user_id);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\t//Delete row in avatars table\n\t\t\t$stmt = $this->conn->prepare(\"DELETE FROM avatars WHERE id = ? \");\n\t\t\t$stmt->bind_param(\"i\", $avatar_id);\t\t\t\n\t\t\t$stmt->execute();\n\t\t\t$count=$stmt->affected_rows;\n\t\t\t$stmt->close();\n\t\t\t\n } else {\n throw new Exception(\"BD can't execute: $stmt->execute()==NULL \");\n }\n\t\t\n return $count;\n }", "public function deletePicture()\n {\n $this->getPicture()->remove(); \n $this->set('picture','');\n $this->save();\n }", "protected function task_remove_recipe_image_file_metadata() {\n // phpcs:enable\n $this->drupal7DatabaseQuery(\"DELETE file_metadata FROM field_data_field_recipe_image INNER JOIN file_metadata ON field_data_field_recipe_image.field_recipe_image_fid = file_metadata.fid\");\n }", "public function removeAvatarFromDestination($path)\n {\n $this->avatar ? unlink($path .'/' .$this->avatar->filename) : '';\n }", "function delete()\n {\n unlink( $this->imagepath() );\n\n // Delete from database\n parent::delete();\n }", "public function deleteUserAvatar($user_id) { \n \t\n \t$stmt = $this->conn->prepare(\"SELECT a.filename_full, a.filename_avatar, a.filename_icon, a.id FROM users u LEFT OUTER JOIN avatars a ON u.avatar = a.id WHERE u.id = ? \");\n $stmt->bind_param(\"i\", $user_id);\n \n if ($stmt->execute()) {\n \n\t\t\t$stmt->store_result();\n if($stmt->num_rows==0){\n \treturn 0;\n } \n $stmt->bind_result($filename_full, $filename_avatar,$filename_icon,$avatar_id); \n $stmt->close();\n\t\t\t\n //Unlinking files\n if( file_exists($_SERVER['DOCUMENT_ROOT'].path_fulls.$filename_full)&& ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_fulls.$filename_full);} \t\t\t\t\t\t\n\t\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].path_avatars.$filename_avatar)&& ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_avatars.$filename_avatar);} \t\t\t\t\t\t\n\t\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].path_icons.$filename_icon) && ($filename_full!=NULL) ){\n\t\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].path_icons.$filename_icon);} \t\t\n\t\t\t\t\n\t\t\t//Update avatar column on users table\n\t\t\t$new_avatar_id = $this->conn->insert_id;\n\t\t\t$stmt = $this->conn->prepare(\"UPDATE `users` SET `avatar` = NULL WHERE `id` = ? \");\n\t\t\t$stmt->bind_param(\"i\", $user_id);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\t//Delete row in avatars table\n\t\t\t$stmt = $this->conn->prepare(\"DELETE FROM avatars WHERE id = ? \");\n\t\t\t$stmt->bind_param(\"i\", $avatar_id);\t\t\t\n\t\t\t$stmt->execute();\n\t\t\t$count=$stmt->affected_rows;\n\t\t\t$stmt->close();\n\t\t\t\n } else {\n throw new Exception(\"BD can't execute: $stmt->execute()==NULL \");\n }\n\t\t\n return $count;\n }", "public function removeByPathRemovesCorrectPathDataProvider() {}", "function media_no_point($path)\n{\n return str_replace('.', '', $path);\n}", "function delete_img($img_array=NULL)\r\n {\r\n foreach ($img_array as $img)\r\n {\r\n if(file_exists($img))\r\n {\r\n unlink($img);\r\n }\r\n }\r\n }", "function display_admin_tools_clean_images()\n {\n if ($_GET['auto_save'] == 2) {\n $this->update_admin_tools_clean_images();\n }\n\n $html = geoAdmin::m();\n $html .= '<fieldset><legend>Remove Orphaned Images</legend>';\n $html .= '<div class=\"page_note\">This tool will search the user images folder for any files that are no longer referenced by listings in the database. Any of these \"orphaned\" listings will be permanently deleted from the server.\n\t\tthis will not affect your listings in any way, and is normally not needed, but it may help free up disk space on some server configurations, especially older sites or those with lots of uploaded images. If your server has a large number of uploaded files, this may take a while.\n\t\tClick the button below to proceed, but do so with caution, as this action cannot be undone.' . (defined('DEMO_MODE') ? '<br /><br /><strong>Disabled for this demo</strong>' : '') . '</div>';\n\n if (!defined('DEMO_MODE')) {\n $html .= '<div class=\"center\"><a href=\"index.php?mc=admin_tools_settings&amp;page=admin_tools_clean_images&amp;auto_save=1\" class=\"mini_button lightUpLink\">Remove Orphaned Images</a></div></fieldset>';\n }\n geoAdmin::getInstance()->display_page($html);\n }", "private function cleanup_image($uid, $file, $thumbfile) {\n //clean up resources\n $query = new \\Peyote\\Delete('resources');\n $query->where('image', '=', $uid);\n $this->db->fetch($query);\n //clean up media resources\n $query = new \\Peyote\\Delete('media');\n $query->where('uid', '=', $uid);\n $this->db->fetch($query);\n //remove image in db\n $query = new \\Peyote\\Delete('images');\n $query->where('uid', '=', $uid);\n $this->db->fetch($query);\n //remove image\n unlink($file);\n unlink($thumbfile);\n }", "public function removeImage(Image $image);", "public function delete_image() {\n if ($this->value) {\n $this->value = 0;\n }\n }", "public function deleteImgFiles()\n {\n $original_img_file = $this->url;\n // thumbnail\n $thumbnail_img_file = $this->_getThumbnailUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $thumbnail_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $thumbnail_img_file);\n }\n // poster\n $poster_img_file = $this->_getPosterUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $poster_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $poster_img_file);\n }\n // original\n if ( file_exists(Yii::getAlias('@webroot') . $original_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $original_img_file);\n }\n }", "function _remove_sponsor_img( Sponsor $sponsor ) {\n\t// Check if the sponsor image exists\n\tif ( !file_exists( $sponsor->getImgDir(false) ) )\n\t\tthrow new Exception( __(\"The sponsor's image doesn't exists\", 'wp-sfw-plugin') );\n\n\t// Remove the sponsor image from the server\n\t$img_directory = $sponsor->getImgDir(false);\n\tunset( $img_directory );\n\t// Seeting empty for the sponsor image\n\t$sponsor->setImg('');\n\n\t// Loading the SponsorDAO\n\t$dao = new SponsorDAO();\n\t// Saving the sponsor without img and return the sponsor object\n\treturn $dao->save( $sponsor );\n}", "function handle_customer_profile_image_delete($customer_id,$dirname=''){\n do_action('before_delete_customer_customerthumb');\n\n if($dirname==\"\"){\n $dirname = get_upload_path_by_type('customerp') . $customer_id . '/';\n }\n\n if(is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname.\"/\".$file))\n {\n unlink($dirname.\"/\".$file);\n }\n else\n {\n delete_directory($customer_id, $dirname.'/'.$file);\n }\n }\n }\n closedir($dir_handle);\n rmdir($dirname);\n return true;\n}", "function delete_related_rows($file_id)\n {\n //Imagen de perfil de usuario\n $arr_row['image_id'] = 0;\n $arr_row['url_image'] = '';\n $arr_row['url_thumbnail'] = '';\n $this->db->where('image_id', $file_id);\n $this->db->update('user', $arr_row);\n }", "function removeImageFromDB()\n{\n\t$imgID_X = htmlentities($_POST['imgID']);\n\t\n\t$db = adodbConnect();\n\t$imgRemQuery = \"DELETE FROM image WHERE imgID=\" .$imgID_X;\n\t$db->EXECUTE($imgRemQuery) or die(\"Error removing image from 1st table\");\n\t$bridgeRemQuery = \"DELETE FROM image2category WHERE imgID='\". $imgID_X .\"'\";\n\t$db->EXECUTE($bridgeRemQuery) or die(\"Error removing image from 2nd table\");\n\t\n print \"<div id='noticeDiv' class='noticemsg'>Image \". $imgID_X .\" has been removed \".\n\t \"from database</div>\\n\";\n \n\tshowAllImages();\n\n}", "function remove_fields_edit_user()\n{\n echo '<style>tr.user-url-wrap{ display: none; }</style>';\n}" ]
[ "0.7466158", "0.6946634", "0.68737954", "0.6834665", "0.6585394", "0.65310866", "0.6486161", "0.6474933", "0.6390922", "0.6318148", "0.6313522", "0.631313", "0.62896323", "0.6242983", "0.6221651", "0.621417", "0.61970735", "0.6183413", "0.61627895", "0.60919935", "0.60880613", "0.6082714", "0.60803396", "0.6068589", "0.60323924", "0.60272217", "0.6008735", "0.6001549", "0.5995453", "0.5957067", "0.59320045", "0.5924485", "0.5922172", "0.59063894", "0.5896243", "0.5888404", "0.5876197", "0.5864828", "0.58484304", "0.5844043", "0.58363307", "0.583487", "0.5830772", "0.58285", "0.58143085", "0.5813146", "0.5812608", "0.5802812", "0.58013177", "0.5797702", "0.57616717", "0.5757807", "0.5757155", "0.5756758", "0.57458144", "0.5743587", "0.5723762", "0.57192415", "0.5715817", "0.5710906", "0.5710306", "0.57047904", "0.5700381", "0.5698347", "0.5688873", "0.56887233", "0.56850463", "0.5675366", "0.5674376", "0.56581485", "0.56575435", "0.5655435", "0.5647806", "0.56440467", "0.5641414", "0.5638405", "0.5636398", "0.5633295", "0.563216", "0.56266564", "0.5622356", "0.5614047", "0.5613015", "0.5609101", "0.5608221", "0.560137", "0.56008977", "0.5599097", "0.55956715", "0.5594565", "0.5592026", "0.5577178", "0.5566604", "0.556628", "0.5548661", "0.55483216", "0.55475354", "0.55452496", "0.5540603", "0.55394703" ]
0.7574094
0
Function to fetch event id from event tag August 17,2016
Функция для получения идентификатора события из тега события 17 августа 2016 года
function getEventTagfromEventId($eventId) { $qry="SELECT eventTagId FROM entrp_events WHERE id=".$eventId." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $eventTagId = $row['eventTagId']; } return $eventTagId; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventIdfromEventTag($eventTagid)\n{\n\t\n\t$qry=\"SELECT id FROM entrp_events \n\t\t\tWHERE eventTagId='\".$eventTagid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function getEventID() {\n return $this->_getField(\"eventID\", 0, 2);\n }", "public function getID() {return $this->eventID;}", "public static function getEventIDFromName( $event_name ) {\n\t\t// Replication lag means sometimes a new event will not exist in the table yet\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$id_num = $dbw->selectField(\n\t\t\t'click_tracking_events',\n\t\t\t'id',\n\t\t\tarray( 'event_name' => $event_name ),\n\t\t\t__METHOD__\n\t\t);\n\t\t// If this entry doesn't exist, which will be incredibly rare as the whole database will only have a few hundred\n\t\t// entries in it at most and getting DB_MASTER up top would be wasteful\n\t\t// FIXME: Use replace() instead of this selectField --> insert or update logic\n\t\tif ( $id_num === false ) {\n\t\t\t$dbw->insert(\n\t\t\t\t'click_tracking_events',\n\t\t\t\tarray( 'event_name' => (string) $event_name ),\n\t\t\t\t__METHOD__\n\t\t\t);\n\t\t\t$id_num = $dbw->insertId();\n\t\t}\n\t\treturn $id_num === false ? 0 : $id_num;\n\t}", "public function get_event_id()\n {\n return $this->event_id;\n }", "function getEventHostFromEVENTID($eventId)\n{\n\t//SELECT clientid FROM entrp_events WHERE id=1\n\t$qry=\"SELECT clientid FROM entrp_events \n\t\t\tWHERE id='\".$eventId.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "public function getEventID() {\r\n if (isset($this->eventID)) {\r\n return $this->eventID;\r\n }\r\n return false;\r\n }", "public function eventId(): string;", "function getEventId()\r\n {\r\n return $this->_eventid ;\r\n }", "protected function getEventId() {\n\t\treturn $this->_id;\n\t}", "public function getEventId()\n {\n return $this->eventid;\n }", "public function getEventId()\n {\n return $this->event_id;\n }", "public function get_event_hash_code();", "function getEventId()\n {\n return $this->__eventid ;\n }", "function getSingleEvent($eventId) {\r\n\t\t$resEvent = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid, datetime, subject, public, series, tags, requiredteams, documents, notes', #select\r\n\t\t\t'tx_servicemgr_events', #from\r\n\t\t\t'uid='.$eventId.' and hidden=0 and deleted=0', #where\r\n\t\t\t'', '',\r\n\t\t\t'0,1' #limit\r\n\t\t);\r\n\r\n\t\tif ($resEvent) {\r\n\t\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resEvent);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function get_event($eventId) {\n\t\t$data = array('id' => $eventId);\n\t\t$this->db->select('*');\n\t\t$query = $this->db->get_where('events', $data);\n\t\treturn $query->row();\n\t}", "public function getEventName($eventId) {\n $this->db->limit(1);\n $this->db->select('name');\n $this->db->where('_id', $eventId);\n $query = $this->db->get('events');\n\n if ($query->num_rows() > 0) {\n $res = $query->result();\n return $res[0]->name;\n } else {\n return '';\n }\n }", "function get_event($eid){\n\t$con = mysqli_connect('127.0.0.1', 'root', '','dashboardproject');\n\t$eid = (int)$eid;\n\t\n\t$sql = \"SELECT\n\t\t\t\tevent_title AS 'title',\n\t\t\t\tevent_body AS 'body',\n\t\t\t\tevent_poster AS 'user',\n\t\t\t\tevent_date AS 'date',\n\t\t\t\tevent_img AS 'imgn',\n\t\t\t\ted AS 'ed',\n\t\t\t\tven AS 'ven'\n\t\t\tFROM events\n\t\t\tWHERE event_id = {$eid}\";\n\t\t\t\n\t$event = mysqli_query($con, $sql);\n\t$event = mysqli_fetch_assoc($event);\n\t\n\t\n\t\n\treturn $event;\n}", "public function getEventId() {\n\t\treturn $this->id;\n\t}", "public static function getEventIdFromUniqueEvent($unique_event_name=null)\r\n\t{\r\n\t\tglobal $Proj;\r\n\t\t// Make sure we are in the Project context\r\n\t\tself::checkProjectContext(__METHOD__);\r\n\t\t// Make sure project is longitudinal, else return FALSE\r\n\t\tif (!self::isLongitudinal()) return false;\r\n\t\t// If $event_id is not valid, then return FALSE\r\n\t\tif ($unique_event_name == null) return false;\r\n\t\t$event_id = $Proj->getEventIdUsingUniqueEventName($unique_event_name);\r\n\t\t// Get and return event_id\r\n\t\treturn (!is_numeric($event_id) ? false : $event_id);\r\n\t}", "public function getEventCode();", "public function getEventoId()\n {\n return $this->evento_id;\n }", "function get_events_id($id) {\r\n $sql = \"SELECT * FROM events where event_id=$id\";\r\n //$this->register_events = mysqli_query($this->db_connect(), $query);\r\n $this->events_id = mysqli_query($this->db_connect(), $sql);\r\n return $this->events_id;\r\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function get_current_event_id() {\n\t\treturn $this->current_event_id;\n\t}", "public function event_id($id){\n $this->db->select('event_id');\n $this->db->from('member');\n $this->db->where('member_id', $id);\n $query = $this->db->get();\n $row = $query->row_array();\n return $row['event_id'];\n }", "public function getIIdEvent()\n {\n return $this->iIdEvent;\n }", "function get_revent($eventid) {\n\n\t$dbGetEvent = DBselect( 'SELECT r_eventid FROM event_recovery WHERE eventid =\"'.$eventid.'\"');\n\t$dbevent = DBFetch($dbGetEvent);\n\t\n\t$r_event = $dbevent['r_eventid'];\t\n\t\n\treturn $r_event;\n}", "protected function getEventId() {\n return $this->type.'-'.$this->resource->id;\n }", "public function getOccurrenceId() {\n\n $siteeventTable = Engine_Api::_()->getDbTable('events', 'siteevent');\n $siteeventTableName = $siteeventTable->info('name');\n\n $occurrenceTable = Engine_Api::_()->getDbTable('occurrences', 'siteevent');\n $siteeventOccurTableName = $occurrenceTable->info('name');\n $select = $siteeventTable->select();\n $where = \"$siteeventTableName.event_id = $this->event_id\";\n\n $select = $select\n ->setIntegrityCheck(false)\n ->from($siteeventTableName, array());\n $select->join($siteeventOccurTableName, \"$siteeventTableName.event_id = $siteeventOccurTableName.event_id\", array('occurrence_id'))\n ->where($where)\n //->group(\"$siteeventOccurTableName.event_id\")\n ->order(\"$siteeventOccurTableName.event_id ASC\")\n ->limit(1);\n\n $occurrence_id = $select->query()->fetchColumn();\n return $occurrence_id;\n }", "function get_event($event_id, $cid = null){\r\n global $course_id;\r\n if(is_null($cid)){\r\n $cid = $course_id;\r\n }\r\n return Database::get()->querySingle(\"SELECT * FROM agenda WHERE course_id = ?d AND $event_id = ?d\", $course_id, $event_id);\r\n }", "function get_exc_booking_id($exc_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'AS/'.$year.'/'.$exc_id; }", "public function getEventAttendanceEventId(): Uuid {\n\t\treturn ($this->eventAttendanceEventId);\n\t}", "public function Event( int $eventId )\r\n { $this->Events();\r\n return $this->events[$eventId] ?? null;\r\n }", "public function findId($event)\n {\n if (empty($this->jobId)) {\n $scenario = $event instanceof ScenarioEvent ? $event->getScenario() : $event->getOutline();\n $context = $event->getContext();\n $url = $context->getSession()->getDriver()->getWebDriverSession()->getUrl();\n $parts = explode('/', $url);\n $this->jobId = array_pop($parts);\n }\n }", "function getJoinOnEventID()\n { \n return $this->getJoinOnFieldX('event_id');\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getId() {\n\t\treturn $this->id_evento;\n\t}", "public function getLastAppliedEventID();", "static public function eventGEExists($eventId, $compId){\n\t\treturn SportEventGroupEvent::where('event_id', '=', $eventId )\n\t\t\t\t\t\t\t\t\t ->where('event_group_id', '=', $compId )->value('event_id');\n\t}", "public function getEvento()\n {\n return $this->id_evento;\n }", "public function getEventAttendanceId(): Uuid {\n\t\treturn ($this->eventAttendanceId);\n\t}", "private function _getEvent($eventId) {\n\n $eventInfo = $this->Event->getEvent($eventId);\n if (!$eventInfo) {\n\n $this->miniFlash('Unable to find selected event. Try searching instead', 'index');\n }\n if (!$eventInfo['Event']['published']) {\n $this->miniFlash('Your event has been saved. However to prevent people from spamming this events section and to ensure that only tech events are posted, an administrator will need to approve your event before it becomes publicly accessible.', 'index');\n }\n return $eventInfo;\n }", "function tag_get_id($tag) {\n log_assert(is_tag($tag));\n $query = sprintf(\n \"SELECT id FROM ia_tags WHERE name = %s AND type = %s AND parent = %s\",\n db_quote($tag[\"name\"]), db_quote($tag[\"type\"]), db_quote($tag[\"parent\"])\n );\n $result = db_fetch($query);\n return $result['id'];\n}", "public static function getEventName(): string;", "function getEvent($client, $eventId) \r\n{\r\n $gdataCal = new Zend_Gdata_Calendar($client);\r\n $query = $gdataCal->newEventQuery();\r\n $query->setUser('default');\r\n $query->setVisibility('private');\r\n $query->setProjection('full');\r\n $query->setEvent($eventId);\r\n\r\n try {\r\n $eventEntry = $gdataCal->getCalendarEventEntry($query);\r\n return $eventEntry;\r\n } catch (Zend_Gdata_App_Exception $e) {\r\n echo \"<h2>Might be that the ID of the event: \" . $eventId . \" is not correct, </h2><br><h3>you can check the <a href=\"\">error_log.txt</a> or contact oana.ureche@deri.org, attach the error_log.txt file </h3>\"; \r\n\terror_log($e, 3, \"error_log.txt\");\r\n return null;\r\n }\r\n}", "public function getEventKey()\r\n {\r\n return $this->getAttr('EventKey');\r\n }", "public function getTimVideoID(){\n\t\t$version = \"03\";\n\t\t$sq = mysql_query(\"SELECT * FROM tim_video\") or die(mysql_error());\n\t\t$num_row = mysql_num_rows($sq);\n\t\t$DT = getdate();\n\t\t$DR = $DT['year'].\"\".$DT['mon'].\"\".$DT['mday'];\n\t\tif($num_row <= 0){\n\t\t\t$number = 1;\n\t\t\t$id_reg = \"VIDEO-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t}else{\n\t\t\t$number = $num_row + 1;\n\t\t\tif($number < 10){\n\t\t\t\t$id_reg = \"VIDEO-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t\t}else{\n\t\t\t\t$id_reg = \"VIDEO-\".$DR.\"-\".$number.\"-\".$version;\n\t\t\t}\n\t\t}\n\t\treturn $id_reg;\n\t}", "function get_event() {\n\tglobal $event;\n\tglobal $no_error, $error_message;\n\n\tif (isset($_GET['event_id'])) {\n\t\t$event = get_event_details($_GET['event_id']);\n\n\t\tif ($event) {\n\t\t\tget_event_logo();\n\t\t\tget_event_featured_image();\n\t\t\tget_event_cta_background_image();\n\t\t\tget_event_photos();\n\t\t} else {\n\t\t\t$no_error = FALSE;\n\t\t\t$error_message = 'Event not found. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t\t}\n\t} else {\n\t\t$no_error = FALSE;\n\t\t$error_message = 'Event not selected. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t} // if (isset($_GET['event_id']))\n}", "function getDateIdentifier($date) {\n return $date->getDateTime()->getTimeStamp();\n }", "function getEventByID($ID){\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://web.njit.edu/~jsr24/CS490/getEventByID.php\"); \r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"ID=\".$ID);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t$getEventReply = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $getEventReply;\t#review reply from DB\t\r\n\t}", "function f_getLatestDayId()\n {\n global $db;\n $sql_query = \"select GTCDayID from gtcdayconversion order by GTCDayID desc limit 1\";\n $result = $db->query($sql_query) or die($db->error);\n $row = $result->fetch_assoc();\n $temp = explode(\" \",$row['GTCDayID']);\n $day_id = $temp[0];\n return $day_id;\n }", "private function get_tag_id() {\n\t\t$settings = $this->get_settings()->get();\n\n\t\tif ( ! empty( $settings['googleTagID'] ) ) {\n\t\t\treturn $settings['googleTagID'];\n\t\t}\n\t\treturn $settings['measurementID'];\n\t}", "protected function getMaxEventID(){\r\n\t\t$allIDs = $this->getEventIDs();\r\n\t\t\r\n\t\tif(empty($allIDs)){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max($allIDs);\r\n\t}", "function getEventStatus($event)\n{\n\techo $event;\n\treturn 0;\n}", "public function testEventsGetByEventId()\n {\n }", "public function get_event( $id ) {\n\t\t\tglobal $wpdb;\r\n\t\t\twpa_log('getting single event by ID \"' . $id . '\"');\r\n\t\t\treturn $wpdb->get_row( \"SELECT id, name, event_cat_id, sub_type_id, location, date_format(date,'\" . WPA_DATE_FORMAT . \"') as date FROM $this->EVENT_TABLE WHERE id = $id\" );\n\t\t}", "private function getCorrelationId($event)\n {\n return isset($event['extra']['correlationId']) ?\n $event['extra']['correlationId'] :\n $event['extra']['requestId'];\n }", "public function getBotDetectorEventToken()\n {\n $app = JFactory::getApplication();\n $event_token = $app->input->get('ct_bot_detector_event_token');\n if ( empty($event_token) ){\n $get_input = $app->input->getArray();\n foreach ($get_input as $key => $value) {\n if (stripos($key, 'ct_bot_detector_event_token') === 0 &&\n preg_match('/^[A-Fa-f0-9]{64}$/', $value)\n ) {\n $event_token = $value;\n }\n }\n }\n return empty($event_token) || !is_string($event_token) ? '' : $event_token;\n }", "function event_exists($calid)\n{\n return retrieve_event($calid);\n}", "public function getCheckInEventId(): Uuid {\n\t\treturn ($this->checkInEventId);\n\t}", "public function getElementId();", "function get_event_by_eid($eid)\n\t{\n\t\t$events_table = SQL_PREFIX . 'events';\n\t\t$users_table = SQL_PREFIX . 'users';\n\t\t$cats_table = SQL_PREFIX . 'categories';\n\n\t\t$query = \"SELECT \" . $this->get_event_fields()\n\t\t\t.\", `username`, `name`, `bg_color`, `text_color`\\n\"\n\t\t\t.\"FROM `$events_table`\\n\"\n\t\t\t.\"LEFT JOIN `$users_table` ON `uid` = `owner`\\n\"\n\t\t\t.\"LEFT JOIN `$cats_table` USING (`catid`)\\n\"\n\t\t\t.\"WHERE `eid` = '$eid'\\n\";\n\n\t\t$sth = $this->dbh->query($query)\n\t\t\tor $this->db_error(_('Error in get_event_by_eid'),\n\t\t\t\t\t$query);\n\n\t\t$result = $sth->fetch_assoc()\n\t\t\tor soft_error(_(\"Event doesn't exist\") . \": $eid\");\n\n\t\treturn $result;\n\t}", "function getId($tag) {\n \treturn $this->sql->getOne(\"SELECT id FROM Tag WHERE name='$tag' AND user_id=$_SESSION[user_id]\");\n }", "function get_etag($entry, &$schedule_tag=null)\n\t{\n\t\t$etag = $this->bo->get_etag($entry, $schedule_tag, $this->client_shared_uid_exceptions);\n\n\t\t//error_log(__METHOD__ . \"($entry[id] ($entry[etag]): $entry[title] --> etag=$etag\");\n\t\treturn $etag;\n\t}", "public function getScanSceneId()\r\n {\r\n $eventKey = $this->getEventKey();\r\n if (strpos($eventKey, 'qrscene_') === 0) {\r\n $eventKey = substr($eventKey, 8);\r\n }\r\n return $eventKey;\r\n }", "public function findOneById($eventId)\n {\n $qb = $this->queryAll()->where('e.id = :eventId')\n ->setParameter(':eventId', $eventId, \\PDO::PARAM_INT);\n $event = $qb->execute()->fetch();\n $event['tags'] = $this->getLinkedTagsById($eventId);\n $event['media'] = isset($event['main_img']) && null !== $event['main_img'] ? $this->getMainImg($event['main_img']) : null;\n $event = isset($event['id']) ? $event : [];\n\n return $event;\n }", "public function getEventKey()\n {\n return $this->eventKey;\n }", "public function find($event_id);", "public function getEvent($event_id = '') {\n\t\ttry {\n\t\t\treturn \\Stripe\\Event::retrieve($event_id);\n\t\t} catch (Exception $ex) {\n\t\t\t$this->log($ex);\n\n\t\t\treturn false;\n\t\t}\n\t}", "function google_seo_meta_event($eid)\n{\n global $settings, $event;\n\n // Canonical:\n if($settings['google_seo_meta_canonical'] && $event['eid'] > 0)\n {\n google_seo_meta_canonical(get_event_link($event['eid']));\n }\n\n // Description:\n google_seo_meta_description($event['description']);\n}", "function getTagIdfromVideoId($params)\r\n\t\t{\r\n\t\t\t$sql = \"select tag_id from tag_component where component_id=?\";\r\n\t\t\t$types= array('integer');\r\n\t\t\t$res = $this->execute_query($sql,$params,$types);\r\n\t\t\treturn $res;\r\n\t\t}", "function collection_getInstID($coll_id)\n{\n\t$ci = get_instance();\n\t$ci->load->model('Bdd_select');\n\t$data['dataset'] = $ci->Bdd_select->get_infoData($coll_id);\n\t\n\treturn intval($data['dataset']->IdInst);\n}", "public function getEvent($eventID) {\r\n\t\t$result = $this->mysqli->prepare ( 'SELECT * FROM c4_event where event_id =?' );\r\n\t\tif ($result) {\r\n\t\t\t$result->bind_param ( 'i', $eventID );\r\n\t\t\t//var_dump($result);\r\n\t\t\t$result->execute ();\r\n\t\t\t//$count = $result->num_rows;\r\n\t\t\t$result->bind_result ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t//printf(\"\\n %s \\n\",$userID);\r\n\t\t\t$result->fetch ();\r\n\t\t\t$event = new Event ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t$result->close ();\r\n\t\t\treturn $event;\r\n\t\t\r\n\t\t}\r\n\t}", "function get_tag_id($tag) {\n include('connection.php');\n\n try {\n $result = $db->prepare('SELECT id FROM tags WHERE name = ?');\n $result->bindValue(1, $tag, PDO::PARAM_STR);\n $result->execute();\n } catch (Exception $e) {\n $e->getMessage();\n }\n\n $tag_id = $result->fetch();\n\n return $tag_id;\n}", "private function setEventID() {\n $this->event_id = $this->getRaceInfoFromDB('event_id');\n }", "public function firstEventNumber() : int\n {\n return $this->firstEventNumber;\n }", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_AGEAN_PERF: \t$source_id = 9; break;\n\t\t\tcase self::TYPE_AGEAN_TITLE: \t$source_id = 10; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "function getEventByID($handle, $event_id) {\n if ($this->authenticated === false) {\n return false;\n } else if (empty($handle)) {\n return false;\n }\n // GET https://www.google.com/calendar/feeds/default/private/full/entryID\n $url = \"https://www.google.com/calendar/feeds/$handle/private/full/$event_id?alt=jsonc\";\n\n $ch = $this->curlGetHandle($url, true);\n\n $response = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if ($http_code == \"200\") {\n $event = json_decode($response);\n if (!empty($event)) {\n return $event;\n } else {\n return array();\n }\n } else {\n return false;\n }\n }", "public function event( $id ){\n return $this->eventRepository->findOneBy( array( 'id' => $id ));\n }", "public function get_event()\n {\n }", "function id($day) {\n return floor(($day - strtotime(\"10/17/07\")) / (60 * 60 * 24));\n }", "private function GetRungInfo($the_id, $event){\n\t\t$row = SqlGetRow(\"rung\",X1_DB_teamsevents,\" WHERE team_id=$the_id AND ladder_id=\".MakeItemString($event['sid']));\t\n\t\treturn $row['rung'];\n\t}", "function appGetEventTag($response_message, $xmlrequest) {\r\n\r\n global $return_codes;\r\n $pageNumber = $xmlrequest['AppGetAllEventTag']['pageNumber'];\r\n $appEventsList = $this->app_get_event_tag($xmlrequest, $pageNumber, 10);\r\n $count = isset($appEventsList['count']) && ($appEventsList['count']) ? $appEventsList['count'] : NULL;\r\n if (!empty($appEventsList)) {\r\n $str = '';\r\n for ($i = 0; $i < $count; $i++) {\r\n $width_even_img = NULL;\r\n $height_even_img = NULL;\r\n if (is_readable($this->local_folder . $appEventsList[$i]['even_img'])) {\r\n $sizee = getimagesize($this->local_folder . $appEventsList[$i]['even_img']);\r\n $width_even_img = $sizee[0];\r\n $height_even_img = $sizee[1];\r\n\r\n $file_extension = substr($appEventsList[$i]['even_img'], strrpos($appEventsList[$i]['even_img'], '.') + 1);\r\n $arr = explode('.', $appEventsList[$i]['even_img']);\r\n $Id = isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id']) ? $appEventsList[$i]['even_id'] : NULL;\r\n\r\n if (!file_exists($this->local_folder . $arr[0] . \"_\" . $Id . \".\" . $file_extension) && (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime']))) {\r\n thumbanail_for_image($Id, $appEventsList[$i]['even_img']);\r\n }\r\n\r\n if (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime'])) {\r\n $appEventsList[$i]['even_img'] = isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7) ? event_image_detail($appEventsList[$i]['even_id'], $appEventsList[$i]['even_img'], 1) : NULL;\r\n list($width_even_img, $height_even_img) = (isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7)) ? getimagesize($this->local_folder . $appEventsList[$i]['even_img']) : NULL;\r\n }\r\n }\r\n $appEventsList[$i]['even_addr'] = strip_tags($appEventsList[$i]['even_addr'], \"<br />\");\r\n $appEventsList[$i]['even_addr'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"<br />\", \"<br/>\"), \"\\\\n\", $appEventsList[$i]['even_addr']);\r\n $appEventsList[$i]['even_img'] = $this->profile_url . $appEventsList[$i]['even_img'];\r\n\r\n if (isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id'])) {\r\n $str_temp = '{\r\n \"eventId\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_id']). '\",\r\n \"eventName\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_title']). '\",\r\n \"eventPhoto\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_img']). '\",\r\n \"width_even_img\":\"' .str_replace('\"', '\\\"', $width_even_img). '\",\r\n \"height_even_img\":\"' .str_replace('\"', '\\\"', $height_even_img). '\",\r\n \"eventCity\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_city']). '\",\r\n \"eventState\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_state']). '\",\r\n \"eventPhone\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_phon']) . '\",\r\n \"eventzip\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_zip']). '\",\r\n \"eventCountry\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_country']). '\",\r\n \"eventAddress\":\"' .str_replace('\"', '\\\"', trim(preg_replace('/\\s+/', ' ', $appEventsList[$i]['even_addr']))). '\",\r\n \"eventLatitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['latitude']). '\",\r\n \"eventLongitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['longitude']). '\"\r\n }';\r\n $str .= $str_temp;\r\n $str .=',';\r\n }\r\n }\r\n $str = substr($str, 0, strlen($str) - 1);\r\n $response_str = response_repeat_string();\r\n $response_mess = '\r\n {\r\n\t\t ' . $response_str . '\r\n \"AppearanceVenueList\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessDesc\"] . '\",\r\n \"CurrentVenueCount\":\"' . $count . '\",\r\n \"TotalVenueCount\":\"' . $appEventsList['Total']['TotalRecords'] . '\",\r\n \"AppearanceVenues\":[' . $str . ']\r\n\t\t }\r\n }';\r\n } else {\r\n\r\n $response_mess = '\r\n {\r\n ' . response_repeat_string() . '\r\n \"AppGetAllEventTag\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordDesc\"] . '\"\r\n }\r\n\t}';\r\n }\r\n writelog(\"Appearance:appGetEventTag:\", $response_mess, false);\r\n return getValidJSON($response_mess);\r\n }", "public function getLastEventID(): ?string\n {\n return (string) $this->hub->getLastEventID();\n }", "function get_tag_id($tag_label){\n\tglobal $tprefix;global $db;\n\t$sql = \"select `tag_id` from `$tprefix\".\"_tags` where `tag_label` = '\".$tag_label.\"'\";//echo '<br>2' .$sql;\n\t$result = $db->query($sql);\n\t$row = $result->fetch_assoc();\n\treturn $row['tag_id'];\n}", "public static function id_from_tag_name($tag_name) {\n $tag = self::find_by_attribute('name', $tag_name);\n return $tag->id;\n }", "private function getUpdateEventId()\n\t{\n\t\treturn @IPS_GetObjectIDByIdent('updateEvent', $this->InstanceID);\n\t}", "public function getFullIdentifier()\n {\n return $this->getOrganisation().' '.$this->getApplicationEventType();\n }", "public function getEventName();", "public function getEventName();", "public function determineId() {}", "public function getEventInfo($event_id) {\n\n $eventInfo = array();\n\n $query = $this->db->prepare('SELECT * FROM `events`\n WHERE event_id=:event_id');\n $query->setFetchMode(PDO::FETCH_OBJ);\n $query->execute(array(\n ':event_id' => $event_id));\n\n if ($query->rowCount() == 0) { return false; }\n $row = $query->fetch();\n $eventInfo['event_id'] = $row->event_id;\n $eventInfo['name'] = $row->name;\n $eventInfo['chair_id'] = $row->chair_id;\n $eventInfo['start_datetime'] = strtotime($row->start_datetime);\n $eventInfo['end_datetime'] = strtotime($row->end_datetime);\n $eventInfo['description'] = $row->description;\n $eventInfo['location'] = $row->location;\n $eventInfo['meeting_location'] = $row->meeting_location;\n $eventInfo['color'] = $row->color;\n $eventInfo['online_signups'] = $row->online_signups;\n $eventInfo['online_end_datetime'] = strtotime($row->online_end_datetime);\n $eventInfo['status'] = $row->status;\n $eventInfo['num_attendees'] = $row->num_attendees;\n $eventInfo['num_other_attendees'] = $row->num_other_attendees;\n $eventInfo['pros'] = $row->pros;\n $eventInfo['cons'] = $row->cons;\n $eventInfo['do_again'] = $row->do_again;\n $eventInfo['funds_raised'] = $row->funds_raised;\n $eventInfo['service_hours'] = $row->service_hours;\n $eventInfo['admin_hours'] = $row->admin_hours;\n $eventInfo['social_hours'] = $row->social_hours;\n $eventInfo['num_override_hours'] = $row->num_override_hours;\n $eventInfo['tag_ids'] = $this->getEventTags($row->event_id);\n return $eventInfo;\n }", "public function extractID(): string\n {\n $idColumn = $this->qb->getIdColumn($this->request, new MetaData());\n if ('rec_id' === $idColumn) {\n return $this->records['recordId'];\n }\n\n $uri = $this->qb->getUri() . '/' . $this->records['recordId'];\n try {\n $record = $this->conn->performFMRequest('GET', $uri, $this->qb->getOptions());\n return $record[0]['fieldData'][$idColumn];\n } catch (Exception $e) {\n throw new FMException('Unable to locate record primary key with error ' . $e->getMessage());\n }\n\n }", "public function getCartId()\n {\n return $this->eventId;\n }", "function get_event_by_oid($oid)\n\t{\n\t\t$events_table = SQL_PREFIX . 'events';\n\t\t$occurrences_table = SQL_PREFIX . 'occurrences';\n\t\t$users_table = SQL_PREFIX . 'users';\n\t\t$cats_table = SQL_PREFIX . 'categories';\n\n\t\t$query = \"SELECT \" . $this->get_event_fields()\n\t\t\t.\", `username`, `name`, `bg_color`, `text_color`\\n\"\n\t\t\t.\"FROM `$events_table`\\n\"\n\t\t\t.\"LEFT JOIN `$occurrences_table` USING (`eid`)\\n\"\n\t\t\t.\"LEFT JOIN `$users_table` ON `uid` = `owner`\\n\"\n\t\t\t.\"LEFT JOIN `$cats_table` USING (`catid`)\\n\"\n\t\t\t.\"WHERE `oid` = '$oid'\\n\";\n\n\t\t$sth = $this->dbh->query($query)\n\t\t\tor $this->db_error(_('Error in get_event_by_oid'),\n\t\t\t\t\t$query);\n\n\t\t$result = $sth->fetch_assoc()\n\t\t\tor soft_error(_(\"Event doesn't exist with oid\")\n\t\t\t\t\t. \": $oid\");\n\n\t\treturn $result;\n\t}", "function tribe_events_get_event( $event = null ) {\n\t\tglobal $post;\n\n\t\tif ( null === $event ) {\n\t\t\treturn $post;\n\t\t}\n\n\t\tif ( $event instanceof WP_Post && Tribe__Events__Main::POSTTYPE === get_post_type( $event ) ) {\n\t\t\treturn $post;\n\t\t}\n\n\t\tif ( is_numeric( $event ) && $event == intval( $event ) ) {\n\t\t\t$event = get_post( $event );\n\n\t\t\tif ( null !== $event && Tribe__Events__Main::POSTTYPE === get_post_type( $event ) ) {\n\t\t\t\treturn $event;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function getEventAttendanceProfileId(): Uuid {\n\t\treturn ($this->eventAttendanceProfileId);\n\t}" ]
[ "0.7604229", "0.7437202", "0.6756875", "0.672269", "0.67168766", "0.6675681", "0.6666887", "0.6642331", "0.6593998", "0.65636075", "0.6554212", "0.6528966", "0.64781874", "0.6446437", "0.6369353", "0.6349308", "0.63269824", "0.6321424", "0.6290486", "0.6269141", "0.6248235", "0.62445605", "0.6232193", "0.6227132", "0.6227132", "0.62100774", "0.62080383", "0.6137652", "0.6131326", "0.6108652", "0.6107275", "0.61013687", "0.6092564", "0.60682476", "0.60369515", "0.5986797", "0.5964823", "0.5945604", "0.5945604", "0.5903959", "0.58804595", "0.5878849", "0.5867748", "0.5863136", "0.5840704", "0.5826064", "0.5816145", "0.5813844", "0.57777685", "0.57692933", "0.57690114", "0.574065", "0.5735461", "0.57258785", "0.57152784", "0.56953233", "0.5672662", "0.5671516", "0.5644543", "0.5637311", "0.5630249", "0.5621274", "0.5614104", "0.560659", "0.56037337", "0.56025904", "0.5581249", "0.5576271", "0.55737704", "0.5559465", "0.55592066", "0.5557361", "0.5553203", "0.55389243", "0.55376536", "0.55371535", "0.5524237", "0.5519549", "0.5513983", "0.5512413", "0.5505905", "0.550492", "0.5493401", "0.5491296", "0.5488946", "0.54878765", "0.54811895", "0.5475095", "0.5465374", "0.54587615", "0.54553896", "0.5442255", "0.5442255", "0.5439272", "0.5436279", "0.54316", "0.54313356", "0.54283065", "0.54255754", "0.54255676" ]
0.74864405
1
Function to get company description using companyuser relationship August 10,2016
Функция для получения описания компании с использованием отношения companyuser 10 августа 2016 года
function getCompanyDescriptionUsingCompUserRelation($companyID) { $companyDesc= ''; $qry="SELECT description FROM company_profiles WHERE id=".$companyID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $companyDesc = $row['description']; } } return $companyDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthorcompany() {}", "function getCompanyNameUsingCompUserRelation($companyID)\n{\n\t$companyN= '';\n \t$qry=\"SELECT company_name\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyN\t\t\t=\t$row['company_name'];\n\t\t} \t \t\n }\n return $companyN;\n\n}", "public function display_company(){\n\n\t\t// $con = mysqli_connect(\"localhost\",\"root\",\"\",\"kikay_kit\");\n\t\t// $query = mysqli_query($con,\"SELECT u.id AS u_id, cm.code AS cm_code, u.status AS u_status, u.created_date AS u_created_date, cm.id AS cm_id, cm.name AS cm_company, cm.description AS cm_description\n\t\t// \t\tFROM company cm\n\t\t// \t\tINNER JOIN user u ON cm.user_id = u.id\");\n\t\t// if(mysqli_num_rows($query)>0){\t\n\t\t// \tprint_r(mysqli_fetch_assoc($query));die();\n\t\t// \t// return $query->result();\n\t\t// }\n\t\t// else{\n\t\t// \treturn NULL;\n\t\t// }\n\t\t$query = $this->db->query(\"SELECT u.id AS u_id, cm.code AS cm_code, u.status AS u_status, u.created_date AS u_created_date, cm.id AS cm_id, cm.name AS cm_company, cm.description AS cm_description\n\t\t\t\tFROM company cm\n\t\t\t\tINNER JOIN user u ON cm.user_id = u.id\");\n\t\tif($query->num_rows()>0){\t\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\treturn NULL;\n\t\t}\n\t}", "public static function getCompanyInfoByUserId($user_id){\n $company = DB::table('term_relation')\n ->leftJoin('company', 'term_relation.company_id','=','company.id')\n ->leftJoin('users', 'users.id','=','term_relation.user_id')\n ->where(['term_relation.user_id'=>$user_id,'term_relation.term_type'=>0,'term_relation.role'=>4])\n ->select('term_relation.*','company.*','users.id as c_user_id','users.name as user_name','users.designation','users.device_id as company_device_id')\n ->first();\n return $company;\n }", "public function getCompany();", "public function getCompany() {}", "abstract public function getCompany() : String;", "function getCompanyUserNameUsingCompUserRelation($companyID)\n{\n\t$companyUN= '';\n \t$qry=\"SELECT company_username\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyUN\t\t\t=\t$row['company_username'];\n\t\t}\n \t \t\n }\n return $companyUN;\n\n}", "public function companyDetails() {\n\n $vsql = \"SELECT * fROM companydetails\";\n\n $vres = $this->query($vsql);\n $cnt1 = $this->numRows($vres);\n if ($cnt1 > 0) {\n while ($row = $this->fetchData($vres)) {\n $cid = $row['id'];\n $det = \"SELECT * FROM user_details WHERE id in (SELECT Userid from companyMap WHERE companyid=$cid)\";\n $vresone = $this->query($det);\n $cnt2 = $this->numRows($vresone);\n if ($cnt2 > 0) {\n\n\n while ($row1 = $this->fetchData($vresone)) {\n $row['users'][] = $row1;\n }\n }\n\n $arr[] = $row;\n }\n $err = array('errCode' => 0, 'errMsg' => 'data found successfully');\n } else {\n $arr = array();\n $err = array('errCode' => 1, 'errMsg' => 'no data found');\n }\n\n $result = array('results' => $arr, 'error' => $err);\n return $result;\n }", "function getUserDesignationFromCompUserRelation($userID)\n{\n\t$designation= '';\n \t$qry=\"SELECT designation\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$designation\t=\t$row['designation'];\n\t\t} \t \t\n }\n return $designation;\n}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "public function company(){\n\n\t\t$query=$this->db->query(\"select * from company_info where is_this_recruitment_employer='0' order by company_id asc \");\n\t\treturn $query->result();\n\n\t}", "function fn_seo_get_company_data(&$company_id, &$lang_code, &$extra, &$fields, &$join, &$condition)\n{\n $fields[] = '?:seo_names.name as seo_name';\n $fields[] = '?:seo_names.path as seo_path';\n\n $join .= db_quote(\n \" LEFT JOIN ?:seo_names ON ?:seo_names.object_id = ?i ?p\",\n $company_id, fn_get_seo_join_condition('m', 'companies.company_id', $lang_code)\n );\n}", "function getCompanyName($entrpID)\n{\n\t$companyName \t= 'Not Specified';\n\t//SELECT company_profiles.company_name FROM entrp_company_members LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid WHERE entrp_company_members.clientid=1\n\t$qry = \"SELECT company_profiles.company_name \n\t\t\t FROM entrp_company_members \n\t\t\t LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid \n\t\t\t WHERE entrp_company_members.clientid=\".$entrpID.\"\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n while($row = mysqli_fetch_array($res))\n {\n \t$companyName \t= $row['company_name'];\n\t\t}\n } \n\treturn $companyName;\n}", "public function get_companies() {\n $this->db->select('u.user_id, u.user_email, u.user_type, u.created_at, u.status, up.prof_id,u.c_acc_status, up.company_name,up.thumb_nail, up.prof_image, up.status as prof_status, up.ip_address, up.updated_at as prof_updated');\n $this->db->join('upkepr_users as u', 'up.user_id = u.user_id', 'INNER')->where('u.user_type',2);\n return $this->db->get($this->table . ' as up')->result();\n }", "function company_details() {\n if (!$this->request->isAsyncCall()) {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n \n $client_id = $this->request->get('company_id');\n $client_company = Companies::findById($client_id);\n if (!instance_of($client_company, 'Company')) {\n $this->httpError(HTTP_ERR_NOT_FOUND,' ');\n } // if\n \n $company_address = CompanyConfigOptions::getValue('office_address', $client_company);\n echo $company_address;\n die();\n }", "public function getCompanyDetails(){\n\n return (new Query())->select(\n '('.(new Query())->select('count(*)')->from(Auctions::tableName())->where(['company' => $this->id])->createCommand()->rawSql.') as companyAuctions,'.\n '('.(new Query())->select('count(*)')->from(CompanyUsers::tableName())->where('company=:c and user!=:u',[':c' => $this->id , ':u' => Auction::$app->user->id])->createCommand()->rawSql.') as companyUsers,'.\n '('.(new Query())->select('count(*)')->from(DealerCompany::tableName())->where(['company' => $this->id])->createCommand()->rawSql.') as companyDealers'\n )->one();\n\n }", "public static function getSolderHead($company_id){\n if(!$company_id)\n return null;\n $companyInfo = DB::table('users')\n ->leftJoin('term_relation','term_relation.user_id','=','users.id')\n ->leftJoin('company','term_relation.company_id','=','company.id')\n ->leftJoin('units','term_relation.unit_id','=','units.id')\n ->where(['term_relation.company_id'=>$company_id,'term_relation.role'=>4])\n ->select('term_relation.*',\n 'users.id as user_id','users.device_id as c_device_id','users.name as c_user_name',\n 'company.id as company_id','company.company_name as company_name',\n 'units.id as unit_id','units.unit_name as unit_name'\n )\n ->first();\n return $companyInfo;\n }", "function fetch_company_information_from_userid($clientid)\n{\n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\t\n\t$data= array();\n\t/*\n\t$qry=\"SELECT company_profiles.*,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM company_profiles\n\t\t\tLEFT JOIN location_info ON location_info.id=company_profiles.client_location\n\t\t\tWHERE company_profiles.clientid=\".$clientid.\"\n\t \";\n\t*/\n\t$role\t\t\t=\tgetUserDesignationFromCompUserRelation($clientid);\n\t$companyID\t=\tgetCompanyIDFromCompUserRelation($clientid);\n\t$qry=\"SELECT company_profiles.*,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM company_profiles\n\t\t\tLEFT JOIN location_info ON location_info.id=company_profiles.client_location\n\t\t\tWHERE company_profiles.id=\".$companyID.\"\n\t \";\n\t \n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$data['id']\t\t\t\t\t=\t$row['id']; \n\t\t\t$data['companyName']\t\t=\t$row['company_name']; \t\n\t\t\t$data['companyUserName']=\t$row['company_username'];\t\t\n\t\t\t$data['location']\t\t\t=\t$row['located_at']; \t\t\t\n\t\t\t\n\t\t\tif($row['avatar']!='')\n \t\t{\n \t\t\t$data['profilePhoto']\t\t\t\t=\t$row['avatar'];\n \t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['profilePhoto']\t\t\t\t=\t$company_default_avatar;\n\t\t\t} \n\t\t\t\n\t\t\tif($row['cover_photo']!='')\n \t\t{\n \t\t\t$data['coverPhoto']\t\t\t\t=\t$row['cover_photo'];\n \t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['coverPhoto']\t\t\t\t=\t$company_default_cover;\n\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$data['website']\t\t\t=\t$row['website'];\n\t\t\t$data['email']\t\t\t\t=\t$row['email']; \t\t\t\n\t\t\t$data['mobile']\t\t\t=\t$row['mobile']; \t\t\t\n\t\t\t$data['tel']\t\t\t\t=\t$row['telephone']; \t\t\t\n\t\t\t$data['fax']\t\t\t\t=\t$row['fax'];\n\t\t\t$data['companyDesc']\t\t=\t$row['description']; \n\t\t\t\n\t\t\t$data['followers']\t\t=\tentrp_company_follows($data['id']);\n\t\t\t$data['categories']\t\t= fetch_company_categories($data['id']);\n\t\t\t$data['role']\t= $role;\t\t\t\t\n\t\t}\n\t}\n\telse \n\t{\n\t\t$data['id']\t\t\t\t\t=\t''; \t\t\t\n\t\t$data['profilePhoto']\t=\t''; \t\t\n\t\t$data['coverPhoto']\t\t=\t''; \t\t\n\t\t$data['companyName']\t\t=\t''; \n\t\t$data['companyUserName']='';\n\t\t$data['location']\t\t\t=\t''; \t\t\t\n\t\t$data['companyDesc']\t\t=\t''; \t\t\n\t\t$data['email']\t\t\t\t=\t''; \t\t\t\n\t\t$data['website']\t\t\t=\t''; \t\t\t\n\t\t$data['mobile']\t\t\t=\t''; \t\n\t\t$data['tel']\t\t\t\t=\t''; \t\t\t\n\t\t$data['fax']\t\t\t\t=\t''; \n\t}\n\t\n\treturn $data;\n\n}", "function getCompany() {\n checkIfNotAjax();\n $this->libauth->check(__METHOD__);\n $this->BeOnemdl->table = 'company';\n $this->BeOnemdl->searchable = array('companyname');\n $this->BeOnemdl->select2fields = array('id' => 'id', 'text' => \"concat(companyname,' [', companyshort,']')\");\n $result['results'] = $this->BeOnemdl->getSelect2(array('status' => '1'));\n $result['more'] = true;\n echo json_encode($result);\n }", "abstract public function get_the_company_gplus();", "public function getCompany(){\n return \"\";\n }", "public function companyDetailsWithEmail() {\n\n $vsql = \"SELECT * fROM companydetails\";\n\n $vres = $this->query($vsql);\n $cnt1 = $this->numRows($vres);\n if ($cnt1 > 0) {\n while ($row = $this->fetchData($vres)) {\n $cid = $row['id'];\n $det = \"SELECT * FROM user_details,tbl_user_master WHERE user_details.id = tbl_user_master.id AND tbl_user_master.id in (SELECT Userid from companyMap WHERE companyid=$cid)\";\n $vresone = $this->query($det);\n $cnt2 = $this->numRows($vresone);\n if ($cnt2 > 0) {\n\n\n while ($row1 = $this->fetchData($vresone)) {\n $row['users'][] = $row1;\n }\n }\n\n $arr[] = $row;\n }\n $err = array('errCode' => 0, 'errMsg' => 'data found successfully');\n } else {\n $arr = array();\n $err = array('errCode' => 1, 'errMsg' => 'no data found');\n }\n\n $result = array('results' => $arr, 'error' => $err);\n return $result;\n }", "public function getUsers($company_id);", "function get_clinic_info($user_id,$field = \"clinic_id\" ){\n if( is_numeric($user_id) && $user_id >0 ){\n $sql = \"select clinic_id from clinic_user where user_id = '{$user_id}'\";\n $result = @mysql_query($sql);\n while( $row = @mysql_fetch_array($result) ){\n $clinic_id = $row[\"clinic_id\"];\n if(is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_id\" ) {\n return $row[$field];\n }\n if( is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_name\" ){\n $clinic_name = $this->get_field($clinic_id,\"clinic\",$field); \n return html_entity_decode($clinic_name);\n }\n }\n }\n return \"\";\n }", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "public function buildCompanyData();", "public function get_detail_companies() {\n $token = $this->input->get_post('token');\n $company_id = $this->input->get_post('company_id');\n\n // Check parameters\n if ($this->helperlib->hasEmptyParams(array($token))) {\n $this->outputlib->error($this->lang->line('error_missing_parameters'));\n }\n \n $user = $this->userlib->getUserProfile($token);\n $query = \"\n SELECT \n c.*,\n GROUP_CONCAT(ci.industry SEPARATOR '@@') AS industries\n FROM\n \".TABLE_COMPANIES.\" c\n LEFT OUTER JOIN \".TABLE_COMPANIES_INDUSTRIES.\" ci\n ON c.id = ci.company_id\n WHERE c.user_id = ? and c.id = ?\n GROUP BY c.id\n \";\n $data = array($user['id'],$company_id);\n $results = $this->db->query($query, $data);\n $results = $results->result_array();\n \n $companies = array();\n foreach ($results as $row) {\n $logo = $row['logo'];\n if (strlen($logo) == 0) {\n $row['logo'] = DEFAULT_COMPANY_LOGO;\n } else {\n $row['logo'] = COMPANY_LOGO_URL.$row['logo'];\n }\n $row['industries'] = explode(\"@@\", $row['industries']);\n \n $companies[] = $row;\n }\n \n $this->outputlib->output(STATUS_OK, '', $companies);\n }", "public function getcompanyInfo(){\n $query = \"SELECT * FROM tbl_companyinfo\";\n $result = $this->db->select($query);\n return $result;\n }", "public function companyDetailsWithEmailAndProject() {\n\n $vsql = \"SELECT * fROM companydetails\";\n\n $vres = $this->query($vsql);\n $cnt1 = $this->numRows($vres);\n if ($cnt1 > 0) {\n while ($row = $this->fetchData($vres)) {\n $cid = $row['id'];\n $det = \"SELECT * FROM user_details,tbl_user_master WHERE user_details.id = tbl_user_master.id AND tbl_user_master.id in (SELECT Userid from companyMap WHERE companyid=$cid)\";\n $vresone = $this->query($det);\n $cnt2 = $this->numRows($vresone);\n if ($cnt2 > 0) {\n\n\n while ($row1 = $this->fetchData($vresone)) {\n $projectSql = \"SELECT * fROM projectMap where assignuser=\" . $row1['id'];\n $pres = $this->query($projectSql);\n while ($prow = $this->fetchData($pres)) {\n $row1['prject'][] = $prow;\n }\n\n $row['users'][] = $row1;\n }\n }\n\n $arr[] = $row;\n }\n $err = array('errCode' => 0, 'errMsg' => 'data found successfully');\n } else {\n $arr = array();\n $err = array('errCode' => 1, 'errMsg' => 'no data found');\n }\n\n $result = array('results' => $arr, 'error' => $err);\n return $result;\n }", "function get_company($conn){\r\n $output=\"\";\r\n $who_email = $_SESSION[\"username\"];\r\n $get_cn = \"SELECT so_companyname FROM product_info WHERE who_email = '$who_email'\";\r\n $r_cn = mysqli_query($conn,$get_cn);\r\n if (mysqli_num_rows($r_cn) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($r_cn)) {\r\n $output .= \"<option value=\".$row['so_companyname'].\">\".$row['so_companyname'].\"</option>\";\r\n \r\n }\r\n return $output;\r\n }\r\n }", "public function getUserCompanyList() {\n try {\n $planList = $this->shortPositionService->getUserCompanyList(Auth::user()->email);\n if (!empty($planList)) {\n return $this->respond($planList);\n } else {\n return $this->respondBadRequest(['error' => 'No plans']);\n }\n } catch (EquioException $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('Subscription not found')]\n );\n } catch (\\Exception $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('messages.un_processable_request')]\n );\n }\n }", "public function companies_list () \n\t\t{\n\t\t\t$this->loadModel (\"User\");\n\t\t\t$category_id\t\t\t\t\t\t=\t$_REQUEST['category_id'];\t\t\t\n\t\t\t$this->User->virtualFields\t=\tarray ('followers'=>'select count(id) from employer_followers where User.id = employer_followers.user_id');\n\t\t\t$data = $this->User->find ('all',array('conditions'=>array('User.usertype_id'=>8,'User.category_id'=>$category_id)));\n\t\t\t//pr ($data);die;\n\t\t\tif (!empty($data)) {\n\t\t\t\tforeach($data as $key=>$value) {\n\t\t\t\t\t$response[]=array(\n\t\t\t\t\t\t'id'\t\t\t\t\t\t=> @$value['User']['id'],\n\t\t\t\t\t\t'category_id'\t\t\t=> @$value['User']['category_id'],\n\t\t\t\t\t\t'category_name'\t=> @$value['Topic']['name'],\n\t\t\t\t\t\t'company_name'\t=> @$value['User']['company_name'],\n\t\t\t\t\t\t'image'\t\t\t\t\t=> FULL_BASE_URL.$this->webroot.'files' . DS . 'profileimage'. DS .$value['User']['profile_image'],\t\t\t\t\t\t\n\t\t\t\t\t\t'email'\t\t\t\t\t=> @$value['User']['email'],\n\t\t\t\t\t\t'contact' \t\t\t\t=> @$value['User']['contact'],\n\t\t\t\t\t\t'description' \t\t\t=> @$value['User']['description'],\n\t\t\t\t\t\t'followers' \t\t\t\t=> @$value['User']['followers'],\n\t\t\t\t\t\t'status'\t\t\t\t \t=> 1\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//pr($response);die;\n\t\t\t\techo json_encode($response);exit;\n\t\t\t} else {\n\t\t\t\t$response[] = array('status'=>0,'msg'=>'no company found.');\n\t\t\t\techo json_encode ($response);exit;\n\t\t\t}\t\t\t\n\t\t}", "public function get_company($id_user)\n\t{\n\t\t return $this->CI->db->select(PREFIX.'companies.Name, '.PREFIX.'companies.LogoPath, '.PREFIX.'companies.Street, '.PREFIX.'companies.StreetNumber, '.PREFIX.'companies.Country, '.PREFIX.'companies.ZIP, '.PREFIX.'companies.City')\n\t\t \t\t\t\t\t ->from(PREFIX.'users, '.PREFIX.'companies')\n\t\t \t\t\t\t\t ->where(PREFIX.'users.id', $id_user)\n\t\t \t\t\t\t\t ->where(PREFIX.'companies.ID', 1)\n \t\t\t\t\t ->get();\n\t}", "public function getCompany(): string\n {\n return $this->company;\n }", "public function get_companies() {\n $token = $this->input->get_post('token');\n // Check parameters\n if ($this->helperlib->hasEmptyParams(array($token))) {\n $this->outputlib->error($this->lang->line('error_missing_parameters'));\n }\n \n $user = $this->userlib->getUserProfile($token);\n $query = \"\n SELECT \n c.*,\n GROUP_CONCAT(ci.industry SEPARATOR '@@') AS industries\n FROM\n \".TABLE_COMPANIES.\" c\n LEFT OUTER JOIN \".TABLE_COMPANIES_INDUSTRIES.\" ci\n ON c.id = ci.company_id\n WHERE c.user_id = ?\n GROUP BY c.id\n \";\n $data = array($user['id']);\n $results = $this->db->query($query, $data);\n $results = $results->result_array();\n \n // TR altered to fix case with no company defined (20150324) \n if (count($results) > 0) {\n $companies = array();\n foreach ($results as $row) {\n $logo = $row['logo'];\n if (strlen($logo) == 0) {\n $row['logo'] = DEFAULT_COMPANY_LOGO;\n } else {\n $row['logo'] = COMPANY_LOGO_URL.$row['logo'];\n }\n $row['industries'] = explode(\"@@\", $row['industries']);\n \n $companies[] = $row;\n }\n $this->outputlib->output(STATUS_OK, '', $companies);\n\n } else {\n $this->outputlib->error('Error: no company defined'); \n }\n\n }", "function get_companies($id) {\n $ci =& get_instance(); \n \n //get resseller discount based on user's id\n $ci->db->where ( 'id', $id );\n $qu = $ci->db->get ( 'companies' );\n $companies = $qu->result_array (); \n $name = @$companies[0]['name'];\n \n \n\t\treturn $name;\n\t\t \n \n }", "protected function _usersBelongsCompany()\n {\n if( Session::get('roles_id') == 1 ){\n $response = SysUsersModel::with(\n 'binnacle'\n ,'roles'\n ,'groups'\n ,'companies'\n )->orderBy('id','DESC')\n ->groupby('id')->get();\n }else{\n $response = SysEmpresasModel::find(Session::get('company_id'))\n ->users()\n ->with(\n 'roles'\n ,'groups'\n ,'binnacle'\n ,'companies'\n )->orderBy('id','DESC')->groupby('id')->get();\n }\n return $response;\n }", "public static function getUserInfo($company_id, $dep_id, $user_id)\n {\n $company_id = DbAgent::queryEncode($company_id,DbAgent::$DB_STRING);\n $dep_id = DbAgent::queryEncode($dep_id,DbAgent::$DB_STRING);\n $user_id = DbAgent::queryEncode($user_id,DbAgent::$DB_STRING);\n \n $query = \"SELECT user_t.*\n FROM user_t\n inner join company_t\n on user_t.company_id = company_t.company_id\n and company_t.del_flag = 0\n inner join department_t\n on user_t.company_id = department_t.company_id\n and department_t.del_flag = 0\n and user_t.dep_id = department_t.dep_id\n WhERE user_t.del_flag = 0\n and user_t.company_id = $company_id\n and user_t.dep_id = $dep_id\n and user_t.user_id = $user_id\";\n \n\t\t$record = Database::currentDb()->getRecord($query);\n return $record;\n }", "public function getBusinessInformation($company_id){\n //\n // get id, idCompany, prom_text, company_name, latLng, logo_icon_start_with\n //\n $sql_check = \"SELECT \".\n \"company.id, \".\n \"company.name, \".\n \"GROUP_CONCAT(X( company.geographicPosition ) , ',', Y( company.geographicPosition ) ) AS latLng, \".\n \"logoTypes.logo as icon, \".\n \"commercialTypes.name as commercialTypes, \".\n \"company.address, \".\n \"company.city \".\n \"FROM company \".\n \"join logoTypes on ( company.idLogosTypes = logoTypes.id ) \".\n \"join commercialTypes on ( commercialTypes.id = company.idCommercialTypes ) \".\n \"where company.id =\".$company_id ;\n\t\t\n $arrComp = $this->exec_query_0($sql_check,'SEL');\n\n if(empty($arrComp[\"id\"])){ \n //\n // company not exist\n //\n return FALSE; \n }\n else{\n $result_ = $arrComp;\n\t\t\t\t$result_['id'] = (isset($result_['id'])) ? (int)$result_['id']:$result_['id'];\n\t\t\t\tif(isset($result_['latLng'])) {\n\t\t\t\t\t$co_ordinates = (explode(\",\",$result_['latLng']));\n\t\t\t\t\t$result_['latLng'] = (isset($result_['latLng'])) ? array((float)$co_ordinates[0],(float)$co_ordinates[1]):$result_['idCompany'];\n\t\t\t\t}\n\t\t\t}\n $this->arrResultData['m'] = $result_;\n return TRUE;\n }", "function getCompanyContestByUserId($user_id){\n $sql = \"SELECT c.id company_id, c.*, t.id contest_id, t.* FROM companys c, contests t WHERE c.user_id = ? AND c.id = t.company_id\";\n $query = $this->db->query($sql, array($user_id));\n if($query->num_rows() > 0 ){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "function getUserDescription($user_id)\n\t\t{\n\t\t\t//getting values from databases\n\t\t\t$userDetails = $this->manage_content->getValue_where(\"user_info\",\"*\",\"user_id\",$user_id);\n\t\t\t\n\t\t\tif(!empty($userDetails[0]['name']))\n\t\t\t{\n\t\t\t\t$name = $userDetails[0]['name'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$userCred = $this->manage_content->getValue_where('user_credentials', '', 'user_id', $user_id);\n\t\t\t\t$name = $userCred[0]['username'];\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"profile_box_heading project_title_outline_userdetails\">'.$name.'\n\t\t\t\t\t<span class=\"portfolio_part_share pull-right\"><a href=\"edit-profile.php?op=per\">Edit</a></span>\n\t\t\t\t</div>\n \t\t\t<div class=\"hiring_rate profile_details\">\n\t\t\t\t\t\t<p>'.$userDetails[0]['description'].'</p>\n\t\t\t\t\t\t<div class=\"profile_info_outline\">\n\t\t\t\t\t\t\t<div class=\"profile_info_box pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/expertise_icon.png\" class=\"profile_info_icon center-block\"/>\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading text-center\">Certifications</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text text-center\">'; if(!empty($userDetails[0]['no_certificates'])) { echo substr($userDetails[0]['no_certificates'],0,30); } else { echo 'NULL'; } echo '</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"profile_info_box pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/availability_icon.png\" class=\"profile_info_icon center-block\" />\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading text-center\">Availability</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text text-center\">'.$userDetails[0]['availability'].'</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"profile_info_box profile_info_box-last pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/interested_icon.png\" class=\"profile_info_icon center-block\" />\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading text-center\">Interested In</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text text-center\">'; if(!empty($userDetails[0]['interested_topic'])) { echo substr($userDetails[0]['interested_topic'],0,30); } else { echo 'Nothing Specify'; } echo '</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t\t}", "public function companies(){\n $UserIn=getUser()->id;\n $UserCoCode=getUser()->CoCode;\n //---------------\n $companies=DB::table('employees')\n ->Join('companies','companies.CoCode','=','employees.CoCode')\n ->leftJoin('users','users.id','=','companies.CompanyOwner')\n ->where('employees.id', $UserIn)\n ->select('companies.CompanyName',\n 'companies.CompanyAddress',\n 'users.name',\n 'users.name',\n 'employees.CoCode',\n 'employees.permCode',\n )\n ->get();\n return $companies;\n }", "function organization_name_from_user_id($user_id)\n {\n $user = \\App\\User::FindOrFail($user_id);\n\n echo($user->organization()->get()[0]->name);\n }", "public function companyDetail($company=null){\n /*Obtengo los detalles de la compania*/\n $domainManager = CompaniesManager::getInstance();\n $company = $domainManager->getOne($company);\n\n /*Consulta al AccountCompanyRelationManager, los periodos existentes en la base de datos*/\n $domainManager = AccountCompanyRelationManager::getInstance();\n $periods = $domainManager->getColumn(\"periodo\");\n\n /*Obtengo la cantidad de indicadores disponibles, para armar la tabla.*/\n $domainManager = IndicatorsManager::getInstance();\n $indicatorsCount = $domainManager->getQuantity(\"activo\",1);\n\n return view('company_detail')->with(\"companyName\", $company->nombre)\n ->with(\"companyAccounts\",$company->cuentas)\n ->with(\"indicatorsPeriods\", $periods)\n ->with(\"indicatorsCount\", $indicatorsCount);\n }", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getAllCompanies(PDO $dbh){\n\n $sql = $dbh->prepare(\"SELECT id, display_name FROM civicrm_contact \n WHERE contact_type='Organization' ORDER BY display_name\");\n $sql->execute();\n $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n $companies = array();\n\n foreach($result as $key => $value){\n \n $id = $value[\"id\"];\n $orgName = $value[\"display_name\"];\n $companies[$id] = $orgName;\n }\n\n return $companies;\n\n}", "function get_the_author_description()\n{\n}", "function company_of_chart_for_user_query($user_id='')\n {\n $sql = \"SELECT DISTINCT(CUM.company_id) AS company_id, CM.company_name, CUM.company_id AS aaa, MAX(sent_time) AS sent_time, DATE_FORMAT(MAX(sent_time),'%H:%i %p') sent_time_only,\n (SELECT COUNT(id) FROM hia_company_user_messages WHERE end_user_id = '$user_id' AND company_id = aaa AND read_time IS NULL ) AS no_of_msg, \n IF(CU.users_profilepic IS NULL OR CU.users_profilepic = '', 'admin-no-image.png', CU.users_profilepic)AS company_logo\n FROM hia_company_user_messages AS CUM\n JOIN hia_company AS CM ON (CUM.company_id = CM.company_id)\n JOIN hia_users AS CU ON(CM.company_id = CU.users_companyid AND CU.users_type = '2')\n WHERE CUM.end_user_id = '$user_id'\n GROUP BY CUM.company_id \";\n\n // echo $sql;\n\n if ( ! $this->db->simple_query($sql))\n {\n $error = $this->db->error();\n //print_r($error);\n //exit();\n return $error;\n }\n else\n {\n $query = $this->db->query($sql);\n \n return $query->result_array();\n }\n \n }", "public function get_company_info($company_id){\n\t\t$this->db->where(\"company_id\", $company_id);\n\t\t$query = $this->db->get('company_info');\n\t\treturn $query->row();\t\n\t}", "public function fetch_company_data()\n {\n $this->autoRender = false;\n $this->setLayout = false;\n\n $allCompanies = $this->Company->get_fetch_url();\n foreach ($allCompanies as $company) { //api_key=tp5vhpdhzv6w48w4q7b7cscr\n\n $fetched_data = $this->get_one_company_data($company);\n if ($fetched_data->homepage_url != \"\" && $fetched_data->image->available_sizes[0][1] !=\"\") {\n $company['Company']['slug'] = $fetched_data->permalink;\n $company['Company']['description'] = $fetched_data->description;\n $company['Company']['description'] = $fetched_data->description;\n $company['Company']['url'] = $fetched_data->homepage_url;\n\n $company['Company']['logo_url'] = \"http://www.crunchbase.com/\" . $fetched_data->image->available_sizes[0][1];\n $company['Company']['twitter_url'] = \"http://twitter.com/\" . $fetched_data->twitter_username;\n $company['Company']['blog_url'] = \"http://twitter.com/\" . $fetched_data->blog_url;\n $this->Company->create();\n $this->Company->save($company);\n\n $employeeData = array();\n $company_id = $this->Company->id;\n $count =0 ;\n if (!empty($fetched_data->relationships)) {\n foreach ($fetched_data->relationships as $employee) {\n $this->Company->Employee->create();\n if (!empty($employee->person->image->available_sizes[0][1])){\n $employeeData[] = array(\n 'type' => $employee->title,\n 'name' => $employee->person->first_name . \" \" . $employee->person->last_name,\n 'photo_url' => \"http://www.crunchbase.com/\" . $employee->person->image->available_sizes[0][1],\n 'data_fetch_url' => \"http://api.crunchbase.com/v/1/person/\" . $employee->person->permalink . \".js\",\n 'company_id' => $company_id,\n\n );\n $count++;\n }\n if($count == 5)\n break;\n\n }\n }\n\n $this->Company->Employee->saveAll($employeeData);\n echo \"Data saved\";\n }else{\n $this->Company->delete($company['Company']['id']);\n }\n //\n // $this->Company->Employee->create();\n // $employee['Employee']['data_fetch_url']=\"api.crunchbase.com/v/1/person/\"\n\n\n }\n\n\n exit;\n\n }", "function get_clinic_info($user_id,$field = \"clinic_id\" ){\n if( is_numeric($user_id) && $user_id >0 ){\n $sql = \"select clinic_id from clinic_user where user_id = '\".$user_id.\"'\";\n $result = @mysql_query($sql);\n while( $row = @mysql_fetch_array($result) ){\n $clinic_id = $row[\"clinic_id\"];\n if(is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_id\" ) {\n return $row[$field];\n }\n if( is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_name\" ){\n $clinic_name = get_clinic_name($clinic_id,\"clinic_name\"); return $clinic_name;\n }\n }\n }\n return \"\";\n }", "public function getClinicDetails($user_id){\n $queryInfo=$this->execute_query(\"select clinic.*,clinic_type.clinic_type as clinic_title from clinic LEFT JOIN clinic_user ON clinic.clinic_id = clinic_user.clinic_id ,clinic_type where clinic.clinic_type=clinic_type.clinic_type_id AND clinic_user.user_id = '{$user_id}' \");\n \n $resultDetails=array();\n \n if($this->num_rows($queryInfo)>0){\n $resultDetails=$this->fetch_array($queryInfo); \n }\n return $resultDetails; \n }", "function _clientx_offers_theme_company($company) {\n $field = array(\n 'label' => t('Company/Agency'),\n 'items' => array(),\n 'classes_array' => array(\n 'field',\n 'field-name-field-companys-and-agencies',\n 'field-type-entityreference',\n 'field-label-inline',\n 'clearfix',\n ),\n 'classes' => 'field field-name-field-companys-and-agencies field-type-entityreference field-label-inline clearfix',\n 'theme_hook_original' => 'field',\n 'label_hidden' => FALSE,\n 'attributes' => '',\n 'title_attributes' => '',\n 'content_attributes' => '',\n 'item_attributes' => array('0' => ''),\n );\n\n if (isset($company['url'])) {\n // Display as link to Company/Agency node.\n $field['items'][0] = array(\n '#type' => 'link',\n '#title' => $company['title'],\n '#href' => $company['url'],\n );\n }\n else {\n // Display as a Company ID.\n $field['items'][0] = array(\n '#markup' => $company['title'],\n );\n }\n\n return array(\n '#theme' => 'clientx_company_name',\n '#field' => $field,\n );\n}", "function getCompanyInfo($userId) {\n $this->db->select('id, name, rate, feature1, feature2,feature3,overview,report_logo');\n $this->db->from('tbl_booking');\n $this->db->where('id', $userId);\n $query = $this->db->get();\n\n return $query->result();\n }", "function all_charts_of_a_company_for_user_query($user_id='', $company_id='')\n {\n $sql = \"SELECT CUM.*, DATE_FORMAT( sent_time,'%m-%d-%Y') sent_date_only, DATE_FORMAT( sent_time,'%H:%i %p') sent_time_only, CHR.users_firstname AS hr_firstname, CHR.users_lastname AS hr_last_name, IF(CHR.users_profilepic IS NULL OR CHR.users_profilepic = '', 'admin-no-image.png', CHR.users_profilepic) AS company_hr_logo,\n EUR.users_firstname, EUR.users_lastname,EUR.users_profilepic AS USER_IMAGE\n FROM hia_company_user_messages AS CUM\n JOIN hia_company AS CM ON (CUM.company_id = CM.company_id)\n JOIN hia_users AS CHR ON( CUM.company_user_id = CHR.users_id )\n JOIN hia_users AS EUR ON( CUM.end_user_id = EUR.users_id )\n WHERE CUM.end_user_id = '$user_id'\n AND CUM.company_id = '$company_id'\n ORDER BY sent_time ASC, id ASC\n \";\n\n //echo $sql;\n\n if ( ! $this->db->simple_query($sql))\n {\n $error = $this->db->error();\n //print_r($error);\n //exit();\n return $error;\n }\n else\n {\n $query = $this->db->query($sql);\n \n return $query->result_array();\n }\n \n }", "public static function findPermissionsstring($company_user_id,$company_id)\n {\n \t$details = static::findAll(['company_user_id' => $company_user_id,'company_id'=>$company_id]);\n \t$permissions = '';\n \tif(!empty($details))\n \t{\n \t\tforeach($details as $detail)\n \t\t{\n \t\t\t$permissions .= $detail->clientPermission->permission_name.', ';\n \t\t}\n \t}\n \telse\n \t{\n \t\t$permissions = '<span style=\"color: black;\">No Permissions assigned</span>';\n \t}\n \treturn $permissions;\n }", "function users_list_for_company_chart_query($company_id='')\n {\n $sql = \"SELECT DISTINCT US.users_id, US.users_firstname, US.users_lastname, US.users_phone, \n IF(US.users_profilepic IS NULL OR US.users_profilepic = '', 'admin-no-image.png', US.users_profilepic) AS users_profilepic, DATE_FORMAT(MAX(CUM.sent_time),'%H:%i %p') sent_time_only,\n (SELECT COUNT(id) FROM hia_company_user_messages WHERE end_user_id = US.users_id AND company_id = '$company_id' AND read_time IS NULL ) AS no_of_msg\n FROM hia_user_applied_jobs AS UAJ\n JOIN hia_jobpost AS JP ON(UAJ.job_post_id = JP.jobpost_id)\n JOIN hia_users AS US ON (UAJ.user_id = US.users_id)\n LEFT JOIN hia_company_user_messages AS CUM ON(UAJ.user_id = CUM.end_user_id)\n WHERE JP.jobpost_companyid = '$company_id'\n GROUP BY US.users_id\";\n\n // echo $sql;\n\n if ( ! $this->db->simple_query($sql))\n {\n $error = $this->db->error();\n //print_r($error);\n //exit();\n return $error;\n }\n else\n {\n $query = $this->db->query($sql);\n \n return $query->result_array();\n }\n \n }", "public function getCompanyContacts($company_id){\n\n $this->db->select('sale_c.*, comp.company_name');\n $this->db->from('sales_contacts sale_c');\n $this->db->join('companies comp','comp.id = sale_c.company');\n //$this->db->join('country cont','cont.id = comp.country');\n $this->db->where('sale_c.company', $company_id);\n $this->db->where('sale_c.status !=', 0);\n $this->db->order_by('sale_c.id', 'desc');\n $query = $this->db->get();\n $query = $query->result_array(); \n return $query;\n }", "public function showCompany($company)\n {\n $companyLookup = CompanyLookup::where('user_id', '=', Auth::user()->id)->first();\n $companyName = Company::where('id', '=', $companyLookup->company_id)->first();\n\t\t$companyViewing = Company::where('name', '=', $company)->first();\n\n if(Auth::user()->role == 'admin' || $companyName->name == 'AST') {\n // tell the view you're an admin\n $isAdmin = (Auth::user()->role == 'admin') ? true : false;\n\n // get company id by name for $company\n $companyId = Company::where('name', '=', $company)->first(['id']);\n\n $sortby = \"created_at\";\n //assume desc\n $sortdirection = 'desc';\n\n if(request()->has('sortdirection') && request()->sortdirection == 'asc')\n {\n $sortdirection = 'asc';\n }\n\n // if sortby is set\n if(request()->has('sortby')) \n {\n $sortby = request()->sortby;\n\n switch($sortby) \n {\n case \"date\":\n $sortby = \"string_date\";\n break;\n case \"company\":\n $sortby = \"company_name\";\n break;\n case \"name\":\n // do nothing\n break;\n case \"communication-type\":\n $sortby = \"communication_type\";\n break;\n case \"contact\":\n // do nothing\n break;\n case \"subject\":\n $sortby = \"status\";\n break;\n case \"assigned-to\":\n $sortby = \"assigned_to\";\n break;\n case \"action\":\n $sortby = \"action_item\";\n break;\n case \"assigned-to\":\n $sortby = \"assigned_to\";\n break;\n default:\n $sortby = 'created_at';\n break;\n }\n }\n\n //get company that admin is viewing\n $viewing = $companyViewing->name;\n\n //get current statuses for company (since admin can see all activity)\n //not sure if we need current statuses anymore... this may change to just reflect the most recent activity, like a snapshot. \n //Discuss with Scott and Kelly\n $currentStatuses = CurrentStatuses::where('user_id', '=', \"1,\" . Auth::user()->id)\n ->orderBy('created_at', 'desc')\n ->get();\n\n //get action logs for action_key between admin and client\n $actionLog = ActionLog::where('activity_key', '=', '1,' . $companyId->id)\n ->where('archived', '=' , 0)\n ->where('deleted', '=' , 0)\n ->orderBy($sortby, $sortdirection)\n ->get();\n\n //get product files for user currently viewing\n $product_documents = ProductDocument::where('user_relation_key', '=', \"1,\" . $companyId->id)\n ->where('deleted', '=', 0)\n ->orderBy('created_at', 'desc')\n ->get();\n\n //get test data for user\n $test_data = TestData::where('user_relation_key', '=', \"1,\" . $companyId->id)\n ->orderBy('created_at', 'desc')\n ->get();\n\n return view('pages.dashboard', compact('companyName', 'currentStatuses', 'actionLog', 'isAdmin', 'viewing', 'product_documents', 'test_data'));\n }\n else {\n return redirect()->route('home');\n }\n }", "public function checkForCompany($user_id);", "function getUserDetails($oUser) {\n global $default;\n if (!isset($oUser)) {\n return \"\";\n } else {\n return\n \"<tr>\\n\".\n \"<td>\" . _(\"Name\") . \": </td><td>\". $oUser->getName() . \"</td>\\n\" .\n \"</tr>\\n\".\n \"<tr>\\n\".\n \"<td>\" . _(\"Email Address\") . \": </td><td>\". $oUser->getEmail() . \"</td>\\n\" .\n \"</tr>\\n\".\n \"<tr>\\n\".\n \"<td>\" . _(\"Mobile Number\") . \": </td><td>\". $oUser->getMobile() . \"</td>\\n\" .\n \"</tr>\\n\";\n }\n}", "public function company_profile() \n\t\t{\n\t\t\t$this->loadModel('User');\n\t\t\t$this->User->virtualFields\t=\tarray ('followers'=>'select count(id) from employer_followers where User.id ='.$_REQUEST['user_id'].'');\n\t\t\t$user_data\t=\t$this->User->find ('first',array('conditions'=>array('User.id'=>$_REQUEST['user_id'])));\n\t\t\t//pr ($user_data);die;\n\t\t\tif ($user_data['User']['address'] == '') {\n\t\t\t\t$user_data['User']['address'] = 'N/A';\n\t\t\t}\n\t\t\tif ($user_data['User']['website'] == '') {\n\t\t\t\t$user_data['User']['website'] = 'N/A';\n\t\t\t}\n\t\t\tif (!empty($user_data)) {\n\t\t\t\t$response[]=array(\n\t\t\t\t\t'company_id'\t\t\t=> @$user_data['User']['id'],\n\t\t\t\t\t'company_name'\t=> @$user_data['User']['company_name'],\n\t\t\t\t\t'description'\t\t\t=> @$user_data['User']['description'],\n\t\t\t\t\t'profile_image'\t\t=> FULL_BASE_URL.$this->webroot.'files' . DS . 'profileimage'. DS .$user_data['User']['profile_image'],\t\n\t\t\t\t\t'followers'\t\t\t \t=> @$user_data['User']['followers'],\t\t\t\n\t\t\t\t\t'employes'\t\t\t\t=> @$user_data['User']['employes'],\t\t\t\n\t\t\t\t\t'address'\t\t\t \t=> @$user_data['User']['address'],\t\t\t\n\t\t\t\t\t'website'\t\t\t\t=> @$user_data['User']['website'],\t\t\t\n\t\t\t\t\t'status'\t\t\t\t \t=> 1\t\t\t\t\n\t\t\t\t);\n\t\t\t\t//pr($response);die;\n\t\t\t\techo json_encode($response);exit;\n\t\t\t} else {\n\t\t\t\t$response[] = array('status'=>0,'msg'=>'no record found.');\n\t\t\t\techo json_encode ($response);exit;\n\t\t\t}\n\t\t}", "function my_job_title($user){\n$html ='<div class=\"oj-author-job-title\">'.esc_attr( get_the_author_meta( 'job_title', $user->ID ) ).' at '.esc_attr( get_the_author_meta( 'company', $user->ID ) ).'</div>';\nreturn $html;\n}", "public function company_connection_company()\n\t\t{\n\t\t\t$this->loadModel ('User');\n\t\t\t$user_id\t=\t$_REQUEST['company_id'];\n\t\t\t$data \t\t=\t$this->User->find ('first',array('conditions'=>array('User.id'=>$user_id),'contain'=>array('EmployerFollower'=>array('User.id','User.company_name','User.college','User.usertype_id','User.profile_image'))));\n\t\t\tif (!empty($data)) {\t\t\t\t\n\t\t\t\tif (!empty($data['EmployerFollower'])) {\n\t\t\t\t\t$response = array();\n\t\t\t\t\tforeach($data['EmployerFollower'] as $info) {\n\t\t\t\t\t\tif ($info['user_types_id'] == 8) {\n\t\t\t\t\t\t\t$response[]=array(\n\t\t\t\t\t\t\t\t'company_id'\t\t\t\t\t\t=> @$info['id'],\n\t\t\t\t\t\t\t\t'company_name'\t\t\t\t=> @$data['User']['company_name'],\n\t\t\t\t\t\t\t\t'follower_id'\t\t\t\t\t\t=> @$info['User']['id'],\n\t\t\t\t\t\t\t\t'follower_company_name'\t=> @$info['User']['company_name'],\n\t\t\t\t\t\t\t\t'follower_image'\t\t\t\t\t=> FULL_BASE_URL.$this->webroot.'files' . DS . 'profileimage'. DS .$info['User']['profile_image'],\t\n\t\t\t\t\t\t\t\t'status'\t\t\t\t \t\t\t\t=> 1\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\tif (empty($response)) {\n\t\t\t\t\t\t$response[] = array('status'=>0,'msg'=>'no follower found.');\n\t\t\t\t\t}\n\t\t\t\t\t//pr($response);die;\n\t\t\t\t\techo json_encode($response);exit;\n\t\t\t\t} else {\n\t\t\t\t\t$response[] = array('status'=>0,'msg'=>'no follower found.');\n\t\t\t\t\techo json_encode ($response);exit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$response[] = array('status'=>0,'msg'=>'user not found.');\n\t\t\t\techo json_encode ($response);exit;\n\t\t\t}\t\n\t\t}", "function chpprop_retrieve_users($uid, $company_id) {\n $users = array();\n $users['Manager'] = array();\n $users['Security'] = array();\n $users['Enforcer'] = array();\n $users['Tenant'] = array();\n\n $account = user_load(array('uid' => $uid));\n\n // As Admin, get all properties in a relation\n if ((in_array('Admin', array_values($account->roles)) and $account->status) or\n $account->uid == 1) {\n $dbusers = array_merge(chdbprop_get_company_users($company_id),\n\t\t\t chdbprop_get_company_users('ANY'));\n foreach ($dbusers as $dbuser) {\n $dbuid = $dbuser['UID'];\n $dbaccount = user_load(array('uid' => $dbuid));\n if ($dbaccount === FALSE) {\n\t// Automatic cleanup of discrapencies\n\tchdbprop_delete_user($dbuid, $account->uid);\n\tcontinue;\n }\n if (in_array('Manager', array_values($dbaccount->roles)) and $dbaccount->status) {\n\tif (!isset($users['Manager'][$dbuid])) {\n\t $users['Manager'][$dbuid]['Name'] = $dbaccount->name;\n\t}\n\t$users['Manager'][$dbuid]['Rules'][] =\n\t array('Id' => $dbuser['Id'],\n\t\t'CompanyId' => $dbuser['CompanyId'],\n\t\t'RegionId' => $dbuser['RegionId'],\n\t\t'ClientId' => $dbuser['ClientId'],\n\t\t'PropertyId' => $dbuser['PropertyId'],\n\t\t'LotId' => $dbuser['LotId']);\n }\n if (in_array('Enforcer', array_values($dbaccount->roles)) and $dbaccount->status) {\n\tif (!isset($users['Enforcer'][$dbuid])) {\n\t $users['Enforcer'][$dbuid]['Name'] = $dbaccount->name;\n\t}\n\t$users['Enforcer'][$dbuid]['Rules'][] =\n\t array('Id' => $dbuser['Id'],\n\t\t'CompanyId' => $dbuser['CompanyId'],\n\t\t'RegionId' => $dbuser['RegionId'],\n\t\t'ClientId' => $dbuser['ClientId'],\n\t\t'PropertyId' => $dbuser['PropertyId'],\n\t\t'LotId' => $dbuser['LotId']);\n }\n if (in_array('Security', array_values($dbaccount->roles)) and $dbaccount->status) {\n\tif (!isset($users['Security'][$dbuid])) {\n\t $users['Security'][$dbuid]['Name'] = $dbaccount->name;\n\t}\n\t$users['Security'][$dbuid]['Rules'][] =\n\t array('Id' => $dbuser['Id'],\n\t\t'CompanyId' => $dbuser['CompanyId'],\n\t\t'RegionId' => $dbuser['RegionId'],\n\t\t'ClientId' => $dbuser['ClientId'],\n\t\t'PropertyId' => $dbuser['PropertyId'],\n\t\t'LotId' => $dbuser['LotId']);\n }\n if (in_array('Tenant', array_values($dbaccount->roles)) and $dbaccount->status) {\n\tif (!isset($users['Tenant'][$dbuid])) {\n\t $users['Tenant'][$dbuid]['Name'] = $dbaccount->name;\n\t}\n\t$users['Tenant'][$dbuid]['Rules'][] =\n\t array('Id' => $dbuser['Id'],\n\t\t'CompanyId' => $dbuser['CompanyId'],\n\t\t'RegionId' => $dbuser['RegionId'],\n\t\t'ClientId' => $dbuser['ClientId'],\n\t\t'PropertyId' => $dbuser['PropertyId'],\n\t\t'LotId' => $dbuser['LotId']);\n }\n }\n return $users;\n }\n\n // Via relations\n $dbusers = array_merge(chdbprop_get_company_user($company_id, $uid),\n\t\t\t chdbprop_get_company_user('ANY', $uid));\n foreach ($dbusers as $dbuser) {\n if (in_array('Manager', array_values($account->roles)) and $account->status) {\n if (!isset($users['Manager'][$uid])) {\n\t$users['Manager'][$uid]['Name'] = $account->name;\n }\n $users['Manager'][$uid]['Rules'][] =\n\tarray('Id' => $dbuser['Id'],\n\t 'CompanyId' => $dbuser['CompanyId'],\n\t 'RegionId' => $dbuser['RegionId'],\n\t 'ClientId' => $dbuser['ClientId'],\n\t 'PropertyId' => $dbuser['PropertyId'],\n\t 'LotId' => $dbuser['LotId']);\n }\n if (in_array('Enforcer', array_values($account->roles)) and $account->status) {\n if (!isset($users['Enforcer'][$uid])) {\n\t$users['Enforcer'][$uid]['Name'] = $account->name;\n }\n $users['Enforcer'][$uid]['Rules'][] =\n\tarray('Id' => $dbuser['Id'],\n\t 'CompanyId' => $dbuser['CompanyId'],\n\t 'RegionId' => $dbuser['RegionId'],\n\t 'ClientId' => $dbuser['ClientId'],\n\t 'PropertyId' => $dbuser['PropertyId'],\n\t 'LotId' => $dbuser['LotId']);\n }\n if (in_array('Security', array_values($account->roles)) and $account->status) {\n if (!isset($users['Security'][$uid])) {\n\t$users['Security'][$uid]['Name'] = $account->name;\n }\n $users['Security'][$uid]['Rules'][] =\n\tarray('Id' => $dbuser['Id'],\n\t 'CompanyId' => $dbuser['CompanyId'],\n\t 'RegionId' => $dbuser['RegionId'],\n\t 'ClientId' => $dbuser['ClientId'],\n\t 'PropertyId' => $dbuser['PropertyId'],\n\t 'LotId' => $dbuser['LotId']);\n }\n if (in_array('Tenant', array_values($account->roles)) and $account->status) {\n if (!isset($users['Tenant'][$uid])) {\n\t$users['Tenant'][$uid]['Name'] = $account->name;\n }\n $users['Tenant'][$uid]['Rules'][] =\n\tarray('Id' => $dbuser['Id'],\n\t 'CompanyId' => $dbuser['CompanyId'],\n\t 'RegionId' => $dbuser['RegionId'],\n\t 'ClientId' => $dbuser['ClientId'],\n\t 'PropertyId' => $dbuser['PropertyId'],\n\t 'LotId' => $dbuser['LotId']);\n }\n }\n return $users;\n}", "function db_get_company_list($id_office,$in_pipeline = false,$ol = '',$oc= '',$ifc= '',$efc = '',$pfc = '',$vc = '',$ic = '',$namefc = '',$user = '',$page_size = 100, $page_count = 0,$is_count = false,$debug = false)\n{\n\t$result = array();\n\t$link = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n\tif ($link)\n\t{\n\t\tif ($is_count)\n\t\t{\n\t\t\t$query = 'SELECT count(*) as number from companies';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = 'SELECT *,if(volumen_negocio=\"<700k\",1,if(volumen_negocio=\"700k-1.200K\",2,if(volumen_negocio=\"1.200k-3.000k\",3,4))) as volumen_negocio_clases from companies';\n\t\t}\n\t\t\n\t\tif ($in_pipeline || FILTER_BY_OFFICE_ENABLED == true)\n\t\t{\n\t\t\t$query .=' WHERE id_office=\"'.$id_office.'\"';\n\t\t\t/*$user = trim($user);\n\t\t\tif ($in_pipeline && $user !== '')\n\t\t\t{\n\t\t\t\t$query .=' AND user=\"'.$user.'\"';\n\t\t\t}*/\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .=' WHERE true ';\n\t\t}\n\t\t\n\t\tif ($in_pipeline)\n\t\t{\n\t\t\t$query .= \" AND in_pipe='SI' \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .= \" AND in_pipe='NO' \";\n\t\t\t$query .= \" AND (length(Resultado_neto_2015) > 0) \";\n\t\t}\n\t\t\t\n\t\t\t$filter = '';\t\n\t\t\tif ($ifc !== '')\n\t\t\t{\n\t\t\t\t$subfilter = '';\n\t\t\t\t$items = explode(',',$ifc);\n\t\t\t\tfor($i = 0; $i < count($items); $i++)\n\t\t\t\t{\n\t\t\t\t\t$item = explode('_',$items[$i]);\n\t\t\t\t\tif ($item[1] === \"1\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($subfilter !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$subfilter .= ' OR ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$subfilter .= \"left(IPE,1) = '\".$item[0].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t\t$query .= ' AND ('.$subfilter.')';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($efc !== '')\n\t\t\t{\n\t\t\t\t$subfilter = '';\n\t\t\t\t$items = explode(',',$efc);\n\t\t\t\tfor($i = 0; $i < count($items); $i++)\n\t\t\t\t{\n\t\t\t\t\t$item = explode('_',$items[$i]);\n\t\t\t\t\tif ($item[1] === \"1\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($subfilter !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$subfilter .= ' OR ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$subfilter .= \"ScoreExport = '\".$item[0].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t\t$query .= ' AND ('.$subfilter.')';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($pfc !== '')\n\t\t\t{\n\t\t\t\t$subfilter = '';\n\t\t\t\t$items = explode(',',$pfc);\n\t\t\t\tfor($i = 0; $i < count($items); $i++)\n\t\t\t\t{\n\t\t\t\t\t$item = explode('_',$items[$i]);\n\t\t\t\t\tif ($item[1] === \"1\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($subfilter !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$subfilter .= ' OR ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$subfilter .= \"left(Propension,1) = '\".$item[0].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t\t$query .= ' AND ('.$subfilter.')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($vc !== '')\n\t\t\t{\n\t\t\t\t$subfilter = '';\n\t\t\t\t$items = explode(',',$vc);\n\t\t\t\tfor($i = 0; $i < count($items); $i++)\n\t\t\t\t{\n\t\t\t\t$item = explode('_',$items[$i]);\n\t\t\t\tif ($item[1] === \"1\")\n\t\t\t\t{\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t$subfilter .= ' OR ';\n\t\t\t\t}\n\t\t\t\t\t$subfilter .= \"visit = '\".$item[0].\"'\";\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t\t\t$query .= ' AND ('.$subfilter.')';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($ic !== '')\n\t\t\t{\n\t\t\t\t$subfilter = '';\n\t\t\t\t$items = explode(',',$ic);\n\t\t\t\tfor($i = 0; $i < count($items); $i++)\n\t\t\t\t{\n\t\t\t\t$item = explode('_',$items[$i]);\n\t\t\t\tif ($item[1] === \"1\")\n\t\t\t\t{\n\t\t\t\tif ($subfilter !== '')\n\t\t\t\t{\n\t\t\t\t\t$subfilter .= ' OR ';\n\t\t\t\t}\n\t\t\t\t$item[0] = ($item[0] === 'VACIO') ? '' : $item[0];\n\t\t\t\t$subfilter .= \"interest = '\".$item[0].\"'\";\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\tif ($subfilter !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$query .= ' AND ('.$subfilter.')';\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t// Name filter\n\t\t\t$namefc = trim($namefc);\n\t\t\tif ($namefc !== '')\n\t\t\t{\n\t\t\t\t$query .= ' AND ( nombre_empresa like \"%'.$namefc.'%\" OR cif =\"'.$namefc.'\")';\n\t\t\t}\n\t\t\t\n\t\t\tif ($is_count !== true)\n\t\t\t{\n\t\t\t\tswitch ($ol)\n\t\t\t\t{\n\t\t\t\t\t\tcase 'R': $query .= \" ORDER by IPE \" . (($oc == \"A\") ? \"ASC\":\"DESC\"); break;\n\t\t\t\t\t\tcase 'M': $query .= \" ORDER by Municipio \" . (($oc == \"A\") ? \"ASC\":\"DESC\"); break;\n\t\t\t\t\t\tcase 'V': \n\t\t\t\t\t\t\t\t\t//$query .= \" ORDER by ventas_2015,ventas_2014,ventas_2013,ventas_2012 \" . (($oc == \"A\") ? \"ASC\":\"DESC\"); break;\n\t\t\t\t\t\t\t\t\t$query .= \" ORDER by volumen_negocio_clases \" . (($oc == \"A\") ? \"ASC\":\"DESC\"); break;\n\t\t\t\t \n\t\t\t\t\t\tcase 'P': $query .= \" ORDER by Propension \" . (($oc == \"A\") ? \"ASC\":\"DESC\"); break;\n\t\t\t\t\t\tcase 'N':\n\t\t\t\t\t\tdefault: $query .= \" ORDER by Propension DESC\"; break;\n\t\t\t\t}\n\t\t\t\t$query .= ' LIMIT 1000;';\n\t\t\t}\n\t\t\t\n\t\t\t$query .= ';';\n\t\n\t\t\tif ($debug) {print($query);exit;}\n\t\t\t$res_db = $link->query($query);\n\n\t\t\tif ($is_count === true)\n\t\t\t{\n\t\t\t\t$data_result = $res_db->fetch_assoc();\n\t\t\t\t$result = $data_result['number'];\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = 0;\n\t\t\t\twhile($data_result = $res_db->fetch_assoc())\n\t\t\t\t{\n\t\t\t\t\t$page = floor($i / $page_size);\n\t\t\t\t\t//print('#'.$page.'-'.$page_count.' -'.$i.'-'.$page_size);\n\t\t\t\t\tif ($page == $page_count)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($data_result as $k => $v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($k === 'notes')\n\t\t\t\t\t\t\t{\n\t\t//\t\t\t\t\t\t$v = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$data_result[$k] = trim(utf8_encode($v));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_push($result,$data_result);\n\t\t\t\t\t\t//print(\" OK \");\n\t\t\t\t\t}\n\t\t\t\t\t//\tprint(\"\\n\");\n\t\t\t\t\t$i++;\n\t\t\t\t//\tprint('*');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t//print_r(count($result));\n\n\t\tmysqli_close($link);\n\t}\n\treturn $result;\n}", "function getCompany()\n\t{\n\t\treturn $this->company;\n\t}", "function _getItemDesc($user_id = null)\r\n {\r\n \t$subscr_obj = $this->getSubscrTypeObj();\r\n \t\r\n \tif ($user_id) {\r\n \t\t$user = JFactory::getUser($user_id);\r\n \t}\r\n \telse {\r\n \t\t$user = JFactory::getUser();\r\n \t}\r\n \t\r\n \t$desc = $subscr_obj->get('id') . ':' . $subscr_obj->get('title') . (' - [ ' . ($user->get('id') ? $user->get('username') : JText::_('COM_TIENDA_PAYPALPRO_NEW_USER=')) . ' ]');\r\n \t\r\n \treturn $desc;\r\n }", "function getUserDescriptionForPublic($user_id)\n\t\t{\n\t\t\t//getting values from databases\n\t\t\t$userDetails = $this->manage_content->getValue_where(\"user_info\",\"*\",\"user_id\",$user_id);\n\t\t\t\n\t\t\techo '<div class=\"profile_box_heading\">'.$userDetails[0]['name'].'</div>\n \t\t\t<div class=\"hiring_rate profile_details\">\n\t\t\t\t\t\t<p>'.$userDetails[0]['description'].'</p>\n\t\t\t\t\t\t<div class=\"profile_info_outline\">\n\t\t\t\t\t\t\t<div class=\"profile_info_box pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/expertise_icon.png\" class=\"profile_info_icon pull-left\"/>\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline pull-left\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading\">Certifications</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text\">'; if(!empty($userDetails[0]['no_certificates'])) { echo substr($userDetails[0]['no_certificates'],0,30); } else { echo 'NULL'; } echo '</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"profile_info_box pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/availability_icon.png\" class=\"profile_info_icon pull-left\" />\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline pull-left\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading\">Availability</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text\">'.$userDetails[0]['availability'].'</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"profile_info_box pull-left\">\n\t\t\t\t\t\t\t\t<img src=\"img/interested_icon.png\" class=\"profile_info_icon pull-left\" />\n\t\t\t\t\t\t\t\t<div class=\"profile_info_text_outline pull-left\">\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_heading\">Interested In</div>\n\t\t\t\t\t\t\t\t\t<div class=\"profile_info_text\">'; if(!empty($userDetails[0]['interested_topic'])) { echo substr($userDetails[0]['interested_topic'],0,30); } else { echo 'Nothing Specify'; } echo '</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t\t}", "public function getContributorsDetails($where)\n {\n $msg_query=\"select u.identifier, up.user_id, up.first_name, up.last_name, up.phone_number, u.email, u.password, u.created_at, u.type,\n u.profile_type, c.language, c.favourite_category, c.category_more from User u\n LEFT JOIN UserPlus up ON up.user_id=u.identifier\n LEFT JOIN Contributor c ON c.user_id=u.identifier where u.type = 'contributor' ORDER BY u.created_at DESC\";\n // echo $msg_query;//exit;\n if(($result=$this->getQuery($msg_query,true))!=NULL)\n return $result;\n else\n return \"No Messages Found\";\n }", "function getCompaniesByUserId() {\r\n\t\t$user = JFactory::getUser();\r\n\t\tif($user->id == 0)\r\n\t\t\treturn null;\r\n\r\n\t\t$appSettings = JBusinessUtil::getInstance()->getApplicationSettings();\r\n\r\n\t\t$searchDetails = array();\r\n\t\t$searchDetails['userId'] = $user->id;\r\n\t\t$searchDetails['enablePackages'] = $appSettings->enable_packages;\r\n\t\t$searchDetails['showPendingApproval'] = $appSettings->show_pending_approval;\r\n\r\n\t\t$companiesTable = $this->getTable(\"Company\");\r\n\t\t$companies = $companiesTable->getCompaniesByNameAndCategories($searchDetails);\r\n\r\n\t\treturn $companies;\r\n\t}", "function company()\n\t{\n\t\t// return new RBE_OpenTHC_Company($this->_c);\n\t\t//$r = $this->_c->get('/config/company');\n\t\t//echo $r->getBody()->__toString();\n\t\t//return json_decode($r->getBody(), true);\n\t\treturn new RBE_OpenTHC_Company($this);\n\t}", "function user_details($id) {\r\n global $OUTPUT, $DB;\r\n // $user = new stdClass();\r\n $user = $DB->get_record('user', array('id' => $id));\r\n //$user->id = $id; // User Id.\r\n\r\n $user->picture = $OUTPUT->user_picture($user, array('size' => 100));\r\n // Fetch Data.\r\n $result = $DB->get_record_sql('SELECT concat(firstname,\" \",lastname) as name,department, timecreated as date FROM {user} WHERE id = ?', array($id));\r\n $table = '<table width=\"80%\"><tr><td width=\"20%\" style=\"vertical-align:middle;\" rowspan=\"5\">' . $user->picture . '</td></tr>\r\n <tr><td width=\"20%\">' . get_string('name', 'block_course_status_tracker') . '</td><td>' . $result->name . '</td></tr>';\r\n\r\n $check_designation_field = report_get_custom_field($id, \"Designation\"); // Custom Field name for designation is \"Designation\".\r\n if ($check_designation_field != 0) {\r\n $table .='<tr><td>' . get_string('job_title', 'block_course_status_tracker') . '</td><td>' . format_string($check_designation_field) . '</td></tr>';\r\n }\r\n $table .='<tr><td>' . get_string('department', 'block_course_status_tracker') . '</td><td>' . format_string($result->department) . '</td></tr>\r\n <tr><td>' . get_string('joining_date', 'block_course_status_tracker') . '</td><td>' . userdate($result->date, get_string('strftimedate', 'core_langconfig')) . '</td></tr>\r\n </table>';\r\n return $table;\r\n}", "public function getPhoneCompany();", "function getHiddenCompanies($user_id){\n \t$query = \"\tSELECT company\n \t\t\t\tFROM \".TABLE_USERS_HIDDEN_COMPANIES.\"\n \t\t\t\tWHERE user_id = ?\n \t\t\t\t\";\n \t$data = array($user_id); \n $results = $this->db->query($query, $data);\n $results = $results->result_array();\n\t\n\t\t$output = array();\n\t\tforeach ($results as $row){\n\t\t\tarray_push($output, $row['company']);\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "public function get_description();", "public function getOwnedByAttribute()\n {\n return $this->company;\n }", "function list_active_companies() {\n\tglobal $wpdb;\n\n\t$companies = $wpdb->get_results('SELECT DISTINCT company_id FROM wp_Company_answer');\n\t$test = '';\n\n\t$test .= '<ul>';\n foreach ( $companies as $single ) {\n $id = $single->company_id;\n // Check if the user is actually a company\n $user = get_userdata( $id );\n $user_roles = $user->roles;\n if ( in_array( 'company', $user_roles, true ) ) {\n $company_name = $wpdb->get_var(\"SELECT user_nicename FROM wp_users INNER JOIN wp_usermeta WHERE ID = $single->company_id\");\n $test .= '<li><a href=\"#\" onclick=\"return giveCompanyCookie(' . $id . ')\"> ' . $company_name . '</a></li>';\n $test .= \"\\r\\n\";\n }\n\n }\n\t$test .= '</ul>';\n\techo $test;\n\tdie();\n}", "public function author_description_func() {\n global $post;\n $post = $this->single;\n setup_postdata($post);\n $item = get_the_author_description();\n return $item;\n }", "function findClients($user) {\n $company_ids = $user->visibleCompanyIds();\n \n if(is_foreachable($company_ids)) {\n $companies_table = TABLE_PREFIX . 'companies';\n $projects_table = TABLE_PREFIX . 'projects';\n \n return Companies::findBySQL(\"SELECT DISTINCT $companies_table.* FROM $companies_table, $projects_table WHERE $projects_table.company_id > ? AND $projects_table.company_id IN (?) AND $companies_table.id = $projects_table.company_id AND $companies_table.is_owner != ? ORDER BY $companies_table.name\", array(0, $company_ids, true));\n } else {\n return null;\n } // if\n }", "public function getOrganization();", "function getParentsCompany() {\n\n\t\tforeach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {\n\t\t\t// Recursive company found\n\t\t\tif ($topPage['tx_mfiaddresschanger_address'] == 2) {\n\t\t\t\t$company = $this->company . $topPage['tx_mfiaddresschanger_company'];\n\t\t\t}\n\t\t}\n\t\t// Return company\n\t\treturn $company;\n\t}", "function get_company_prophet($prophet_contact_array,$token){\r\n\tif(is_array($prophet_contact_array) && isset($prophet_contact_array) && isset($prophet_contact_array['MainCompanyId']) && $prophet_contact_array['MainCompanyId'] != '' ){\r\n\t\t$guid = $prophet_contact_array['MainCompanyId'];\r\n\t\t$url = prophet_url.\"/odata/Companies\".\"(guid'\".$guid.\"')\";\r\n\t\t$curl = curl_init($url);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json',\"Authorization:Token $token\"));\r\n\t\t$response = curl_exec($curl);\r\n\t\tif (!$response) {\r\n\t\t die(\"Connection Failure.n\");\r\n\t\t}\r\n\t\t$response = (array)json_decode($response);\r\n\t}else{\r\n\t\t$response = array();\r\n\t}\r\n\treturn $response;\r\n\r\n}", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "function getCoCommissionByUser($userid, $page=0, $page_size=0){\n\t\t$sql = \"SELECT a.AgentID, concat(LName, ' ', FName) as Name, a.CID, b.ID as CourseID, c.ID as SemID, d.NAME AS SchoolName, c.SEM, RedDate, IF(NotifyDate is null or NotifyDate = '0000-00-00','', NotifyDate) as NotifyDate, DoB, c.CoComm \n\t\t\t\tFROM client_info a, client_course b, client_course_sem c, institute d \n\t\t\t\tWHERE a.CID = b.CID AND b.ID = c.CCID AND b.IID = d.ID AND a.ClientType like '%study%' and c.StartDate <= NOW() AND LName like 'SUB%' AND (RedDate is not null and RedDate != '0000-00-00') AND (CoDate is null or CoDate = '0000-00-00') \";\n\t\tif ($userid > 0) {\n\t\t\t$sql .= \" AND b.ConsultantID = {$userid} \";\n\t\t}\n\t\t\n\t\t$sql .= \" Order by Name asc \";//d.OrderID\n\t\t\n\t\tif ($page > 0 && $page_size > 0) {\n\t\t\t$sql .= \" Limit \".($page-1)*$page_size.\", \".$page_size;\n\t\t}\t\t\n\t\t$_arr = array();\n\t\t$this->query($sql);//echo $sql.\"<p/>\";\n\t\twhile ($this->fetch()) {\n\t\t\t$_arr[$this->AgentID][$this->CID]['name'] = $this->Name;\n\t\t\t$_arr[$this->AgentID][$this->CID]['dob' ] = $this->DoB;\t\t\t\n\n\t\t\tif ($this->NotifyDate != '') \n\t\t\t\t$_arr[$this->AgentID][$this->CID]['course'][$this->CourseID][$this->SemID]['desc'] = \"SEM *{$this->SEM}: in {$this->SchoolName} co-com notify date {$this->NotifyDate}, Co-Comm: {$this->CoComm}\";\n\t\t\telse\n\t\t\t\t$_arr[$this->AgentID][$this->CID]['course'][$this->CourseID][$this->SemID]['desc'] = \"SEM *{$this->SEM}: in {$this->SchoolName} Commission Received {$this->RedDate}, Co-Comm: {$this->CoComm}\";\n\n\t\t\t$_arr[$this->AgentID][$this->CID]['course'][$this->CourseID][$this->SemID]['date'] = $this->NotifyDate;\n\t\t}\n\t\treturn $_arr;\n\t}", "function GetAllWithDetails($user_id = null)\n\t{\n\t\t// JOIN uomuser on curriculam.uomUser_id = uomuser.id\n\t\t// LEFT JOIN meeting on curriculam.meeting_id = meeting.id\n\n\t\t$this->db->select('curriculam.*, uomuser.nameWithInitials, uomuser.registrationNo, meeting.meetingCode, meeting.name');\n\t\t$this->db->from($this->tableName);\n\t\t$this->db->join('uomuser', 'curriculam.uomUser_id = uomuser.id');\n\t\t$this->db->join('meeting', 'curriculam.meeting_id = meeting.id', 'left');\n\t\t$this->db->order_by(\"FIELD (curriculam.status, 'pending', 'chairman_rejected', 'chairman_forwarded_to_FAC','fac_approved')\");\n\n\t\tif ($user_id != null) {\n\t\t\t$this->db->where('curriculam.uomUser_id', $user_id);\n\t\t}\n\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result();\n\t}", "public function getCompany($id);", "function _load_user_print_info() {\n // get all user object\n $users = entity_load('user');\n $field_names = _user_method_collections();\n\n foreach ($users as $user) {\n if ($user->uid > 1 && $user->uid < 230000000000) {\n $output[$user->uid] = array(\n \"name\" => $user->name,\n \"email\" => $user->mail,\n \"roles\" => $user->roles,\n );\n\n foreach ($field_names as $field_name => $row) {\n $field_value = NULL;\n $field_info = field_info_field($row['d7_field_name']);\n\n if ($field_info['type'] == 'entityreference') {\n // check is user or term\n if ($field_info['settings']['target_type'] == 'user') {\n if (isset($user->{$row['d7_field_name']}['und'][0]['target_id'])) {\n $user = user_load($user->{$row['d7_field_name']}['und'][0]['target_id']);\n if (isset($user->name)) {\n $field_value = $user->name;\n }\n }\n }\n else {\n if (isset($user->{$row['d7_field_name']}['und'][0]['target_id'])) {\n foreach ($user->{$row['d7_field_name']}['und'] as $value) {\n $field_term = \\Drupal\\taxonomy\\Entity\\Term::load($value['target_id']);\n if (isset($field_term->name)) {\n $field_value[] = $field_term->name;\n }\n }\n }\n }\n }\n else { // text, date\n if (isset($user->{$row['d7_field_name']}['und'][0]['value'])) {\n $field_value = $user->{$row['d7_field_name']}['und'][0]['value'];\n }\n }\n\n $output[$user->uid]['field'][$row['d8_field_name']] = $field_value;\n }\n }\n }\n\n $json_data = json_encode($output, JSON_UNESCAPED_UNICODE);\n}", "function fetch_business_numbers($userid = 0, $noformatting = '')\n{\n global $ilance, $myapi, $phrase;\n $sql = $ilance->db->query(\"\n SELECT regnumber, vatnumber, companyname, dnbnumber\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\".intval($userid).\"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n $html = '';\n if (!empty($res['companyname']))\n {\n $html .= '<div>'.$phrase['_company_name'].': <strong>' . stripslashes($res['companyname']) . '</strong></div>';\n }\n if (!empty($res['regnumber']))\n {\n $html .= '<div>'.$phrase['_company_registration_number'].': <strong>'.$res['regnumber'].'</strong></div>';\n }\n if (!empty($res['vatnumber']))\n {\n $html .= '<div>'.$phrase['_vat_registration_number'].': <strong>'.$res['vatnumber'].'</strong></div>';\n }\n if (empty($html))\n {\n $html .= '<div>'.$phrase['_no_company_registration_numbers_submitted_to_marketplace'].'</div>';\n }\n }\n else\n {\n $html = '--';\n }\n return $html;\n}", "function tep_get_author_description($author_id, $language_id) {\n $author_query = tep_db_query(\"select authors_description from \" . TABLE_AUTHORS_INFO . \" where authors_id = '\" . (int)$author_id . \"' and languages_id = '\" . (int)$language_id . \"'\");\n $author = tep_db_fetch_array($author_query);\n\n return $author['authors_description'];\n }", "public function company_info()\n\t{\n\t\tif ($this->isLoggedIn()) {\n\t\t\t$group = $this->session->userdata['role'];\n\t\t\t$data['menu'] = $this->Menu_model->getMenuItems($group);\n\t\t\t$data['company_info'] = $this->Settings_model->get_company_info();\n\t\t\t$data['title'] = $data['company_info']['name'].\" | Company Info\";\n\t\t\t$this->load->view('backend/system_settings/company_info', $data);\n\t\t} else {\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "function getUserEmployementList($user_id)\n\t\t{\n\t\t\t//getting values from databases\n\t\t\t$empDetails = $this->manage_content->getValueMultipleCondtn(\"user_employment\",\"*\",array(\"user_id\",\"status\"),array($user_id,1));\n\t\t\tif(!empty($empDetails[0]))\n\t\t\t{\n\t\t\t\techo '<thead>\n \t<tr class=\"table-heading-bg\">\n \t<th>Company</th>\n <th>Position</th>\n <th>Start Date</th>\n <th>End Date</th>\n <th>Description</th>\n\t\t\t\t\t\t\t<th>Action</th>\n </tr>\n </thead>\n <tbody>';\n\t\t\t\t\n\t\t\t\tforeach($empDetails as $empDetail)\n\t\t\t\t{\n\t\t\t\t\techo '<tr>\n \t<td>'.$empDetail['com_name'].'</td>\n <td>'.$empDetail['position'].'</td>\n <td>'.$empDetail['start_date'].'</td>\n <td>'.$empDetail['end_date'].'</td>\n <td>'.$empDetail['description'].'</td>\n\t\t\t\t\t\t\t<td><span class=\"portfolio_part_share\"><a href=\"edit-profile.php?op=emp&emp_id='.$empDetail['id'].'\">Edit</a></span></td>\n </tr>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</tbody>';\n\t\t\t}\n\t\t}", "public function index()\n {\n \n return User::with('role')->with('user_companies.user_condominiums')->get();\n }", "function get_hotel_user_markup_details() {\r\n\t\t$ci = &get_instance ();\r\n\t\t\r\n\t\t$group_fk = $ci->entity_group_fk;\r\n\t\t$user_id = intval ( @$ci->entity_user_id );\r\n\t\t$level = 'level_4'; // agent setting the markup\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM markup_list ML WHERE user_oid IN (\" . $user_id . \") \r\n\t\t\t\tAND group_fk = \" . $group_fk . \" AND markup_level = '\" . $level . \"' AND \r\n\t\t\t\tmodule_type = 'Hotel' ORDER BY ML.user_oid DESC\";\r\n\t\t$output = $ci->db->query ( $sql )->result_array ();\r\n\t\treturn array (\r\n\t\t\t\t'status' => SUCCESS_STATUS,\r\n\t\t\t\t'markup' => $output\r\n\t\t);\r\n\t}", "function get_company($id){\n\t\t\t$res = query(\"SELECT `id`,`name`,`description` FROM `tbl_companies` WHERE `id`=?\",\n\t\t\t\t$id);\n\t\t\tif ($res==null) {\n\t\t\t\treturn array('error' => 'company does not exist');\n\t\t\t}else{\n\t\t\t\t$this->name = $res[0][\"name\"];\t\t\t\t\n\t\t\t\t/*//regenerate token expiry key\n\t\t\t\t$token = new Token();\n\t\t\t\t$t = $token->generateToken($this->uid,$api_access);*/\n\t\t\t\treturn $this->getCompany();\n\t\t\t\t//TODO: add profile and handle null values\n\t\t\t\t//return array('error' => 'invalid email or password');\n\t\t\t}\n\t\t}", "static function getCompanyNameForUser($user)\r\n\t{\r\n\t\t$companyName = null;\r\n\t\t\r\n\t\tif ( NULL !== $user && $user->isLoaded() )\r\n\t\t{\r\n\t\t\t$companyAddress = static::getCompanyAddress($user);\r\n\r\n\t\t\t$companyName = $companyAddress->company_name;\r\n\t\t}\r\n\r\n\t\treturn $companyName;\r\n\t}" ]
[ "0.69583976", "0.6698672", "0.66759896", "0.65466285", "0.65331596", "0.6475569", "0.6390462", "0.6351868", "0.62524736", "0.6180494", "0.6179023", "0.6141388", "0.6109716", "0.6044551", "0.5983206", "0.59749675", "0.5953146", "0.593824", "0.5923772", "0.5910357", "0.5909158", "0.590243", "0.5883846", "0.58800864", "0.58724904", "0.58274895", "0.58047444", "0.57957685", "0.57850647", "0.57749563", "0.5770435", "0.5759461", "0.575727", "0.5755111", "0.5750631", "0.57432467", "0.57333344", "0.572198", "0.56904715", "0.5687512", "0.5678086", "0.56677455", "0.5665903", "0.56614757", "0.56600887", "0.56530285", "0.56481415", "0.5647692", "0.56474215", "0.5644179", "0.5637905", "0.56346077", "0.5622831", "0.5616066", "0.56147873", "0.5594207", "0.5583411", "0.5573257", "0.55615807", "0.55503273", "0.5540182", "0.55396825", "0.5537024", "0.5532131", "0.55287355", "0.55272484", "0.5504675", "0.54889524", "0.54801935", "0.546974", "0.5468678", "0.5439769", "0.54387164", "0.54263127", "0.5416899", "0.5416208", "0.54145396", "0.541334", "0.5408445", "0.54082894", "0.5405203", "0.54044735", "0.5397717", "0.53911924", "0.538613", "0.538613", "0.538613", "0.538613", "0.53681624", "0.53603625", "0.5352042", "0.5349871", "0.53452647", "0.5340351", "0.5335165", "0.53299916", "0.53228533", "0.5318201", "0.5316383", "0.53139454" ]
0.7928572
0
Function to get company name using companyuser relationship August 10,2016
Функция получения названия компании с использованием отношения companyuser 10 августа 2016 года
function getCompanyNameUsingCompUserRelation($companyID) { $companyN= ''; $qry="SELECT company_name FROM company_profiles WHERE id=".$companyID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $companyN = $row['company_name']; } } return $companyN; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompanyUserNameUsingCompUserRelation($companyID)\n{\n\t$companyUN= '';\n \t$qry=\"SELECT company_username\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyUN\t\t\t=\t$row['company_username'];\n\t\t}\n \t \t\n }\n return $companyUN;\n\n}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "function getCompanyName($entrpID)\n{\n\t$companyName \t= 'Not Specified';\n\t//SELECT company_profiles.company_name FROM entrp_company_members LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid WHERE entrp_company_members.clientid=1\n\t$qry = \"SELECT company_profiles.company_name \n\t\t\t FROM entrp_company_members \n\t\t\t LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid \n\t\t\t WHERE entrp_company_members.clientid=\".$entrpID.\"\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n while($row = mysqli_fetch_array($res))\n {\n \t$companyName \t= $row['company_name'];\n\t\t}\n } \n\treturn $companyName;\n}", "static function getCompanyNameForUser($user)\r\n\t{\r\n\t\t$companyName = null;\r\n\t\t\r\n\t\tif ( NULL !== $user && $user->isLoaded() )\r\n\t\t{\r\n\t\t\t$companyAddress = static::getCompanyAddress($user);\r\n\r\n\t\t\t$companyName = $companyAddress->company_name;\r\n\t\t}\r\n\r\n\t\treturn $companyName;\r\n\t}", "function getCompanyDescriptionUsingCompUserRelation($companyID)\n{\n\t$companyDesc= '';\n \t$qry=\"SELECT description\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyDesc\t\t\t=\t$row['description'];\n\t\t}\n \t \t\n }\n return $companyDesc;\n}", "public function company_name()\n\t{\n\t\treturn $this->customer->company_name;\n\t}", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompany();", "public function getCompanyName()\n { \n $companies = $this->getCompany(); \n\n $result = [];\n foreach($companies as $company){\n $result[$company->id] = $company->name; \n } \n return $result;\n }", "public function getCompanyName()\r\n\r\n\t{\r\n\r\n\t\treturn $this->companyName;\r\n\r\n \t}", "public function getCompanyNameIdentifier();", "public function getAuthorcompany() {}", "public function getCompany(): string\n {\n return $this->company;\n }", "public function getCompanyName() {\r\n return $this->_company_name;\r\n }", "public function getCompany() {}", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName() \n {\n return $this->CompanyName;\n }", "abstract public function getCompany() : String;", "function organization_name_from_user_id($user_id)\n {\n $user = \\App\\User::FindOrFail($user_id);\n\n echo($user->organization()->get()[0]->name);\n }", "public static function getCompanyInfoByUserId($user_id){\n $company = DB::table('term_relation')\n ->leftJoin('company', 'term_relation.company_id','=','company.id')\n ->leftJoin('users', 'users.id','=','term_relation.user_id')\n ->where(['term_relation.user_id'=>$user_id,'term_relation.term_type'=>0,'term_relation.role'=>4])\n ->select('term_relation.*','company.*','users.id as c_user_id','users.name as user_name','users.designation','users.device_id as company_device_id')\n ->first();\n return $company;\n }", "public function getCompanyName() {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n if (array_key_exists(\"companyName\", $this->_propDict)) {\n return $this->_propDict[\"companyName\"];\n } else {\n return null;\n }\n }", "function getCompanyName($clientId)\n{\n $sqlCompany = \"SELECT NomSociete FROM webcontrat_client WHERE id='$clientId'\";\n $rowCompany = querySQL($sqlCompany, $GLOBALS['connectionR'], true, true);\n $companyName = $rowCompany['NomSociete'];\n return ($companyName);\n}", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "public function display_company(){\n\n\t\t// $con = mysqli_connect(\"localhost\",\"root\",\"\",\"kikay_kit\");\n\t\t// $query = mysqli_query($con,\"SELECT u.id AS u_id, cm.code AS cm_code, u.status AS u_status, u.created_date AS u_created_date, cm.id AS cm_id, cm.name AS cm_company, cm.description AS cm_description\n\t\t// \t\tFROM company cm\n\t\t// \t\tINNER JOIN user u ON cm.user_id = u.id\");\n\t\t// if(mysqli_num_rows($query)>0){\t\n\t\t// \tprint_r(mysqli_fetch_assoc($query));die();\n\t\t// \t// return $query->result();\n\t\t// }\n\t\t// else{\n\t\t// \treturn NULL;\n\t\t// }\n\t\t$query = $this->db->query(\"SELECT u.id AS u_id, cm.code AS cm_code, u.status AS u_status, u.created_date AS u_created_date, cm.id AS cm_id, cm.name AS cm_company, cm.description AS cm_description\n\t\t\t\tFROM company cm\n\t\t\t\tINNER JOIN user u ON cm.user_id = u.id\");\n\t\tif($query->num_rows()>0){\t\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\treturn NULL;\n\t\t}\n\t}", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "public function getCompanyName()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_THE_COMPANY_NAME,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "function getUserName($user)\n\t{\n\t\t\n\t\t$senderQuery=\"select IF(u.type='client',company_name,CONCAT(first_name,' ',last_name)) as sendername ,email,CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t LEFT JOIN UserPlus up ON u.identifier=up.user_id\n\t\t LEFT JOIN Client c ON u.identifier=c.user_id\n\t\t where identifier='\".$user.\"'\";\n\t\t\n\t\t//echo $senderQuery;exit;\n\t\tif(($result=$this->getQuery($senderQuery,true))!=NULL)\n\t\t{\n\t\t\tif($result[0]['sendername']!=NULL)\n\t\t\t\treturn $result[0]['sendername'];\n\t\t\telse\n {\n\t\t\t\t$email=explode(\"@\",$result[0]['email']);\n return $email[0];\n }\n\t\t}\n\n\t}", "static function getFullnameOrCompanyName ( $user )\r\n\t{\r\n\t\tif ( NULL === $user || !$user->isLoaded() )\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif ( static::isUserRepresentsCompany($user) )\r\n\t\t{\r\n\t\t\treturn static::getCompanyAddress($user)->company_name;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $user->fullname;\r\n\t\t}\r\n\t}", "public function serach_vendor_by_companyName($companyName){\n\t\tif(!empty($companyName))\n \t\t return DB::table('users as a')\n\t\t ->select('a.*','b.*','c.addedBy as NotificationFrom','c.notification_type')\n\t\t ->leftJoin('vendor as b', 'b.parentId', '=', 'a.id')\n\t\t ->leftJoin('invite_user as c', 'c.userId', '=', 'b.parentId')\n\t\t ->where(array('b.companyName'=>$companyName,'a.is_deleted'=>0,'a.userType'=>2,'a.addedType'=>\"External\",'a.status'=>1))\n\t\t ->first(); \n\t\n\t}", "public function company(){\n\n\t\t$query=$this->db->query(\"select * from company_info where is_this_recruitment_employer='0' order by company_id asc \");\n\t\treturn $query->result();\n\n\t}", "public static function getSolderHead($company_id){\n if(!$company_id)\n return null;\n $companyInfo = DB::table('users')\n ->leftJoin('term_relation','term_relation.user_id','=','users.id')\n ->leftJoin('company','term_relation.company_id','=','company.id')\n ->leftJoin('units','term_relation.unit_id','=','units.id')\n ->where(['term_relation.company_id'=>$company_id,'term_relation.role'=>4])\n ->select('term_relation.*',\n 'users.id as user_id','users.device_id as c_device_id','users.name as c_user_name',\n 'company.id as company_id','company.company_name as company_name',\n 'units.id as unit_id','units.unit_name as unit_name'\n )\n ->first();\n return $companyInfo;\n }", "public function get_company_name($cmid){\n\t\t$query = $this->db->query(\"SELECT name AS cm_company\n\t\t\t\tFROM company\n\t\t\t\tWHERE id = '$cmid'\");\n\t\treturn $query->result();\n\t}", "public function getCompany()\n {\n $value = $this->get(self::COMPANY);\n return $value === null ? (string)$value : $value;\n }", "public function getCompany(){\n return \"\";\n }", "function get_company($conn){\r\n $output=\"\";\r\n $who_email = $_SESSION[\"username\"];\r\n $get_cn = \"SELECT so_companyname FROM product_info WHERE who_email = '$who_email'\";\r\n $r_cn = mysqli_query($conn,$get_cn);\r\n if (mysqli_num_rows($r_cn) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($r_cn)) {\r\n $output .= \"<option value=\".$row['so_companyname'].\">\".$row['so_companyname'].\"</option>\";\r\n \r\n }\r\n return $output;\r\n }\r\n }", "public function companies(){\n $UserIn=getUser()->id;\n $UserCoCode=getUser()->CoCode;\n //---------------\n $companies=DB::table('employees')\n ->Join('companies','companies.CoCode','=','employees.CoCode')\n ->leftJoin('users','users.id','=','companies.CompanyOwner')\n ->where('employees.id', $UserIn)\n ->select('companies.CompanyName',\n 'companies.CompanyAddress',\n 'users.name',\n 'users.name',\n 'employees.CoCode',\n 'employees.permCode',\n )\n ->get();\n return $companies;\n }", "function get_companies($id) {\n $ci =& get_instance(); \n \n //get resseller discount based on user's id\n $ci->db->where ( 'id', $id );\n $qu = $ci->db->get ( 'companies' );\n $companies = $qu->result_array (); \n $name = @$companies[0]['name'];\n \n \n\t\treturn $name;\n\t\t \n \n }", "function getUserName() {\n\n\t\t$obj_id = $this->user_id;\n\n\t\t$result = $this->db->select(\"SELECT `user_id`,`first_name`,`last_name` FROM `as_user_details` WHERE `user_id` = :user_id_fk\", array( \"user_id_fk\" => $obj_id ));\n\n if ($result[0]['first_name'] && $result[0]['last_name']) {\n $result = $result[0];\n $result = htmlentities($result['first_name'] . \" \" . $result['last_name']);\n return $result;\n } else {\n $result = $this->db->select(\"SELECT `username` FROM `as_users` WHERE `user_id` = :user_id\", array( \"user_id\" => $obj_id ));\n return htmlentities($result[0]['username']);\n }\n\n }", "private function getOwnerLabel() {\n\t\t$owner = $this->getOwner();\n\n\t\treturn ($owner->hasCompany() ? $owner->getCompany() : $owner->getName());\n\t}", "public function getPersonName();", "public function getUsers($company_id);", "protected function _usersBelongsCompany()\n {\n if( Session::get('roles_id') == 1 ){\n $response = SysUsersModel::with(\n 'binnacle'\n ,'roles'\n ,'groups'\n ,'companies'\n )->orderBy('id','DESC')\n ->groupby('id')->get();\n }else{\n $response = SysEmpresasModel::find(Session::get('company_id'))\n ->users()\n ->with(\n 'roles'\n ,'groups'\n ,'binnacle'\n ,'companies'\n )->orderBy('id','DESC')->groupby('id')->get();\n }\n return $response;\n }", "function get_company_name($acc){\n global $db;\n $account = $db->prepare(\"SELECT account, company FROM accounts WHERE account = :acc\");\n $account->bindParam(':acc', $acc);\n $account->execute();\n $account = $account->fetchAll(PDO::FETCH_ASSOC);\n return $account;\n}", "function getUserName($user)\n{\n\n\t$userQuery=\"select CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t\t\t\t\tINNER JOIN UserPlus up ON u.identifier=up.user_id\t\t\t\t\t\t\n\t\t\t\t\t\twhere identifier='\".$user.\"'\";\n\t//echo $senderQuery;exit;\n\t$result = mysql_fetch_array(mysql_query($userQuery));\n\treturn $result['full_name'];\n\t\n\t \n}", "function getParentsCompany() {\n\n\t\tforeach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {\n\t\t\t// Recursive company found\n\t\t\tif ($topPage['tx_mfiaddresschanger_address'] == 2) {\n\t\t\t\t$company = $this->company . $topPage['tx_mfiaddresschanger_company'];\n\t\t\t}\n\t\t}\n\t\t// Return company\n\t\treturn $company;\n\t}", "function getUserName($user)\n {\n\n $userQuery=\"select CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t\t\t\t\tINNER JOIN UserPlus up ON u.identifier=up.user_id\n\t\t\t\t\t\twhere identifier='\".$user.\"'\";\n //echo $senderQuery;exit;\n $result = mysql_fetch_array(mysql_query($userQuery));\n return $result['full_name'];\n\n\n }", "abstract public function get_the_company_gplus();", "public function get_company($id_user)\n\t{\n\t\t return $this->CI->db->select(PREFIX.'companies.Name, '.PREFIX.'companies.LogoPath, '.PREFIX.'companies.Street, '.PREFIX.'companies.StreetNumber, '.PREFIX.'companies.Country, '.PREFIX.'companies.ZIP, '.PREFIX.'companies.City')\n\t\t \t\t\t\t\t ->from(PREFIX.'users, '.PREFIX.'companies')\n\t\t \t\t\t\t\t ->where(PREFIX.'users.id', $id_user)\n\t\t \t\t\t\t\t ->where(PREFIX.'companies.ID', 1)\n \t\t\t\t\t ->get();\n\t}", "public function getCustomerName (){\r\n\t\treturn User::where('id', $this->user_id)->first()->name;\r\n\t}", "public function __toString()\n {\n return $this->getCompanyName();\n }", "public function getUserCompanyId() {\n\t\treturn ($this->userCompanyId);\n\t}", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "function getCompanyIdfromCompanyUserName($companyUserName)\n{\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE company_username='\".$companyUserName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t} \n\treturn $id;\n}", "function fn_seo_get_company_data(&$company_id, &$lang_code, &$extra, &$fields, &$join, &$condition)\n{\n $fields[] = '?:seo_names.name as seo_name';\n $fields[] = '?:seo_names.path as seo_path';\n\n $join .= db_quote(\n \" LEFT JOIN ?:seo_names ON ?:seo_names.object_id = ?i ?p\",\n $company_id, fn_get_seo_join_condition('m', 'companies.company_id', $lang_code)\n );\n}", "function get_user_name($userObj_or_id, $options=NULL) {\n if(!$userObj_or_id) return '';\n $userObj = any2obj('user', $userObj_or_id);\n //dump($userObj);\n //$userObj = get_user($userObj->id);\n if($userObj->first_name || $userObj->last_name) return get_name_string($userObj);\n return $userObj->username;\n}", "public function get_companies() {\n $this->db->select('u.user_id, u.user_email, u.user_type, u.created_at, u.status, up.prof_id,u.c_acc_status, up.company_name,up.thumb_nail, up.prof_image, up.status as prof_status, up.ip_address, up.updated_at as prof_updated');\n $this->db->join('upkepr_users as u', 'up.user_id = u.user_id', 'INNER')->where('u.user_type',2);\n return $this->db->get($this->table . ' as up')->result();\n }", "public function getCompanyName($id)\n\t{\n\t\t$companyName = Ticker::findOrFail($id)->ticker_full_name;\n\t\treturn $companyName;\n\t}", "function getFull_name(){ \n \t$user = $this->loadUser(Yii::app()->user->id); \n \treturn $user->user_full_name;\n\t}", "function dsi_get_display_name($user_id){\n\n $display = get_the_author_meta('display_name', $user_id);\n $nome = get_the_author_meta('first_name', $user_id);\n $cognome = get_the_author_meta('last_name', $user_id);\n if(($nome != \"\") && ($cognome != \"\"))\n return $nome.\" \".$cognome;\n else\n return $display;\n\n}", "function getUserFullName($user, $adminData=null){\n\n if(!isset($user)) return \"\";\n\n if($user->getRuolo() == RuoloUtente::AMMINISTRATORE && $adminData){\n return \"Crowdmine\";\n }\n return $user->getNome() . \" \" . $user->getCognome();\n}", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getPhoneCompany();", "function my_job_title($user){\n$html ='<div class=\"oj-author-job-title\">'.esc_attr( get_the_author_meta( 'job_title', $user->ID ) ).' at '.esc_attr( get_the_author_meta( 'company', $user->ID ) ).'</div>';\nreturn $html;\n}", "function getCompany()\n\t{\n\t\treturn $this->company;\n\t}", "public function getCompany()\n\t{\n\t\treturn $this->fields->get('COMPANY');\n\t}", "public function getFullName($iUserId);", "public function getDisplayName() {\n\t\t$displayName = \"{$this->first_name} {$this->last_name}\";\n\n\t\tif ($this->company_name !== null && $this->company_name !== '') {\n\t\t\t$displayName .= \" ({$this->company_name})\";\n\t\t}\n\n\t\treturn $displayName;\n\t}", "function getUserFilterCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function getUser(){ return UserData::getById($this->user_id)->name.\" \".UserData::getById($this->user_id)->lastname; }", "public function checkForCompany($user_id);", "function woocommerce_pip_print_company_name() {\n\n\tif ( get_option( 'woocommerce_pip_company_name' ) != '' ) {\n\t\treturn get_option( 'woocommerce_pip_company_name' ) . '<br />';\n\t}\n}", "public function getCompanyName($name)\r\n\t{\r\n\t $query = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"\r\n\t SELECT investment_application.id,investment_application.name\r\n\t\tfrom investment_application \r\n\t\t where investment_application.name = '$name'\r\n\t \");\r\n\t $values = null;\r\n\t foreach($query as $q)\r\n\t\t{\r\n\t\t $values = array($q['id'] => $q['name']);\r\n\t\t}\r\n\t return $values;\r\n\t}", "function getCompanyByUserId($user_id){\n $sql = \"SELECT * FROM companys WHERE user_id = ?\";\n $query = $this->db->query($sql, array($user_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "function getCompany() {\n checkIfNotAjax();\n $this->libauth->check(__METHOD__);\n $this->BeOnemdl->table = 'company';\n $this->BeOnemdl->searchable = array('companyname');\n $this->BeOnemdl->select2fields = array('id' => 'id', 'text' => \"concat(companyname,' [', companyshort,']')\");\n $result['results'] = $this->BeOnemdl->getSelect2(array('status' => '1'));\n $result['more'] = true;\n echo json_encode($result);\n }", "function get_account_owner($accountid) {\n $conn = db_connect();\n $sql = \"select userid from dulaney_stewart_accounts where accountid = $accountid\";\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n \n $sql = \"select name from dulaney_stewart_users where userid = \" . $row[\"userid\"];\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n return $row[\"name\"];\n}", "public function getFullName(){\n $user = $this->loadUser;\n return $user->name.' '.$user->surname;\n }", "function get_user_full_name($user_id)\n{\n $ci = & get_instance();\n $result = $ci->db->get_where('ci_users', array('id' => $user_id))->row_array();\n return $result['firstname'].' '.$result['lastname'];\n}", "public function getFieldCompany()\n {\n return $this->fieldCompany;\n }", "public function getOwnerusername() {}", "public function getNameContact();", "function get_subdomain(App\\Models\\User $user_model)\n {\n \t$college = $user_model->college;\n \treturn $college->sub_domain_name;\n }", "public function company()\n {\n return $this->belongsTo(User::class);\n }", "public function getBusinessOwnerNameById($userid=null)\n {\n \t$model = ClassRegistry::init('BusinessOwner');\n $username = \"\";\n if($userid!=NULL){\n \t$userData = $model->find('first',array('fields'=>'member_name','conditions'=>array('BusinessOwner.user_id'=>$userid)));\n \t$username = (empty($userData['BusinessOwner']['member_name'])) ? AdminName : $userData['BusinessOwner']['member_name'];\n }\n return $username;\n }", "function getCreatedByCompanyId() {\n return $this->getAdditionalProperty('created_by_company_id');\n }", "function get_clinic_info($user_id,$field = \"clinic_id\" ){\n if( is_numeric($user_id) && $user_id >0 ){\n $sql = \"select clinic_id from clinic_user where user_id = '{$user_id}'\";\n $result = @mysql_query($sql);\n while( $row = @mysql_fetch_array($result) ){\n $clinic_id = $row[\"clinic_id\"];\n if(is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_id\" ) {\n return $row[$field];\n }\n if( is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_name\" ){\n $clinic_name = $this->get_field($clinic_id,\"clinic\",$field); \n return html_entity_decode($clinic_name);\n }\n }\n }\n return \"\";\n }", "public function getUserCompanyList() {\n try {\n $planList = $this->shortPositionService->getUserCompanyList(Auth::user()->email);\n if (!empty($planList)) {\n return $this->respond($planList);\n } else {\n return $this->respondBadRequest(['error' => 'No plans']);\n }\n } catch (EquioException $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('Subscription not found')]\n );\n } catch (\\Exception $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('messages.un_processable_request')]\n );\n }\n }", "public function getDisplayNameAttribute()\n {\n //check to see if we have a company name\n if($company = $this->billing->company)\n return $company;\n\n\n $name = $this->billing->firstName;\n\n //if we have a last name, then also include that\n if($this->billing->lastName)\n $name .= ' '.$this->billing->lastName;\n\n return $name;\n }", "public function get_company_info($company_id){\n\t\t$this->db->where(\"company_id\", $company_id);\n\t\t$query = $this->db->get('company_info');\n\t\treturn $query->row();\t\n\t}", "function list_active_companies() {\n\tglobal $wpdb;\n\n\t$companies = $wpdb->get_results('SELECT DISTINCT company_id FROM wp_Company_answer');\n\t$test = '';\n\n\t$test .= '<ul>';\n foreach ( $companies as $single ) {\n $id = $single->company_id;\n // Check if the user is actually a company\n $user = get_userdata( $id );\n $user_roles = $user->roles;\n if ( in_array( 'company', $user_roles, true ) ) {\n $company_name = $wpdb->get_var(\"SELECT user_nicename FROM wp_users INNER JOIN wp_usermeta WHERE ID = $single->company_id\");\n $test .= '<li><a href=\"#\" onclick=\"return giveCompanyCookie(' . $id . ')\"> ' . $company_name . '</a></li>';\n $test .= \"\\r\\n\";\n }\n\n }\n\t$test .= '</ul>';\n\techo $test;\n\tdie();\n}", "public function getCompany()\n {\n if (array_key_exists(\"company\", $this->_propDict)) {\n return $this->_propDict[\"company\"];\n } else {\n return null;\n }\n }", "public function getCompaniesAttribute(){\n\n $tenant = null;\n $tenants = $this->tenant;\n\n if (isset($tenants[0])) {\n $tenant = $tenants[0];\n }\n\n if($tenant){\n $company = $tenant->company;\n if(isset($company[0])){\n return $company[0];\n }\n }\n return;\n }" ]
[ "0.7884789", "0.71432775", "0.7142753", "0.7087555", "0.68974185", "0.68360156", "0.68224037", "0.68224037", "0.68224037", "0.681811", "0.6817082", "0.6807195", "0.67675906", "0.6751767", "0.67011046", "0.66690385", "0.6667677", "0.66607505", "0.66607505", "0.66239226", "0.66127956", "0.65935373", "0.6563077", "0.64817655", "0.6452569", "0.6435307", "0.6406446", "0.6399822", "0.63754714", "0.63732636", "0.6362293", "0.63425136", "0.6304562", "0.63005817", "0.6278566", "0.6255761", "0.6254334", "0.6253963", "0.6241157", "0.62313527", "0.62236416", "0.6210364", "0.61996865", "0.61976254", "0.61934304", "0.6185774", "0.61756396", "0.61734074", "0.61729646", "0.61649865", "0.61453336", "0.61335003", "0.6104762", "0.6102494", "0.60684335", "0.60638905", "0.60638905", "0.60638905", "0.6047514", "0.60455215", "0.6037074", "0.6035163", "0.60319555", "0.60242194", "0.60232216", "0.6005452", "0.59957004", "0.59957004", "0.59957004", "0.59957004", "0.5975624", "0.59621775", "0.595553", "0.59482306", "0.59453094", "0.5939122", "0.5927847", "0.59093225", "0.59079194", "0.59010494", "0.5870455", "0.586772", "0.5861289", "0.58547693", "0.58437854", "0.58390707", "0.58383423", "0.5833604", "0.5831959", "0.58304024", "0.5825172", "0.58202803", "0.5814711", "0.58089894", "0.57983875", "0.5794963", "0.57904583", "0.57796615", "0.5775508", "0.5767963" ]
0.8005472
0
Function to get company username using companyuser relationship August 10,2016
Функция для получения имени пользователя компании с использованием отношения companyuser 10 августа 2016 года
function getCompanyUserNameUsingCompUserRelation($companyID) { $companyUN= ''; $qry="SELECT company_username FROM company_profiles WHERE id=".$companyID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $companyUN = $row['company_username']; } } return $companyUN; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompanyNameUsingCompUserRelation($companyID)\n{\n\t$companyN= '';\n \t$qry=\"SELECT company_name\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyN\t\t\t=\t$row['company_name'];\n\t\t} \t \t\n }\n return $companyN;\n\n}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "function getCompanyName($entrpID)\n{\n\t$companyName \t= 'Not Specified';\n\t//SELECT company_profiles.company_name FROM entrp_company_members LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid WHERE entrp_company_members.clientid=1\n\t$qry = \"SELECT company_profiles.company_name \n\t\t\t FROM entrp_company_members \n\t\t\t LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid \n\t\t\t WHERE entrp_company_members.clientid=\".$entrpID.\"\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n while($row = mysqli_fetch_array($res))\n {\n \t$companyName \t= $row['company_name'];\n\t\t}\n } \n\treturn $companyName;\n}", "public function getOwnerusername() {}", "public function getUsers($company_id);", "function getUserName($user)\n\t{\n\t\t\n\t\t$senderQuery=\"select IF(u.type='client',company_name,CONCAT(first_name,' ',last_name)) as sendername ,email,CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t LEFT JOIN UserPlus up ON u.identifier=up.user_id\n\t\t LEFT JOIN Client c ON u.identifier=c.user_id\n\t\t where identifier='\".$user.\"'\";\n\t\t\n\t\t//echo $senderQuery;exit;\n\t\tif(($result=$this->getQuery($senderQuery,true))!=NULL)\n\t\t{\n\t\t\tif($result[0]['sendername']!=NULL)\n\t\t\t\treturn $result[0]['sendername'];\n\t\t\telse\n {\n\t\t\t\t$email=explode(\"@\",$result[0]['email']);\n return $email[0];\n }\n\t\t}\n\n\t}", "function getCompanyIdfromCompanyUserName($companyUserName)\n{\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE company_username='\".$companyUserName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t} \n\treturn $id;\n}", "function getUserName() {\n\n\t\t$obj_id = $this->user_id;\n\n\t\t$result = $this->db->select(\"SELECT `user_id`,`first_name`,`last_name` FROM `as_user_details` WHERE `user_id` = :user_id_fk\", array( \"user_id_fk\" => $obj_id ));\n\n if ($result[0]['first_name'] && $result[0]['last_name']) {\n $result = $result[0];\n $result = htmlentities($result['first_name'] . \" \" . $result['last_name']);\n return $result;\n } else {\n $result = $this->db->select(\"SELECT `username` FROM `as_users` WHERE `user_id` = :user_id\", array( \"user_id\" => $obj_id ));\n return htmlentities($result[0]['username']);\n }\n\n }", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "static function getCompanyNameForUser($user)\r\n\t{\r\n\t\t$companyName = null;\r\n\t\t\r\n\t\tif ( NULL !== $user && $user->isLoaded() )\r\n\t\t{\r\n\t\t\t$companyAddress = static::getCompanyAddress($user);\r\n\r\n\t\t\t$companyName = $companyAddress->company_name;\r\n\t\t}\r\n\r\n\t\treturn $companyName;\r\n\t}", "public function get_username();", "function getCompanyDescriptionUsingCompUserRelation($companyID)\n{\n\t$companyDesc= '';\n \t$qry=\"SELECT description\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyDesc\t\t\t=\t$row['description'];\n\t\t}\n \t \t\n }\n return $companyDesc;\n}", "function getUserName($user)\n{\n\n\t$userQuery=\"select CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t\t\t\t\tINNER JOIN UserPlus up ON u.identifier=up.user_id\t\t\t\t\t\t\n\t\t\t\t\t\twhere identifier='\".$user.\"'\";\n\t//echo $senderQuery;exit;\n\t$result = mysql_fetch_array(mysql_query($userQuery));\n\treturn $result['full_name'];\n\t\n\t \n}", "public function getCompanyNameIdentifier();", "function get_username($email) {\n\n return sql_getUsername($email);\n}", "function getUserName($user)\n {\n\n $userQuery=\"select CONCAT(first_name,' ',last_name) as full_name from User u\n\t\t\t\t\t\tINNER JOIN UserPlus up ON u.identifier=up.user_id\n\t\t\t\t\t\twhere identifier='\".$user.\"'\";\n //echo $senderQuery;exit;\n $result = mysql_fetch_array(mysql_query($userQuery));\n return $result['full_name'];\n\n\n }", "function get_account_owner($accountid) {\n $conn = db_connect();\n $sql = \"select userid from dulaney_stewart_accounts where accountid = $accountid\";\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n \n $sql = \"select name from dulaney_stewart_users where userid = \" . $row[\"userid\"];\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n return $row[\"name\"];\n}", "public function getUserCompanyId() {\n\t\treturn ($this->userCompanyId);\n\t}", "private function getUserName($username) {\n $user_uid = NULL;\n $connection = \\Drupal::database();\n $result = $connection->select('users_field_data', 'fd')\n ->fields('fd', array('uid'))\n ->distinct(TRUE)\n ->condition('fd.name', $username, '=')\n ->execute()->fetchCol();\n return $result;\n }", "protected function _usersBelongsCompany()\n {\n if( Session::get('roles_id') == 1 ){\n $response = SysUsersModel::with(\n 'binnacle'\n ,'roles'\n ,'groups'\n ,'companies'\n )->orderBy('id','DESC')\n ->groupby('id')->get();\n }else{\n $response = SysEmpresasModel::find(Session::get('company_id'))\n ->users()\n ->with(\n 'roles'\n ,'groups'\n ,'binnacle'\n ,'companies'\n )->orderBy('id','DESC')->groupby('id')->get();\n }\n return $response;\n }", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUserName() {}", "public function getUsername() {}", "function get_user_name($userObj_or_id, $options=NULL) {\n if(!$userObj_or_id) return '';\n $userObj = any2obj('user', $userObj_or_id);\n //dump($userObj);\n //$userObj = get_user($userObj->id);\n if($userObj->first_name || $userObj->last_name) return get_name_string($userObj);\n return $userObj->username;\n}", "public function getUserName();", "public function getUserName();", "function getCompanyName($clientId)\n{\n $sqlCompany = \"SELECT NomSociete FROM webcontrat_client WHERE id='$clientId'\";\n $rowCompany = querySQL($sqlCompany, $GLOBALS['connectionR'], true, true);\n $companyName = $rowCompany['NomSociete'];\n return ($companyName);\n}", "function SimplyCivi_username($object) {\n if ($object->uid && $object->name) {\n // Shorten the name when it is too long or it will break many tables.\n if (drupal_strlen($object->name) > 20) {\n $name = drupal_substr($object->name, 0, 15) .'...';\n }\n else {\n $name = $object->name;\n }\n\n if (user_access('access user profiles')) {\n $output = l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));\n }\n else {\n $output = check_plain($name);\n }\n }\n elseif ($object->name) {\n // Sometimes modules display content composed by people who are\n // not registered members of the site (e.g. mailing list or news\n // aggregator modules). This clause enables modules to display\n // the true author of the content.\n if (!empty($object->homepage)) {\n $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));\n }\n else {\n $output = check_plain($object->name);\n }\n }\n else {\n $output = variable_get('anonymous', t('Anonymous'));\n }\n\n return $output;\n}", "public static function getCompanyInfoByUserId($user_id){\n $company = DB::table('term_relation')\n ->leftJoin('company', 'term_relation.company_id','=','company.id')\n ->leftJoin('users', 'users.id','=','term_relation.user_id')\n ->where(['term_relation.user_id'=>$user_id,'term_relation.term_type'=>0,'term_relation.role'=>4])\n ->select('term_relation.*','company.*','users.id as c_user_id','users.name as user_name','users.designation','users.device_id as company_device_id')\n ->first();\n return $company;\n }", "public function getCompanyName()\r\n\r\n\t{\r\n\r\n\t\treturn $this->companyName;\r\n\r\n \t}", "public function getAuthorcompany() {}", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "function getUserName($userId){\n $db = new Database();\n \n $getUserName = \"SELECT name FROM user WHERE userId = '$userId'\";\n $getName = $db->link->query($getUserName);\n \n $row = $getName->fetch_row();\n $finalName = $row[0];\n \n return $finalName; \n \n}", "function theUserName(){\n global $connection;\n\n $id = userLoggedIn();\n\n if (isset($id)) {\n $presentUserDetails = \"SELECT * FROM usersdetails WHERE usersId = $id\";\n\n $querypresentUserDetailsUsername = mysqli_query($connection,$presentUserDetails);\n \n if (!$querypresentUserDetailsUsername) {\n \n die(\"could not query the QUERYPRESENTUSERDETAILSUSERNAME \" .mysqli_error($connection));\n }\n \n $fetchPresentUserDetails = mysqli_fetch_assoc($querypresentUserDetailsUsername);\n \n $fetchPresentUserUsername = $fetchPresentUserDetails['userName'];\n return $fetchPresentUserUsername;\n }\n \n}", "function get_username($user_id)\n\t{\n\t\tglobal $db;\n\n\t\t$target_userdata = array();\n\t\t$target_userdata = get_userdata($user_id);\n\t\t$target_username = empty($target_userdata) ? '' : $target_userdata['username'];\n\n\t\treturn $target_username;\n\t}", "function bp_core_get_username( $user_id, $user_nicename = false, $user_login = false ) {\r\n\tglobal $bp;\r\n\r\n\tif ( !$username = wp_cache_get( 'bp_user_username_' . $user_id, 'bp' ) ) {\r\n\t\tif ( empty( $user_nicename ) && empty( $user_login ) ) {\r\n\t\t\t$ud = false;\r\n\r\n\t\t\tif ( $bp->loggedin_user->id == $user_id )\r\n\t\t\t\t$ud = &$bp->loggedin_user->userdata;\r\n\r\n\t\t\tif ( $bp->displayed_user->id == $user_id )\r\n\t\t\t\t$ud = &$bp->displayed_user->userdata;\r\n\r\n\t\t\tif ( empty( $ud ) ) {\r\n\t\t\t\tif ( !$ud = bp_core_get_core_userdata( $user_id ) )\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t$user_nicename = $ud->user_nicename;\r\n\t\t\t$user_login = $ud->user_login;\r\n\t\t}\r\n\r\n\t\tif ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) )\r\n\t\t\t$username = $user_login;\r\n\t\telse\r\n\t\t\t$username = $user_nicename;\r\n\t}\r\n\r\n\t/* Add this to cache */\r\n\tif ( !empty( $username ) )\r\n\t\twp_cache_set( 'bp_user_username_' . $user_id, $username, 'bp' );\r\n\r\n\treturn apply_filters( 'bp_core_get_username', $username );\r\n}", "public function getUsername()\n {\n if (!isset($this->data['fields']['username'])) {\n if ($this->isNew()) {\n $this->data['fields']['username'] = null;\n } elseif (!isset($this->data['fields']) || !array_key_exists('username', $this->data['fields'])) {\n $this->addFieldCache('username');\n $data = $this->getRepository()->getCollection()->findOne(array('_id' => $this->getId()), array('username' => 1));\n if (isset($data['username'])) {\n $this->data['fields']['username'] = (string) $data['username'];\n } else {\n $this->data['fields']['username'] = null;\n }\n }\n }\n\n return $this->data['fields']['username'];\n }", "function getUserFullName($user, $adminData=null){\n\n if(!isset($user)) return \"\";\n\n if($user->getRuolo() == RuoloUtente::AMMINISTRATORE && $adminData){\n return \"Crowdmine\";\n }\n return $user->getNome() . \" \" . $user->getCognome();\n}", "protected function username() {\n $username = '';\n if ($current_user = $this->user_datas()) {\n $username = $current_user->get_name(); // username is used by default\n \n // if there's a last name, great !\n if ($last_name = $current_user->get_last_name()) {\n $username = $last_name;\n }\n \n // ok there's a first name, go for it !\n if ($first_name = $current_user->get_first_name()) {\n $username .= ' '.$first_name;\n }\n }\n return $username;\n }", "public function serach_vendor_by_companyName($companyName){\n\t\tif(!empty($companyName))\n \t\t return DB::table('users as a')\n\t\t ->select('a.*','b.*','c.addedBy as NotificationFrom','c.notification_type')\n\t\t ->leftJoin('vendor as b', 'b.parentId', '=', 'a.id')\n\t\t ->leftJoin('invite_user as c', 'c.userId', '=', 'b.parentId')\n\t\t ->where(array('b.companyName'=>$companyName,'a.is_deleted'=>0,'a.userType'=>2,'a.addedType'=>\"External\",'a.status'=>1))\n\t\t ->first(); \n\t\n\t}", "public function getUsernameFromEmail($email) { }", "function getUserFilterCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function getOAuthUserName();", "function getUsername();", "public function company_name()\n\t{\n\t\treturn $this->customer->company_name;\n\t}", "public function actionCompanyUser()\n {\n $vartotojai = $this->getOldCompanyUsers();\n foreach ($vartotojai as $vartotojas) {\n if ($this->userExists($vartotojas['id'])) {\n continue;\n }\n\n $imone = $this->getOldUserCompany($vartotojas['id']);\n if (!$imone) {\n $this->writeToCSV(User::tableName(), 'Vartotojas neturi ryšio su įmone', $vartotojas['id']);\n continue;\n }\n\n if ($this->companyExists($imone['id'])) {\n $this->migrateCompanyUser($vartotojas, $imone);\n } else {\n $this->writeToCSV(User::tableName(), 'Vartotojo įmonė neegzistuoja', $vartotojas['id']);\n }\n }\n\n return null;\n }", "public static function getUsername() {\n\n }", "function fullname_from_username($username){\r\n\tglobal $user_id;\r\n\tid_from_username($username);\r\n\t\r\n\t//get fullname from id\r\n\treturn full_name_from_id($user_id);\r\n}", "function getUsername()\n {\n require_once('User.php');\n # Get the user object\n $user = new User($this->UserId);\n # Return his/hers username\n return $user->getUsername();\n }", "public function getCompany();", "function organization_name_from_user_id($user_id)\n {\n $user = \\App\\User::FindOrFail($user_id);\n\n echo($user->organization()->get()[0]->name);\n }", "function get_user_name($user_id, $connect)\r\n {\r\n // create query to fetch username for user_id\r\n $query = \"SELECT username FROM user_ WHERE user_id = '$user_id'\";\r\n // make satement for execution\r\n $statement = $connect->prepare($query);\r\n // execute statement\r\n $statement->execute();\r\n // fetch data and store in variable\r\n $result = $statement->fetchAll();\r\n // should be only one, but loop through result\r\n foreach ($result as $row) {\r\n return $row['username'];\r\n }\r\n }", "public function getCompanyName()\n { \n $companies = $this->getCompany(); \n\n $result = [];\n foreach($companies as $company){\n $result[$company->id] = $company->name; \n } \n return $result;\n }", "public function get_username($user_id,$tenant_id)\n {\n $this->db->select('user_name');\n $this->db->from('tms_users');\n $this->db->where('user_id',$user_id);\n $this->db->where('tenant_id',$tenant_id);\n $sql = $this->db->get();\n return $sql->row();\n }", "public function getCompanyName() {\r\n return $this->_company_name;\r\n }", "public static function getSolderHead($company_id){\n if(!$company_id)\n return null;\n $companyInfo = DB::table('users')\n ->leftJoin('term_relation','term_relation.user_id','=','users.id')\n ->leftJoin('company','term_relation.company_id','=','company.id')\n ->leftJoin('units','term_relation.unit_id','=','units.id')\n ->where(['term_relation.company_id'=>$company_id,'term_relation.role'=>4])\n ->select('term_relation.*',\n 'users.id as user_id','users.device_id as c_device_id','users.name as c_user_name',\n 'company.id as company_id','company.company_name as company_name',\n 'units.id as unit_id','units.unit_name as unit_name'\n )\n ->first();\n return $companyInfo;\n }", "function _usersUsername(){\r\n\t\t$users_username=NULL;\r\n\t\tif($this->Auth->user()){\r\n\t\t\t// debug($this->Auth->user());\r\n\t\t\t$users_username['FullName'] = $this->Auth->user('FullName');\r\n\t\t\t$users_username['UserId'] = $this->Auth->user('UserId');\r\n $users_username['Username'] = $this->Auth->user('Username');\r\n\t\t}\r\n\t\treturn $users_username;\r\n\t}", "function get_username($field_name,$user_id){\n global $privatekey;\n\t\t$query = \"select $field_name from user where user_id = '{$user_id}' \";\n\t\t$result = @mysql_query($query);\n\t\twhile( $row = @mysql_fetch_array($result)){\n $encrypt_field = array('name_title','name_first','name_last','password','address', 'address2', 'city', 'state', 'zip', 'phone1', 'phone2','fax');\n if( in_array($field_name, $encrypt_field) ){\n $row[$field_name] = decrypt_data($row[$field_name],$privatekey);\n return $row[$field_name];\n } \n\t\t\treturn $row[$field_name];\n\t\t}\n\t\treturn \"\";\n\t\t\n\t}", "public function getUsername()\n {\n // ...\n }", "public function getBusinessOwnerNameById($userid=null)\n {\n \t$model = ClassRegistry::init('BusinessOwner');\n $username = \"\";\n if($userid!=NULL){\n \t$userData = $model->find('first',array('fields'=>'member_name','conditions'=>array('BusinessOwner.user_id'=>$userid)));\n \t$username = (empty($userData['BusinessOwner']['member_name'])) ? AdminName : $userData['BusinessOwner']['member_name'];\n }\n return $username;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "function get_connect_username($userid) {\n global $DB;\n\n $username = '';\n $param = array('id' => $userid);\n $record = $DB->get_record('user', $param, 'id,username,email');\n\n if (!empty($userid) && !empty($record)) {\n $username = set_username($record->username, $record->email);\n }\n\n return $username;\n}", "function find_user_by_name($username,$connection)\n {\n $salt_string=\"@!\";\n $_SESSION[\"username\"]=$username;\n $username.=$salt_string;\n $query=\"SELECT name FROM user_details WHERE username='$username'\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return chop($row['name'],$salt_string);\n }\n }", "public function getusername_createdby()\n {\n $user=User::where ( 'id',$this->createdby )->first();\n\n if ($user)\n return $user->name;\n\n return \"\";\n }", "public function getUsers() {\n\n\t\t// edited using the new column names\n\t\t$parent_id = getLoggedUserID();\n\t\t$cid=logged('company_id');\n\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->table);\n\t\t//$this->db->where('parent_id', $parent_id);\n\t\t$this->db->where('id', $parent_id);\n\t\t$this->db->or_where('company_id',$cid );\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result();\n\t}", "function bootstrap_foundation_username($object) {\n if ($object->uid && $object->name) {\n // Shorten the name when it is too long or it will break many tables.\n if (drupal_strlen($object->name) > 20) {\n $name = drupal_substr($object->name, 0, 15) .'...';\n }\n else {\n $name = $object->name;\n }\n\n if (user_access('access user profiles')) {\n $output = l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));\n }\n else {\n $output = check_plain($name);\n }\n }\n elseif ($object->name) {\n // Sometimes modules display content composed by people who are\n // not registered members of the site (e.g. mailing list or news\n // aggregator modules). This clause enables modules to display\n // the true author of the content.\n if (!empty($object->homepage)) {\n $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));\n }\n else {\n $output = check_plain($object->name);\n }\n }\n else {\n $output = variable_get('anonymous', t('Anonymous'));\n }\n\n return $output;\n}", "function login_with_email_address($username) {\n $user = get_user_by('email',$username);\n if(!empty($user->user_login))\n $username = $user->user_login;\n return $username;\n}", "public function getCompanyName() \n {\n return $this->CompanyName;\n }", "public function getUsername()\n {\n $this->getLogin();\n }", "function getUsername()\r\n\t{\r\n\t\t// Tomar la referencia al registro\r\n\t\t$registry = &$_SESSION['registry'];\r\n\r\n\t\t// Registrar los datos del usuario logeado\t\t\r\n\t\treturn $registry->getEntry('USERNAME');\r\n\t\t\r\n\t}", "function getUsername() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->username;\n }", "function get_all_users_by_company($company_id){\n\t$user = get_user();\n\t$user_profile = get_user_profile($user->id);\n\n\tif( $company_id != $user_profile['company_id'] ){\n\t\tflash()->error('zakázané!');\n\t\treturn false;\n\t}\n\n\tglobal $database;\n\t$users = $database->select('user_profiles','*',['company_id' => $company_id]);\n\n\treturn $users? $users : false;\n\n}", "public function getCompany(): string\n {\n return $this->company;\n }", "public function getFullName($iUserId);", "public function getUserNameRef() {\n return \"username\";\n\t}", "function getCreatedByCompanyId() {\n return $this->getAdditionalProperty('created_by_company_id');\n }", "function getFull_name(){ \n \t$user = $this->loadUser(Yii::app()->user->id); \n \treturn $user->user_full_name;\n\t}", "function obtenerUserbyCorreo($correo){\r\n //se crea la consulta\r\n $consulta = \"SELECT * FROM Usuarios WHERE correo='$correo'\";\r\n // Ejecutar la consulta\r\n $resultado = $this->conexionBD->query($consulta);\r\n //se recorre la consulta\r\n $username=\"\";\r\n while ($row = $resultado->fetch_assoc()) {\r\n $username=$row[\"username\"];\r\n }\r\n return $username;\r\n }", "function _parseUsername($coPetition, $config) {\n if(!isset($coPetition['EnrolleeCoPerson']['Identifier'])) {\n return null; \n }\n foreach ($coPetition['EnrolleeCoPerson']['Identifier'] as $identifier) {\n $id = $identifier['identifier'];\n $type = $identifier['type'];\n $status = $identifier['status'];\n $deleted = $identifier['deleted'];\n if (isset($id) && $type == $config['HumanitiesCommonsIdpEnrollerConfig']['username_id_type'] && $status == StatusEnum::Active && empty($deleted)) {\n $username = $id;\n return $username;\n }\n }\n\n return null;\n }", "function find_username_by_id($user_id,$connection) \n {\n $salt_string=\"@!\";\n $query=\"SELECT username FROM user_details WHERE user_id=$user_id\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return chop($row['username'],$salt_string);\n }\n }", "public function obtenerPorUsername($username);", "public function getFullName($u){\r\n\t\t $conn = $this->conn;\r\n\t\t $user = $u;\r\n\t\t $stmt = $conn->prepare(\"SELECT `Name`\r\n\t\t FROM `customers` \r\n\t\t\t\t WHERE `username`=?\");\r\n $stmt->bind_param(\"s\", $user);\r\n\t\t $stmt->execute();\r\n\t\t $result = $stmt->get_result();\r\n\t\t if($result->num_rows === 0)\r\n\t\t\t print_r('No rows');\r\n\t\t $row = $result->fetch_assoc();\r\n\t\t return $row[\"Name\"];\r\n\t }", "public function findByUserCompany($company)\n {\n $qb = $this->createQueryBuilder(\"n\")\n ->leftJoin(\"n.sender\", \"company\")\n ->andWhere(\"company = :company\")\n ->setParameter(\"company\", $company);\n return $qb->getQuery()->getResult();\n }", "function get_user_login_name( $user ) {\n $u_login_name = get_user_data( $user , 'u_login_name' );\n return $u_login_name;\n}", "function get_username( ) {\n\n return $this->username;\n\n }", "function get_field( $name, $user_entity ) {\n\t\t\tif ( strpos( $name, '.' ) ) {\n\t\t\t\t$names = explode( '.', $name );\n\t\t\t\t$value = $user_entity;\n\t\t\t\tforeach ( $names as $n ) {\n\t\t\t\t\t$value = $value[$n];\n\t\t\t\t}\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn $user_entity[$name];\n\t\t\t}\n\t\t}", "abstract public function getCompany() : String;", "public function getUserNameIdentifier();", "public function getUsername()\n {\n }", "public function getUsername()\n {\n }", "public function getUsername()\n {\n }", "public function getUsername()\n {\n }", "public function getUsername()\n {\n }" ]
[ "0.7777102", "0.71496695", "0.6767089", "0.67268276", "0.66490734", "0.6618706", "0.66040933", "0.65894794", "0.6548301", "0.6532547", "0.65239334", "0.6495556", "0.6376524", "0.6370351", "0.63672715", "0.6336677", "0.6306507", "0.6289471", "0.6270877", "0.6264617", "0.6235483", "0.61940706", "0.61940706", "0.61940706", "0.61940706", "0.6189071", "0.61744046", "0.61719656", "0.61638176", "0.61638176", "0.6162578", "0.6157708", "0.61521304", "0.61301935", "0.61287206", "0.6127591", "0.6127591", "0.6127591", "0.6117161", "0.61169547", "0.6109136", "0.61034167", "0.6103124", "0.6096266", "0.609403", "0.608835", "0.60808575", "0.6079928", "0.6051707", "0.6051014", "0.6048426", "0.604786", "0.6041624", "0.6037926", "0.60310674", "0.60273767", "0.60249084", "0.6022105", "0.601952", "0.60184836", "0.6004896", "0.600441", "0.6000263", "0.59978193", "0.5996518", "0.599602", "0.59916055", "0.59916055", "0.5988612", "0.5982674", "0.59807366", "0.59796894", "0.59774727", "0.59668386", "0.59659886", "0.596279", "0.5959542", "0.5955271", "0.5945115", "0.5941912", "0.5940026", "0.5940005", "0.59379804", "0.59338146", "0.59305006", "0.5915872", "0.5915215", "0.5911463", "0.5908915", "0.59057564", "0.59056455", "0.5900937", "0.5886427", "0.588491", "0.58810234", "0.58794284", "0.58794284", "0.58794284", "0.58794284", "0.58794284" ]
0.8265596
0
Function to get company id of a user from companyuser relationship August 10,2016
Функция получения идентификатора компании пользователя из отношения companyuser 10 августа 2016 года
function getCompanyIDFromCompUserRelation($userID) { $companyid= ''; $qry="SELECT companyid FROM entrp_company_members WHERE clientid=".$userID." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $companyid = $row['companyid']; } } return $companyid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserCompanyId() {\n\t\treturn ($this->userCompanyId);\n\t}", "function getCompanyIdfromCompanyUserName($companyUserName)\n{\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE company_username='\".$companyUserName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t} \n\treturn $id;\n}", "function getCompanyIDfromUserID($userID)\n{\n\t//SELECT id FROM company_profiles WHERE clientid=1;\n\t$companyID\t=\tgetCompanyIDFromCompUserRelation($userID);\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE id='\".$companyID.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "function getCreatedByCompanyId() {\n return $this->getAdditionalProperty('created_by_company_id');\n }", "function getUserFilterCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "function getCompanyUserNameUsingCompUserRelation($companyID)\n{\n\t$companyUN= '';\n \t$qry=\"SELECT company_username\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyUN\t\t\t=\t$row['company_username'];\n\t\t}\n \t \t\n }\n return $companyUN;\n\n}", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompany_id(){\n\t\treturn $this->data['company_id'];\n\t}", "function getCompanyNameUsingCompUserRelation($companyID)\n{\n\t$companyN= '';\n \t$qry=\"SELECT company_name\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyN\t\t\t=\t$row['company_name'];\n\t\t} \t \t\n }\n return $companyN;\n\n}", "public function getCompanyid()\n {\n return $this->companyid;\n }", "public function getUsers($company_id);", "protected function _usersBelongsCompany()\n {\n if( Session::get('roles_id') == 1 ){\n $response = SysUsersModel::with(\n 'binnacle'\n ,'roles'\n ,'groups'\n ,'companies'\n )->orderBy('id','DESC')\n ->groupby('id')->get();\n }else{\n $response = SysEmpresasModel::find(Session::get('company_id'))\n ->users()\n ->with(\n 'roles'\n ,'groups'\n ,'binnacle'\n ,'companies'\n )->orderBy('id','DESC')->groupby('id')->get();\n }\n return $response;\n }", "public static function getCompanyInfoByUserId($user_id){\n $company = DB::table('term_relation')\n ->leftJoin('company', 'term_relation.company_id','=','company.id')\n ->leftJoin('users', 'users.id','=','term_relation.user_id')\n ->where(['term_relation.user_id'=>$user_id,'term_relation.term_type'=>0,'term_relation.role'=>4])\n ->select('term_relation.*','company.*','users.id as c_user_id','users.name as user_name','users.designation','users.device_id as company_device_id')\n ->first();\n return $company;\n }", "public function get_company_id(){\n return (int) $this->v_company_id;\n }", "public function checkForCompany($user_id);", "public function getCompanyId()\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getCompanyId()\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getIdCompany(): int\n {\n return $this->idCompany;\n }", "public function getLogisticCompanyId()\n {\n return $this->logistic_company_id;\n }", "public function getId_company()\n {\n return $this->id_company;\n }", "function organization_id_from_user_id($user_id)\n {\n $user = \\App\\User::FindOrFail($user_id);\n\n echo($user->organization()->get()[0]->id);\n }", "public function getIdCompany()\n {\n return $this->idCompany;\n }", "function getCompanyByUserId($user_id){\n $sql = \"SELECT * FROM companys WHERE user_id = ?\";\n $query = $this->db->query($sql, array($user_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "static function get_company_id($company_url) {\n try {\n $url = parse_url($company_url);\n $path = $url[path];\n $path_array = explode (\"/\" , $path);\n $company_id = end($path_array);\n \n return $company_id; \n } catch (Exception $error) {\n echo 'Execption get company id : '.$error->getMessage();\n }\n }", "function change_id_company($company)\n\t{\n\t\t$data['company'] = $this->mdl_crud->view_data_row('dt_customer', 'company_name', $company);\n\t\treturn $data['company']->id_company;\n\t}", "public function getCompanyId()\n {\n if ($this->get('CompanyID') === null) {\n return null;\n }\n return (int) $this->get('CompanyID');\n }", "public function get_order_id_from_company($company,$user_id) {\n $info = array();\n\n $sql = \"SELECT * FROM $this->o_table WHERE (status = 'itemlist' AND company LIKE '%$company%' AND owner = '$user_id')\";\n $records = $$this->lisdb->query($sql)->result_array();\n $count = count($records);\n\n // construct the item list now\n if($count != 0) { // add new entry\n $info[0] = $records['order_id'];\n $info[1] = $records['maxitems']; // also return this sice we are going to need it\n }\n else {\n $info[0] = -1; // return -1 as order id\n }\n\n return $info;\n }", "public function getId()\n {\n return $this->idcompany;\n }", "public function getCurrentCompanyId()\n {\n return $this->currentCompanyId;\n }", "function getDelegatedByCompanyId() {\n return $this->getAdditionalProperty('delegated_by_company_id');\n }", "public function getCompanyNameIdentifier();", "public function company()\n {\n return $this->belongsTo(User::class);\n }", "private function _getUserJoinDateToCompany(int $user_id) {\r\n \r\n $sql = 'SELECT date_joined AS result FROM company_users WHERE user_id=:user_id';\r\n $data = [':user_id' => $user_id];\r\n\r\n $query_st = $this->_db->singleQueryRetStatement($sql, $data);\r\n \r\n $data_array = $query_st->fetch();\r\n \r\n $result = $data_array['result'];\r\n \r\n return $result;\r\n }", "public function company_registration_no($value) \n\t{\n\t\t$user = User::where('company_registration_no',$value)->first();\n\n\t\treturn $this->builder->where('user_id',optional($user)->id);\n\t}", "function getCompanyWhereMainContactIs($userid) {\n\tglobal $mysql_companies_table;\n\t$sql = \"select id from $mysql_companies_table where main_contact_id='$userid'\";\n\t$result = execsql($sql);\n\tif($row = mysql_fetch_row($result)) {\n\t\treturn $row[0];\n\t} else {\n\t\treturn '';\n\t}\n}", "public static function isRelationExsist($id_user, $id_company)\n {\n $companyUser = CompanyUser::where('user_id', $id_user)->where('company_id', $id_company)->first();//find the relation in the pivot table with the user id and company id\n if (is_null($companyUser)) {\n return false;\n } else {\n return $companyUser;\n }\n }", "public function getCrmUserId() {\n /**\n * @var \\Cx\\Core\\Core\\Controller\\Cx $cx\n */\n $cx = \\Env::get('cx');\n if (!$cx->getLicense()->isInLegalComponents('Crm')) {\n return false;\n }\n $db = $cx->getDb()->getAdoDb();\n $result = $db->SelectLimit(\"SELECT `id` FROM `\" . DBPREFIX . \"module_crm_contacts` WHERE `user_account` = \" . intval($this->id), 1);\n if ($result->RecordCount() == 0) {\n return null;\n }\n return $result->fields['id'];\n }", "public static function getUserIDListByManager($company_id, $dep_id)\n\t{\n\t\t$company_id = DbAgent::queryEncode($company_id, DbAgent::$DB_STRING);\n\t\t$dep_id = DbAgent::queryEncode($dep_id, DbAgent::$DB_STRING);\n\t\t$query = \"SELECT user_t.user_id, user_t.name, user_t.leader_id, user_t.dep_id, user_t.company_id\n\t\tFROM user_t, company_t, department_t\n\t\twhere user_t.company_id = $company_id\n\t\tand user_t.dep_id = $dep_id\n and company_t.del_flag = 0\n and department_t.del_flag = 0\n and user_t.del_flag = 0\n\t\tand company_t.company_id = user_t.company_id \n and department_t.company_id = user_t.company_id\n and department_t.dep_id = user_t.dep_id\n\t\torder by user_id;\";\t \n\t\t$record = Database::currentDb()->getMultiRecord($query, $t);\t\t\n\t\treturn $record;\n\t}", "public function get_company($id_user)\n\t{\n\t\t return $this->CI->db->select(PREFIX.'companies.Name, '.PREFIX.'companies.LogoPath, '.PREFIX.'companies.Street, '.PREFIX.'companies.StreetNumber, '.PREFIX.'companies.Country, '.PREFIX.'companies.ZIP, '.PREFIX.'companies.City')\n\t\t \t\t\t\t\t ->from(PREFIX.'users, '.PREFIX.'companies')\n\t\t \t\t\t\t\t ->where(PREFIX.'users.id', $id_user)\n\t\t \t\t\t\t\t ->where(PREFIX.'companies.ID', 1)\n \t\t\t\t\t ->get();\n\t}", "public function checkCompanyOwnership($company_id, $user_id)\n\t{\n\t\treturn User::findOrFail($user_id)\n\t\t\t\t\t->company()\n\t\t\t\t\t->where('id', $company_id)\n\t\t\t\t\t->count();\n\t}", "function get_all_users_by_company($company_id){\n\t$user = get_user();\n\t$user_profile = get_user_profile($user->id);\n\n\tif( $company_id != $user_profile['company_id'] ){\n\t\tflash()->error('zakázané!');\n\t\treturn false;\n\t}\n\n\tglobal $database;\n\t$users = $database->select('user_profiles','*',['company_id' => $company_id]);\n\n\treturn $users? $users : false;\n\n}", "public function getUserOrganizationId()\n\t{\n\t\treturn $this->user_organization_id;\n\t}", "private function getUserId() {\n $query = $this->getEntityManager()->createQueryBuilder()\n ->select('u')\n ->from('App:User', 'u')\n ->getQuery();\n $user_array = $query->getResult(Query::HYDRATE_ARRAY);\n\n $this->user_id = $user_array[0]['id'];\n\n return $this->user_id;\n }", "public function signedCompany()\n {\n return $this->belongsTo('App\\User', 'user_signed_id');\n }", "public function getUsableLogisticCompanyId()\n {\n return $this->usable_logistic_company_id;\n }", "public function get_company_id($driver_id)\n\t{\n\t\t$result = $this->mongo_db->findOne(MDB_PEOPLE,array('_id' => (int)$driver_id ),array('company_id'));\n\t\treturn (!empty($result) && isset($result['company_id']))?$result['company_id']:0;\n\t}", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public static function loginCompany($user)\n {\n $result = DB::select()->from('Company')->where('CompanyName', '=', $user)->execute();\n $res = array();\n foreach($result as $row)\n {\n return $row;\n }\n return -1;\n \n /*$user = $this->conn->real_escape_string($user);\n $pwhash = $this->conn->real_escape_string($pwhash);\n \n $sql = \"SELECT *\n FROM `Company`\n WHERE `CompanyName` = '\".$user.\"'\";\n\n \n $result = $this->conn->query($sql);\n $r = $result->fetch_assoc();\n\n //mysql_free_result($result);\n if($user == $r['CompanyName'] && $pwhash == $r['CompanyPass'])\n {\n return $r['id_pk'];\n \n }\n else {\n return -1;\n }*/\n }", "function getUserIdOfEmpid($emp_id)\n\t\t{\n\t\t\t$portRow = $this->manage_content->getValue_where(\"user_employment\",\"*\",\"id\",$emp_id);\n\t\t\treturn $portRow[0]['user_id'];\n\t\t}", "function get_id_user($login)\n{\n return (get_user_id($login));\n}", "public function company(){\n\n\t\t$query=$this->db->query(\"select * from company_info where is_this_recruitment_employer='0' order by company_id asc \");\n\t\treturn $query->result();\n\n\t}", "public function getApplicantId($businessId)\r\n\t{\r\n\t $query = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"SELECT investment_application.created_by from investment_application where investment_application.id = '$businessId' \");\r\n\t $id = null;\r\n\t foreach($query as $q)\r\n\t {\r\n\t $id = $q['created_by'];\r\n\t }\r\n\t //\r\n\t return $id;\r\n\t}", "public function getMemberOfCompanyIds(User $user)\n {\n $rawCompanyIds = $this->documentManager->createQuery(\n 'SELECT IDENTITY(m.company) AS companyId\n FROM SnapRapidApiBundle:CompanyMember m\n WHERE m.user = :user AND m.acceptedAt IS NOT NULL'\n )\n ->setParameter(':user', $user)\n ->getArrayResult();\n\n $companyIds = array_column($rawCompanyIds, 'companyId');\n\n return $companyIds;\n }", "public function getUserID();", "public function checkCompanyOwnership($company_id, $user_id);", "public function checkForCompany($user_id)\n\t{\n\t\treturn User::findOrFail($user_id)\n\t\t\t\t\t->company()\n\t\t\t\t\t->count();\n\t}", "public function getAcountIdUserAuth(){\n $user = auth()->user();\n $cuenta=Cuenta::where('users_id',$user->id)->firstOrFail();\n return $cuenta->idcuenta_usuario;\n }", "public function getInviteeUserId();", "private function getSecundaryUsers($companyId) {\n $secondUserSQL = \"select * \"\n . \"from secondary_users \"\n . \"inner join secondary_users_types on secondary_users.secondary_type_id = secondary_users_types.id \"\n . \"where company_id = {$companyId} ;\";\n $secondUserParam = array(\n 'User' => array(\n 'query' => $secondUserSQL\n )\n );\n return $this->AccentialApi->urlRequestToGetData('users', 'query', $secondUserParam);\n }", "private function _getCompanyUsers(int $company_id) {\r\n \r\n $sql = 'SELECT * FROM users AS u INNER JOIN company_users AS cu ON u.user_id=cu.user_id'\r\n . ' WHERE cu.company_id=:company_id AND u.user_id!=:self_id';\r\n $data = [\r\n 'company_id' => $company_id,\r\n 'self_id' => $this->_user->getId()\r\n ];\r\n \r\n $query_st = $this->_db->singleQueryRetStatement($sql, $data);\r\n \r\n if ($query_st) {\r\n $users = $query_st->fetchAll(PDO::FETCH_CLASS, 'User');\r\n }\r\n \r\n return $users ?? null;\r\n }", "public function get_passenger_company_id($id) \n\t{\n\t\t$result = $this->mongo_db->findOne(MDB_PASSENGERS,array('_id' => (int)$id ),array('passenger_cid'));\n\t\treturn (!empty($result) && isset($result['passenger_cid']))?$result['passenger_cid']:0;\n\t\t\n\t}", "function getAffiliatedId() {\n\t\t$user = $_SESSION[\"loginAffiliateUser\"];\n\t\treturn $user->getAffiliateId();\n\t}", "function getID($user)\n\t{\n\t\t$request = request(\"SELECT id FROM users WHERE user='\".$user.\"' OR mail='\".$user.\"'\");\n\t\t$user = $request->fetch();\n\t\t$user = $user['id'];\n\t\treturn $user;\n\t}", "function getUserIdfromUserName($userName)\n{\n\t\n\t$qry=\"SELECT clientid FROM entrp_login \n\t\t\tWHERE username='\".$userName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function getCompany()\n {\n return $this->hasOne(CompanyProfile::className(), ['id' => 'company_id']);\n }", "protected function getUserId() {}", "protected function getUserId() {}", "public function getUserId() {\n\n\t}", "abstract public function getUserUid(UserInterface $user);", "abstract protected function getUserId() ;", "public function rootCompanyId()\n {\n return QcCompany::where('rootStatus', $this->getDefaultHasRootStatus())->where('companyType', $this->getDefaultParentCompanyType())->pluck('company_id');\n }", "function get_company_contact_person($company_id)\n {\n return $this->db->get_where('company_contact_person',array('company_id'=>$company_id))->row_array();\n }", "public function getParentCompanyID() {\n return $this->_data['parent_company'];\n }", "protected abstract function getUserId();", "function findOwnerCompany() {\n return Companies::find(array(\n 'conditions' => array('is_owner = ?', true),\n 'one' => true,\n ));\n }", "public static function getUserInfo($company_id, $dep_id, $user_id)\n {\n $company_id = DbAgent::queryEncode($company_id,DbAgent::$DB_STRING);\n $dep_id = DbAgent::queryEncode($dep_id,DbAgent::$DB_STRING);\n $user_id = DbAgent::queryEncode($user_id,DbAgent::$DB_STRING);\n \n $query = \"SELECT user_t.*\n FROM user_t\n inner join company_t\n on user_t.company_id = company_t.company_id\n and company_t.del_flag = 0\n inner join department_t\n on user_t.company_id = department_t.company_id\n and department_t.del_flag = 0\n and user_t.dep_id = department_t.dep_id\n WhERE user_t.del_flag = 0\n and user_t.company_id = $company_id\n and user_t.dep_id = $dep_id\n and user_t.user_id = $user_id\";\n \n\t\t$record = Database::currentDb()->getRecord($query);\n return $record;\n }", "function get_user_id() {\n\n\t\tglobal $wpdb;\n\n\t\t$table = $this->make_table_name();\n\t\t$data = $wpdb->get_results( \"SELECT user_id FROM {$table};\" );\n\t\t\n\t\treturn $data;\n\t}", "public function getCompanyOwnerDetails($accountid)\n {\n $queryBuilder = $this->createQueryBuilder('u')\n ->select('u')\n ->leftJoin('u.account', 'a')\n ->where('u.is_owner = :val')\n ->andWhere('a.id = :accountId')\n ->setParameter('accountId', $accountid)\n ->setParameter('val', 1);\n \n return $queryBuilder->getQuery()->getSingleResult();\n }", "public function getQuickBookContextUser($companyId)\n {\n setScopeId($companyId);\n\n $settings = $this->getSettings($companyId);\n\n $userId = null;\n\n if (ine($settings, 'context')) {\n $userId = $settings['context'];\n }\n\n $user = User::where('company_id', $companyId)\n ->where('id', $userId)\n ->first();\n\n if (!$user) {\n\n $user = User::where('company_id', $companyId)\n ->orderBy('created_at', 'asc')\n ->first();\n }\n\n return $user;\n }", "public function getResponsibleUserId(): int;", "public function getCompany($id)\n\t{\n\t\treturn User::withTrashed()\n\t\t\t\t\t->findOrFail($id)\n\t\t\t\t\t->company()\n\t\t\t\t\t->first();\n\t}", "public function getId($user_id) {\n\n\t}", "public function getCompany();", "public function findByUserCompany($company)\n {\n $qb = $this->createQueryBuilder(\"n\")\n ->leftJoin(\"n.sender\", \"company\")\n ->andWhere(\"company = :company\")\n ->setParameter(\"company\", $company);\n return $qb->getQuery()->getResult();\n }", "static function generateCompanyNumber()\r\n\t{\r\n\t\treturn static::_generateUserNumber('SELECT max(user_number) AS value FROM user WHERE user_number > 900000', 900000, 100);\r\n\t}", "public function getPrimaryKey()\n {\n return $this->getCompanyid();\n }", "public function findById($company_id);", "function getByCompanyId($company_id){\n $sql = \"SELECT * FROM companys WHERE id = ?\";\n $query = $this->db->query($sql, array($company_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "function getCompaniesByUserId() {\r\n\t\t$user = JFactory::getUser();\r\n\t\tif($user->id == 0)\r\n\t\t\treturn null;\r\n\r\n\t\t$appSettings = JBusinessUtil::getInstance()->getApplicationSettings();\r\n\r\n\t\t$searchDetails = array();\r\n\t\t$searchDetails['userId'] = $user->id;\r\n\t\t$searchDetails['enablePackages'] = $appSettings->enable_packages;\r\n\t\t$searchDetails['showPendingApproval'] = $appSettings->show_pending_approval;\r\n\r\n\t\t$companiesTable = $this->getTable(\"Company\");\r\n\t\t$companies = $companiesTable->getCompaniesByNameAndCategories($searchDetails);\r\n\r\n\t\treturn $companies;\r\n\t}", "private function get_user_id($user_names){\n $name_pegawai = $this->remove_behind_pipeline($user_names);\n $id_user = $this->Team->User->getUserIdByName($name_pegawai);\n return $id_user[0]['User']['id'];\n }", "public function getUserId()\n {\n return !empty($this->owner->user) ? $this->owner->user->id : null;\n }", "function bp_core_get_userid( $username ) {\r\n\tglobal $wpdb;\r\n\r\n\tif ( empty( $username ) )\r\n\t\treturn false;\r\n\r\n\treturn apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM \" . CUSTOM_USER_TABLE . \" WHERE user_login = %s\", $username ) ) );\r\n}", "function getAllCompanyMemberIDs($companyId)\n{\n\t$data= array();\n\t\n\t$qry=\"SELECT clientid FROM entrp_company_members WHERE companyid=\".$companyId.\"\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$data[]\t\t\t=\t$row['clientid'];\n\t\t}\t\t\n\t}\n\treturn $data;\n}", "public function getUserId(SocialGateway_Account $account){\n\t\treturn $account->unique;\n\t}" ]
[ "0.76584285", "0.72442925", "0.7226014", "0.72216964", "0.6955183", "0.6947831", "0.6923713", "0.67613566", "0.6750918", "0.6692723", "0.6667125", "0.6647442", "0.66413796", "0.6582488", "0.6567295", "0.6559507", "0.65448624", "0.65115726", "0.65115726", "0.65104866", "0.6493783", "0.6488959", "0.6485955", "0.64820504", "0.6466174", "0.6430908", "0.63906276", "0.63692516", "0.63195825", "0.6308441", "0.6233563", "0.6223951", "0.6168419", "0.6153336", "0.614903", "0.61347705", "0.61204326", "0.60950553", "0.608662", "0.6080767", "0.6079016", "0.607719", "0.607239", "0.60540193", "0.6031987", "0.60130733", "0.60101265", "0.5999683", "0.59974587", "0.59974587", "0.59974587", "0.59974587", "0.59974587", "0.59789485", "0.59659874", "0.59652984", "0.5962781", "0.5962751", "0.59621", "0.5956887", "0.59520286", "0.5943725", "0.59417045", "0.5924725", "0.5918356", "0.59079576", "0.59014493", "0.59007305", "0.58755124", "0.58728105", "0.5870793", "0.58470595", "0.58446074", "0.5841912", "0.5840889", "0.58377576", "0.58357906", "0.5834372", "0.5821173", "0.58178616", "0.5817561", "0.581744", "0.58146244", "0.57847685", "0.57814187", "0.57797825", "0.57750624", "0.5753088", "0.5750996", "0.57444906", "0.57443976", "0.5739227", "0.5737037", "0.5729938", "0.5723517", "0.5723022", "0.5721622", "0.5716639", "0.57161397", "0.5713891" ]
0.7576126
1
Function to fetch event id from event tag June 29,2016
Функция для получения идентификатора события из метки события 29 июня 2016 года
function getEventIdfromEventTag($eventTagid) { $qry="SELECT id FROM entrp_events WHERE eventTagId='".$eventTagid."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['id']; } return $id; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventTagfromEventId($eventId)\n{\n\t\n\t$qry=\"SELECT eventTagId FROM entrp_events \n\t\t\tWHERE id=\".$eventId.\" \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$eventTagId\t\t=\t$row['eventTagId']; \t\t\t\t\t\n\t\t}\n\t\treturn $eventTagId;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function getEventID() {\n return $this->_getField(\"eventID\", 0, 2);\n }", "public static function getEventIDFromName( $event_name ) {\n\t\t// Replication lag means sometimes a new event will not exist in the table yet\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$id_num = $dbw->selectField(\n\t\t\t'click_tracking_events',\n\t\t\t'id',\n\t\t\tarray( 'event_name' => $event_name ),\n\t\t\t__METHOD__\n\t\t);\n\t\t// If this entry doesn't exist, which will be incredibly rare as the whole database will only have a few hundred\n\t\t// entries in it at most and getting DB_MASTER up top would be wasteful\n\t\t// FIXME: Use replace() instead of this selectField --> insert or update logic\n\t\tif ( $id_num === false ) {\n\t\t\t$dbw->insert(\n\t\t\t\t'click_tracking_events',\n\t\t\t\tarray( 'event_name' => (string) $event_name ),\n\t\t\t\t__METHOD__\n\t\t\t);\n\t\t\t$id_num = $dbw->insertId();\n\t\t}\n\t\treturn $id_num === false ? 0 : $id_num;\n\t}", "public function getID() {return $this->eventID;}", "public function get_event_id()\n {\n return $this->event_id;\n }", "function getEventHostFromEVENTID($eventId)\n{\n\t//SELECT clientid FROM entrp_events WHERE id=1\n\t$qry=\"SELECT clientid FROM entrp_events \n\t\t\tWHERE id='\".$eventId.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "public function eventId(): string;", "protected function getEventId() {\n\t\treturn $this->_id;\n\t}", "public function getEventID() {\r\n if (isset($this->eventID)) {\r\n return $this->eventID;\r\n }\r\n return false;\r\n }", "function getEventId()\r\n {\r\n return $this->_eventid ;\r\n }", "public function getEventId()\n {\n return $this->eventid;\n }", "public function getEventId()\n {\n return $this->event_id;\n }", "function getEventId()\n {\n return $this->__eventid ;\n }", "function getSingleEvent($eventId) {\r\n\t\t$resEvent = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid, datetime, subject, public, series, tags, requiredteams, documents, notes', #select\r\n\t\t\t'tx_servicemgr_events', #from\r\n\t\t\t'uid='.$eventId.' and hidden=0 and deleted=0', #where\r\n\t\t\t'', '',\r\n\t\t\t'0,1' #limit\r\n\t\t);\r\n\r\n\t\tif ($resEvent) {\r\n\t\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resEvent);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function get_event($eid){\n\t$con = mysqli_connect('127.0.0.1', 'root', '','dashboardproject');\n\t$eid = (int)$eid;\n\t\n\t$sql = \"SELECT\n\t\t\t\tevent_title AS 'title',\n\t\t\t\tevent_body AS 'body',\n\t\t\t\tevent_poster AS 'user',\n\t\t\t\tevent_date AS 'date',\n\t\t\t\tevent_img AS 'imgn',\n\t\t\t\ted AS 'ed',\n\t\t\t\tven AS 'ven'\n\t\t\tFROM events\n\t\t\tWHERE event_id = {$eid}\";\n\t\t\t\n\t$event = mysqli_query($con, $sql);\n\t$event = mysqli_fetch_assoc($event);\n\t\n\t\n\t\n\treturn $event;\n}", "function get_event($eventId) {\n\t\t$data = array('id' => $eventId);\n\t\t$this->db->select('*');\n\t\t$query = $this->db->get_where('events', $data);\n\t\treturn $query->row();\n\t}", "public function get_event_hash_code();", "public function getEventId() {\n\t\treturn $this->id;\n\t}", "public function getEventName($eventId) {\n $this->db->limit(1);\n $this->db->select('name');\n $this->db->where('_id', $eventId);\n $query = $this->db->get('events');\n\n if ($query->num_rows() > 0) {\n $res = $query->result();\n return $res[0]->name;\n } else {\n return '';\n }\n }", "public function event_id($id){\n $this->db->select('event_id');\n $this->db->from('member');\n $this->db->where('member_id', $id);\n $query = $this->db->get();\n $row = $query->row_array();\n return $row['event_id'];\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "function get_events_id($id) {\r\n $sql = \"SELECT * FROM events where event_id=$id\";\r\n //$this->register_events = mysqli_query($this->db_connect(), $query);\r\n $this->events_id = mysqli_query($this->db_connect(), $sql);\r\n return $this->events_id;\r\n }", "public static function getEventIdFromUniqueEvent($unique_event_name=null)\r\n\t{\r\n\t\tglobal $Proj;\r\n\t\t// Make sure we are in the Project context\r\n\t\tself::checkProjectContext(__METHOD__);\r\n\t\t// Make sure project is longitudinal, else return FALSE\r\n\t\tif (!self::isLongitudinal()) return false;\r\n\t\t// If $event_id is not valid, then return FALSE\r\n\t\tif ($unique_event_name == null) return false;\r\n\t\t$event_id = $Proj->getEventIdUsingUniqueEventName($unique_event_name);\r\n\t\t// Get and return event_id\r\n\t\treturn (!is_numeric($event_id) ? false : $event_id);\r\n\t}", "public function get_current_event_id() {\n\t\treturn $this->current_event_id;\n\t}", "public function getEventoId()\n {\n return $this->evento_id;\n }", "public function getOccurrenceId() {\n\n $siteeventTable = Engine_Api::_()->getDbTable('events', 'siteevent');\n $siteeventTableName = $siteeventTable->info('name');\n\n $occurrenceTable = Engine_Api::_()->getDbTable('occurrences', 'siteevent');\n $siteeventOccurTableName = $occurrenceTable->info('name');\n $select = $siteeventTable->select();\n $where = \"$siteeventTableName.event_id = $this->event_id\";\n\n $select = $select\n ->setIntegrityCheck(false)\n ->from($siteeventTableName, array());\n $select->join($siteeventOccurTableName, \"$siteeventTableName.event_id = $siteeventOccurTableName.event_id\", array('occurrence_id'))\n ->where($where)\n //->group(\"$siteeventOccurTableName.event_id\")\n ->order(\"$siteeventOccurTableName.event_id ASC\")\n ->limit(1);\n\n $occurrence_id = $select->query()->fetchColumn();\n return $occurrence_id;\n }", "function get_event($event_id, $cid = null){\r\n global $course_id;\r\n if(is_null($cid)){\r\n $cid = $course_id;\r\n }\r\n return Database::get()->querySingle(\"SELECT * FROM agenda WHERE course_id = ?d AND $event_id = ?d\", $course_id, $event_id);\r\n }", "function get_exc_booking_id($exc_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'AS/'.$year.'/'.$exc_id; }", "public function getEventAttendanceEventId(): Uuid {\n\t\treturn ($this->eventAttendanceEventId);\n\t}", "public function getIIdEvent()\n {\n return $this->iIdEvent;\n }", "function get_revent($eventid) {\n\n\t$dbGetEvent = DBselect( 'SELECT r_eventid FROM event_recovery WHERE eventid =\"'.$eventid.'\"');\n\t$dbevent = DBFetch($dbGetEvent);\n\t\n\t$r_event = $dbevent['r_eventid'];\t\n\t\n\treturn $r_event;\n}", "protected function getEventId() {\n return $this->type.'-'.$this->resource->id;\n }", "public function getEventCode();", "function getJoinOnEventID()\n { \n return $this->getJoinOnFieldX('event_id');\n }", "public function getLastAppliedEventID();", "function getDateIdentifier($date) {\n return $date->getDateTime()->getTimeStamp();\n }", "public function findId($event)\n {\n if (empty($this->jobId)) {\n $scenario = $event instanceof ScenarioEvent ? $event->getScenario() : $event->getOutline();\n $context = $event->getContext();\n $url = $context->getSession()->getDriver()->getWebDriverSession()->getUrl();\n $parts = explode('/', $url);\n $this->jobId = array_pop($parts);\n }\n }", "function f_getLatestDayId()\n {\n global $db;\n $sql_query = \"select GTCDayID from gtcdayconversion order by GTCDayID desc limit 1\";\n $result = $db->query($sql_query) or die($db->error);\n $row = $result->fetch_assoc();\n $temp = explode(\" \",$row['GTCDayID']);\n $day_id = $temp[0];\n return $day_id;\n }", "function getEvent($client, $eventId) \r\n{\r\n $gdataCal = new Zend_Gdata_Calendar($client);\r\n $query = $gdataCal->newEventQuery();\r\n $query->setUser('default');\r\n $query->setVisibility('private');\r\n $query->setProjection('full');\r\n $query->setEvent($eventId);\r\n\r\n try {\r\n $eventEntry = $gdataCal->getCalendarEventEntry($query);\r\n return $eventEntry;\r\n } catch (Zend_Gdata_App_Exception $e) {\r\n echo \"<h2>Might be that the ID of the event: \" . $eventId . \" is not correct, </h2><br><h3>you can check the <a href=\"\">error_log.txt</a> or contact oana.ureche@deri.org, attach the error_log.txt file </h3>\"; \r\n\terror_log($e, 3, \"error_log.txt\");\r\n return null;\r\n }\r\n}", "public function Event( int $eventId )\r\n { $this->Events();\r\n return $this->events[$eventId] ?? null;\r\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getEventAttendanceId(): Uuid {\n\t\treturn ($this->eventAttendanceId);\n\t}", "public function getTimVideoID(){\n\t\t$version = \"03\";\n\t\t$sq = mysql_query(\"SELECT * FROM tim_video\") or die(mysql_error());\n\t\t$num_row = mysql_num_rows($sq);\n\t\t$DT = getdate();\n\t\t$DR = $DT['year'].\"\".$DT['mon'].\"\".$DT['mday'];\n\t\tif($num_row <= 0){\n\t\t\t$number = 1;\n\t\t\t$id_reg = \"VIDEO-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t}else{\n\t\t\t$number = $num_row + 1;\n\t\t\tif($number < 10){\n\t\t\t\t$id_reg = \"VIDEO-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t\t}else{\n\t\t\t\t$id_reg = \"VIDEO-\".$DR.\"-\".$number.\"-\".$version;\n\t\t\t}\n\t\t}\n\t\treturn $id_reg;\n\t}", "public function getId() {\n\t\treturn $this->id_evento;\n\t}", "static public function eventGEExists($eventId, $compId){\n\t\treturn SportEventGroupEvent::where('event_id', '=', $eventId )\n\t\t\t\t\t\t\t\t\t ->where('event_group_id', '=', $compId )->value('event_id');\n\t}", "private function _getEvent($eventId) {\n\n $eventInfo = $this->Event->getEvent($eventId);\n if (!$eventInfo) {\n\n $this->miniFlash('Unable to find selected event. Try searching instead', 'index');\n }\n if (!$eventInfo['Event']['published']) {\n $this->miniFlash('Your event has been saved. However to prevent people from spamming this events section and to ensure that only tech events are posted, an administrator will need to approve your event before it becomes publicly accessible.', 'index');\n }\n return $eventInfo;\n }", "public function getEvento()\n {\n return $this->id_evento;\n }", "protected function getMaxEventID(){\r\n\t\t$allIDs = $this->getEventIDs();\r\n\t\t\r\n\t\tif(empty($allIDs)){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max($allIDs);\r\n\t}", "function id($day) {\n return floor(($day - strtotime(\"10/17/07\")) / (60 * 60 * 24));\n }", "function get_event() {\n\tglobal $event;\n\tglobal $no_error, $error_message;\n\n\tif (isset($_GET['event_id'])) {\n\t\t$event = get_event_details($_GET['event_id']);\n\n\t\tif ($event) {\n\t\t\tget_event_logo();\n\t\t\tget_event_featured_image();\n\t\t\tget_event_cta_background_image();\n\t\t\tget_event_photos();\n\t\t} else {\n\t\t\t$no_error = FALSE;\n\t\t\t$error_message = 'Event not found. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t\t}\n\t} else {\n\t\t$no_error = FALSE;\n\t\t$error_message = 'Event not selected. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t} // if (isset($_GET['event_id']))\n}", "public function getCheckInEventId(): Uuid {\n\t\treturn ($this->checkInEventId);\n\t}", "public static function getEventName(): string;", "public function get_event( $id ) {\n\t\t\tglobal $wpdb;\r\n\t\t\twpa_log('getting single event by ID \"' . $id . '\"');\r\n\t\t\treturn $wpdb->get_row( \"SELECT id, name, event_cat_id, sub_type_id, location, date_format(date,'\" . WPA_DATE_FORMAT . \"') as date FROM $this->EVENT_TABLE WHERE id = $id\" );\n\t\t}", "function getEventByID($ID){\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://web.njit.edu/~jsr24/CS490/getEventByID.php\"); \r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"ID=\".$ID);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t$getEventReply = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $getEventReply;\t#review reply from DB\t\r\n\t}", "public function testEventsGetByEventId()\n {\n }", "function get_event_by_eid($eid)\n\t{\n\t\t$events_table = SQL_PREFIX . 'events';\n\t\t$users_table = SQL_PREFIX . 'users';\n\t\t$cats_table = SQL_PREFIX . 'categories';\n\n\t\t$query = \"SELECT \" . $this->get_event_fields()\n\t\t\t.\", `username`, `name`, `bg_color`, `text_color`\\n\"\n\t\t\t.\"FROM `$events_table`\\n\"\n\t\t\t.\"LEFT JOIN `$users_table` ON `uid` = `owner`\\n\"\n\t\t\t.\"LEFT JOIN `$cats_table` USING (`catid`)\\n\"\n\t\t\t.\"WHERE `eid` = '$eid'\\n\";\n\n\t\t$sth = $this->dbh->query($query)\n\t\t\tor $this->db_error(_('Error in get_event_by_eid'),\n\t\t\t\t\t$query);\n\n\t\t$result = $sth->fetch_assoc()\n\t\t\tor soft_error(_(\"Event doesn't exist\") . \": $eid\");\n\n\t\treturn $result;\n\t}", "public function getBotDetectorEventToken()\n {\n $app = JFactory::getApplication();\n $event_token = $app->input->get('ct_bot_detector_event_token');\n if ( empty($event_token) ){\n $get_input = $app->input->getArray();\n foreach ($get_input as $key => $value) {\n if (stripos($key, 'ct_bot_detector_event_token') === 0 &&\n preg_match('/^[A-Fa-f0-9]{64}$/', $value)\n ) {\n $event_token = $value;\n }\n }\n }\n return empty($event_token) || !is_string($event_token) ? '' : $event_token;\n }", "private function getUpdateEventId()\n\t{\n\t\treturn @IPS_GetObjectIDByIdent('updateEvent', $this->InstanceID);\n\t}", "public function firstEventNumber() : int\n {\n return $this->firstEventNumber;\n }", "function tag_get_id($tag) {\n log_assert(is_tag($tag));\n $query = sprintf(\n \"SELECT id FROM ia_tags WHERE name = %s AND type = %s AND parent = %s\",\n db_quote($tag[\"name\"]), db_quote($tag[\"type\"]), db_quote($tag[\"parent\"])\n );\n $result = db_fetch($query);\n return $result['id'];\n}", "function get_etag($entry, &$schedule_tag=null)\n\t{\n\t\t$etag = $this->bo->get_etag($entry, $schedule_tag, $this->client_shared_uid_exceptions);\n\n\t\t//error_log(__METHOD__ . \"($entry[id] ($entry[etag]): $entry[title] --> etag=$etag\");\n\t\treturn $etag;\n\t}", "public function getEventKey()\r\n {\r\n return $this->getAttr('EventKey');\r\n }", "private function get_tag_id() {\n\t\t$settings = $this->get_settings()->get();\n\n\t\tif ( ! empty( $settings['googleTagID'] ) ) {\n\t\t\treturn $settings['googleTagID'];\n\t\t}\n\t\treturn $settings['measurementID'];\n\t}", "function google_seo_meta_event($eid)\n{\n global $settings, $event;\n\n // Canonical:\n if($settings['google_seo_meta_canonical'] && $event['eid'] > 0)\n {\n google_seo_meta_canonical(get_event_link($event['eid']));\n }\n\n // Description:\n google_seo_meta_description($event['description']);\n}", "function event_exists($calid)\n{\n return retrieve_event($calid);\n}", "function getEventStatus($event)\n{\n\techo $event;\n\treturn 0;\n}", "public function findOneById($eventId)\n {\n $qb = $this->queryAll()->where('e.id = :eventId')\n ->setParameter(':eventId', $eventId, \\PDO::PARAM_INT);\n $event = $qb->execute()->fetch();\n $event['tags'] = $this->getLinkedTagsById($eventId);\n $event['media'] = isset($event['main_img']) && null !== $event['main_img'] ? $this->getMainImg($event['main_img']) : null;\n $event = isset($event['id']) ? $event : [];\n\n return $event;\n }", "public function getElementId();", "public function find($event_id);", "function appGetEventTag($response_message, $xmlrequest) {\r\n\r\n global $return_codes;\r\n $pageNumber = $xmlrequest['AppGetAllEventTag']['pageNumber'];\r\n $appEventsList = $this->app_get_event_tag($xmlrequest, $pageNumber, 10);\r\n $count = isset($appEventsList['count']) && ($appEventsList['count']) ? $appEventsList['count'] : NULL;\r\n if (!empty($appEventsList)) {\r\n $str = '';\r\n for ($i = 0; $i < $count; $i++) {\r\n $width_even_img = NULL;\r\n $height_even_img = NULL;\r\n if (is_readable($this->local_folder . $appEventsList[$i]['even_img'])) {\r\n $sizee = getimagesize($this->local_folder . $appEventsList[$i]['even_img']);\r\n $width_even_img = $sizee[0];\r\n $height_even_img = $sizee[1];\r\n\r\n $file_extension = substr($appEventsList[$i]['even_img'], strrpos($appEventsList[$i]['even_img'], '.') + 1);\r\n $arr = explode('.', $appEventsList[$i]['even_img']);\r\n $Id = isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id']) ? $appEventsList[$i]['even_id'] : NULL;\r\n\r\n if (!file_exists($this->local_folder . $arr[0] . \"_\" . $Id . \".\" . $file_extension) && (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime']))) {\r\n thumbanail_for_image($Id, $appEventsList[$i]['even_img']);\r\n }\r\n\r\n if (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime'])) {\r\n $appEventsList[$i]['even_img'] = isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7) ? event_image_detail($appEventsList[$i]['even_id'], $appEventsList[$i]['even_img'], 1) : NULL;\r\n list($width_even_img, $height_even_img) = (isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7)) ? getimagesize($this->local_folder . $appEventsList[$i]['even_img']) : NULL;\r\n }\r\n }\r\n $appEventsList[$i]['even_addr'] = strip_tags($appEventsList[$i]['even_addr'], \"<br />\");\r\n $appEventsList[$i]['even_addr'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"<br />\", \"<br/>\"), \"\\\\n\", $appEventsList[$i]['even_addr']);\r\n $appEventsList[$i]['even_img'] = $this->profile_url . $appEventsList[$i]['even_img'];\r\n\r\n if (isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id'])) {\r\n $str_temp = '{\r\n \"eventId\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_id']). '\",\r\n \"eventName\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_title']). '\",\r\n \"eventPhoto\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_img']). '\",\r\n \"width_even_img\":\"' .str_replace('\"', '\\\"', $width_even_img). '\",\r\n \"height_even_img\":\"' .str_replace('\"', '\\\"', $height_even_img). '\",\r\n \"eventCity\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_city']). '\",\r\n \"eventState\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_state']). '\",\r\n \"eventPhone\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_phon']) . '\",\r\n \"eventzip\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_zip']). '\",\r\n \"eventCountry\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_country']). '\",\r\n \"eventAddress\":\"' .str_replace('\"', '\\\"', trim(preg_replace('/\\s+/', ' ', $appEventsList[$i]['even_addr']))). '\",\r\n \"eventLatitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['latitude']). '\",\r\n \"eventLongitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['longitude']). '\"\r\n }';\r\n $str .= $str_temp;\r\n $str .=',';\r\n }\r\n }\r\n $str = substr($str, 0, strlen($str) - 1);\r\n $response_str = response_repeat_string();\r\n $response_mess = '\r\n {\r\n\t\t ' . $response_str . '\r\n \"AppearanceVenueList\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessDesc\"] . '\",\r\n \"CurrentVenueCount\":\"' . $count . '\",\r\n \"TotalVenueCount\":\"' . $appEventsList['Total']['TotalRecords'] . '\",\r\n \"AppearanceVenues\":[' . $str . ']\r\n\t\t }\r\n }';\r\n } else {\r\n\r\n $response_mess = '\r\n {\r\n ' . response_repeat_string() . '\r\n \"AppGetAllEventTag\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordDesc\"] . '\"\r\n }\r\n\t}';\r\n }\r\n writelog(\"Appearance:appGetEventTag:\", $response_mess, false);\r\n return getValidJSON($response_mess);\r\n }", "private function setEventID() {\n $this->event_id = $this->getRaceInfoFromDB('event_id');\n }", "public function event( $id ){\n return $this->eventRepository->findOneBy( array( 'id' => $id ));\n }", "private function getCorrelationId($event)\n {\n return isset($event['extra']['correlationId']) ?\n $event['extra']['correlationId'] :\n $event['extra']['requestId'];\n }", "public function get_event_by_id($event_id='')\n\t{\n\t\t$this->db->select('event_id, CONCAT(cu.first_name, \" \", cu.last_name) AS name_customer, end_date,start_date, CONCAT(start_date, \" \", start_time) AS start_time,CONCAT(start_date, \" \", end_time) AS end_time,law.lawyer_id, CONCAT(la.first_name, \" \", la.last_name) AS name_lawyer,e.description, e.status');\n\t\t$this->db->from('events e');\n\t\t$this->db->join('customers cus', 'cus.customer_id = e.customer_id');\n\t\t$this->db->join('lawyer law', 'law.lawyer_id = e.lawyer_id');\n\t\t$this->db->join('peoples cu', 'cu.person_id = cus.person_id');\n\t\t$this->db->join('peoples la', 'la.person_id = law.person_id');\n\t\t$this->db->where('e.event_id', $event_id);\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\t\treturn $query->row();\n\t}", "public function getEvent($eventID) {\r\n\t\t$result = $this->mysqli->prepare ( 'SELECT * FROM c4_event where event_id =?' );\r\n\t\tif ($result) {\r\n\t\t\t$result->bind_param ( 'i', $eventID );\r\n\t\t\t//var_dump($result);\r\n\t\t\t$result->execute ();\r\n\t\t\t//$count = $result->num_rows;\r\n\t\t\t$result->bind_result ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t//printf(\"\\n %s \\n\",$userID);\r\n\t\t\t$result->fetch ();\r\n\t\t\t$event = new Event ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t$result->close ();\r\n\t\t\treturn $event;\r\n\t\t\r\n\t\t}\r\n\t}", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_AGEAN_PERF: \t$source_id = 9; break;\n\t\t\tcase self::TYPE_AGEAN_TITLE: \t$source_id = 10; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "function getEvent($client, $eventid){\n global $server;\n $retValue = array ('eventid' => $eventid,\n 'eventname' => 'Birthday',\n 'starttime' => '06.08.2014 12:00',\n 'endtime' => '09.08.2014 20:00',\n 'description' => 'Vasia`s birthday',\n 'notes' => 'Event notes',\n 'responsible' => 'Vyacheslav Korbut',\n 'estimate' => '1000',\n 'location' => $this->getLocation($client, '1'),\n 'taskline' => $this->getTaskline($eventid)\n );\n \n return $retValue;\n }", "function collection_getInstID($coll_id)\n{\n\t$ci = get_instance();\n\t$ci->load->model('Bdd_select');\n\t$data['dataset'] = $ci->Bdd_select->get_infoData($coll_id);\n\t\n\treturn intval($data['dataset']->IdInst);\n}", "private function GetRungInfo($the_id, $event){\n\t\t$row = SqlGetRow(\"rung\",X1_DB_teamsevents,\" WHERE team_id=$the_id AND ladder_id=\".MakeItemString($event['sid']));\t\n\t\treturn $row['rung'];\n\t}", "function getId($tag) {\n \treturn $this->sql->getOne(\"SELECT id FROM Tag WHERE name='$tag' AND user_id=$_SESSION[user_id]\");\n }", "function fetchEventDetailsBasedonEventTAG($eventTag)\n{\n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\n\t$data= array();\t\n\t\n\t$qry=\"SELECT entrp_events.*,entrp_event_categories.category_name \n\t\t\tFROM entrp_events \n\t\t\tLEFT JOIN entrp_event_categories ON entrp_events.category=entrp_event_categories.id\n\t\t WHERE entrp_events.eventTagId='\".$eventTag.\"'\n\t\t\t\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n \t{\n \t\t$data['id']\t\t\t\t=\t$row['id'];\n \t\t$eventid\t\t\t\t\t= \t$data['id']\t;\n \t\t$data['name']\t\t\t=\t$row['eventName'];\n \t\t$data['address']\t\t=\t$row['address'];\n \t\t\n \t\t$data['date']\t\t\t=\t$row['event_date'];\n \t\t$data['startTime']\t=\t$row['start_time'];\n \t\t$data['endTime']\t\t=\t$row['end_time'];\n \t\t$data['clientid']\t=\t$row['clientid'];\n \t\tif($row['poster']!='')\n \t\t{\n \t\t\t$data['poster']\t=\t$row['poster'];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$data['poster']\t=\t$events_default;\n \t\t}\n \t\t$data['about']\t\t\t=\t$row['description'];\n \t\t$data['category']\t\t=\t$row['category_name'];\n \t\t$data['map']['center']['latitude']\t\t=\t$row['location_lat'];\n\t\t\t$data['map']['center']['longitude']\t\t=\t$row['location_long'];\n\t\t\t$data['map']['zoom']\t=\t8;\n\t\t\t\n\t\t\t// newly fetched info starts\n\t\t\t$data['city']\t\t\t\t=\t$row['city'];\n\t\t\t$data['added_by']\t\t\t=\t$row['added_by'];\n\t\t\t$data['added_on']\t\t\t=\t$row['added_on'];\n\t\t\t$data['status']\t\t\t=\t$row['status'];\n\t\t\t$data['read_only']\t\t=\t$row['read_only'];\n\t\t\t$data['eventTagId']\t\t=\t$row['eventTagId'];\n\t\t\t// newly fetched info ends\n \t}\n\t\t\n\t\t$data['attendees']=getEventAttendeesFromEventID($eventid);\n\t}\n\telse\n\t{\n\t\t$data['id']\t\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['name']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['address']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['map']['center']['latitude']\t\t=\t'';\n\t\t$data['map']['center']['longitude']\t\t=\t'';\n\t\t$data['map']['zoom']\t\t\t\t\t\t\t=\t8;\n\t\t$data['date']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['startTime']\t\t\t\t\t\t\t=\t'';\n\t\t$data['endTime']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['eventPhoto']\t\t\t\t\t\t\t=\t'';\n\t\t$data['poster']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['about']\t\t\t\t\t\t\t\t\t=\t'';\n \t$data['category']\t\t\t\t\t\t\t\t=\t'';\n \t\n \t$data['description']\t\t=\t'';\n\t\t$data['city']\t\t\t\t=\t'';\n\t\t$data['added_by']\t\t\t=\t'';\n\t\t$data['added_on']\t\t\t=\t'';\n\t\t$data['status']\t\t\t=\t'';\n\t\t$data['read_only']\t\t=\t'';\n\t\t$data['eventTagId']\t\t=\t'';\n\t}\n\treturn $data;\n}", "public function testEventsCalendarGetByEventId()\n {\n }", "function getTagIdfromVideoId($params)\r\n\t\t{\r\n\t\t\t$sql = \"select tag_id from tag_component where component_id=?\";\r\n\t\t\t$types= array('integer');\r\n\t\t\t$res = $this->execute_query($sql,$params,$types);\r\n\t\t\treturn $res;\r\n\t\t}", "function get_event_by_oid($oid)\n\t{\n\t\t$events_table = SQL_PREFIX . 'events';\n\t\t$occurrences_table = SQL_PREFIX . 'occurrences';\n\t\t$users_table = SQL_PREFIX . 'users';\n\t\t$cats_table = SQL_PREFIX . 'categories';\n\n\t\t$query = \"SELECT \" . $this->get_event_fields()\n\t\t\t.\", `username`, `name`, `bg_color`, `text_color`\\n\"\n\t\t\t.\"FROM `$events_table`\\n\"\n\t\t\t.\"LEFT JOIN `$occurrences_table` USING (`eid`)\\n\"\n\t\t\t.\"LEFT JOIN `$users_table` ON `uid` = `owner`\\n\"\n\t\t\t.\"LEFT JOIN `$cats_table` USING (`catid`)\\n\"\n\t\t\t.\"WHERE `oid` = '$oid'\\n\";\n\n\t\t$sth = $this->dbh->query($query)\n\t\t\tor $this->db_error(_('Error in get_event_by_oid'),\n\t\t\t\t\t$query);\n\n\t\t$result = $sth->fetch_assoc()\n\t\t\tor soft_error(_(\"Event doesn't exist with oid\")\n\t\t\t\t\t. \": $oid\");\n\n\t\treturn $result;\n\t}", "function getEventByID($handle, $event_id) {\n if ($this->authenticated === false) {\n return false;\n } else if (empty($handle)) {\n return false;\n }\n // GET https://www.google.com/calendar/feeds/default/private/full/entryID\n $url = \"https://www.google.com/calendar/feeds/$handle/private/full/$event_id?alt=jsonc\";\n\n $ch = $this->curlGetHandle($url, true);\n\n $response = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if ($http_code == \"200\") {\n $event = json_decode($response);\n if (!empty($event)) {\n return $event;\n } else {\n return array();\n }\n } else {\n return false;\n }\n }", "public function getEvent($event_id = '') {\n\t\ttry {\n\t\t\treturn \\Stripe\\Event::retrieve($event_id);\n\t\t} catch (Exception $ex) {\n\t\t\t$this->log($ex);\n\n\t\t\treturn false;\n\t\t}\n\t}", "function ajan_activity_feed_item_guid() {\n\techo ajan_get_activity_feed_item_guid();\n}", "public function getEventAttendanceProfileId(): Uuid {\n\t\treturn ($this->eventAttendanceProfileId);\n\t}", "public function getFullIdentifier()\n {\n return $this->getOrganisation().' '.$this->getApplicationEventType();\n }", "public function getLastEventID(): ?string\n {\n return (string) $this->hub->getLastEventID();\n }", "public function get_event()\n {\n }", "function getUniqueID()\n{\n\t$CI = get_instance();\n\t$now = gmdate('Ymd', time() + (7 * 60 * 60));\n\n\t$CI->db->select_max('id', 'id');\n\t$x = $CI->db->get_where('history', ['LEFT(id,8)' => $now])->row_array();\n\n\t$id = sprintf(\n\t\t\"%04s\",\n\t\tintval(\n\t\t\tsubstr($x['id'], 8)\n\t\t) + 1\n\t);\n\treturn $now . $id;\n}", "public function getEventInfo($event_id) {\n\n $eventInfo = array();\n\n $query = $this->db->prepare('SELECT * FROM `events`\n WHERE event_id=:event_id');\n $query->setFetchMode(PDO::FETCH_OBJ);\n $query->execute(array(\n ':event_id' => $event_id));\n\n if ($query->rowCount() == 0) { return false; }\n $row = $query->fetch();\n $eventInfo['event_id'] = $row->event_id;\n $eventInfo['name'] = $row->name;\n $eventInfo['chair_id'] = $row->chair_id;\n $eventInfo['start_datetime'] = strtotime($row->start_datetime);\n $eventInfo['end_datetime'] = strtotime($row->end_datetime);\n $eventInfo['description'] = $row->description;\n $eventInfo['location'] = $row->location;\n $eventInfo['meeting_location'] = $row->meeting_location;\n $eventInfo['color'] = $row->color;\n $eventInfo['online_signups'] = $row->online_signups;\n $eventInfo['online_end_datetime'] = strtotime($row->online_end_datetime);\n $eventInfo['status'] = $row->status;\n $eventInfo['num_attendees'] = $row->num_attendees;\n $eventInfo['num_other_attendees'] = $row->num_other_attendees;\n $eventInfo['pros'] = $row->pros;\n $eventInfo['cons'] = $row->cons;\n $eventInfo['do_again'] = $row->do_again;\n $eventInfo['funds_raised'] = $row->funds_raised;\n $eventInfo['service_hours'] = $row->service_hours;\n $eventInfo['admin_hours'] = $row->admin_hours;\n $eventInfo['social_hours'] = $row->social_hours;\n $eventInfo['num_override_hours'] = $row->num_override_hours;\n $eventInfo['tag_ids'] = $this->getEventTags($row->event_id);\n return $eventInfo;\n }", "public function getDocumentId() {}", "public function determineId() {}", "public function getEtagInfo()\n {\n if (isset($this->urlParameters[\"identifier\"])) {\n $id = $this->urlParameters[\"identifier\"];\n $doc = DocManager::getDocument($id);\n if ($doc->wid > 0) {\n $sql = sprintf(\"select id, revdate from docread where id = %d or id = %d\", $doc->wid, $doc->id);\n simpleQuery(getDbAccess() , $sql, $results, false, false);\n $result = array_merge(array_values($results[0]) , array_values($results[1]));\n \n $user = getCurrentUser();\n $result[] = $doc->state;\n $result[] = $user->id;\n $result[] = $user->memberof;\n // Necessary for localized state label\n $result[] = \\ApplicationParameterManager::getScopedParameterValue(\"CORE_LANG\");\n return join(\"\", $result);\n }\n }\n return null;\n }", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_IDVE_IMPACT:\t$source_id = 5; break;\n\t\t\tcase self::TYPE_PDX_REWORK:\t\t$source_id = 6; break;\n\t\t\tcase self::TYPE_IDVE_IFS:\t\t$source_id = 12; break;\n\t\t\tcase self::TYPE_IDVE_IPDL:\t\t$source_id = 13; break;\n\t\t\tcase self::TYPE_IDVE_ICF:\t\t$source_id = 14; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "public function getScanSceneId()\r\n {\r\n $eventKey = $this->getEventKey();\r\n if (strpos($eventKey, 'qrscene_') === 0) {\r\n $eventKey = substr($eventKey, 8);\r\n }\r\n return $eventKey;\r\n }" ]
[ "0.7335999", "0.72840303", "0.65985143", "0.6596887", "0.6584066", "0.6581364", "0.6547023", "0.6503339", "0.64996284", "0.64983803", "0.64681673", "0.6453821", "0.6360222", "0.6324342", "0.6280439", "0.6260421", "0.6249616", "0.6243286", "0.6206875", "0.617815", "0.6169124", "0.6169124", "0.61682254", "0.6152946", "0.61164993", "0.6115074", "0.6101325", "0.6047406", "0.60367596", "0.60364515", "0.6010583", "0.6006482", "0.6003137", "0.59805536", "0.59528065", "0.59374666", "0.5927968", "0.58728635", "0.58700013", "0.58642685", "0.58474517", "0.58235633", "0.58235633", "0.5786689", "0.57648873", "0.5755106", "0.57542646", "0.5742227", "0.57335055", "0.57089543", "0.567004", "0.56400067", "0.5626341", "0.56197774", "0.56115216", "0.56093603", "0.55924565", "0.5584874", "0.55785495", "0.5567863", "0.55183065", "0.5516435", "0.5506151", "0.55037445", "0.5493049", "0.5491342", "0.5476796", "0.54763526", "0.5474567", "0.54550785", "0.54547143", "0.54495156", "0.54470646", "0.54413086", "0.54398334", "0.5415904", "0.5413692", "0.54069185", "0.54058766", "0.5404661", "0.5403288", "0.5403257", "0.5387387", "0.5380621", "0.53782177", "0.537758", "0.53762555", "0.53756726", "0.53692234", "0.5368023", "0.53603685", "0.5357865", "0.53566206", "0.53521276", "0.534917", "0.53303427", "0.53263664", "0.5319512", "0.5307397", "0.5298726" ]
0.74543667
0
Function to fetch event details based on event tag June 21,2016
Функция для получения деталей события на основе тега события 21 июня 2016 года
function fetchEventDetailsBasedonEventTAG($eventTag) { //the defaults starts global $myStaticVars; extract($myStaticVars); // make static vars local $member_default_avatar = $member_default_avatar; $member_default_cover = $member_default_cover; $member_default = $member_default; $company_default_cover = $company_default_cover; $company_default_avatar = $company_default_avatar; $events_default = $events_default; $event_default_poster = $event_default_poster; //the defaults ends $data= array(); $qry="SELECT entrp_events.*,entrp_event_categories.category_name FROM entrp_events LEFT JOIN entrp_event_categories ON entrp_events.category=entrp_event_categories.id WHERE entrp_events.eventTagId='".$eventTag."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $data['id'] = $row['id']; $eventid = $data['id'] ; $data['name'] = $row['eventName']; $data['address'] = $row['address']; $data['date'] = $row['event_date']; $data['startTime'] = $row['start_time']; $data['endTime'] = $row['end_time']; $data['clientid'] = $row['clientid']; if($row['poster']!='') { $data['poster'] = $row['poster']; } else { $data['poster'] = $events_default; } $data['about'] = $row['description']; $data['category'] = $row['category_name']; $data['map']['center']['latitude'] = $row['location_lat']; $data['map']['center']['longitude'] = $row['location_long']; $data['map']['zoom'] = 8; // newly fetched info starts $data['city'] = $row['city']; $data['added_by'] = $row['added_by']; $data['added_on'] = $row['added_on']; $data['status'] = $row['status']; $data['read_only'] = $row['read_only']; $data['eventTagId'] = $row['eventTagId']; // newly fetched info ends } $data['attendees']=getEventAttendeesFromEventID($eventid); } else { $data['id'] = ''; $data['name'] = ''; $data['address'] = ''; $data['map']['center']['latitude'] = ''; $data['map']['center']['longitude'] = ''; $data['map']['zoom'] = 8; $data['date'] = ''; $data['startTime'] = ''; $data['endTime'] = ''; $data['eventPhoto'] = ''; $data['poster'] = ''; $data['about'] = ''; $data['category'] = ''; $data['description'] = ''; $data['city'] = ''; $data['added_by'] = ''; $data['added_on'] = ''; $data['status'] = ''; $data['read_only'] = ''; $data['eventTagId'] = ''; } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventInfo($event_id) {\n\n $eventInfo = array();\n\n $query = $this->db->prepare('SELECT * FROM `events`\n WHERE event_id=:event_id');\n $query->setFetchMode(PDO::FETCH_OBJ);\n $query->execute(array(\n ':event_id' => $event_id));\n\n if ($query->rowCount() == 0) { return false; }\n $row = $query->fetch();\n $eventInfo['event_id'] = $row->event_id;\n $eventInfo['name'] = $row->name;\n $eventInfo['chair_id'] = $row->chair_id;\n $eventInfo['start_datetime'] = strtotime($row->start_datetime);\n $eventInfo['end_datetime'] = strtotime($row->end_datetime);\n $eventInfo['description'] = $row->description;\n $eventInfo['location'] = $row->location;\n $eventInfo['meeting_location'] = $row->meeting_location;\n $eventInfo['color'] = $row->color;\n $eventInfo['online_signups'] = $row->online_signups;\n $eventInfo['online_end_datetime'] = strtotime($row->online_end_datetime);\n $eventInfo['status'] = $row->status;\n $eventInfo['num_attendees'] = $row->num_attendees;\n $eventInfo['num_other_attendees'] = $row->num_other_attendees;\n $eventInfo['pros'] = $row->pros;\n $eventInfo['cons'] = $row->cons;\n $eventInfo['do_again'] = $row->do_again;\n $eventInfo['funds_raised'] = $row->funds_raised;\n $eventInfo['service_hours'] = $row->service_hours;\n $eventInfo['admin_hours'] = $row->admin_hours;\n $eventInfo['social_hours'] = $row->social_hours;\n $eventInfo['num_override_hours'] = $row->num_override_hours;\n $eventInfo['tag_ids'] = $this->getEventTags($row->event_id);\n return $eventInfo;\n }", "function getEventTagfromEventId($eventId)\n{\n\t\n\t$qry=\"SELECT eventTagId FROM entrp_events \n\t\t\tWHERE id=\".$eventId.\" \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$eventTagId\t\t=\t$row['eventTagId']; \t\t\t\t\t\n\t\t}\n\t\treturn $eventTagId;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "private function _getEvent($eventId) {\n\n $eventInfo = $this->Event->getEvent($eventId);\n if (!$eventInfo) {\n\n $this->miniFlash('Unable to find selected event. Try searching instead', 'index');\n }\n if (!$eventInfo['Event']['published']) {\n $this->miniFlash('Your event has been saved. However to prevent people from spamming this events section and to ensure that only tech events are posted, an administrator will need to approve your event before it becomes publicly accessible.', 'index');\n }\n return $eventInfo;\n }", "function get_event() {\n\tglobal $event;\n\tglobal $no_error, $error_message;\n\n\tif (isset($_GET['event_id'])) {\n\t\t$event = get_event_details($_GET['event_id']);\n\n\t\tif ($event) {\n\t\t\tget_event_logo();\n\t\t\tget_event_featured_image();\n\t\t\tget_event_cta_background_image();\n\t\t\tget_event_photos();\n\t\t} else {\n\t\t\t$no_error = FALSE;\n\t\t\t$error_message = 'Event not found. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t\t}\n\t} else {\n\t\t$no_error = FALSE;\n\t\t$error_message = 'Event not selected. Click <a href=\"' . dirname($_SERVER['PHP_SELF']) . '\">here</a> to continue.';\n\t} // if (isset($_GET['event_id']))\n}", "function app_get_event_tag($xmlRequest, $pageNumber, $limit) {\r\n // if (DEBUG)\r\n writelog(\"appearance.class.php :: app_get_event_tag() :: \", \"Starts Here \", false);\r\n\r\n if ($pageNumber) {\r\n $lowerLimit = ($pageNumber - 1) * $limit;\r\n } else {\r\n $lowerLimit = 0;\r\n }\r\n\r\n $appEventList = array();\r\n $venueId = mysql_real_escape_string($xmlRequest['AppGetAllEventTag']['venueId']);\r\n $latitude = mysql_real_escape_string($xmlRequest['AppGetAllEventTag']['venueLatitude']);\r\n $longitude = mysql_real_escape_string($xmlRequest['AppGetAllEventTag']['venueLongitude']);\r\n\r\n// $queryAppEvents = \"SELECT SQL_CALC_FOUND_ROWS *,( 3956 *2 * ASIN( SQRT( POWER( SIN( ( $latitude - abs( latitude ) ) * pi( ) /180 /2 ) , 2 ) + COS( $latitude * pi( ) /180 ) * COS( abs( latitude ) * pi( ) /180 ) * POWER( SIN( (\r\n// abs( $longitude ) - abs( longitude ) ) * pi( ) /180 /2 ) , 2 ) ) )\r\n// ) AS distance FROM event_list GROUP BY even_id LIMIT $lowerLimit,$limit\";\r\n //$queryAppEvents = \"SELECT SQL_CALC_FOUND_ROWS * FROM event_list WHERE even_stat >='\" . (time()) . \"' AND even_dt >='\" . (time()) . \"' order by even_dt ASC LIMIT $lowerLimit,$limit\";\r\n $queryAppEvents = \"SELECT SQL_CALC_FOUND_ROWS * FROM event_list WHERE even_stat >='\" . (time()) . \"' AND even_own='$venueId' order by even_dt ASC LIMIT $lowerLimit,$limit\";\r\n\r\n // if (DEBUG) {\r\n writelog(\"appearance.class.php :: app_get_event_tag() :: Query to get app events list : \", $queryAppEvents, false);\r\n // }\r\n $appEventList = execute_query($queryAppEvents, true, \"select\");\r\n $appEventList['Total'] = execute_query(\"SELECT FOUND_ROWS() as TotalRecords ;\", false, 'select');\r\n\r\n // if (DEBUG) {\r\n writelog(\"Appearance:app_get_event_tag:\", $appEventList, true);\r\n writelog(\"appearance.class.php :: app_get_event_tag() :: \", \"End Here \", false);\r\n // }\r\n if (!empty($appEventList)) {\r\n return $appEventList;\r\n } else {\r\n return array();\r\n }\r\n }", "public function getEvent();", "public function getEvent();", "public function getEvent();", "public function getEvent();", "function get_event($eid){\n\t$con = mysqli_connect('127.0.0.1', 'root', '','dashboardproject');\n\t$eid = (int)$eid;\n\t\n\t$sql = \"SELECT\n\t\t\t\tevent_title AS 'title',\n\t\t\t\tevent_body AS 'body',\n\t\t\t\tevent_poster AS 'user',\n\t\t\t\tevent_date AS 'date',\n\t\t\t\tevent_img AS 'imgn',\n\t\t\t\ted AS 'ed',\n\t\t\t\tven AS 'ven'\n\t\t\tFROM events\n\t\t\tWHERE event_id = {$eid}\";\n\t\t\t\n\t$event = mysqli_query($con, $sql);\n\t$event = mysqli_fetch_assoc($event);\n\t\n\t\n\t\n\treturn $event;\n}", "function get_events() {\n\t\t\n\t$eventData = [];\n\n $args = array(\n 'event_start_after'\t\t => '',\n 'event_start_before'\t\t=> '',\n 'event_end_after'\t\t\t=> '',\n 'event_end_before'\t\t => '',\n 'event_ondate'\t\t\t => '',\n 'event_date_range'\t\t => 'between',\n 'event_date_type'\t\t\t=> 'all',\n 'event_ticket_type'\t\t => 'all',\n 'event_show_past_events' => true, // show by default\n 'event_show_occurrences'\t=> Events_Maker()->options['general']['show_occurrences'],\n 'post_type'\t\t\t => 'event',\n 'author'\t\t\t => '',\n 'posts_per_page' => -1\n );\n\n if(isset($_REQUEST['cats']) && !empty($_REQUEST['cats'])) {\n $cats = explode(' ', $_REQUEST['cats']);\n if($cats && is_array($cats) && !empty($cats)){\n $args['tax_query'][] = array(\n 'taxonomy'\t\t\t => 'event-category',\n 'field'\t\t\t\t => 'slug',\n 'terms'\t\t\t\t => $cats,\n 'include_children'\t => false\n );\n\n }\n }\n\n if(isset($_REQUEST['start'])) $args['event_start_after'] = sanitize_title_for_query($_REQUEST['start']);\n if(isset($_REQUEST['end'])) $args['event_start_before'] = sanitize_title_for_query($_REQUEST['end']);\n\n // calendar events query\n $args = apply_filters( 'em_get_full_calendar_events_args', $args );\n\n\t$e = new WP_Query( $args );\n\tif ( $e->have_posts() ) {\n\t\t// The 2nd Loop\n\t\twhile ( $e->have_posts() ) {\n\t\t\t$e->the_post();\n\t\t\t$event = $e->post;\n\n\t\t\t$allday = em_is_all_day( $event->ID );\n\n if ( em_is_recurring( $event->ID ) && Events_Maker()->options['general']['show_occurrences'] ) {\n $start = $event->event_occurrence_start_date;\n $end = $event->event_occurrence_end_date;\n } else {\n $start = $event->_event_start_date;\n $end = $event->_event_end_date;\n }\n\n\t\t\tob_start();\n\t\t\tget_template_part( 'parts/event', 'tooltip' );\n\t\t\t$tooltip = ob_get_clean();\n\n\t\t\t//defaults\n\t\t\t$append_to_title = false;\n $event_data['backgroundColor'] = '';\n $event_data['textColor'] = '';\n\n\t\t\t$eventData[] = array(\n 'id' => get_the_ID(),\n 'title' => get_the_title(),\n 'allDay' => $allday,\n 'start' => $start,\n 'end' => $end,\n 'tooltip' => trim($tooltip),\n 'appendToTitle' => $append_to_title,\n //'url' => get_permalink(),\n 'editable' => false,\n //'description' => get_the_content()\n\t\t\t);\n\t\t}\n\n\t\t// Restore original Post Data\n\t\twp_reset_postdata();\n\t}\n\t\n\twp_send_json($eventData);\n\t\n\twp_die();\n}", "function appGetEventTag($response_message, $xmlrequest) {\r\n\r\n global $return_codes;\r\n $pageNumber = $xmlrequest['AppGetAllEventTag']['pageNumber'];\r\n $appEventsList = $this->app_get_event_tag($xmlrequest, $pageNumber, 10);\r\n $count = isset($appEventsList['count']) && ($appEventsList['count']) ? $appEventsList['count'] : NULL;\r\n if (!empty($appEventsList)) {\r\n $str = '';\r\n for ($i = 0; $i < $count; $i++) {\r\n $width_even_img = NULL;\r\n $height_even_img = NULL;\r\n if (is_readable($this->local_folder . $appEventsList[$i]['even_img'])) {\r\n $sizee = getimagesize($this->local_folder . $appEventsList[$i]['even_img']);\r\n $width_even_img = $sizee[0];\r\n $height_even_img = $sizee[1];\r\n\r\n $file_extension = substr($appEventsList[$i]['even_img'], strrpos($appEventsList[$i]['even_img'], '.') + 1);\r\n $arr = explode('.', $appEventsList[$i]['even_img']);\r\n $Id = isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id']) ? $appEventsList[$i]['even_id'] : NULL;\r\n\r\n if (!file_exists($this->local_folder . $arr[0] . \"_\" . $Id . \".\" . $file_extension) && (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime']))) {\r\n thumbanail_for_image($Id, $appEventsList[$i]['even_img']);\r\n }\r\n\r\n if (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime'])) {\r\n $appEventsList[$i]['even_img'] = isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7) ? event_image_detail($appEventsList[$i]['even_id'], $appEventsList[$i]['even_img'], 1) : NULL;\r\n list($width_even_img, $height_even_img) = (isset($appEventsList[$i]['even_img']) && (strlen($appEventsList[$i]['even_img']) > 7)) ? getimagesize($this->local_folder . $appEventsList[$i]['even_img']) : NULL;\r\n }\r\n }\r\n $appEventsList[$i]['even_addr'] = strip_tags($appEventsList[$i]['even_addr'], \"<br />\");\r\n $appEventsList[$i]['even_addr'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"<br />\", \"<br/>\"), \"\\\\n\", $appEventsList[$i]['even_addr']);\r\n $appEventsList[$i]['even_img'] = $this->profile_url . $appEventsList[$i]['even_img'];\r\n\r\n if (isset($appEventsList[$i]['even_id']) && ($appEventsList[$i]['even_id'])) {\r\n $str_temp = '{\r\n \"eventId\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_id']). '\",\r\n \"eventName\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_title']). '\",\r\n \"eventPhoto\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_img']). '\",\r\n \"width_even_img\":\"' .str_replace('\"', '\\\"', $width_even_img). '\",\r\n \"height_even_img\":\"' .str_replace('\"', '\\\"', $height_even_img). '\",\r\n \"eventCity\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_city']). '\",\r\n \"eventState\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_state']). '\",\r\n \"eventPhone\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_phon']) . '\",\r\n \"eventzip\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_zip']). '\",\r\n \"eventCountry\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['even_country']). '\",\r\n \"eventAddress\":\"' .str_replace('\"', '\\\"', trim(preg_replace('/\\s+/', ' ', $appEventsList[$i]['even_addr']))). '\",\r\n \"eventLatitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['latitude']). '\",\r\n \"eventLongitude\":\"' .str_replace('\"', '\\\"', $appEventsList[$i]['longitude']). '\"\r\n }';\r\n $str .= $str_temp;\r\n $str .=',';\r\n }\r\n }\r\n $str = substr($str, 0, strlen($str) - 1);\r\n $response_str = response_repeat_string();\r\n $response_mess = '\r\n {\r\n\t\t ' . $response_str . '\r\n \"AppearanceVenueList\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"SuccessDesc\"] . '\",\r\n \"CurrentVenueCount\":\"' . $count . '\",\r\n \"TotalVenueCount\":\"' . $appEventsList['Total']['TotalRecords'] . '\",\r\n \"AppearanceVenues\":[' . $str . ']\r\n\t\t }\r\n }';\r\n } else {\r\n\r\n $response_mess = '\r\n {\r\n ' . response_repeat_string() . '\r\n \"AppGetAllEventTag\":{\r\n \"errorCode\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordCode\"] . '\",\r\n \"errorMsg\":\"' . $return_codes[\"AppGetAllEventTag\"][\"FailedToAddRecordDesc\"] . '\"\r\n }\r\n\t}';\r\n }\r\n writelog(\"Appearance:appGetEventTag:\", $response_mess, false);\r\n return getValidJSON($response_mess);\r\n }", "public function getEvent(){\r\n $event = $this->modx->getObject('ChurchEvents', array('id' => $this->filters['event_id']));\r\n if ( is_object($event) ) {\r\n $properties = $event->toArray();\r\n // format the time to readable!\r\n $properties = array_merge($properties,$this->processEvent($event));\r\n if ( $event->get('event_type') == 'private' && !$this->isAdmin() ) {\r\n // only show that public time and that the event is reserved\r\n foreach ( $properties as $k => $v ) {\r\n if ( $k == 'public_start' || $k == 'public_end' || $k == 'duration'){\r\n continue;\r\n }\r\n $properties[$k] = '';\r\n }\r\n $properties['title'] = $this->modx->lexicon('churchevents.reserved');\r\n } else {\r\n // do I need to do anything? yes extended to data \r\n $tmp = $this->getExtended($properties['extended']);\r\n $properties = array_merge($properties,(array)$tmp );\r\n }\r\n // get location info\r\n if ( $this->getFilter('useLocations') ) {\r\n /** SELECT loc.NAME AS location, loc.notes AS locNotes, loc.*, locT.* FROM modx_church_event_locations eloc\r\n JOIN modx_church_locations loc ON loc.id = eloc.church_location_id\r\n JOIN modx_church_location_type locT ON locT.id = loc.church_location_type_id\r\n WHERE\r\n eloc.church_event_id = 44\r\n */\r\n $locations = $event->getMany('EventLocations');\r\n $locationTypes = array();\r\n $locationOrder = array();\r\n foreach($locations as $loc ) {\r\n // 1 get the location\r\n $location = $this->modx->getObject('ChurchLocations', array('id' => $loc->get('church_location_id'), 'published'=>'Yes'));\r\n if ( !is_object($location)) {\r\n continue;\r\n }\r\n if ( !isset($locationTypes[$location->get('church_location_type_id')])) {\r\n // get the new location type\r\n $locType = $this->modx->getObject('ChurchLocationType', array('id'=>$location->get('church_location_type_id')));\r\n $locationTypes[$locType->get('name')] = $locType->toArray();\r\n $locationOrder[] = $locType->get('name');\r\n } \r\n $locationTypes[$locType->get('name')]['location'][$location->get('name')] = $location->toArray();\r\n }\r\n // set the loctaion type to natural order\r\n natsort($locationOrder);\r\n $locationType_string = '';\r\n foreach( $locationOrder as $locTypeName ){\r\n // get locations\r\n $locations = $locationTypes[$locTypeName]['location'];\r\n natsort($locations);\r\n $location_string = '';\r\n foreach($locations as $location){\r\n // location is an array not an Object\r\n $location_string .= $this->getChunk($this->getFilter('eventDescriptionLocationTpl'), $location);\r\n }\r\n if (!empty($location_string) ) {\r\n $tmp = $locationTypes[$locTypeName];\r\n $tmp['locations'] = $location_string;\r\n $locationType_string .= $this->getChunk($this->getFilter('eventDescriptionLocationTypeTpl'), $tmp);\r\n }\r\n }\r\n $properties['locationInfo'] = $locationType_string;\r\n } else {\r\n $properties['locationInfo'] = $this->getChunk($this->getFilter('eventDescriptionBasicLocationTpl'));\r\n }\r\n \r\n \r\n // edit_url and delete_url\r\n if ( $this->isAdmin() ) {\r\n $properties['edit_url'] = $this->url.'view=edit&amp;event_id='.$event->get('id');\r\n $properties['delete_url'] = $this->url.'view=delete&amp;event_id='.$event->get('id');\r\n \r\n }\r\n } else {\r\n $text .= $this->modx->lexicon('churchevents.missing');\r\n }\r\n \r\n $this->show_calendar = false;\r\n return $this->getChunk($this->filters['eventDescriptionTpl'],$properties);\r\n }", "public function processEvent($event){\r\n list($date) = explode(' ',$event->get('start_date'));\r\n $time_str = '';\r\n $end_time = $start_time = $setup_time = NULL;\r\n $hr = $min = $dhr = $dmin = NULL;\r\n switch ( $event->get('event_timed') ){\r\n case 'Y':\r\n list($d, $time) = explode(' ',$event->get('public_start'));\r\n list($hr,$min) = explode(\":\", $time);\r\n $hr = (int)$hr;\r\n $min = (int)$min;\r\n list($dhr,$dmin) = explode(\":\", $event->get('duration'));\r\n $dhr = (int)$dhr;\r\n $dmin = (int)$dmin;\r\n $start_time = $this->formatTime($hr, $min);\r\n $end_time = $this->formatTime(($hr+$dhr), ($min+$dmin));\r\n if ( $event->get('start_date') != $event->get('public_start') ) {\r\n list($d, $time) = explode(' ',$event->get('start_date'));\r\n list($hr,$min) = explode(\":\", $time);\r\n $hr = (int)$hr;\r\n $min = (int)$min;\r\n $setup_time = $this->formatTime($hr, $min);\r\n }\r\n $time_str = '<span class=\"eTime\">'.$start_time.' &ndash; '.$end_time.'</span> ';\r\n break;\r\n case 'allday':\r\n $start_time = $this->modx->lexicon('churchevents.allday_text');\r\n $time_str = '<span class=\"allDay\">'.$this->modx->lexicon('churchevents.allday').'</span>';\r\n break;\r\n case 'N':\r\n $start_time = $this->modx->lexicon('churchevents.notice_text');\r\n default:\r\n break;\r\n }\r\n // build the event info - this is also the URL:\r\n $notice = '';\r\n if ( $event->get('status') != 'approved' ) {\r\n $notice = '<img src=\"'.MODX_ASSETS_URL.'components/churchevents/images/'.$event->get('status').'.png\" title=\"This event is marked as '.$event->get('status').'\" /> ';\r\n }\r\n $event_title = $event->get('title');\r\n if ( $event->get('event_type') == 'private' && !$this->isAdmin() ) {\r\n $event_title = $this->modx->lexicon('churchevents.reserved');\r\n \r\n }\r\n $locData = array();\r\n if ( $this->filters['useLocations'] ) {\r\n // get locations\r\n $locations = $event->getMany('EventLocations');\r\n //print_r($locations);\r\n $locationInfo = $locationInfoUrls = '';\r\n foreach( $locations as $location ) {\r\n //print_r($location);\r\n //$Tmp = $location->toArray();\r\n $loc = $location->getOne('Location');\r\n //$Tmp = $loc->toArray();\r\n //print_r($Tmp);\r\n //echo ' - L: '.$location->get('name');\r\n if ( !empty($locationInfo) ) {\r\n $locationInfo .= ', ';\r\n $locationInfoUrls .= ', ';\r\n }\r\n $locationInfo .= $loc->get('name');\r\n $locationInfoUrls .= '<a href=\"'.$this->url.'view=location&amp;location='.$loc->get('id').'\">'.$loc->get('name').'</a>';\r\n }\r\n } else {\r\n $locationInfo = $event->get('location_name');\r\n $locationInfoUrls = '';\r\n // location info for basic location\r\n $locData = array(\r\n 'location_name' => $event->get('location_name'), \r\n 'address' => $event->get('address'), \r\n 'city' => $event->get('city'), \r\n 'state' => $event->get('state'), \r\n 'zip' => $event->get('zip'), \r\n 'country' => $event->get('country')\r\n );\r\n }\r\n // $event->toArray();\r\n $properties = array(\r\n 'event' => $notice.$time_str.\r\n '<a href=\"'.$this->url.'view=event&amp;event_id='.$event->get('id').'\">'.$event_title.'</a>',\r\n 'class' => 'chCat_'.$event->get('church_ecategory_id'),// the CSS class(es) \r\n 'calendar_id' => $event->get('church_calendar_id'),// the CSS class(es)\r\n 'calendar' => $this->calendar_array[$event->get('church_calendar_id')],\r\n 'category_id' => $event->get('church_ecategory_id'),\r\n 'category' => $this->category_array[$event->get('church_ecategory_id')],\r\n 'event_id' => $event->get('id'),\r\n 'event_date' => strftime($this->filters['dateFormat'], strtotime($event->get('start_date'))),\r\n 'timestamp' => strtotime($event->get('public_start')),\r\n 'event_title' => $event_title,\r\n 'setup_time' => $setup_time,\r\n 'start_time' => $start_time,\r\n 'status' => $event->get('status'),\r\n 'end_time' => $end_time,\r\n 'event_time' => $time_str,\r\n 'event_url' => $this->url.'view=event&amp;event_id='.$event->get('id'),//&amp;a='.$a.'\r\n 'notice' => $notice,\r\n 'locationInfo' => $locationInfo,\r\n 'locationInfoUrls' => $locationInfoUrls,\r\n 'version' => $event->get('version'),\r\n 'public_desc' => $event->get('public_desc'),\r\n 'public_start' => $event->get('public_start'),\r\n 'duration' => $event->get('duration'),\r\n 'end_date' => $event->get('end_date'),\r\n 'contact' => $event->get('contact'),\r\n 'contact_email' => $event->get('contact_email'),\r\n 'contact_phone' => $event->get('contact_phone'),\r\n 'start_hour' => $hr,\r\n 'start_minute' => $min,\r\n 'end_hour' => $hr+$dhr,\r\n 'end_minute' => $min+$dmin,\r\n 'event_timed' => $event->get('event_timed'),\n 'office_notes' => $event->get('office_notes')\r\n );\n \r\n // extended fields\r\n $tmp = $this->getExtended($event->get('extended'));\r\n $properties = array_merge($tmp, $properties, $locData);\r\n \n //kofc specific fields\n $properties = array_merge($this->getKCEvent($properties),$properties);\n \r\n return $properties;\r\n }", "function getEvent($eventID){\n $event = [];\n\n try {\n if ($stmt = $this->conn->prepare(\"SELECT name, datestart, dateend, numberallowed FROM event WHERE idevent= :eventID\")){\n $stmt->execute(array(\":eventID\"=>$eventID));\n $event['id'] = $eventID;\n while ($row = $stmt->fetch()){\n $event['name'] = $row['name'];\n $event['start'] = $row['datestart'];\n $event['end'] = $row['dateend'];\n $event['capacity'] = $row['numberallowed'];\n } \n }\n return $event;\n } catch (PDOException $e) {\n //can log message\n echo $e->getMessage();\n return array();\n }\n }", "function get_event($event_id, $cid = null){\r\n global $course_id;\r\n if(is_null($cid)){\r\n $cid = $course_id;\r\n }\r\n return Database::get()->querySingle(\"SELECT * FROM agenda WHERE course_id = ?d AND $event_id = ?d\", $course_id, $event_id);\r\n }", "function getEvents($date = ''){\n\t//Include db configuration file\n\tinclude 'dbConfig.php';\n\t$eventListHTML = '';\n\t$date = $date?$date:date(\"Y-m-d\");\n\t//Get events based on the current date\n\t$result = $db->query(\"SELECT title FROM events WHERE date = '\".$date.\"' AND status = 1\");\n\tif($result->num_rows > 0){\n\t\t$eventListHTML = '<h2>Events on '.date(\"l, d M Y\",strtotime($date)).'</h2>';\n\t\t$eventListHTML .= '<ul>';\n\t\twhile($row = $result->fetch_assoc()){ \n $eventListHTML .= '<li>'.$row['title'].'</li>';\n }\n\t\t$eventListHTML .= '</ul>';\n\t}\n\techo $eventListHTML;\n}", "function getEventIdfromEventTag($eventTagid)\n{\n\t\n\t$qry=\"SELECT id FROM entrp_events \n\t\t\tWHERE eventTagId='\".$eventTagid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function get_event()\n {\n }", "function getSingleEvent($eventId) {\r\n\t\t$resEvent = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid, datetime, subject, public, series, tags, requiredteams, documents, notes', #select\r\n\t\t\t'tx_servicemgr_events', #from\r\n\t\t\t'uid='.$eventId.' and hidden=0 and deleted=0', #where\r\n\t\t\t'', '',\r\n\t\t\t'0,1' #limit\r\n\t\t);\r\n\r\n\t\tif ($resEvent) {\r\n\t\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resEvent);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getEvent()\n {\n \t//Getting event id from the webhook\n \t$array_webook_last = [];\n\t\t$event_webhook_json = file_get_contents('http://ambasd.tw1.ru/eventbrite.txt');\n\t\t$array_webhook = json_decode($event_webhook_json,true);\n\t\t$array_webook_last= explode('/', $array_webhook['data']['api_url']) ;\n\t\t$eventId = $array_webook_last[5];\n\t\t$search = $eventId;\n \t\t//echo 'The event id is : ' . $eventId;\n \t\t//checking if that event ID exists already or not \n \t\t$events = event::all();\n \t\t$events = json_decode($events, TRUE);\n \t\tforeach ($events as $event) {\n \t\t\tif($event['event_id'] == $eventId ){\n \t\t\t\techo 'MATCH FOUND // No New events';\n \t\t\t\texit();\n \t\t\t}\n \t\t}\n\n \t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://www.eventbriteapi.com/v3/events/\". $eventId .\"/?token=HVI4TKUB4HG4AA25SWQN\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, FALSE);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$result = json_decode($response,true);\n\t\t//print(\"<pre>\".print_r($result,true).\"</pre>\");\n\t\t$name = $result['name']['text'];\n\t\t$description = $result['description']['text'];\n\t\t$link = $result['url'];\n\t\t$picture_link = $result['logo']['original']['url'];\n\t\t// Getting the exact date - time \n\t\t$start = $result['start']['local']; $timestamp = strtotime($start); $start_day = date('D', $timestamp);\n\t\t$timezone = $result['start']['timezone'];\n\t\t$start_time = date('h:ia', $timestamp);\n\t\t$year = date('Y', $timestamp);\n\t\t$end = $result['end']['local']; $timestamp = strtotime($end); $end_day = date('D', $timestamp);\n\t\t$end_time = date('h:ia', $timestamp);\n\t\t$event_time = 'Days : '.$start_day .' - '.$end_day .' ' . $start_time .' - ' . $end_time;\n\t\t//echo $event_time;\n\t\t$venue_id = $result['venue_id'];\n\n\t\t// Getting the event Address\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://www.eventbriteapi.com/v3/venues/\".$venue_id.\"/?token=HVI4TKUB4HG4AA25SWQN\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, FALSE);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$result = json_decode($response,true);\n\t\t//print(\"<pre>\".print_r($result,true).\"</pre>\");\n\t\t$address = $result['name'] . ',' .$result['address']['localized_address_display'];\n\t\t//echo $address;\n\t\t\n\t\t// Getting the event price\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://www.eventbriteapi.com/v3/events/\".$eventId .\"/ticket_classes/?token=HVI4TKUB4HG4AA25SWQN\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, FALSE);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$results = json_decode($response,true);\n\t\t//print(\"<pre>\".print_r($results,true).\"</pre>\");\n\n\t\tforeach ($results['ticket_classes'] as $result) {\n\t\t\techo ' <br/>' . $result['name'];\n\t\t\tif ($result['name'] == 'Autism Fitness Level 1 Early Enrollment' || $result['name'] == 'Autism Fitness Certification L1 Early Enrollment'){\n\t\t\t\t$early = $result['actual_cost']['display'];\n\t\t\t}\n\t\t\tif ($result['name'] == 'Autism Fitness Level 1 Enrollment' || $result['name'] == 'Autism Fitness L1 Enrollment'){\n\t\t\t\t$actual = $result['actual_cost']['display'];\n\t\t\t\t$actual_start_date = $result['sales_start'];\n\t\t\t}\n\t\t}\n\t\t//echo '<br/> actual price ' . $actual;\n\t\t//echo '<br/> Sale price ' .$early;\n\t\t//echo '<br/> sale ends ' . $actual_start_date;\n\t\t$actual_start_date = strtotime($actual_start_date);\n\t\t//echo $actual_start_date;\n\t\t//echo '<br/> event name is : <h2>' . $name . '</h2>';\n\t\t//echo ' url is : ' . $picture_link;\n\t\t\n\t\t//inserting data to DB\n\t\t$event = new Event();\n $event->title = $name;\n $event->description = $description;\n $event->event_id = $eventId;\n $event->date = $start;\n $event->event_time = $event_time;\n $event->address = $address;\n $event->price = $early;\n $event->final_price = $actual;\n $event->enroll_date = $actual_start_date;\n $event->picture_link = $picture_link;\n $event->year = $year;\n $event->publish = 1;\n $event->event_url = $link;\n $event->sale_ends = $actual_start_date;\n $event->time_zone = $timezone;\n $event->eventbrite = 1;\n $event->lms_key = 'empty';\n $event->lms_group_id = 'empty';\n $event->l1_course_added = 0;\n $event->test = 0;\n\n\t\t$event->save();\n\t\techo 'new event ' . $eventId;\n\n }", "public function getEvent($eventId) {\n\t\ttry {\t\n\t\t\t///parent::SetDatabaseConnection();\n\t\t\t$query = \"SELECT * FROM social_events WHERE userid = '\".$this->session->userid.\"' AND event_id='\".$eventId.\"'\";\n\t\t\t//echo $query;die;\n\t\t\t$stmt = $this->db->query($query);\t\t\t\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "public function getEventbyDay($date = NULL){\n \t\t$select = $this->select()\n ->from($this->_name)\n\t\t\t\t\t ->where('events.eventStartDate = ?',$date);\n $events = $this->getAdapter()->fetchAll($select);\n return $events;\n \t}", "function get_event($eventId) {\n\t\t$data = array('id' => $eventId);\n\t\t$this->db->select('*');\n\t\t$query = $this->db->get_where('events', $data);\n\t\treturn $query->row();\n\t}", "function em_events( $args = array() ){ echo em_get_events($args); }", "Public function viewEvent()\n {\n// $gClient->setAccessToken($_SESSION['token']);\n// $googleCal = new Google_CalendarService($gClient);\n//\n// $calendarId = 'pcr.ac.id_gpi2bjmlveu6rkgmipdkn4saqs@group.calendar.google.com';\n// \n// $gClient->setUseObjects(true);\n// $results = $googleCal->events->listEvents($calendarId);\n// $events = $results->getItems();\n//\n// \n// \n// \n// $l_event_id =\"\";\n// if (empty($events)) {\n// print \"No upcoming events found.\\n\";\n// } else {\n// print \"Upcoming events:\\n\";\n// foreach ($events as $event) {\n// if (empty($start)) {\n// $start = $event->start->date;\n// } \n// \n// }\n// echo json_encode($events);\n// //echo 'ID : '.$l_event_id.' | '.$eventsum.'<br>';\n// \n// }\n \n// $gClient->setUseObjects(true);\n// $results = $googleCal->events->listEvents($calendarId);\n// $events = $results->getItems();\n// \n// $l_event_id =\"\";\n// foreach ($events as $gev)\n// {\n// $l_event_id = substr($gev->id, 0, 17);\n// $eventsp=$this->evn_mdl->getEventTempById($l_event_id);\n// echo json_encode($eventsp);\n// }\n //$event_id =\"eventeka123123\";\n \n// foreach ($events as $event) {\n// $eventId = substr($event->id, 0, 17);\n// \n// //$result = substr($eventId, 0, 17);\n// $eventsp=$this->evn_mdl->getEventTempById($eventId);\n// // print_r($result.'ada ya');\n// echo json_encode($eventsp);\n// }\n \n \n \n// $data = array('id' =>$eventt->id,\n// 'title' => 'eka1',\n// 'description' => 'iyaaa',\n// 'color' => '#40E0D0',\n// 'start' => $eventt->start->dateTime,\n// 'end' => $eventt->end->dateTime,\n// 'dtmupd' => date('Y-m-d H:i:s'),\n// );\n// $this->evn_mdl->addEventTemp($data,$event_id);\n// \n \n \n// $eventt = $googleCal->events->get($calendarId, \"eventeka123123\");\n// \n // echo json_encode($eventt);\n $result=$this->evn_mdl->getEventTemp();\n// \n// \n// $hari = array('start' => date('Y-m-d H:i:s'),\n// 'end' => date('Y-m-d H:i:s'),\n// 'titel' => 'aYO',\n// 'description' => 'iyaa',\n// 'color' => '#40E0D0',\n// 'id' => '39');\n \n //echo json_encode($hari);\n //echo $data['hari']=$hari;\n //echo json_encode($hari);\n// \n// foreach ($result as $row)\n// {\n// print_r($row);\n// }\n// exit;\n echo json_encode($result);\n }", "function retrieve_event($calid)\n{\n $query = \"SELECT * FROM tbl_news WHERE calid='{$calid}'\";\n $result = mysql_query($query);\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC))\n {\n $results[] = $row;\n }\n return $results;\n}", "function get_events(){\n\t$con = mysqli_connect('127.0.0.1', 'root', '','dashboardproject');\n\t\t\t\n\t$sql = \"SELECT\n\t\t\t\t\tevents.event_id AS 'id',\n\t\t\t\t\tevents.event_title AS 'title',\n\t\t\t\t\tLEFT(events.event_body, 512) AS 'preview',\n\t\t\t\t\tDATE_FORMAT(events.event_date, '%d/%m/%y %h:%i:%s') AS 'date',\n\t\t\t\t\tevents.event_img AS 'eimage',\n\t\t\t\t\tevents.event_poster AS 'user'\n\t\t\tFROM events \n\t\t\tORDER BY events.event_date DESC\";\n\t\t\t\n\t\n\t$result = mysqli_query($con, $sql);\n\t$events = array();\n\t\n\t$rowcount = mysqli_num_rows($result);\n\t\n\t$c = 0;\n\twhile ($c < $rowcount){\n\t\t$row = mysqli_fetch_assoc($result);\n\t\t\n\t\t$events[] = array(\n\t\t\t'id'\t\t\t=> $row['id'],\n\t\t\t'title'\t\t\t=> $row['title'],\n\t\t\t'preview'\t\t=> $row['preview'],\n\t\t\t'user'\t\t\t=> $row['user'],\n\t\t\t'imgn'\t\t\t=> $row['eimage'],\n\t\t\t'date'\t\t\t=> $row['date']\n\t\t);\n\t\t$c =$c+1;\n\t}\n\t\n\treturn $events;\n}", "private function parseEventHtml ($html) {\n $doc = new DOMDocument();\n @$doc->loadHTML($html);\n $ret = array();\n $ret['title'] = $this->usr->doXPathQuery('//h1[@itemprop=\"name\"]', $doc)->item(0)->textContent;\n if(!empty($this->usr->doXPathQuery('//h1[contains(@itemprop, \"name\")]/following-sibling::p', $doc)->item(0))) {\n $ret['tagline'] = $this->usr->doXPathQuery('//h1[contains(@itemprop, \"name\")]/following-sibling::p', $doc)->item(0)->nodeValue;\n }\n $ret['dtstart'] = $this->usr->doXPathQuery('//*[contains(@itemprop, \"startDate\")]/@content', $doc)->item(0)->nodeValue;\n $ret['dtend'] = $this->usr->doXPathQuery('//*[contains(@itemprop, \"endDate\")]/@content', $doc)->item(0)->nodeValue;\n if(!empty($this->usr->doXPathQuery('//*[contains(@itemprop, \"name\")]', $doc)->item(1))) {\n $ret['venue_name'] = $this->usr->doXPathQuery('//*[contains(@itemprop, \"name\")]', $doc)->item(1)->nodeValue;\n }\n if(!empty($this->usr->doXPathQuery('//th/*[text()=\"Location:\"]/../../td/*[contains(@class, \"s\")]/text()[1]', $doc)->item(0))) {\n $ret['venue_address'] = $this->usr->doXPathQuery('//th/*[text()=\"Location:\"]/../../td/*[contains(@class, \"s\")]/text()[1]', $doc)->item(0)->nodeValue;\n }\n if ($location = $this->usr->doXPathQuery('//*[contains(@itemprop, \"location\")]', $doc)->item(0)) {\n $ret['adr']['country-name'] = $location->getElementsByTagName('meta')->item(0)->attributes->getNamedItem('content')->value;\n $ret['adr']['region'] = $location->getElementsByTagName('meta')->item(1)->attributes->getNamedItem('content')->value;\n if ($locality = $location->getElementsByTagName('meta')->item(2)) {\n $ret['adr']['locality'] = $locality->attributes->getNamedItem('content')->value;\n }\n }\n if (!empty($this->usr->doXPathQuery('//th[text()=\"Cost:\"]/../td', $doc)->item(0))) {\n $ret['cost'] = $this->usr->doXPathQuery('//th[text()=\"Cost:\"]/../td', $doc)->item(0)->nodeValue;\n }\n\n if (!empty($this->usr->doXPathQuery('//th[text()=\"Dress code:\"]/../td', $doc)->item(0))) {\n $ret['dress_code'] = $this->usr->doXPathQuery('//th[text()=\"Dress code:\"]/../td', $doc)->item(0)->textContent;\n }\n // TODO: Save an HTML representation of the description, then make a getter that returns a text-only version.\n // See also http://www.php.net/manual/en/class.domelement.php#101243\n $ret['description'] = $this->usr->doXPathQuery('//*[contains(@class, \"description\")]', $doc)->item(0)->nodeValue;\n if ($creator_link = $this->usr->doXPathQuery('//h3[text()=\"Created by\"]/following-sibling::ul//a', $doc)->item(0)) {\n $ret['creator'] = $ret['created_by'] = new FetLifeProfile(array( // both for backwards compatibility\n 'url' => $creator_link->attributes->getNamedItem('href')->value,\n 'id' => current(array_reverse(explode('/', $creator_link->attributes->getNamedItem('href')->value))),\n 'avatar_url' => $creator_link->getElementsByTagName('img')->item(0)->attributes->getNamedItem('src')->value,\n 'nickname' => $creator_link->getElementsByTagName('img')->item(0)->attributes->getNamedItem('alt')->value\n ));\n }\n return $ret;\n }", "function fetchrecentsearchevents($userid)\n{\n $currentdate=date(\"Y-m-d H:i:s\");\n $tbl=\"tbl_event as e , tbl_recenteventsearch as r \";\n $sf=\"e.*,r.recent_id,r.userid\";\n\t\n\tif($_GET['searchevent']!=\"\")\n\t{\n\t$cnd .=\" e.end_date !='\".$currentdate.\"' AND e.end_date >'\".$currentdate.\"' AND (e.title LIKE '%\" .$_GET['searchevent'].\"%' ) AND e.userid!=\".$userid.\" AND e.userid!=1 AND r.userid=\".$userid;\n\t}\n\telse\n\t{\n\t$cnd=\" e.end_date !='\".$currentdate.\"' AND e.end_date >'\".$currentdate.\"' AND e.userid!=\".$userid.\" AND e.userid!=1 AND r.userid=\".$userid;\n\t}\n\n\t$ob = ' r.recent_id DESC ';\n\t$gb=\" e.id \";\n\t$prn = '';\n\t$l =\"0,20\";\n\t\t$result = $this-> gj($tbl, $sf , $cnd, $ob, $gb, $ad, $l, \"\");\n\t\t$numrow = @mysql_num_rows($result);\n\t\t\n\t\tif($numrow)\n\t\t{\n\t\t\t$i=0;\n\t\t\twhile($row = @mysql_fetch_assoc($result))\n\t\t\t{\n\t\t\t$events[$i] =$row;\n\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\treturn $events;\n\n}", "function getDateEvent($year, $month){\n\t\t$year = ($month < 10 && strlen($month) == 1) ? \"$year-0$month\" : \"$year-$month\";\n\t\t$query = $this->db->select('event_date, total_events')->from('events')->like('event_date', $year, 'after')->get();\n\t\techo $this->db->last_query(); die;\n\t\tif($query->num_rows() > 0){\n\t\t\t$data = array();\n\t\t\tforeach($query->result_array() as $row){\n\t\t\t\t$date = explode('-',$row['event_date']);\n\t\t\t\t$data[(int) end($date)] = ($row['total_events'] >= 0)? '<font color=\"blue\">'.number_format($row['total_events'], 0,',', '.').'</font>' : '<font color=\"red\">'.number_format($row['total_events'], 0,',', '.').'</font>';\n\t\t\t}\n\t\t\treturn $data;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getEventStr($oDate)\n\t{\n\t\t$str = \"\";\n\t\t$dow = strtoupper($oDate->format(\"l\")); // Day of Week MONDAY, TUESDAY etc\n\t\t$wom = weekOfMonth($oDate); // Week of month - 1,2 etc\n\n\t\t$qry = \" SELECT id, parentid, eventsource, eventdate, eventtime, eventname, \" .\n\t\t\t\t\t \" DATE_FORMAT(eventtime, '%l:%i %p') as disptime, linkurl \" . \n\t\t \" FROM calendar \" . \n\t\t \" WHERE eventdate = '\" . date_format($oDate, 'Y-m-d') . \"' \" .\n\t\t \" ORDER BY eventtime\"; \n\t\n\t\t$res = mysql_query($qry);\n\n\t\twhile ($row = mysql_fetch_assoc($res)) \n\t\t{\n\t\t\t$id = \"id\" . $row['id'];\n\t\t\tif ($row['eventsource'] == 'FORTHCOMING')\n\t\t\t{\n\t\t\t\tprint(\"<div id=\\\"\" . $id . \"\\\" class=\\\"tip\\\">\" . \"Click to see event details\" . \"</div>\\n\");\n\t\t\t\tif (! empty($row['linkurl']) )\n\t\t\t\t{\n\t\t\t\t\t$str .= \"<a href='\" . $row['linkurl'];\n\t\t\t\t\t$str .= \"#articleid\" . $row['parentid'] . \"' \";\t// internal link on target page\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$str .= \"<a href='\" . \"index.php?displaypage=dispforthevent.php\";\n\t\t\t\t\t$str .= \"#articleid\" . $row['parentid'] . \"' \";\t// internal link on target page\n\t\t\t\t}\n\n\t\t\t\t$str .= \" onmouseout='popUp(event,\\\"\" . $id . \"\\\")'\" . \n\t\t\t\t\t\t\t\t\" onmouseover='popUp(event,\\\"\" . $id . \"\\\")' > \\n\"; // onclick='return false'\n\t\t\t} else if ($row['eventsource'] == 'REGULAR')\n\t\t\t{ \n\t\t\t\tif (! empty($row['linkurl']) )\n\t\t\t\t{\n\t\t\t\t\tprint(\"<div id=\\\"\" . $id . \"\\\" class=\\\"tip\\\">\" . \"Click to see event details\" . \"</div>\\n\");\n\t\t\t\t\t$str .= \"<a href='\" . $row['linkurl'] . \"' \";\n\t\t\t\t\t$str .= \" onmouseout='popUp(event,\\\"\" . $id . \"\\\")'\" . \n\t\t\t\t\t\t\t\t\t\" onmouseover='popUp(event,\\\"\" . $id . \"\\\")' > \\n\"; // onclick='return false'\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$str .= \"<h4>\\n\";\n // FC_HIDE_TIME (11:11) is a magic time that means do not display time\n\t\t\tif (substr($row['eventtime'],0,5) != FC_HIDE_TIME ) \n\t\t\t{\n\t\t\t\t//$str .= substr($row['eventtime'],0,5) . \"<br />\\n\";\n\t\t\t\t$str .= $row['disptime'] . \"<br />\\n\";\n\t\t\t}\n\t\t\t$str .= $row['eventname'] . \"<br />\\n\";\n\t\t\t$str .= \"</h4>\\n\";\n\t\t\tif ($row['eventsource'] == 'FORTHCOMING')\n\t\t\t{\n\t\t\t\t$str .= \"</a>\\n\";\n\t\t\t}\telse if ($row['eventsource'] == 'REGULAR')\n\t\t\t{ // don't use a tool tip for regular events\n\t\t\t\t//$str .= \"</a>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tmysql_free_result($res);\n\n\t\treturn $str;\n\t}", "public function getDateEventString(){\n\t \t return CakeTime::format('F jS, Y ', $this->getAttr('date_event'));\n\t }", "public static function getEventDate() {\n if ($result = \\Drupal::cache()->get(self::$nameEventDateCache)) {\n return $result->data;\n }\n else {\n return self::setEventDate();\n }\n }", "private function _innerDetailProcess()\n {\n $empty_res = array();\n\n $param_date = $this->_request->getParam('date');\n $param_region = $this->_request->getParam('region');\n\n if (empty($param_date)) {\n $param_date = date('Y-m-d');\n }\n $this->req_date = $this->m_service->getRequestDate($param_date);\n if (!$this->req_date) {\n $this->req_date = date('Y-m-d');\n }\n\n $param_event_key = $this->_request->getParam('event_key');\n if (!$param_event_key) {\n return $empty_res;\n }\n\n $req_region = null;\n $region_list = $this->m_service->getRegionList(array('country' => 'ch'));\n foreach ($region_list as $region_key => $region_info) {\n if ($region_key == $param_region) {\n $req_region = $region_info['topic'];\n break;\n }\n }\n\n $params = array();\n\n $params['event_date'] = $this->req_date;\n\n if ($req_region) {\n $params['event_region'] = $req_region;\n }\n\n $params['publication'] = self::PUBLICATION;\n $params['language'] = self::LANGUAGE;\n $params['section'] = self::EV_SECTION;\n $params['article_type'] = self::EV_TYPE;\n\n $params['event_key'] = $param_event_key;\n $params['omit_multidate'] = true;\n\n $events = $this->m_service->getEventList($params);\n\n return $events;\n\n/*\n $this->getHelper('contextSwitch')->addActionContext('list', 'json')->initContext();\n print Zend_Json::encode($events);\n*/\n }", "public function getActivityticketDescriptionForEvent($eventName);", "function getEventStatus($event)\n{\n\techo $event;\n\treturn 0;\n}", "abstract public function getEvents();", "public function getEventName($eventId) {\n $this->db->limit(1);\n $this->db->select('name');\n $this->db->where('_id', $eventId);\n $query = $this->db->get('events');\n\n if ($query->num_rows() > 0) {\n $res = $query->result();\n return $res[0]->name;\n } else {\n return '';\n }\n }", "public function relatedEvents($date)\n { \n $events_ids = explode(\",\", $this->related_events);\n $events_names = [];\n foreach ($events_ids as $id) {\n $event = $this::findOrFail($id);\n\n if (($date >= $event->init_avaibility_date) && ($date <= $event->end_avaibility_date)){\n array_push($events_names, $event->title); \n return $events_names;\n }\n }\n }", "static function get_event_info($post){\n\t\treturn array(\n\t\t\t'enabled' => get_post_meta($post->ID, 'gc_enabled', true),\n\t\t\t'info' => get_post_meta($post->ID, 'event_info', true)\n\t\t);\n\t\t\n\t\t\n\t}", "function get_events() {\n if (!$this->initialized)\n $this->init();\n \n if ($this->api_string == \"\") { return; } // Hasn't been set up yet\n \n $last_request = intval(get_option(\"eventification_last_request\"));\n if ($last_request < time()-$this->update_frequency)\n {\n $url = \"http://eventification.com/api/\" . $this->api_string;\n \n \t\tif (function_exists('file_get_contents')) {\n \t\t\t$file = file_get_contents($url);\n \t\t} else {\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_HEADER, 0);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $file = curl_exec($curl);\n curl_close($curl);\n }\n update_option('eventification_last_request', time());\n $data = json_decode($file, true);\n \n if (isset($data[\"events\"])) {\n update_option('eventification_upcoming_events', json_encode($data[\"events\"]));\n foreach ($data[\"events\"] as $event) {\n $title = $this->parse_template($this->title_template, $event);\n \n $post = get_event_by_title($title);\n\n if (!$post) {\n \n $tags = array();\n foreach ($event[\"tags\"] as $tag) {\n $tags[] = $tag[\"tag_text\"];\n }\n // Create post object\n $_p = array();\n $_p['post_title'] = $title;\n $_p['post_name'] = $this->parse_template($this->slug_template, $event);\n $_p['post_content'] = \"[eventification event_id=\\\"\".$event[\"event_id\"].\"\\\"]\";// \".$event[\"event_id\"].\"}\";\n $_p['post_status'] = 'publish';\n $_p['post_type'] = $this->post_type;\n $_p['post_category'] = array(1); // the default 'Uncategorised'\n $_p['tags_input'] = implode(\", \", $tags);\n \n // Insert the post into the database\n $pid = wp_insert_post( $_p );\n \n } else {\n $pid = $post->ID;\n }\n update_post_meta($pid, \"eventification\", str_replace(\"\\\\\", \"\\\\\\\\\\\\\\\\\", json_encode($event)));\n }\n }\n }\n }", "function getMyEvents(){\n global $conn;\n\n $username = $_SESSION['user'];\n\n $sql = \"SELECT * FROM events WHERE postedby = '$username'\";\n $result = $conn->query($sql);\n\n if($result->num_rows > 0){\n # get fields into variables\n while($row = $result->fetch_assoc()){\n $code = $row['code'];\n $name = $row['name'];\n $description = $row['description'];\n $event = $row['event'];\n $event_date = $row['eventdate'];\n $entry_fee = $row['entryfee'];\n $venue = $row['venue'];\n\n\n echo \"\n <div class='ticket'>\n <h3>\".strtoupper($name).\"</h3><br>\n <p><b>Entry Fee: </b><span class='fee'>Ksh $entry_fee</span></p>\n <p><b>Venue: </b>$venue</p>\n <p><b>Date: </b>$event_date <span style='background-color:#34ca66;color:#fff; border-radius:3px; paddding:1%;'>\".timeSpan($event_date).\"</span></p>\n <p><b>Attending:</b>\".getAttendingCount($code).\"</p>\n <br><a href='?deleteevent=$code'>delete event</a><a style='background-color:#34ca66;border:2px solid #34ca66;' href='new-event/?editevent=$code'>edit event</a><br><br>\n </div>\";\n }\n }else if($result->num_rows < 1){\n echo \"\n <div class='empty-data'>\n <h3>You have not uploaded any events</h3><br><br>\n <a href='new-event'>add new event</a>\n </div>\";\n }\n}", "function getAllEvents(){\n global $conn;\n\n $sql = \"SELECT * FROM events\";\n $result = $conn->query($sql);\n\n if($result->num_rows > 0){\n # get fields into variables\n while($row = $result->fetch_assoc()){\n $code = $row['code'];\n $name = $row['name'];\n $description = $row['description'];\n $event = $row['event'];\n $event_date = $row['eventdate'];\n $entry_fee = $row['entryfee'];\n $venue = $row['venue'];\n\n\n echo \"\n <div class='ticket'>\n <h3>\".strtoupper($name).\"</h3><br>\n <p><b>Entry Fee: </b><span class='fee'>Ksh $entry_fee</span></p>\n <p><b>Venue: </b>$venue</p>\n <p><b>Date: </b>$event_date <span style='background-color:#34ca66;color:#fff; border-radius:3px; paddding:1%;'>\".timeSpan($event_date).\"</span></p>\n <p><b>Attending:</b>\".getAttendingCount($code).\"</p>\n </div>\";\n }\n }else if($result->num_rows < 1){\n echo \"\n <div class='empty-data'>\n <h3>You have not uploaded any events</h3><br><br>\n <a href='new-event'>add new event</a>\n </div>\";\n }\n}", "function google_seo_meta_event($eid)\n{\n global $settings, $event;\n\n // Canonical:\n if($settings['google_seo_meta_canonical'] && $event['eid'] > 0)\n {\n google_seo_meta_canonical(get_event_link($event['eid']));\n }\n\n // Description:\n google_seo_meta_description($event['description']);\n}", "function getEvent($client, $eventId) \r\n{\r\n $gdataCal = new Zend_Gdata_Calendar($client);\r\n $query = $gdataCal->newEventQuery();\r\n $query->setUser('default');\r\n $query->setVisibility('private');\r\n $query->setProjection('full');\r\n $query->setEvent($eventId);\r\n\r\n try {\r\n $eventEntry = $gdataCal->getCalendarEventEntry($query);\r\n return $eventEntry;\r\n } catch (Zend_Gdata_App_Exception $e) {\r\n echo \"<h2>Might be that the ID of the event: \" . $eventId . \" is not correct, </h2><br><h3>you can check the <a href=\"\">error_log.txt</a> or contact oana.ureche@deri.org, attach the error_log.txt file </h3>\"; \r\n\terror_log($e, 3, \"error_log.txt\");\r\n return null;\r\n }\r\n}", "function event_exists($calid)\n{\n return retrieve_event($calid);\n}", "function wpabstracts_getEvents($field, $value, $format){\n global $wpdb;\n $ret_val = null;\n switch ($field){\n case 'event_id':\n $event = $wpdb->get_row(\"SELECT * FROM \".$wpdb->prefix.\"wpabstracts_events WHERE event_id = $value\", $format);\n $ret_val = $event;\n break;\n case 'all':\n $events = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"wpabstracts_events\");\n $ret_val = $events;\n break;\n }\n return $ret_val;\n}", "function dayEvents($startDay, $uid)\n\t{\n $newdate = date('Y-m-d');\n //Time stamp\n $ts = strtotime($newdate);\n\n //Day of week\n $dow = date('w', $ts);\n $offset = $dow - 1;\n if($offset < 0) $offset = 6;\n\n // Calculate timestamp for appropriate column\n $ts = $ts - $offset * 86400; // Gets Mondays timestamp\n $startDay--; // Fixes the start day's offset\n $ts = $ts + $startDay * 86400; // Gets timestamp for current column\n\n \n $newdate = date('Y-m-d', $ts);\n ////if (isset($_GET[\"uid\"])) {\n // $uid = '2';//$_GET['uid'];\n $strSQL = \"SELECT event.Title, event.Start, event.End, event.Location, event.Description, event.eventID\n FROM event\n WHERE event.Date = '$newdate' AND event.staffID = '$uid'\n ORDER BY event.Start\";\n $Query = mysql_query($strSQL);\n $intNumField = mysql_num_fields($Query);\n \n //// if (!empty($Query)) {\n // check for empty result\n if (mysql_num_rows($Query) > 0) {\n $response[\"events\"] = array();\n\n while($row = mysql_fetch_array($Query))\n {\n $events = array();\n //for($i=0;$i<$intNumField;$i++){\n \n // $event[mysql_field_name($Query,$i)] = $obResult[$i];\n //}\n \n //switch ($row[\"start\"]){\n // case \"05:00:00\": $events[\"Start\"]\n //}\n \n $events[\"Title\"] = $row[\"Title\"];\n $events[\"Start\"] = date('h:i:s a', strtotime($row[\"Start\"]));\n $events[\"End\"] = date('h:i:s a', strtotime($row[\"End\"]));\n $events[\"Location\"] = $row[\"Location\"];\n $events[\"Description\"] = $row[\"Description\"];\n $events[\"EventID\"] = $row[\"EventID\"];\n\n array_push($response[\"events\"],$events);\n }\n \n \n // success\n $response[\"success\"] = 1;\n \n // user node\n //$response[\"event\"] = array();\n \n // array_push($response[\"event\"], $event);\n \n // echoing JSON response\n echo json_encode($response);\n //// } else {\n // no event found\n //// $response[\"success\"] = 0;\n //// $response[\"message\"] = \"No event found\";\n \n // echo no users JSON\n //// echo json_encode($response);\n //// }\n } else {\n // no event found\n $response[\"success\"] = 0;\n $response[\"message\"] = \"No event found\";\n \n // echo no users JSON\n echo json_encode($response);\n }\n }", "public function testEventsGetByEventId()\n {\n }", "function getEvents($tag)\n {\n return isset($this->events[$tag]) ? (array)$this->events[$tag] : array();\n }", "function getEvent($id)\n{\n\t$data = array();\n\tif(empty($id))\n\t{\n\t\treturn $data;\n\t}\n\t$query = \t'SELECT e.event_id, e.name, e.description, e.eventdatetime, u.username, e.user_id '.\n\t\t\t\t'FROM events AS e, users AS u '.\n\t\t\t\t'WHERE event_id = '.$id.' '.\n\t\t\t\t'AND e.user_id = u.user_id ';\n\t\t\t\t\n\t$result = mysql_query($query)\n\t\tor die(mysql_error());\n\t$row = mysql_fetch_array($result);\n\t$data = array('id'=>$row['event_id'],\n\t\t\t\t\t'name'=>$row['name'],\n\t\t\t\t\t'desc'=>$row['description'],\n\t\t\t\t\t'author'=>$row['username'],\n\t\t\t\t\t'author_id'=>$row['user_id'],\n\t\t\t\t\t'author_link'=>'./viewprofile.php?action=view&amp;uid='.$row['user_id'],\n\t\t\t\t\t'date'=>$row['eventdatetime']);\n\treturn $data;\n}", "public function get_event( $id ) {\n\t\t\tglobal $wpdb;\r\n\t\t\twpa_log('getting single event by ID \"' . $id . '\"');\r\n\t\t\treturn $wpdb->get_row( \"SELECT id, name, event_cat_id, sub_type_id, location, date_format(date,'\" . WPA_DATE_FORMAT . \"') as date FROM $this->EVENT_TABLE WHERE id = $id\" );\n\t\t}", "function getCurrentDayEvents() {\n $date = date(\"Y-m-d\");\n $query = \"SELECT event.id_event, title, dateStart, dateEnd, image, street, city, iso_country FROM event, location WHERE event.id_location = location.id_location AND event.status = 1 AND dateStart = :day ORDER BY event.id_event\";\n $ps = myDatabase()->prepare($query);\n $ps->bindParam(':day', $date, PDO::PARAM_STR);\n $ps->execute();\n $results = $ps->fetchAll(PDO::FETCH_ASSOC);\n foreach ($results as $row) {\n $event_id = $row['id_event'];\n $event_title = $row['title'];\n $event_datestart = $row['dateStart'];\n $event_dateend = $row['dateEnd'];\n $event_image = $row['image'];\n $event_street = $row['street'];\n $event_city = $row['city'];\n $event_country = $row['iso_country'];\n\n echo '<div class=\"col-xs-6 col-lg-4\">\n <a href=\"event_details.php?event_id=' . $event_id . '\" class=\"thumbnail\">\n <img alt=\"Image\" src=\"images/event_images/' . $event_image . '\" style=\"width:500px;height:300px;padding:2rem\">\n </a>\n <h3>' . $event_title . '</h3>\n <p>Date de début : ' . $event_datestart . '</p><p>Date de fin : ' . $event_dateend . '</p>\n <p>Lieu : ' . $event_street . ' ' . $event_city . ' ' . $event_country . '</p>\n <p><a class=\"btn btn-primary\" href=\"event_details.php?event_id=' . $event_id . '\" role=\"button\">Détails &raquo;</a></p>\n </div>';\n }\n}", "public function getEvent($eventName)\n {\n $query = \"SELECT * FROM event where eventName = '\".$eventName.\"'\";\n $this->registry->getObject('db')->executeQuery( $query );\n if( $this->registry->getObject('db')->numRows() > 0 )\n {\n $data = $this->registry->getObject('db')->getRows();\n $this->setEventName($data['eventName']);\n $this->setEventDescription($data['description']);\n $this->setEventImage($data['imageEvent']);\n return true;\n }\n return null;\n }", "function HandleEvents()\r\n\t{\r\n\t\t$event_action \t\t= isset($_REQUEST['hid_event_action']) ? $_REQUEST['hid_event_action'] : \"\";\r\n\t\t$event_id \t\t = isset($_REQUEST['hid_event_id']) ? $_REQUEST['hid_event_id'] : \"\";\r\n\r\n\r\n\t\t$sel_event \t\t\t= isset($_REQUEST['sel_event']) ? $_REQUEST['sel_event'] : \"\";\r\n\t\t$event_name \t\t= isset($_REQUEST['event_name']) ? $_REQUEST['event_name'] : \"\";\r\n\t\t$sel_event_name\t\t= isset($_REQUEST['sel_event_name']) ? $_REQUEST['sel_event_name'] : \"\";\r\n\t\t$event_description \t= isset($_REQUEST['event_description']) ? $_REQUEST['event_description'] : \"\";\r\n\r\n\t\t$event_from_hour \t= isset($_REQUEST['event_from_hour']) ? $_REQUEST['event_from_hour'] : \"\";\r\n\t\t$event_from_day \t= isset($_REQUEST['event_from_day']) ? $_REQUEST['event_from_day'] : \"\";\r\n\t\t$event_from_month \t= isset($_REQUEST['event_from_month']) ? $_REQUEST['event_from_month'] : \"\";\r\n\t\t$event_from_year \t= isset($_REQUEST['event_from_year']) ? $_REQUEST['event_from_year'] : \"\";\r\n\t\t$start_date = $event_from_year.\"-\".$event_from_month.\"-\".$event_from_day.\" \".$event_from_hour;\r\n\t\t\r\n\t\t$event_to_hour \t\t= isset($_REQUEST['event_to_hour']) ? $_REQUEST['event_to_hour'] : \"\";\r\n\t\t$event_to_day \t\t= isset($_REQUEST['event_to_day']) ? $_REQUEST['event_to_day'] : \"\";\r\n\t\t$event_to_month \t= isset($_REQUEST['event_to_month']) ? $_REQUEST['event_to_month'] : \"\";\r\n\t\t$event_to_year \t\t= isset($_REQUEST['event_to_year']) ? $_REQUEST['event_to_year'] : \"\";\r\n\t\t$finish_date = $event_to_year.\"-\".$event_to_month.\"-\".$event_to_day.\" \".$event_to_hour;\r\n\r\n\t\tif($this->isDemo && $event_action != \"\"){ \r\n\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['msg_this_operation_blocked'].\"</font>\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\t\r\n\t\tif($event_action == \"add\"){\r\n\t\t\t// insert single event\r\n\t\t\t$insert_id = false;\r\n\t\t\tif($sel_event == \"new\"){\r\n\t\t\t\t$sql = \"INSERT INTO \"._DB_PREFIX.\"events (ID, Name, Description) VALUES (NULL, '\".$event_name.\"', '\".$event_description.\"') \";\r\n\t\t\t\t$insert_id = database_void_query($sql);\r\n\t\t\t}else if($sel_event == \"current\"){\r\n\t\t\t\t$insert_id = $sel_event_name;\r\n\t\t\t}\r\n\t\t\tif($insert_id != false){\r\n\t\t\t\t$sql = \"INSERT INTO \"._DB_PREFIX.\"calendar (ID, EventID, EventDate, EventTime) VALUES \";\r\n\t\t\t\t$current_date = $start_date;\r\n\t\t\t\t$offset = 0;\r\n\t\t\t\twhile($current_date < $finish_date){\r\n\t\t\t\t\t$current = getdate(mktime($this->ParseHour($event_from_hour)+$offset,0,0,$event_from_month,$event_from_day,$event_from_year));\r\n\t\t\t\t\t$curr_date = $current['year'].\"-\".$this->ConvertToDecimal($current['mon']).\"-\".$this->ConvertToDecimal($current['mday']);\r\n\t\t\t\t\t$curr_time = $this->ConvertToHour($current['hours']);\r\n\t\t\t\t\t$current_date = $curr_date.\" \".$curr_time;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($current_date < $finish_date){\r\n\t\t\t\t\t\tif($offset > 0) $sql .= \", \";\r\n\t\t\t\t\t\t$sql .= \"(NULL, \".(int)$insert_id.\", '\".$curr_date.\"', '\".$curr_time.\"')\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$offset++;\r\n\t\t\t\t}\r\n\t\t\t\tif(!database_void_query($sql)){\r\n\t\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_inserting_new_events'].\"</font>\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->arrMessages[] = \"<font color='#00a200'>\".$this->lang['success_new_event_was_added'].\"</font>\";\r\n\t\t\t\t\t$this->DeleteCache();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_inserting_new_events'].\"</font>\";\r\n\t\t\t}\r\n\t\t}else if($event_action == \"delete\"){\r\n\t\t\t// delete single event\r\n\t\t\t$sql = \"DELETE FROM \"._DB_PREFIX.\"calendar WHERE ID = \".(int)$event_id;\t\t\t\r\n\t\t\tif(!database_void_query($sql)){\r\n\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_deleting_event'].\"</font>\";\r\n\t\t\t}else{\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#00a200'>\".$this->lang['success_event_was_deleted'].\"</font>\";\r\n\t\t\t\t$this->DeleteCache();\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else if($event_action == \"events_insert\"){\r\n\t\t\t// insert events\r\n\t\t\t$sql = \"INSERT INTO \"._DB_PREFIX.\"events (ID, Name, Description) VALUES (NULL, '\".$event_name.\"', '\".$event_description.\"')\";\r\n\t\t\t$insert_id = database_void_query($sql);\t\r\n\t\t\tif($insert_id != false){\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#00a200'>\".$this->lang['success_new_event_was_added'].\"</font>\";\r\n\t\t\t}else{\r\n\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_inserting_new_events'].\"</font>\";\r\n\t\t\t}\r\n\t\t}else if($event_action == \"events_update\"){\r\n\t\t\t// update events\r\n\t\t\t$sql = \"UPDATE \"._DB_PREFIX.\"events SET Name='\".$event_name.\"', Description='\".$event_description.\"' WHERE ID = \".(int)$event_id;\r\n\t\t\tif(database_void_query($sql)){\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#00a200'>\".$this->lang['success_event_was_updated'].\"</font>\";\r\n\t\t\t}else{\r\n\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_updating_event'].\"</font>\";\r\n\t\t\t}\t\t\t\r\n\t\t}else if($event_action == \"events_delete\"){\r\n\t\t\t// delete event from Events table\r\n\t\t\t$sql = \"DELETE FROM \"._DB_PREFIX.\"events WHERE ID = \".(int)$event_id;\t\t\t\r\n\t\t\tif(!database_void_query($sql)){\r\n\t\t\t\tif($this->isDebug) $this->arrErrors[] = $sql.\"<br />\".mysql_error();\t\t\t\t\t\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#a20000'>\".$this->lang['error_deleting_event'].\"</font>\";\r\n\t\t\t}else{\r\n\t\t\t\t$this->arrMessages[] = \"<font color='#00a200'>\".$this->lang['success_event_was_deleted'].\"</font>\";\r\n\t\t\t\t$this->DeleteCache();\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getViewevent()\n\t {\n\t \t$data = JRequest::get( 'get' );\n\t\t$qry = \"select a.* , count(b.id) as total_booking , c.name ,d.name as cat from #__community_events as a inner join #__community_events_members as b on a.id = b.eventid inner join #__community_events_category as d on a.catid = d.id inner join #__users as c on a.creator = c.id and c.block = 0 where a.id = '\".$data['event_id'].\"'\";\n\n\t\t$db =& JFactory::getDBO();\n\t\t$db->setQuery( $qry );\n\t\t$event = $db->loadObject();\n\t\treturn $event;\n\t }", "public function getEvent()\n {\n $desc = '';\n if ($this->by) {\n $desc = sprintf(\"[%s]\", strip_tags($this->by));\n }\n if ($this->info) {\n if ($this->by) {\n $desc .= \"\\n\";\n }\n $desc .= strip_tags(nl2br($this->info));\n }\n\n $event = Event::create(strip_tags($this->title));\n\n if ($desc) {\n $event->description($desc);\n }\n\n if ($this->place) {\n $event->address($this->place);\n }\n\n $event->startsAt(new \\DateTime($this->start));\n $event->endsAt($this->getCalEnd());\n\n if ((bool) $this->allday) {\n $event->fullDay();\n }\n\n if ($this->frequency) {\n $rrule = RRule::frequency(RecurrenceFrequency::from($this->frequency));\n $rrule->interval($this->interval);\n $rrule->times($this->count);\n\n $event->rrule($rrule);\n }\n\n return $event;\n }", "function the_event_date( $date_format = '' ) {\n $event_date = get_event_date( $date_format );\n\n echo $event_date;\n}", "function getEvent($client, $eventid){\n global $server;\n $retValue = array ('eventid' => $eventid,\n 'eventname' => 'Birthday',\n 'starttime' => '06.08.2014 12:00',\n 'endtime' => '09.08.2014 20:00',\n 'description' => 'Vasia`s birthday',\n 'notes' => 'Event notes',\n 'responsible' => 'Vyacheslav Korbut',\n 'estimate' => '1000',\n 'location' => $this->getLocation($client, '1'),\n 'taskline' => $this->getTaskline($eventid)\n );\n \n return $retValue;\n }", "private function loadEventInformation( Event $event ) {\n\t\t$event->setClosed(false);\n\t\t\n\t\t$venueMapper = new VenueMapper(); \n\t\t$presentersMapper = new Mappers\\PresenterMapper();\n\t\t$categoriesMapper = new Mappers\\CategoryMapper();\n\n\t\tif ( $event->getVenueId() )\n\t\t\t$event->setVenue( $venueMapper->get( $event->getVenueId() ) );\n\n\t\t//Removed Attendees list on the event load, it should be loaded async.\n\t\t//$event->setAttendees( $attendeeManager->getEventAttendees( $event->getId() ) );\n \n\t\t$event->setPresenters( $presentersMapper->getEventPresenters( $event->getId() ) );\n\t\t$event->setCategories( $categoriesMapper->getEventCategories( $event->getId() ) );\n\n\t\t//Check if we have to set the event as closed or not. \n\t\t$today = strtotime( \\Maven\\Core\\MavenDateTime::getWPCurrentDateTime() );\n\n\t\t$eventRegistrationEndDate = strtotime( $event->getRegistrationEndDate() );\n\t\t$eventRegistrationEndTime = strtotime( $event->getRegistrationEndTime() );\n\t\t$currentTime = time();\n\n\t\tif ( $eventRegistrationEndDate < $today ) {\n\t\t\t$event->setClosed( true );\n\t\t} elseif ( $eventRegistrationEndDate == $today && $eventRegistrationEndTime > $currentTime ) {\n\t\t\t$event->setClosed( true );\n//\t\t\tvar_dump( date('G:i:s', $currentTime ) );\n//\t\t\tvar_dump( date('G:i:s',$eventRegistrationEndTime )) ;\n\t\t}\n\t\t\n\t\t$variationsManager = new VariationManager();\n\t\t\n\t\tif ($event->getId() && $event->isVariationsEnabled() ) {\n\t\t\t$event->setVariations( $variationsManager->getVariations( $event->getId() ) );\n\t\t}\n\n\t\treturn $event;\n\t}", "public function get_events() {\n\n $query = $this->db->query(\"SELECT event.id, event.title, event.details, event.timeStamp, event.image, event.userId, user.username FROM siyothlk.event JOIN user on event.userId = user.userId ORDER BY event.timeStamp DESC;\");\n\n if($query->num_rows()>0) {\n foreach ($query->result() as $row) {\n $data[] = $row;\n }\n return $data;\n }\n\n }", "private function getEventList() {\n //check if time is set in the URL\n if(isset($this->request->get['time'])) {\n $time = $this->request->get['time'];\n } else {\n $time = time();\n }\n \n $today = date(\"Y/n/j\", time());\n \n $current_month = date(\"n\", $time);\n \n $current_year = date(\"Y\", $time);\n \n $current_month_text = date(\"F Y\", $time);\n \n $total_days_of_current_month = date(\"t\", $time);\n \n $events = array();\n \n $filter_data = array();\n $filter_data['current_month'] = $current_month;\n $filter_data['current_year'] = $current_year;\n $filter_data['total_days_of_current_month'] = $total_days_of_current_month;\n \n //query the database for events between the first date of the month and the last date of month\n \t$results = $this->model_catalog_calendar->getEvents($filter_data, $_SESSION['store_code']);\n \n /*\n $result = mysql_query(\"SELECT DATE_FORMAT(eventDate,'%d') AS day,eventContent,eventTitle FROM eventcal WHERE eventDate BETWEEN '$current_year/$current_month/01' AND '$current_year/$current_month/$total_days_of_current_month'\");\n \n while($row_event = mysql_fetch_object($result))\n {\n //loading the $events array with evenTitle and eventContent wrapped with <span> and <li>. We will add them inside <ul> in later part\n $events[intval($row_event->day)] .= '<li><span class=\"title\">'.stripslashes($row_event->eventTitle).'</span><span class=\"desc\">'.stripslashes($row_event->eventContent).'</span></li>';\n }\n */\n\n $first_day_of_month = mktime(0,0,0,$current_month,1,$current_year);\n \n //geting Numeric representation for the first day of the month. 0 (for Sunday) through 6 (for Saturday).\n $first_w_of_month = date(\"w\", $first_day_of_month);\n \n //calculate how many rows will be in the calendar to show the dates\n $total_rows = ceil(($total_days_of_current_month + $first_w_of_month)/7);\n \n //trick to show empty cell in the first row if the month doesn't start from Sunday\n $day = -$first_w_of_month;\n \n $next_month = mktime(0,0,0,$current_month+1,1,$current_year);\n $next_month_text = date(\"F \\'y\", $next_month);\n \n $previous_month = mktime(0,0,0,$current_month-1,1,$current_year);\n $previous_month_text = date(\"F \\'y\", $previous_month);\n \n $next_year = mktime(0,0,0,$current_month,1,$current_year+1);\n $next_year_text = date(\"F \\'y\", $next_year);\n \n $previous_year = mktime(0,0,0,$current_month,1,$current_year-1);\n $previous_year_text = date(\"F \\'y\", $previous_year);\n \n $this->data['today'] = $today;\n $this->data['current_month'] = $current_month;\n $this->data['current_year'] = $current_year;\n $this->data['current_month_text'] = $current_month_text;\n $this->data['total_days_of_current_month'] = $total_days_of_current_month;\n $this->data['first_day_of_month'] = $first_day_of_month;;\n $this->data['first_w_of_month'] = $first_w_of_month;;\n $this->data['total_rows'] = $total_rows;;\n $this->data['day'] = $day;;\n $this->data['next_month'] = $next_month;;\n $this->data['next_month_text'] = $next_month_text;;\n $this->data['previous_month'] = $previous_month;;\n $this->data['previous_month_text'] = $previous_month_text;;\n $this->data['next_year'] = $next_year;;\n $this->data['next_year_text'] = $next_year_text;;\n $this->data['previous_year'] = $previous_year;;\n $this->data['previous_year_text'] = $previous_year_text;;\n $this->data['results'] = $results;\n $this->data['calendarurl'] = $this->url->http('information/calendar');\n //var_dump($results);\n\t\t//if ($results) {\n\t\t\t$this->document->title = $this->language->get('heading_title');\n\t\t\t$this->document->breadcrumbs[] = array(\n\t\t\t\t'href' => $this->url->http('information/calendar'),\n\t\t\t\t'text' => $this->language->get('heading_title'),\n\t\t\t\t'separator' => $this->language->get('text_separator')\n\t\t\t);\n\t\t\t$this->data['heading_title'] = $this->language->get('heading_title');\n\t\t\t/*$this->data['calendar_data'] = array();\n\t\t\tforeach ($this->model_catalog_calendar->getCalendar() as $result) {\n\t\t\t\t$this->data['calendar_data'][] = array(\n\t\t\t\t\t'title' => $result['title'],\n\t\t\t\t\t'start_date' => $result['start_date'],\n\t\t\t\t\t'href' => $this->url->http('information/calendar&calendar_id=' . $result['calendar_id'])\n\t\t\t\t);\n\t\t\t}*/\n\t\t\t$this->data['button_continue'] = $this->language->get('button_continue');\n\t\t\t$this->data['continue'] = $this->url->http('common/home');\n\t\t\t$this->id = 'content';\n\t\t\t$this->template = $this->config->get('config_template') . 'information/calendar.tpl';\n\t\t\t$this->layout = 'common/layout';\n\t\t\t$this->render();\n\t\t/*} else {\n\t\t\t$this->getError();\n\t\t}*/\n }", "public function eventId(): string;", "private function getEvent()\n {\n /*$this->webhook_input = '{\n \"update_id\": 344183053,\n \"message\": {\n \"message_id\": 3007,\n \"from\": {\n \"id\": 302497774,\n \"first_name\": \"Herwin\",\n \"language_code\": \"en-GB\"\n },\n \"chat\": {\n \"id\": -1001128531173,\n \"title\": \"LTM Group\",\n \"type\": \"supergroup\"\n },\n \"date\": 1500993429,\n \"text\": \"\\/party\",\n \"entities\": [\n {\n \"type\": \"bot_command\",\n \"offset\": 0,\n \"length\": 6\n }\n ]\n }\n}\n';*/\n if (defined(\"webhook_input\")) {\n $this->webhook_input = file_get_contents(webhook_input);\n } else {\n $this->webhook_input = file_get_contents(\"php://input\");\n }\n $this->event = json_decode($this->webhook_input, true);\n }", "public function get_single_event(Request $request){\n $dateObj = \\DateTime::createFromFormat('!m', $request->input('month'));\n $month = $dateObj->format('m');\n $dateObj = \\DateTime::createFromFormat('!d', $request->input('date'));\n $date = $dateObj->format('d');\n $event=Event::where(\\DB::raw('substr(event_date,1,5)'),'=',$month.'/'.$date)->get(); //Getting Event Date\n return response()->json(['month'=>$month, 'date'=>$date,'event'=>$event]);\n }", "function getEvent($year, $month, $day, $start = 0, $perpage = 10){\n\t\t$day = (strlen($day) == 1)? \"0$day\" : $day;\n\t\t$year = (strlen($month) == 1) ? \"$year-0$month-$day\" : \"$year-$month-$day\";\n\t\t\n\t\t\n\t\t$query = $this->db->select('@rownum := @rownum + 1 as rownum, idevent as id, jenis, akun, event, harga', false)->order_by('idevent')->get_where('event_detail', array('event_date' => $year));\n\t\tif($query->num_rows() > 0){\n\t\t\t$res = array();\n\t\t\tforeach($query->result_array() as $r){\n\t\t\t\t$res[] = array('no' => $r['rownum'], 'id' => $r['id'], 'jenis' => $r['jenis'], 'akun' => $r['akun'], 'event' => $r['event'], 'harga' => number_format($r['harga'], 0, ',', '.'));\n\t\t\t}\n\t\t\treturn $res;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "function getEventsOnDay($date) {\n\t\tlist($year,$month,$day) = explode(\"-\",$date);\n\t\t$paramStart = $year.'-'.$month.'-'.$day.' 00:00:00';\n\t\t$paramEnd = $year.'-'.$month.'-'.$day.' 23:59:59';\n\n\t\t$result = CalendarEvent::getEventsBetweenDates($paramStart,$paramEnd);\n\t\treturn $result;\n\t}", "public function testEventsGetByEventCode()\n {\n }", "function getOpenPublicEvents() {\n // -- CHANGE --\n // Only give events that are public and rank = RANK_STUDENT\n global $connection;\n \n return $connection->query(\" SELECT E.event_id, E.name, E.date, E.date_added, E.cost, E.time, E.type, E.erank, E.access, E.more_details, E.place, E.picture, E.postprocessing, \"\n .\"(SELECT COUNT(*) FROM tblStudentEvent SE WHERE SE.event_id = E.event_id) AS 'interested' \" \n .\" FROM tblEvent E WHERE erank <= 0 AND access='public' AND (CURDATE() < STR_TO_DATE(date, '%Y-%m-%d')) ORDER BY (STR_TO_DATE(E.date, '%Y-%m-%d')) ; \");\n}", "public function event_details($id){\n $this->db->select('*');\n $this->db->from('event');\n $this->db->where('event_id', $id);\n $query = $this->db->get();\n\n if ($query->num_rows() > 0){\n foreach ($query->result() as $row) {\n $response[] = $row;\n }\n return $response;\n }else{\n $response['error'] = 'Event Not Found';\n return $response;\n }\n }", "public function getEvent($eventId) {\n if (Event::where('id', $eventId)->exists()) {\n \n $event = Event::find($eventId);\n $event->ticket = Event::find($eventId)->ticket;\n return response(array(\n 'event' =>$event,\n ),200);\n } else {\n return response()->json([\n \"message\" => \"Event not found\"\n ], 404);\n }\n }", "function ncsulib_foundation_field__field_time__event($variables) {\n\t $output = '<h3>When</h3>';\n\t $items = $variables['element']['#items'];\n\n\t if(count($items) > 1){ //if multiple events\n\t $output.= '<p>';\n\t $dates = $variables['element']['#items'];\n\t foreach($dates as $key => $item){\n\t // kpr($item);\n\n\t $start_raw = strtotime($items[$key]['value'])+timezoneOffset(strtotime($items[0]['value']));\n\t $end_raw = strtotime($items[$key]['value2'])+timezoneOffset(strtotime($items[0]['value2']));\n\t $duration = $end_raw - $start_raw;\n\t $d_hour = floor($duration/60/60);\n\t $d_min = ($duration/60/60 - $d_hour)*60;\n\n\t $output .= '<time itemprop=\"startDate\" datetime=\"'.date('Y-m-d',$start_raw).'T'.date('G:i',$start_raw).'\">'.date('F j', $start_raw).'</time>';\n\t $output .= '<time itemprop=\"duration\" datetime=\"T'.$d_hour.'H'.$d_min.'M\"></time>';\n\t if(count($dates) > $key+1){\n\t $output .= ', ';\n\t } else{\n\t $output .= ', '.date('Y', $start_raw);\n\t }\n\t }\n\t $output .= '<br>';\n\t $output .= date('g:ia', $start_raw).' - '.date('g:ia', $end_raw);\n\t $output.= '</p>';\n\t } else{\n\t $start_raw = strtotime($items[0]['value'])+timezoneOffset(strtotime($items[0]['value']));\n\t $end_raw = strtotime($items[0]['value2'])+timezoneOffset(strtotime($items[0]['value2']));\n\t $duration = $end_raw - $start_raw;\n\t $d_hour = floor($duration/60/60);\n\t $d_min = ($duration/60/60 - $d_hour)*60;\n\n\t // if a one day or mult day event\n\t if(date('z', $start_raw) == date('z', $end_raw)){ //one day\n\t $output .= '<p>';\n\t $output .= '<time itemprop=\"startDate\" datetime=\"'.date('Y-m-d',$start_raw).'T'.date('G:i',$start_raw).'\">'.date('F j, Y', $start_raw).'</time>';\n\t $output .= '<br>';\n\t $output .= date('g:ia', $start_raw).' - '.date('g:ia', $end_raw);\n\t $output .= '<time itemprop=\"duration\" datetime=\"T'.$d_hour.'H'.$d_min.'M\"></time>';\n\t $output .= '</p>';\n\t } else{ //mult day\n\t $output .= '<p>';\n\t $output .= '<time itemprop=\"startDate\" datetime=\"'.date('Y-m-d',$start_raw).'T'.date('G:i',$start_raw).'\">'.date('F j', $start_raw).' - '.date('F j, Y', $end_raw).'</time>';\n\t $output .= '<br>';\n\t $output .= date('g:ia', $start_raw).' - '.date('g:ia', $end_raw);\n\t $output .= '<time itemprop=\"duration\" datetime=\"T'.$d_hour.'H'.$d_min.'M\"></time>';\n\t $output .= '</p>';\n\t }\n\n\t $output .= '';\n\t }\n\n\t return $output;\n\t}", "private function fetchEvents() {\n\t\t$this->events = Event::find(array('club'=>$this->ID));\n\t\t\n\t}", "public function getICalEvent($event) {\n $id = $event['id'];\n $calId = $event['cal_id'];\n\n $startDate = $event['start_date'];\n $startTime = $event['start_time'];\n $endDate = $event['end_date'];\n $endTime = $event['end_time'];\n\n $title = $event['title'];\n $location = $event['location'];\n $description = $event['description'];\n\n $createdOn = $event['created_on'];\n $createdOnTs = strtotime($createdOn);\n $modifiedOn = ($event['updated_on'] == null) ? $createdOn : $event['updated_on'];\n $modifiedOnTs = strtotime($modifiedOn);\n\n $privacy = $event['public'] == 1 ? 'PUBLIC' : 'PRIVATE';\n\n //begin VEVENT\n $ical = \"BEGIN:VEVENT\\r\\n\";\n\n //event start date, end date\n //DTSTART, DTEND (exact UTC time for standard | all-day | multi-day)\n if (($startTime != '00:00') && ($endTime != '00:00')) {\n //DTSTART\n list($year, $month, $day) = explode('-', $startDate);\n list($hour, $min) = explode(':', $startTime);\n $startTs = mktime($hour, $min, 0, $month, $day, $year) - $this->_timeDiff;\n\n $startDate = date('Ymd', $startTs) . 'T' . date('His', $startTs) . 'Z';\n\n //DTEND\n list($year, $month, $day) = explode('-', $endDate);\n list($hour, $min) = explode(':', $endTime);\n $endTs = mktime($hour, $min, 0, $month, $day, $year) - $this->_timeDiff;\n\n $endDate = date('Ymd', $endTs) . 'T' . date('His', $endTs) . 'Z';\n\n $ical .= \"DTSTART:{$startDate}\\r\\n\";\n $ical .= \"DTEND:{$endDate}\\r\\n\";\n\n //DTSTART, DTEND (all-day | multi-day)\n } else {\n $startTs = strtotime($startDate);\n $endTs = strtotime($endDate);\n $startDate = date('Ymd', $startTs);\n $endDate = date('Ymd', strtotime('+1 day', $endTs));\n\n $ical .= \"DTSTART;VALUE=DATE:{$startDate}\\r\\n\";\n $ical .= \"DTEND;VALUE=DATE:{$endDate}\\r\\n\";\n }\n\n //event unique id\n $uid = md5($calId . '-' . $id);\n $ical .= \"UID:$uid@smartphpcalendar.com\\r\\n\";\n\n //privacy\n $ical .= \"CLASS:{$privacy}\\r\\n\";\n\n //event title\n $ical .= \"SUMMARY:{$title}\\r\\n\";\n\n //event location\n $ical .= \"LOCATION:{$location}\\r\\n\";\n\n //event description\n $description = preg_replace(\"/\\\\n|\\\\r|\\\\r\\\\n/\", \"\\n\", $description);\n $ical .= \"DESCRIPTION:{$description}\\r\\n\";\n\n //event repeating info\n $ical .= $this->getIcalEventRepeatInfo($event) . \"\\r\\n\";\n\n //create-time\n $ical .= \"CREATED:\" . date('Ymd', $createdOnTs) . 'T' . date('His', $createdOnTs) . 'Z' . \"\\r\\n\";\n\n //modify-time\n $ical .= \"LAST-MODIFIED:\" . date('Ymd', $modifiedOnTs) . 'T' . date('His', $modifiedOnTs) . 'Z' . \"\\r\\n\";\n\n //invitation-participants\n if ($event['invitation'] == 1) {\n $ical .= $this->getIcalEventParticipants($id);\n }\n\n //end VEVENT\n $ical .= \"END:VEVENT\";\n\n return $ical;\n }", "public function getEvent($eventID) {\r\n\t\t$result = $this->mysqli->prepare ( 'SELECT * FROM c4_event where event_id =?' );\r\n\t\tif ($result) {\r\n\t\t\t$result->bind_param ( 'i', $eventID );\r\n\t\t\t//var_dump($result);\r\n\t\t\t$result->execute ();\r\n\t\t\t//$count = $result->num_rows;\r\n\t\t\t$result->bind_result ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t//printf(\"\\n %s \\n\",$userID);\r\n\t\t\t$result->fetch ();\r\n\t\t\t$event = new Event ($eventID,$eventName,$eventCreator,$eventStartTime,\r\n $eventEndTime,$eventIntro,$eventPublic,$eventFlag,$eventApproved);\r\n\t\t\t$result->close ();\r\n\t\t\treturn $event;\r\n\t\t\r\n\t\t}\r\n\t}", "public function getEventDetailsById($event_id) {\n return Event::findOrFail($event_id);\n }", "function getEventFromEventID($eventid)\n{\n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\n\t$data= array();\t\n\t\n\t$qry=\"SELECT entrp_events.*,entrp_event_categories.category_name \n\t\t\tFROM entrp_events \n\t\t\tLEFT JOIN entrp_event_categories ON entrp_events.category=entrp_event_categories.id\n\t\t WHERE entrp_events.id=\".$eventid.\"\n\t\t\t\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n \t{\n \t\t$data['id']\t\t\t\t=\t$row['id'];\n \t\t$data['name']\t\t\t=\t$row['eventName'];\n \t\t$data['address']\t\t=\t$row['address'];\n \t\t\n\n \t\t$data['date']\t\t\t=\t$row['event_date'];\n \t\t$data['startTime']\t=\t$row['start_time'];\n \t\t$data['endTime']\t\t=\t$row['end_time'];\n \t\t$data['clientid']\t\t=\t$row['clientid'];\n \t\tif($row['poster']!='')\n \t\t{\n \t\t\t$data['poster']\t=\t$row['poster'];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$data['poster']\t=\t$events_default;\n \t\t}\n \t\t$data['about']\t\t\t=\t$row['description'];\n \t\t$data['category']\t\t=\t$row['category_name'];\n \t\t$data['map']['center']['latitude']\t\t=\t$row['location_lat'];\n\t\t\t$data['map']['center']['longitude']\t\t=\t$row['location_long'];\n\t\t\t$data['map']['zoom']\t=\t8;\n\t\t\t\n\t\t\t// newly fetched info starts\n\t\t\t$data['city']\t\t\t\t=\t$row['city'];\n\t\t\t$data['added_by']\t\t\t=\t$row['added_by'];\n\t\t\t$data['added_on']\t\t\t=\t$row['added_on'];\n\t\t\t$data['status']\t\t\t=\t$row['status'];\n\t\t\t$data['read_only']\t\t=\t$row['read_only'];\n\t\t\t$data['eventTagId']\t\t=\t$row['eventTagId'];\n\t\t\t// newly fetched info ends\n \t}\n\t\t\n\t\t$data['attendees']=getEventAttendeesFromEventID($eventid);\n\t}\n\telse\n\t{\n\t\t$data['id']\t\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['name']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['address']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['map']['center']['latitude']\t\t=\t'';\n\t\t$data['map']['center']['longitude']\t\t=\t'';\n\t\t$data['map']['zoom']\t\t\t\t\t\t\t=\t8;\n\t\t$data['date']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['startTime']\t\t\t\t\t\t\t=\t'';\n\t\t$data['endTime']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['eventPhoto']\t\t\t\t\t\t\t=\t'';\n\t\t$data['poster']\t\t\t\t\t\t\t\t=\t'';\n\t\t$data['about']\t\t\t\t\t\t\t\t\t=\t'';\n \t$data['category']\t\t\t\t\t\t\t\t=\t'';\n \t\n \t$data['description']\t\t=\t'';\n\t\t$data['city']\t\t\t\t=\t'';\n\t\t$data['added_by']\t\t\t=\t'';\n\t\t$data['added_on']\t\t\t=\t'';\n\t\t$data['status']\t\t\t=\t'';\n\t\t$data['read_only']\t\t=\t'';\n\t\t$data['eventTagId']\t\t=\t'';\n\t}\n\treturn $data;\n\n\t\t\n\n}", "function fetch_events(){\r\n\tglobal $link;\r\n\t$events = [];\r\n\t$sql = \"SELECT * FROM events\";\r\n\t$query = mysqli_query($link, $sql);\r\n\tif ($query) {\r\n\t\twhile ($row = mysqli_fetch_assoc($query)) {\r\n\t\t\t$events[] = $row;\r\n\t\t}\r\n\t\treturn $events;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "function getEvents($eventType) {\n $temp = $wp_query; $wp_query= null;\n $args = array('&paged='.$paged, 'posts_per_page' => -1, 'meta_key' => 'startdatum', 'orderby' => 'meta_value', 'order' => 'ASC', 'post_type' => 'aktiviteter', 'meta_query' => array(\n array(\n 'key' => 'engangsforetelse_eller_aterkommande_aktivitet',\n 'value' => $eventType,\n 'compare' => 'EXISTS',\n ),\n ),);\n $wp_query = new WP_Query($args);\n\n $eventExists = false;\n $eventThisWeek = false;\n $eventThisMonth = false;\n $eventLater = false;\n\n $posts = get_posts( $args );\n $dateToday = new DateTime(date(Y.m.d));\n $weekToday = $dateToday->format(\"W\");\n\n while ($wp_query->have_posts()) : \n $wp_query->the_post();\n $eventTypeForThisFront = get_field('engangsforetelse_eller_aterkommande_aktivitet');\n $thisEndDate = get_field('slutdatum');\n $startDate = strtotime(get_field('startdatum'));\n $todaysDate = date(Y.m.d);\n $dateTest = new DateTime(get_field('startdatum'));\n $weekTest = $dateTest->format(\"W\");\n $thisStartDate = get_field('startdatum');\n\n if(($eventTypeForThisFront == \"engangsforeteelse\" && $thisStartDate >= $todaysDate) || ($eventTypeForThisFront == \"aterkommande\" && $thisStartDate <= $todaysDate && $thisEndDate >= $todaysDate) ) :\n $thisEndDate =strtotime($thisEndDate);\n if ($thisStartDate <= strtotime('30 days') && $eventThisMonth == false) :\n if ($weekToday == $weekTest && $eventThisWeek == false):\n echo \"<h2>Den här veckan:</h2>\";\n $eventThisWeek = true;\n elseif($weekToday !== $weekTest) :\n echo \"<h2>Kommande månaden:</h2>\";\n $eventThisMonth = true;\n endif;\n elseif(strtotime($thisStartDate) > strtotime('30 days') && $eventLater == false) :\n if($eventThisMonth == true || $eventThisWeek == true):\n $eventLater = true;\n echo \"<h2>Senare:</h2>\";\n endif;\n endif;\n?>\n <div class = frontEvent>\n <div class=\"frontEvent-date\">\n <?php if(($thisEndDate && $startDate === $thisEndDate) || !$thisEndDate ) : ?>\n <p>\n <?php echo date_i18n(\"j\", $startDate);?>\n <?php echo strtoupper(date_i18n(\"M\", $startDate));?>\n <br>\n <?php echo date_i18n(\"D\", $startDate);?>\n </p>\n <?php else:?>\n <p>\n <?php \n echo date_i18n(\"j\", $startDate);?>-<?php echo date_i18n(\"j\", $thisEndDate);\n if(date_i18n(\"M\", $startDate) !== date_i18n(\"M\", $thisEndDate)) :\n echo strtoupper(date_i18n(\"M\", $startDate));?>-<?php echo strtoupper(date_i18n(\"M\", $thisEndDate));\n else :\n echo strtoupper(date_i18n(\"M\", $startDate));\n endif;\n ?>\n <br>\n <?php echo date_i18n(\"D\", $startDate);?>-<?php echo date_i18n(\"D\", $thisEndDate);?>\n </p>\n <?php endif; ?>\n </div>\n <div class =\"frontEvent-content\">\n <h2>\n <a href=\"<?php the_permalink(); ?>\" title=\"Read more\">\n <?php the_title(); ?>\n </a>\n </h2>\n <?php\n if (strtotime($thisStartDate) < strtotime('30 days') && $eventTypeForThisFront == \"engangsforeteelse\") :\n if($weekToday == $weekTest) :\n echo (\"Den här veckan!\");\n else :\n echo (\"Inom en månad!\");\n endif;\n endif;\n the_excerpt();\n ?>\n </div>\n <button class=\"frontEvent-readMore\" onclick=\"location.href='<?php the_permalink() ?>';\">Mer info</button>\n </div>\n <hr>\n<?php\n $eventExists = true;\n endif;\n endwhile;\n if($eventExists == false) :\n echo \"<div class='frontEvent-warning'><p><strong>Det finns tyvärr inga inplanerade aktiviteter för tillfället.</strong> <br/><br/> Följ vårat nyhetsbrev (?) för att få uppdateringar när vi lägger upp nya aktiviteter!</p></div>\"; \n endif;\n }", "function read_events($params)\n {\n $url = self::API_ROOT_URL . \"/\" . self::API_VERSION . \"/events?tzid=\" . urlencode($params['tzid']);\n if (!empty($params['from'])) {\n $url.=\"&from=\" . $params['from'];\n }\n if (!empty($params['to'])) {\n $url.=\"&to=\" . $params['to'];\n }\n if (!empty($params['include_deleted'])) {\n $url.=\"&include_deleted=\" . $params['include_deleted'];\n }\n if (!empty($params['include_moved'])) {\n $url.=\"&include_moved=\" . $params['include_moved'];\n }\n if (!empty($params['last_modified'])) {\n $url.=\"&last_modified=\" . $params['last_modified'];\n }\n if (!empty($params['include_managed'])) {\n $url.=\"&include_managed=\" . $params['include_managed'];\n }\n if (!empty($params['only_managed'])) {\n $url.=\"&only_managed=\" . $params['only_managed'];\n }\n if (!empty($params['localized_times'])) {\n $url.=\"&localized_times=\" . $params['localized_times'];\n }\n if (!empty($params['calendar_ids'])) {\n foreach ($params['calendar_ids'] as $calendar_id) {\n $url.=\"&calendar_ids[]=\" . $calendar_id;\n }\n }\n\n $headers = array();\n $headers[] = 'Authorization: Bearer ' . $this->access_token;\n $headers[] = 'Host: api.cronofy.com';\n\n $result = $this->http_get($url, $headers);\n $result = json_decode($result, true);\n\n return $result;\n }", "function getPublicEvents() {\n // -- CHANGE --\n // Only give events that are public and rank = RANK_STUDENT\n global $connection;\n \n return $connection->query(\" SELECT E.event_id, E.name, E.date, E.date_added, E.cost, E.time, E.type, E.erank, E.access, E.more_details, E.place, E.picture, E.postprocessing, \"\n .\"(SELECT COUNT(*) FROM tblStudentEvent SE WHERE SE.event_id = E.event_id) AS 'interested' \" \n .\" FROM tblEvent E WHERE erank <= 0 AND access='public' AND ( YEAR(E.date) >= YEAR(CURDATE()) ) ORDER BY (STR_TO_DATE(E.date, '%Y-%m-%d')) ; \");\n}", "public function getItemEvent($params)\n { \n if(count($params) != 1 || !(int)$params[0]>0)\n return ['status'=>400, 'clientCode'=>'0001'];\n else\n {\n $model = new EventModel();\n return $model->selectAssoc(\n [\n 'start_event', \n 'end_event', \n 'user_id',\n 'fullname', \n 'description',\n 'room_id',\n 'data_create', \n 'parent_event_id', \n 'is_repeat'\n ],\n false,\n ' JOIN userBooker on userBooker.id = eventBooker.user_id ',\n \"eventBooker.id = :id\", \n ['id'=>$params[0]]\n );\n }\n }", "public function getEvent($name);", "public function getDataEvent($params)\n {\n if(count($params) != 3)\n return ['status'=>400, 'clientCode'=>'0001'];\n\n $cur_month = $params[1];\n $next_month = (new DateTime())->setTimestamp($cur_month)->modify('+1 month')->getTimestamp();\n \n $model = new EventModel();\n $data = $model->selectAssoc(\n ['start_event', 'end_event', 'id', 'start_event_format', 'end_event_format'], \n true, null,\n \"start_event >= :cur_month AND end_event < :next_month AND room_id = :room_id\",\n ['cur_month'=>$cur_month,'next_month'=>$next_month, 'room_id'=>$params[0]],\n \"start_event ASC\");\n //if events exists\n if(count($data['data']) != 0)\n { \n $data_new = [];\n $days = [];\n \n $i = 0; \n foreach($data['data'] as $key=>$val) \n {\n $data_new[$i]= [\n 'day'=>(int) date('d',$val['start_event']),\n 'event'=>[\n 'start_event'=>(new DateTime())->setTimestamp($val['start_event'])->format('H:i'),\n 'end_event'=>(new DateTime())->setTimestamp($val['end_event'])->format('H:i'),\n 'start_event_12'=>(new DateTime())->setTimestamp($val['start_event'])->format('h:i A'),\n 'end_event_12'=>(new DateTime())->setTimestamp($val['end_event'])->format('h:i A'),\n 'id'=>$val['id']\n ]\n ];\n $i++;\n }\n $events = [];\n $events[] = ['day'=> 0, 'day_events'=> []];\n for($i = 1; $i <= $params[2]; $i++) \n {\n $temp = [];\n foreach ($data_new as $key => $val) \n {\n if($data_new[$key]['day'] == $i)\n array_push($temp, $val['event']);\n }\n $events[] = ['day'=> $i, 'day_events'=> $temp];\n }\n }\n else\n {\n $events = [];\n $events[] = ['day'=> 0, 'day_events'=> []];\n for($i = 1; $i <= $params[2]; $i++)\n {\n $events[] = ['day'=> $i, 'day_events'=> []];\n }\n }\n return ['status'=>200, 'data'=>$events];\n }", "function ical_events_feed() \n{\n $ical_events = array();\n \n // If the 'of' querystring doesn't specify events only\n if ( $_GET['of'] != 'events')\n {\n // Load fixtures from Wordpress\n $fixtures = new WP_Query( array('post_type' => 'fixture',\n 'posts_per_page' => -1,\n 'orderby' => 'meta_value', \n 'meta_key' => 'fixture-date', \n 'order' => 'DESC') );\n \n // Loop through each one\n while ($fixtures -> have_posts()) \n {\n $fixtures -> the_post();\n \n $kickOff = timestamp_from_time_date(get_post_meta(get_the_id(), 'fixture-date', true), get_post_meta(get_the_id(), 'fixture-kickoff-time', true));;\n $playerArrival = timestamp_from_time_date(get_post_meta(get_the_id(), 'fixture-date', true), get_post_meta(get_the_id(), 'fixture-player-arrival-time', true));\n \n // Does the user want fixtures to be set at arrival time or kickoff time?\n $dtstart = ( $_GET['fixtureTime'] == 'kickoff' ) ? $kickOff : $playerArrival; \n \n // End time is 100 minutes later\n $dtend = $kickOff + 6000;\n \n // Store in array using the correct format\n $event = array('UID' => md5(get_the_id()) . \"@bisonsrfc.co.uk\",\n 'DTSTART;TZID=Europe/London' => format_timestamp($dtstart), \n 'DTEND;TZID=Europe/London' => format_timestamp($dtend),\n 'CREATED' => get_the_time('Ymd\\THis'), \n 'SUMMARY' => ical_text_escape( html_entity_decode ( get_the_title(), ENT_QUOTES, 'UTF-8' ) ),\n 'DESCRIPTION' => 'This is a Bisons fixture. Follow the URL for more details, or ask a committee member...',\n 'URL' => get_the_permalink()\n );\n \n // If modified date is different to post date, add to array\n if (get_the_modified_date() != get_the_time())\n $event['LAST-MODIFIED'] = get_the_modified_date('Ymd\\THis');\n \n // Add in the location if there is one\n if ($location = get_post_meta(get_the_id(), 'fixture-address', true))\n $event['LOCATION'] = ical_text_escape ($location);\n \n // Add array to master array\n array_push($ical_events, $event);\n }\n }\n\n if ( $_GET['of'] != 'fixtures')\n {\n // Load all events from Wordpress database\n $events = new WP_Query( array('post_type' => 'event', \n 'posts_per_page' => -1,\n 'orderby' => 'meta_value', \n 'meta_key' => 'date', \n 'order' => 'DESC', ));\n \n \n // Loop through each one\n while ($events -> have_posts()) \n {\n $events -> the_post();\n \n // Get start and date from \n $startDate = get_post_meta(get_the_id(), 'date', true);\n $endDate = get_post_meta(get_the_id(), 'enddate', true) ? $endDate = get_post_meta(get_the_id(), 'enddate', true) : $startDate;\n \n // All day events\n if ( get_post_meta(get_the_id(), 'allDay', true) )\n {\n $startDate = format_datestamp( $startDate );\n $endDate = format_datestamp( $endDate );\n $microsoft = array (\n 'X-MICROSOFT-CDO-ALLDAYEVENT' => 'TRUE',\n 'X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT' => 'TRUE'\n );\n }\n \n // Timed events\n else\n {\n $startDate = format_timestamp ( timestamp_from_time_date($startDate, get_post_meta(get_the_id(), 'time', true) ) );\n $endDate = format_timestamp ( timestamp_from_time_date($endDate, get_post_meta(get_the_id(), 'endtime', true) ) );\n }\n \n // Store in array\n $event = array('UID' => md5(get_the_id()) . \"@bisonsrfc.co.uk\", \n 'DTSTART;TZID=Europe/London' => $startDate, \n 'DTEND;TZID=Europe/London' => $endDate, \n 'CREATED' => get_the_time('Ymd\\THis'), \n 'SUMMARY' => ical_text_escape( html_entity_decode (get_the_title(), ENT_QUOTES, 'UTF-8' ) ), \n 'DESCRIPTION' => ical_text_escape ( html_entity_decode ( wp_strip_all_tags( get_the_content(), ENT_QUOTES, 'UTF-8' ) ) ), \n 'URL' => get_the_permalink()\n );\n \n if ( isset ( $microsoft ) )\n array_merge( $event, $microsoft );\n \n // Add in the location if there is one\n if ($location = get_post_meta(get_the_id(), 'address', true))\n $event['LOCATION'] = ical_text_escape ( $location );\n \n // If modified date is different to post date, add to array\n if (get_the_modified_date() != get_the_time())\n $event['LAST-MODIFIED'] = get_the_modified_date('Ymd\\THis');\n \n // Add array to master array\n array_push($ical_events, $event);\n }\n }\n\n // Start output\n $output = \"BEGIN:VCALENDAR\\r\\n\" \n . \"METHOD:PUBLISH\\r\\n\" \n . \"VERSION:2.0\\r\\n\" \n . \"PRODID:-//Bisons RFC.co.uk//Events Calendar//EN\\r\\n\"\n \n // Set timezone\n . \"BEGIN:VTIMEZONE\\r\\n\"\n . \"TZID:Europe/London\\r\\n\"\n . \"BEGIN:DAYLIGHT\\r\\n\" \n . \"TZOFFSETFROM:+0000\\r\\n\"\n . \"RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\\r\\n\"\n . \"DTSTART:19810329T010000\\r\\n\"\n . \"TZNAME:GMT+01:00\\r\\n\"\n . \"TZOFFSETTO:+0100\\r\\n\"\n . \"END:DAYLIGHT\\r\\n\"\n . \"BEGIN:STANDARD\\r\\n\"\n . \"TZOFFSETFROM:+0100\\r\\n\"\n . \"RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\\r\\n\"\n . \"DTSTART:19961027T020000\\r\\n\"\n . \"TZNAME:GMT\\r\\n\"\n . \"TZOFFSETTO:+0000\\r\\n\"\n . \"END:STANDARD\\r\\n\"\n . \"END:VTIMEZONE\\r\\n\";\n \n // Loop through each event\n foreach ($ical_events as $event) \n {\n // Start event\n $output .= \"BEGIN:VEVENT\\r\\n\";\n\n // Loop through each key\n foreach ($event as $key => $value) \n {\n if (is_string($key))\n $output .= \"$key:$value\\r\\n\";\n else\n $output = \"$value\\r\\n\";\n }\n\n // Close event\n $output .= \"END:VEVENT\\r\\n\";\n }\n\n // Close calendar\n $output .= \"END:VCALENDAR\\r\\n\";\n\n // Set the correct headers\n header('Content-type: text/calendar; charset=utf-8');\n header('Content-Disposition: inline; filename=calendar.ics');\n\n echo $output;\n}", "public abstract function getEvents();", "function event_meta_view()\n{\n global $wpdb;\n\n $today = date('Y-m-d', time());\n\n $event = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . EVENTS_TABLE_EVENTS . ' WHERE post_ID= %s', $_GET['post']));\n\n $event_venues = $wpdb->get_results('SELECT * FROM ' . EVENTS_TABLE_VENUES);\n\n include_once(dirname(__FILE__) . '/views/admin_event_meta.php');\n}", "public function getEvents()\n {\n $sth = $this->db->query(\"SELECT e.id, u.login, u.id as id_user, r.id as room_id, r.name as room_name, \n description, time_start as start, time_end as end, parent, time_create\n FROM booker_events as e\n LEFT JOIN booker_users AS u ON e.user_id = u.id\n LEFT JOIN booker_rooms AS r ON e.room_id = r.id\n ORDER BY time_start ASC\");\n\n if ($sth)\n {\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $this->getResponse($result, 200);\n }\n else\n return $this->getResponse(ERR_003, 404);\n }", "function rt_topEvent(){\n\t\tglobal $dB1;\n\t\t$events = $dB1->query_fetch(\"SELECT * FROM news WHERE status = 1 ORDER BY news_id DESC LIMIT 6 \");\n\t\tif(is_array($events)) {\n\t\t\treturn $events;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\t\n\t}", "public function get_events( $term ) {\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\treturn $wpdb->get_results( \"SELECT e.id AS value, CONCAT(e.name, ' (', ec.name, ', ', date_format(e.date,'%d/%m/%y'), ')') AS label\n\t\t\tFROM $this->EVENT_TABLE e\n\t\t\tLEFT JOIN $this->EVENT_CAT_TABLE ec ON e.event_cat_id = ec.id\n\t\t\tWHERE LOWER(e.name) LIKE '%$term%' ORDER BY e.date DESC LIMIT 15\" );\n\t\t}", "public function testEventsCalendarGetByEventId()\n {\n }", "public function find($event_id);", "public function events($atts){\n\textract(shortcode_atts(array('when' => 'upcoming'), $atts));\n\tif($when=='archive'){$when='archive';}else{$when='upcoming';}\n\t$event = new Event;\n\tif(isset($_GET['id'])){ // Display single event\n\t\t$event->put(array('id'=>$_GET['id']));\n\t\t$event->get(array('status'=>$event->statusCode['approved']));\n\t\t//does event have image?\n\t\t$args = array(\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'attachment',\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'eom_event_id',\n\t\t\t\t\t'value' => $event->id,\n\t\t\t\t\t//'type' => 'NUMERIC'\n\t\t)));\n\t\t$query = new WP_Query( $args );\n\t\tif(isset($query->post->ID)){\n\t\t\t$attach_id = $query->post->ID;\n\t\t}else{\n\t\t\t$attach_id = false;\n\t\t}\n\t\t$r = '<div class=\"eom_single_event\">';\n\t\tif($event->image){$r.='<img src=\"'.esc_url($event->image).'\" class=\"eom_image\" />';} //depricated\n\t\t$r.= wp_get_attachment_image( $attach_id, 'large', false ,array('class' => 'eom_image'));\n\t\t\n\t\t$r.= '<h1>'.esc_html($event->name).'</h1>';\n\t\t$r.= '<div class=\"eom_date\">'.date(\"F jS Y - g:ia\",strtotime($event->dateStart)).'</div>';\n\t\t$r.= '<div class=\"eom_venue\">'.__('at','event-o-matic').' <a href=\"#eomAddress\">'.esc_html($event->venueName).'</a></div>';\n\t\tif($event->price!=0.00){$r.='<div class=\"eom_price\"><strong>'.__('Price of attendance:','event-o-matic').'</strong> '.$event->price.'</div>';}\n\t\t$r.= '<p>'.$event->description.'</p>';\n\t\tif($event->url){\n\t\t\t$r.='<p><a href=\"'.esc_url($event->url).'\" target=\"_blank\" />'.__('Event Website', 'event-o-matic').'</a></p>';\n\t\t}\n\t\t$r.='<div class=\"eom_single_map\"><a name=\"eomAddress\"></a>';\n\t\t$r.= '<p><strong>'.esc_html($event->venueName).'</strong><br />'.esc_html($event->venueAddress).'</p>';\n\t\t$r.= '<a href=\"https://maps.google.com/maps?q='.urlencode($event->venueAddress).'&hl=en&sll='.$event->venueLat.','.$event->venueLon.'t=w&hnear='.urlencode($event->venueAddress).'&z=17\" target=\"_blank\">\n\t\t<img src =\"http://maps.googleapis.com/maps/api/staticmap?zoom=13&size='.$this->map_dimentions['w'].'x'.$this->map_dimentions['h'].'&maptype=roadmap\n&markers=color:blue%7C%7C'.$event->venueLat.','.$event->venueLon.'&sensor=false&\" /></a></div>';\n\t\t$r.= '<p><a href=\"?eom_ical='.$event->id.'\" class=\"eom_ical\">'.__('Save event to my calendar', 'event-o-matic').'</a></p>';\n\t\t$r.= '</div>';\n\t\treturn $r;\n\t}else{ // Display event list\n\t\t$p = new pagination;\n\t\t$count = $event->get_count(array('status'=>$event->statusCode['approved'],'when'=>$when));\n\t\t$p->items($count); //get all records as count\n\t\t$p->limit(30); // Limit entries per page\n\t\tif(isset($_GET['paging'])){$p->currentPage($_GET['paging']);} // Gets and validates the current page\n\t\t$p->calculate(); // Calculates what to show\n\t\t$p->parameterName('paging');\n\t\tif(!isset($_GET['paging'])){ $p->page=1; }else{ $p->page=$_GET['paging']; }\n\t\tif(get_option('eom_event_paginate')=='true'){\n\t\t\t$limit = ($p->page - 1) * $p->limit.\", \".$p->limit; //Query for limit paging\n\t\t}else{\n\t\t\t$limit = 1000;\n\t\t}\n\t\t$events=$event->getAll(array('status'=>$event->statusCode['approved'],'limit'=>$limit,'when'=>$when,'order'=>'dateStart ASC'));\n\t\tif( $count > 0 ): \n\t\t\t$r='<p class=\"events_count\">'.$count.' '.$when.' '.__('events','event-o-matic').'.</p>';\n\t\t\tif(get_option('eom_event_paginate')=='true'){ //only show pagination if selected\n\t\t\t\t$r.='<div class=\"tablenav\"><div class=\"tablenav-pages\">'.$p->getOutput().'</div></div>';\n\t\t\t}\n\t\t\t$r.='<div class=\"eom_event_list\">';\n\t\t\tforeach($events as $event){ //individual events\n\t\t\t\t//does event have image?\n\t\t\t\t$args = array('post_status' => 'inherit', 'post_type' => 'attachment', 'meta_query' => array(\n\t\t\t\tarray(\t'key' => 'eom_event_id',\n\t\t\t\t\t\t'value' => $event['id'])));\n\t\t\t\t$img_query = new WP_Query( $args );\n\t\t\t\tif(isset($img_query->post->ID)){\n\t\t\t\t\t$attach_id = $img_query->post->ID;\n\t\t\t\t}else{\n\t\t\t\t\t$attach_id=false;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif($event['preferred']){$r.= '<div class=\"eom_event preferred_event\">';}else{$r.= '<div class=\"eom_event\">';}\n\t\t\t\tif((get_option('eom_image_display')=='true') && ($event['image'])){ // Display image\n\t\t\t\t\t$r.='<a href=\"'.add_query_arg(array('id'=>$event['id'],'vid'=>$event['venueId'])).'\"><img src=\"'.esc_url($event['image']).'\" class=\"eom_image_thumbnail\" /></a>';\n\t\t\t\t}\n\t\t\t\tif((get_option('eom_image_display') == 'true' ) && $attach_id){\n\t\t\t\t\t$r.='<a href=\"'.add_query_arg(array('id'=>$event['id'],'vid'=>$event['venueId'])).'\">';\n\t\t\t\t\t$r.= wp_get_attachment_image( $attach_id, 'thumbnail', false );\n\t\t\t\t\t$r.='</a>';\n\t\t\t\t}\n\t\t\t\t$r.= '<h1><a href=\"'.add_query_arg(array('id'=>$event['id'],'vid'=>$event['venueId'])).'\">'.esc_html($event['name']).'</a></h1>';\n\t\t\t\t$r.= '<div class=\"eom_date\">'.date(\"F jS Y\",strtotime($event['dateStart'])).'</div>';\n\t\t\t\t$r.= '<div class=\"eom_venue\">'.esc_html($event['venueName']).'</div>';\n\t\t\t\tif($event['price']!=0.00){$r.='<div class=\"eom_price\"><strong>'.__('Price of attendance:','event-o-matic').'</strong> '.$event['price'].'</div>';}\n\t\t\t\t$r.= '<p>'.substr($event['description'],0,200).'...</p></div>';\n\t\t\t}\n\t\t\t$r.='</div>';\n\t\t\tif(get_option('eom_event_paginate')=='true'){\n\t\t\t\t$r.='<div class=\"tablenav\"><div class=\"tablenav-pages\">'.$p->getOutput().'</div></div>';\n\t\t\t}\n\t\t\tif($when=='upcoming'){\n\t\t\t\t$r.='<p><a href=\"?eom_ical=upcoming\" class=\"eom_ical\">'.__('Save events to my calendar','event-o-matic').'</a></p>';\n\t\t\t}\n\t\t\t$r .= $this->link_love();\n\t\t\treturn $r;\n\t\telse:\n\t\t\treturn '<p>'.__('No events available.','event-o-matic').'</p>';\n\t\tendif;\t\n\t}\n}", "public function getEventInfo($eventReferenceNumber) {\n $db_conn = $this->connect();\n $eventReferenceNumber = $this->sanitizeInput($eventReferenceNumber, $db_conn);\n $sql = \"SELECT * FROM EVENT WHERE EventReferenceNumber = $eventReferenceNumber\";\n $result = $db_conn->query($sql);\n if (!$result) $this->logError($db_conn, \"getEventInfo was unable to retrieve information on an event: \");\n $db_conn->close();\n return $result;\n }", "function getEventsAction() {\n\n //GET EVENT TABLE\n $siteeventTable = Engine_Api::_()->getDbtable('events', 'siteevent');\n $siteeventTableName = $siteeventTable->info('name');\n\n //MAKE QUERY\n $select = $siteeventTable->select()\n ->where('title LIKE ? ', '%' . $this->_getParam('text') . '%')\n ->where($siteeventTableName . '.closed = ?', '0')\n ->where($siteeventTableName . '.approved = ?', '1')\n ->where($siteeventTableName . '.draft = ?', '0')\n ->where($siteeventTableName . '.search = ?', '1')\n ->order('title ASC')\n ->limit($this->_getParam('limit', 40));\n\n //FETCH RESULTS\n $usersiteevents = $siteeventTable->fetchAll($select);\n $data = array();\n $mode = $this->_getParam('struct');\n\n if ($mode == 'text') {\n foreach ($usersiteevents as $usersiteevent) {\n $content_photo = $this->view->itemPhoto($usersiteevent, 'thumb.icon');\n $data[] = array(\n 'id' => $usersiteevent->event_id,\n 'label' => $usersiteevent->title,\n 'photo' => $content_photo\n );\n }\n } else {\n foreach ($usersiteevents as $usersiteevent) {\n $content_photo = $this->view->itemPhoto($usersiteevent, 'thumb.icon');\n $data[] = array(\n 'id' => $usersiteevent->event_id,\n 'label' => $usersiteevent->title,\n 'photo' => $content_photo\n );\n }\n }\n return $this->_helper->json($data);\n }", "public function getAllEvents()\n {\n $req = $this->db->query(\"SELECT id, title, \n DATE_FORMAT(event_date,'%d/%m/%Y') AS dateEvent FROM events ORDER BY STR_TO_DATE(dateEvent,'%d/%m/%Y')\n DESC\");\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\Event');\n return $req;\n }", "public function fetchEventInformation($eventId = null)\n {\n $event = $this->client->get('/events/'.$eventId);\n\n return $event;\n }", "public function getEtagInfo()\n {\n if (isset($this->urlParameters[\"identifier\"])) {\n $id = $this->urlParameters[\"identifier\"];\n $doc = DocManager::getDocument($id);\n if ($doc->wid > 0) {\n $sql = sprintf(\"select id, revdate from docread where id = %d or id = %d\", $doc->wid, $doc->id);\n simpleQuery(getDbAccess() , $sql, $results, false, false);\n $result = array_merge(array_values($results[0]) , array_values($results[1]));\n \n $user = getCurrentUser();\n $result[] = $doc->state;\n $result[] = $user->id;\n $result[] = $user->memberof;\n // Necessary for localized state label\n $result[] = \\ApplicationParameterManager::getScopedParameterValue(\"CORE_LANG\");\n return join(\"\", $result);\n }\n }\n return null;\n }", "public function getEvents();" ]
[ "0.64505035", "0.6438669", "0.6371193", "0.6318094", "0.63152856", "0.623393", "0.623393", "0.623393", "0.623393", "0.621981", "0.6182076", "0.61699986", "0.6118436", "0.6099091", "0.6046582", "0.60341066", "0.6028612", "0.5996923", "0.5946938", "0.5941459", "0.5929603", "0.59227943", "0.59114", "0.5902076", "0.59015745", "0.5857562", "0.5854953", "0.58533436", "0.58533245", "0.5840185", "0.58390886", "0.5820238", "0.5805482", "0.5802497", "0.5801713", "0.5790949", "0.5785836", "0.57713044", "0.5770459", "0.5760236", "0.57574636", "0.5755114", "0.57398343", "0.57325435", "0.57324195", "0.5731076", "0.5719947", "0.57052904", "0.57012767", "0.569531", "0.5680189", "0.5679025", "0.56761986", "0.56740695", "0.5669126", "0.5666224", "0.56603634", "0.5656895", "0.5653514", "0.56520194", "0.5650039", "0.5648036", "0.564794", "0.56397283", "0.56329507", "0.5618193", "0.5615849", "0.56121975", "0.55967325", "0.55942404", "0.5593903", "0.5584932", "0.5564764", "0.55641794", "0.5563286", "0.55553395", "0.55545366", "0.55522156", "0.5551015", "0.5547787", "0.55436814", "0.5533719", "0.5522442", "0.5521538", "0.55210465", "0.55164796", "0.55158776", "0.5513895", "0.55110735", "0.5506577", "0.5501299", "0.5501294", "0.5498778", "0.5494877", "0.54947233", "0.54926866", "0.5484856", "0.5481375", "0.5480336", "0.54786164" ]
0.70714414
0
Function to get company owner from company id June 07,2016
Функция получения владельца компании по идентификатору компании 07 июня 2016 года
function getCompanyOwnerFromCOMPANYID($companyid) { //SELECT clientid FROM company_profiles WHERE id=1; $qry="SELECT clientid FROM company_profiles WHERE id='".$companyid."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['clientid']; } return $id; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findOwnerCompany() {\n return Companies::find(array(\n 'conditions' => array('is_owner = ?', true),\n 'one' => true,\n ));\n }", "static function findOwnerCompany($force_load = false) {\n if($force_load || self::$owner_company === false) {\n self::$owner_company = Companies::find(array(\n 'conditions' => array('is_owner = ?', true),\n 'one' => true,\n ));\n } // if\n return self::$owner_company;\n }", "public function getAuthorcompany() {}", "public function getCompany();", "private function getOwner() {\n $doc = new DOMDocument();\n $doc->loadXML($this->foxml);\n $xpath = new DOMXPath($doc);\n $result = $xpath->query(\"/*[local-name()='digitalObject']/*[local-name()='objectProperties']/*[local-name()='property'][@NAME='info:fedora/fedora-system:def/model#ownerId']/@VALUE\");\n if ($result && $result->length == 1) {\n return $result->item(0)->value;\n }\n return '';\n }", "public function actionCompanyOwner()\n {\n $vartotojai = $this->getOldCompanyOwners();\n foreach ($vartotojai as $vartotojas) {\n if ($this->userExists($vartotojas['id'])) {\n continue;\n }\n\n $imone = $this->getOldUserCompany($vartotojas['id']);\n if (!$imone) {\n $this->writeToCSV(User::tableName(), 'Vartotojas neturi ryšio su įmone', $vartotojas['id']);\n continue;\n }\n\n if ($this->companyExists($imone['id'])) {\n $this->migrateCompanyUser($vartotojas, $imone);\n } else {\n $this->migrateCompanyWithOwner($vartotojas, $imone);\n }\n }\n\n return null;\n }", "private function getOwner() {\n\t\t$ownerUid = intval($this->piVars['owner']);\n\t\tif ($ownerUid <= 0) {\n\t\t\tthrow new tx_oelib_Exception_NotFound('No owner is selected.', 1333036590);\n\t\t}\n\n\t\t$mapper = tx_oelib_MapperRegistry::get('tx_realty_Mapper_FrontEndUser');\n\t\tif (!$mapper->existsModel($ownerUid)) {\n\t\t\tthrow new tx_oelib_Exception_NotFound('The owner does not exist.', 1333036603);\n\t\t}\n\n\t\treturn $mapper->find($ownerUid);\n\t}", "public function getowner($pi_ownerid) {\r\n\t\t$this->settable(self::TABLE_OWNER);\r\n\r\n\t\t$lo_owner = $this->getrow(['ownerid' => $pi_ownerid]);\r\n\r\n\t\treturn $lo_owner;\r\n\t}", "public function getCompany() {}", "public function getOwner(): string;", "public function getCompanyNameIdentifier();", "private function getOwnerLabel() {\n\t\t$owner = $this->getOwner();\n\n\t\treturn ($owner->hasCompany() ? $owner->getCompany() : $owner->getName());\n\t}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "public function getOwnerName();", "public function getOwnerName();", "public function getOwnerId(): AccountOwnerId\n {\n }", "public function getUserOwner() {}", "function getOwner() {\n return $this->owner_id;\n }", "private function getOwnerEmail() {\n\t$ow = new gfOwnersManage();\n\t$owEmail = $ow->getDetailsByInstance($this->getInstId());\n\tforeach ($owEmail as $oe) {\n\t return $oe[0];\n\t}\n }", "public function getCSOwner() \n {\n return $this->_fields['CSOwner']['FieldValue'];\n }", "public function getCompanyOwnerDetails($accountid)\n {\n $queryBuilder = $this->createQueryBuilder('u')\n ->select('u')\n ->leftJoin('u.account', 'a')\n ->where('u.is_owner = :val')\n ->andWhere('a.id = :accountId')\n ->setParameter('accountId', $accountid)\n ->setParameter('val', 1);\n \n return $queryBuilder->getQuery()->getSingleResult();\n }", "function getOwnerName($id)\n\t{\n\t\tglobal $ilDB;\n\t\n\t\t$q =\" select A.login from usr_data A, object_data B where A.usr_id=B.owner and B.obj_id = \".$ilDB->quote($id ,'integer');\n\t\t$res = $this->ilias->db->query($q);\n\t\t$result = $res->fetchRow();\n\t\treturn $result[0];\n\t}", "function getParentsCompany() {\n\n\t\tforeach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {\n\t\t\t// Recursive company found\n\t\t\tif ($topPage['tx_mfiaddresschanger_address'] == 2) {\n\t\t\t\t$company = $this->company . $topPage['tx_mfiaddresschanger_company'];\n\t\t\t}\n\t\t}\n\t\t// Return company\n\t\treturn $company;\n\t}", "public function getCompanyId()\n {\n return $this->company_id;\n }", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "public function getOwner();", "public function getOwner();", "public function getOwner();", "public function getOwner();", "public function getOwner();", "public function company(){\n\n\t\t$query=$this->db->query(\"select * from company_info where is_this_recruitment_employer='0' order by company_id asc \");\n\t\treturn $query->result();\n\n\t}", "public function getOwner()\n {\n return $this->_getValue('Owner');\n }", "public function getCompany_id(){\n\t\treturn $this->data['company_id'];\n\t}", "function lookupOwnerID($ownerEmail, $hapikey){\n $endpoint = setOwnerAPIEndpointURL($hapikey);\n $ch = curl_init();\n @curl_setopt($ch, CURLOPT_URL, $endpoint);\n @curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n @curl_setopt($ch, CURLOPT_HEADER, 0);\t// IMPORTANT set this to 0 to not receive the header!\n $contactRecord = curl_exec($ch);\n $statusCode = @curl_getinfo($ch, CURLINFO_HTTP_CODE); //Log the response status code\n @curl_close($ch);\n if($statusCode == 401){\n die('ERROR: This is not a valid API key!');\n }\n $output = json_decode($contactRecord, true);\n for($i = 0; $i < sizeof($output); $i++){\n if($output[$i]['email'] == $ownerEmail){\n return $output[$i]['ownerId'];\n }\n }\n return -1; // return -1 to flag that no owner exists with that email address\n}", "function getCreatedByCompanyId() {\n return $this->getAdditionalProperty('created_by_company_id');\n }", "function getOwner() {\n\t\treturn $this->get('owner');\n\t}", "public function getCompanyid()\n {\n return $this->companyid;\n }", "function getOwner() {\n\n return $this->calendarInfo['principaluri'];\n\n }", "protected function fetchOwner($owner)\n {\n return $this->_fetch(\n $this->_db->search->searchGuidForUidOrMailOrAlias(\n $owner\n ),\n $owner\n );\n }", "public function getUserCompanyId() {\n\t\treturn ($this->userCompanyId);\n\t}", "function getOwner() {\n\t\treturn (string)$this->instance->ownerId;\n\t}", "public function getOwnerusername() {}", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "public function getOwner(): ?string;", "function getUserFilterCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "function getCompanyNameUsingCompUserRelation($companyID)\n{\n\t$companyN= '';\n \t$qry=\"SELECT company_name\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyN\t\t\t=\t$row['company_name'];\n\t\t} \t \t\n }\n return $companyN;\n\n}", "public function getOwnerID() {\n return $this->_getField(\"owner\", 0, 2);\n }", "function getOwner() {\n\n return $this->objectData['principaluri'];\n\n }", "function fetch_project_ownerid($projectid = 0)\n{\n global $ilance, $myapi;\n $sql = $ilance->db->query(\"SELECT user_id FROM \" . DB_PREFIX . \"projects WHERE project_id = '\".intval($projectid).\"' LIMIT 1\", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return $res['user_id'];\n }\n return 0;\n}", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "function getCompany()\n\t{\n\t\treturn $this->company;\n\t}", "function getCompanyUserNameUsingCompUserRelation($companyID)\n{\n\t$companyUN= '';\n \t$qry=\"SELECT company_username\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyUN\t\t\t=\t$row['company_username'];\n\t\t}\n \t \t\n }\n return $companyUN;\n\n}", "public function getId_company()\n {\n return $this->id_company;\n }", "public function get_owner_id()\n {\n return $this->owner_id;\n }", "public function getCompany(): string\n {\n return $this->company;\n }", "function getCompanyName($entrpID)\n{\n\t$companyName \t= 'Not Specified';\n\t//SELECT company_profiles.company_name FROM entrp_company_members LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid WHERE entrp_company_members.clientid=1\n\t$qry = \"SELECT company_profiles.company_name \n\t\t\t FROM entrp_company_members \n\t\t\t LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid \n\t\t\t WHERE entrp_company_members.clientid=\".$entrpID.\"\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n while($row = mysqli_fetch_array($res))\n {\n \t$companyName \t= $row['company_name'];\n\t\t}\n } \n\treturn $companyName;\n}", "public function get_company_id(){\n return (int) $this->v_company_id;\n }", "public function getCompany($id);", "abstract public function getCompany() : String;", "public function getOwnerId()\n\t{\n\t return $this->ownerId;\n\t}", "public function getIdCompany()\n {\n return $this->idCompany;\n }", "function getOwner() \n {\n if (!(isset($this->changed['owner'])))\n {\n return $this->owner;\n }\n else\n {\n return $this->changed['owner'];\n }\n }", "public function getUsers($company_id);", "public function resource_ownerid($resid){return($this->resource('ownerid', array('resid' => $resid)));}", "public function get_owner()\n {\n return $this->_owner;\n }", "private function getOldCompanyOwners()\n {\n $query = \"SELECT * FROM vartotojai WHERE klase = :klase LIMIT 1\";\n return Yii::$app->db_prod->createCommand($query, [':klase' => self::KLASE_IMONES_SAVININKAS])->queryAll();\n }", "public function getCurrentCompanyId()\n {\n return $this->currentCompanyId;\n }", "public function getOwner(): int\n {\n return $this->decorated->getOwner();\n }", "public function checkCompanyOwnership($company_id, $user_id);", "function owner()\n {\n $p = DB_DataObject::Factory('core_person');\n $p->get($this->owner_id);\n return $p;\n }", "public function getOwnerId()\n {\n return $this->_OwnerId;\n }", "public function getCompany() {\n\t\treturn $this->company;\n\t}", "function getCompanyByUserId($user_id){\n $sql = \"SELECT * FROM companys WHERE user_id = ?\";\n $query = $this->db->query($sql, array($user_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "function getCompanyName($clientId)\n{\n $sqlCompany = \"SELECT NomSociete FROM webcontrat_client WHERE id='$clientId'\";\n $rowCompany = querySQL($sqlCompany, $GLOBALS['connectionR'], true, true);\n $companyName = $rowCompany['NomSociete'];\n return ($companyName);\n}", "public function getOwner()\n {\n $this->ensureExact();\n return $this->owner;\n }", "public function getCurrentCompany() { return $this->_company; }", "public function getOwner()\n {\n if (!$this->ownerId) {\n return null;\n }\n\n $ownerClass = $this->ownerType;\n\n return $ownerClass::find($this->ownerId);\n }", "function getByCompanyId($company_id){\n $sql = \"SELECT * FROM companys WHERE id = ?\";\n $query = $this->db->query($sql, array($company_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "abstract public function get_the_company_gplus();", "static function get_company_id($company_url) {\n try {\n $url = parse_url($company_url);\n $path = $url[path];\n $path_array = explode (\"/\" , $path);\n $company_id = end($path_array);\n \n return $company_id; \n } catch (Exception $error) {\n echo 'Execption get company id : '.$error->getMessage();\n }\n }", "function get_account_owner($accountid) {\n $conn = db_connect();\n $sql = \"select userid from dulaney_stewart_accounts where accountid = $accountid\";\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n \n $sql = \"select name from dulaney_stewart_users where userid = \" . $row[\"userid\"];\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n return $row[\"name\"];\n}", "public function getCompanyDetails(){\n\n return (new Query())->select(\n '('.(new Query())->select('count(*)')->from(Auctions::tableName())->where(['company' => $this->id])->createCommand()->rawSql.') as companyAuctions,'.\n '('.(new Query())->select('count(*)')->from(CompanyUsers::tableName())->where('company=:c and user!=:u',[':c' => $this->id , ':u' => Auction::$app->user->id])->createCommand()->rawSql.') as companyUsers,'.\n '('.(new Query())->select('count(*)')->from(DealerCompany::tableName())->where(['company' => $this->id])->createCommand()->rawSql.') as companyDealers'\n )->one();\n\n }", "function getListingOwner($result_id)\n {\n $query = \"SELECT User.id user_id, User.name, User.email\n FROM #__users AS User \".\n \"WHERE User.id = \" . (int) $result_id;\n $this->_db->setQuery($query);\n return current($this->_db->loadAssocList());\n }", "function _clientx_offers_get_company_from_id($tid) {\n global $language;\n\n $node = clientxSomeOffersTools::getCompanyNodeFromId($tid, $language->language);\n $title = field_get_items('node', $node, 'title_field');\n\n if ($node) {\n $company = array(\n 'title' => $title[0]['value'],\n 'url' => $node->path['source'],\n );\n return $company;\n }\n else {\n $term = taxonomy_term_load($tid);\n if ($term) {\n $company = array(\n 'title' => $term->name,\n );\n return $company;\n }\n }\n\n return FALSE;\n}", "public function getProjectownername()\n\t{\n\t\treturn $this->projectownername;\n\t}", "public function getProjectownername()\n\t{\n\t\treturn $this->projectownername;\n\t}", "public function getOwner()\n {\n return $this->ownedBy;\n }", "public function getCompanyNumber()\n {\n return $this->companyNumber;\n }", "public function getCompanyNumber()\n {\n return $this->companyNumber;\n }", "public function getCompany()\n {\n if (array_key_exists(\"company\", $this->_propDict)) {\n return $this->_propDict[\"company\"];\n } else {\n return null;\n }\n }", "function company()\n\t{\n\t\t// return new RBE_OpenTHC_Company($this->_c);\n\t\t//$r = $this->_c->get('/config/company');\n\t\t//echo $r->getBody()->__toString();\n\t\t//return json_decode($r->getBody(), true);\n\t\treturn new RBE_OpenTHC_Company($this);\n\t}", "public function get_company($brid){\n\t\t$query = $this->db->query(\"SELECT company_id AS cm_id\n\t\t\t\tFROM branch \n\t\t\t\tWHERE id = '$brid'\");\n\t\treturn $query->result();\n\t}", "public function findById($company_id);", "public function getOwnedByAttribute()\n {\n return $this->company;\n }", "function company($guard = 'api') {\n $user = auth($guard)->user();\n\n return $user->company;\n }", "function getCompanyIdfromCompanyUserName($companyUserName)\n{\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE company_username='\".$companyUserName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t} \n\treturn $id;\n}" ]
[ "0.8091783", "0.70899624", "0.68842024", "0.68662053", "0.68313235", "0.682629", "0.680928", "0.67952836", "0.67616403", "0.6729423", "0.66068554", "0.65758765", "0.6557534", "0.6550894", "0.6550894", "0.6547305", "0.6541176", "0.6473814", "0.64513385", "0.64474785", "0.64362854", "0.6431781", "0.6392939", "0.6391148", "0.63731277", "0.63689727", "0.63689727", "0.63689727", "0.63689727", "0.63689727", "0.6351162", "0.6341383", "0.6331561", "0.6331143", "0.63294125", "0.63279694", "0.6327825", "0.632531", "0.63242596", "0.62861216", "0.6274412", "0.6259587", "0.62497574", "0.62497574", "0.6247698", "0.6246692", "0.624396", "0.62311846", "0.62269443", "0.62174237", "0.6199594", "0.6199594", "0.6199594", "0.6199594", "0.61992353", "0.61759835", "0.61612326", "0.6155354", "0.6141951", "0.6138495", "0.61244154", "0.6113918", "0.6104709", "0.61040795", "0.6101232", "0.6090156", "0.6086685", "0.6085086", "0.60714966", "0.60654444", "0.60624075", "0.606109", "0.60582745", "0.6057893", "0.60535043", "0.60524905", "0.6050623", "0.6048389", "0.6039508", "0.6032037", "0.6031091", "0.6025313", "0.60145587", "0.601295", "0.5998001", "0.5986264", "0.59806764", "0.59764314", "0.59755325", "0.59755325", "0.59652966", "0.59634537", "0.59634537", "0.5962256", "0.59594494", "0.5957147", "0.5952143", "0.59400755", "0.59375846", "0.5929371" ]
0.76563936
1
Function to get event host id from event id June 07.2016
Функция получения идентификатора хоста события по идентификатору события 07.06.2016
function getEventHostFromEVENTID($eventId) { //SELECT clientid FROM entrp_events WHERE id=1 $qry="SELECT clientid FROM entrp_events WHERE id='".$eventId."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['clientid']; } return $id; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventID() {\n return $this->_getField(\"eventID\", 0, 2);\n }", "public function getHostId()\n {\n if ($this->hostId === null) {\n $this->getHostIdFromDatabase();\n }\n\n return $this->hostId;\n }", "public function get_event_hash_code();", "public static function getHostId()\n {\n if (self::isWindows()) {\n $uuid = explode(\"\\r\\n\", trim(shell_exec('wmic csproduct get UUID')));\n\n return (\\count($uuid) === 2 ? $uuid[1] : false);\n }\n\n $uuid = trim(shell_exec('hostid'));\n\n return $uuid === null ? false : $uuid;\n }", "public function getHostNameIdentifier();", "protected function getHostIdFromDatabase()\n {\n if ($this->getHost() === null) {\n return;\n }\n\n $parsedUrl = parse_url($this->getHost());\n\n $host = Host::firstOrCreate(\n [\n 'host' => $parsedUrl['host'],\n 'port' => isset($parsedUrl['port']) ? $parsedUrl['port'] : '',\n ]\n );\n $this->hostId = $host->id;\n }", "public function get_event_id()\n {\n return $this->event_id;\n }", "public function eventId(): string;", "public static function getEventIDFromName( $event_name ) {\n\t\t// Replication lag means sometimes a new event will not exist in the table yet\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$id_num = $dbw->selectField(\n\t\t\t'click_tracking_events',\n\t\t\t'id',\n\t\t\tarray( 'event_name' => $event_name ),\n\t\t\t__METHOD__\n\t\t);\n\t\t// If this entry doesn't exist, which will be incredibly rare as the whole database will only have a few hundred\n\t\t// entries in it at most and getting DB_MASTER up top would be wasteful\n\t\t// FIXME: Use replace() instead of this selectField --> insert or update logic\n\t\tif ( $id_num === false ) {\n\t\t\t$dbw->insert(\n\t\t\t\t'click_tracking_events',\n\t\t\t\tarray( 'event_name' => (string) $event_name ),\n\t\t\t\t__METHOD__\n\t\t\t);\n\t\t\t$id_num = $dbw->insertId();\n\t\t}\n\t\treturn $id_num === false ? 0 : $id_num;\n\t}", "protected function getEventId() {\n\t\treturn $this->_id;\n\t}", "public function getEventID() {\r\n if (isset($this->eventID)) {\r\n return $this->eventID;\r\n }\r\n return false;\r\n }", "public function getEventId()\n {\n return $this->eventid;\n }", "function getInstanceIdFromChannelId($db, $channel_id) \n{\n\n\t$stmt = $db->prepare('SELECT id FROM smf_discord_news WHERE channel_id=?');\n\t$stmt->bindParam(1, $channel_id, PDO::PARAM_INT);\n\t$stmt->execute();\n\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\treturn @$row['id'];\n}", "public function getEventId()\n {\n return $this->event_id;\n }", "public function getExternalId();", "function hosting_get_hostmaster_nid() {\n return hosting_get_hostmaster_site_nid();\n}", "function getEventIdfromEventTag($eventTagid)\n{\n\t\n\t$qry=\"SELECT id FROM entrp_events \n\t\t\tWHERE eventTagId='\".$eventTagid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "function getInstanceId() {\n\t\t# instanceId returns as: instanceid (project)\n\t\t$info = explode( ' ', $this->address->instanceId );\n\t\tif ( $info[0] == 'None' ) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\treturn $info[0];\n\t\t}\n\t}", "public function getID() {return $this->eventID;}", "function getEventId()\r\n {\r\n return $this->_eventid ;\r\n }", "function hosting_get_hostmaster_site_nid() {\n return variable_get('aegir_hostmaster_site_nid', NULL);\n}", "public function getVideoId(){\n switch($this->getVideoHost()){\n case 'youtube':\n parse_str(parse_url($this->url, PHP_URL_QUERY), $query);\n return $query['v'];\n break;\n case 'youtu':\n $path = parse_url($this->url, PHP_URL_PATH);\n $path = str_replace('/', '', $path);\n return $path;\n break;\n case 'vimeo':\n $path = parse_url($this->url, PHP_URL_PATH);\n $path = str_replace('/', '', $path);\n return $path;\n break;\n }\n }", "public function getOccurrenceId() {\n\n $siteeventTable = Engine_Api::_()->getDbTable('events', 'siteevent');\n $siteeventTableName = $siteeventTable->info('name');\n\n $occurrenceTable = Engine_Api::_()->getDbTable('occurrences', 'siteevent');\n $siteeventOccurTableName = $occurrenceTable->info('name');\n $select = $siteeventTable->select();\n $where = \"$siteeventTableName.event_id = $this->event_id\";\n\n $select = $select\n ->setIntegrityCheck(false)\n ->from($siteeventTableName, array());\n $select->join($siteeventOccurTableName, \"$siteeventTableName.event_id = $siteeventOccurTableName.event_id\", array('occurrence_id'))\n ->where($where)\n //->group(\"$siteeventOccurTableName.event_id\")\n ->order(\"$siteeventOccurTableName.event_id ASC\")\n ->limit(1);\n\n $occurrence_id = $select->query()->fetchColumn();\n return $occurrence_id;\n }", "public function getEventId() {\n\t\treturn $this->id;\n\t}", "public function getEventByEid($eid) {\n $result = mysql_query(\"SELECT * FROM events WHERE eid = $eid\") or die(mysql_error());\n\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n $response = mysql_fetch_assoc($result);\n\n $host_uid = $response['host_uid'];\n\n $host = mysql_fetch_assoc(mysql_query(\"SELECT * from `users` where uid = $host_uid\"));\n\n $response['host'] = $host;\n return $response;\n } else {\n // user not found\n return false;\n }\n }", "function getEventId()\n {\n return $this->__eventid ;\n }", "public static function atkHost()\n {\n $atkHost = $_SERVER['HTTP_HOST'] != '' ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\n\n // if we're running on our cluster environment\n // we seem to have a specific portid within the HTTP_HOST\n // If so, remove it from the hostname\n\n $dummy = explode(':', $atkHost);\n\n return $dummy[0];\n }", "function getHubID($publicContactURL){\n $substrings = explode ('/', $publicContactURL); // break public URL into substrings\n return $substrings[4]; // extract portal ID from public URL\n}", "function getConnectionID () {\n\t//the connection id is a unique 6-letter word that identifies the connection between two browsers. once a connection\n\t//is started the id is returned and the other browser requires this to join the connection and exchange data. the id\n\t//itself is based on the unix time number converted to base 35 (0-9,A-Z)\n\treturn strtoupper (substr(base_convert(time(),10,35),0,6));\n}", "function getHost()\n {\n $a = parse_url(PEARWEB_PROTOCOL . PEAR_CHANNELNAME);\n return $a['host'];\n }", "public function getEventoId()\n {\n return $this->evento_id;\n }", "public function findId($event)\n {\n if (empty($this->jobId)) {\n $scenario = $event instanceof ScenarioEvent ? $event->getScenario() : $event->getOutline();\n $context = $event->getContext();\n $url = $context->getSession()->getDriver()->getWebDriverSession()->getUrl();\n $parts = explode('/', $url);\n $this->jobId = array_pop($parts);\n }\n }", "public function GetHostName($id)\n {\n $h = null;\n\n if (is_int($id))\n {\n foreach ($this->GetHosts() as $item)\n {\n if ($item->ID == $id)\n {\n return $item->Name;\n }\n }\n }\n\n return \"\";\n }", "function getEventTagfromEventId($eventId)\n{\n\t\n\t$qry=\"SELECT eventTagId FROM entrp_events \n\t\t\tWHERE id=\".$eventId.\" \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$eventTagId\t\t=\t$row['eventTagId']; \t\t\t\t\t\n\t\t}\n\t\treturn $eventTagId;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "function GetHostlogkey() {\n return $this->posnetResponse->hostlogkey;\n }", "function get_events_id($id) {\r\n $sql = \"SELECT * FROM events where event_id=$id\";\r\n //$this->register_events = mysqli_query($this->db_connect(), $query);\r\n $this->events_id = mysqli_query($this->db_connect(), $sql);\r\n return $this->events_id;\r\n }", "public static function getHost(): string\n {\n // Check for proxy first\n if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {\n $forwaredHostNames = explode(',', (string) $_SERVER['HTTP_X_FORWARDED_HOST']);\n $host = end($forwaredHostNames);\n } else {\n $host = \n $_SERVER['HTTP_HOST'] ??\n $_SERVER['HTTP_SERVER_NAME'] ??\n $_SERVER['HTTP_SERVER_ADDR'];\n }\n\n // trim and remove port number from host\n // host is lowercase as per RFC 952/2181\n return strtolower(preg_replace('/:\\d+$/', '', trim((string) $host)));\n }", "protected function getEventId() {\n return $this->type.'-'.$this->resource->id;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function get_current_event_id() {\n\t\treturn $this->current_event_id;\n\t}", "public function getVideoHost(){\n $url = parse_url($this->url, PHP_URL_HOST);\n $url = str_replace('www.','', $url);\n $url = explode('.', $url)[0];\n return $url;\n }", "public static function host_get() {\n\t\t$host = '::1';\n\t\tif (php_sapi_name()=='cli') {\n\t\t\tif (isset($_SERVER['HOSTNAME'])) {\n\t\t\t\t$host = $_SERVER['HOSTNAME'];\n\t\t\t} elseif (isset($_SERVER['SSH_CONNECTION'])) {\n\t\t\t\t$host = explode(' ',$_SERVER['SSH_CONNECTION']);\n\t\t\t\tif (count($host)>2) {\n\t\t\t\t\t$host = $host[2];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (isset($_SERVER['HTTP_HOST'])) {\n\t\t\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t\t} elseif (isset($_SERVER['SERVER_NAME'])) {\n\t\t\t\t$host = $_SERVER['SERVER_NAME'];\n\t\t\t} elseif (isset($_SERVER['SERVER_ADDR'])) {\n\t\t\t\t$host = $_SERVER['SERVER_ADDR'];\n\t\t\t}\n\t\t}\n\t\treturn $host;\n\t}", "function get_guest_id()\n\t{\n\t\treturn 0;\n\t}", "function get_guest_id()\n\t{\n\t\treturn 0;\n\t}", "function getMainHost($host)\n{\n //$host = parse_url($url, PHP_URL_HOST);\n\n $arr = explode('.', $host);\n $count = count($arr);\n return $arr[$count-2] .'.'. $arr[$count-1];\n\n}", "public static function getEventIdFromUniqueEvent($unique_event_name=null)\r\n\t{\r\n\t\tglobal $Proj;\r\n\t\t// Make sure we are in the Project context\r\n\t\tself::checkProjectContext(__METHOD__);\r\n\t\t// Make sure project is longitudinal, else return FALSE\r\n\t\tif (!self::isLongitudinal()) return false;\r\n\t\t// If $event_id is not valid, then return FALSE\r\n\t\tif ($unique_event_name == null) return false;\r\n\t\t$event_id = $Proj->getEventIdUsingUniqueEventName($unique_event_name);\r\n\t\t// Get and return event_id\r\n\t\treturn (!is_numeric($event_id) ? false : $event_id);\r\n\t}", "function getHost();", "function getHost();", "function getHost();", "public function getHost()\n {\n return $this->alias_record->remoteHostWithUser();\n }", "function f_getLatestDayId()\n {\n global $db;\n $sql_query = \"select GTCDayID from gtcdayconversion order by GTCDayID desc limit 1\";\n $result = $db->query($sql_query) or die($db->error);\n $row = $result->fetch_assoc();\n $temp = explode(\" \",$row['GTCDayID']);\n $day_id = $temp[0];\n return $day_id;\n }", "private function getHost(): string\n {\n return isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : $_SERVER['SERVER_ADDR'];\n }", "public function getHost()\n {\n $hostname = null;\n\n if (!empty($this->server['HTTP_HOST'])) {\n $hostname = $this->server['HTTP_HOST'];\n } else if (!empty($this->server['SERVER_NAME'])) {\n $hostname = $this->server['SERVER_NAME'];\n }\n\n if (strpos($hostname, ':') !== false) {\n $hostname = substr($hostname, 0, strpos($hostname, ':'));\n }\n\n return $hostname;\n }", "public function getMessageId();", "function get_event($eid){\n\t$con = mysqli_connect('127.0.0.1', 'root', '','dashboardproject');\n\t$eid = (int)$eid;\n\t\n\t$sql = \"SELECT\n\t\t\t\tevent_title AS 'title',\n\t\t\t\tevent_body AS 'body',\n\t\t\t\tevent_poster AS 'user',\n\t\t\t\tevent_date AS 'date',\n\t\t\t\tevent_img AS 'imgn',\n\t\t\t\ted AS 'ed',\n\t\t\t\tven AS 'ven'\n\t\t\tFROM events\n\t\t\tWHERE event_id = {$eid}\";\n\t\t\t\n\t$event = mysqli_query($con, $sql);\n\t$event = mysqli_fetch_assoc($event);\n\t\n\t\n\t\n\treturn $event;\n}", "public function getEventName($eventId) {\n $this->db->limit(1);\n $this->db->select('name');\n $this->db->where('_id', $eventId);\n $query = $this->db->get('events');\n\n if ($query->num_rows() > 0) {\n $res = $query->result();\n return $res[0]->name;\n } else {\n return '';\n }\n }", "public function getPollerID($host = null)\n {\n if (!isset($host)) {\n return 0;\n }\n $db = CentreonDBInstance::getMonInstance();\n /*\n * Check if $host is an id or a name\n */\n if (preg_match(\"/^\\d+$/\", $host)) {\n $statement = $db->prepare(<<<SQL\n SELECT instance_id\n FROM hosts\n WHERE hosts.host_id = :host_id\n AND hosts.enabled = '1'\n SQL\n );\n $statement->bindValue(':host_id', (int) $host, PDO::PARAM_INT);\n $statement->execute();\n } else {\n $statement = $db->prepare(<<<SQL\n SELECT instance_id\n FROM hosts\n WHERE hosts.name = :host_name\n AND hosts.enabled = '1' LIMIT 1\n SQL\n );\n $statement->bindValue(':host_name', $host);\n $statement->execute();\n }\n $row = $statement->fetchRow();\n if (isset($row['instance_id'])) {\n return $row['instance_id'];\n }\n return 0;\n }", "private function getSocketId() : string\n {\n// need checking before socket creating\n if (count($this->sockets) >= self::MAX_SOCK) {\n throw new Exception('Cannot get socket id: reach maximal sockets count');\n }\n\n while(true) {\n $this->idCounter++;\n if ($this->idCounter === self::MAX_SOCK) $this->idCounter = 1;\n\n $id = self::SOCKET_ID_PREFIX . $this->idCounter;\n if (!isset($this->sockets[$id])) break;\n }\n\n return $id;\n }", "function getHostPortFromString($hostname=''){\n\n $pos=strpos($hostname,':');\n if($pos === false){\n //no need to process as string is empty or does not contain ':' delimiter\n return '';\n }\n\n $hostArr = explode(':', $hostname);\n\n return $hostArr;\n\n}", "public function getLastEventID(): ?string\n {\n return (string) $this->hub->getLastEventID();\n }", "public function getHostname()\n {\n return $this->getPart('host');\n }", "public function GetHostID($hostname)\n {\n $h = null;\n\n if (is_string($hostname))\n {\n if (!empty($hostname))\n {\n foreach ($this->GetHosts() as $item)\n {\n if ($item->Name == $hostname)\n {\n return $item->ID;\n }\n }\n }\n }\n\n return 0;\n }", "public static function getDreamFactoryInstanceId()\n {\n $instanceID = '';\n try {\n $instanceID = InstanceId::getCachedInstanceId();\n } catch (\\Exception $e) {\n $instanceID = \"Not Found\";\n }\n return $instanceID;\n }", "public function getStationIdentifier(): string\n {\n $response = $this->api->get('station/' . $this->station);\n $stations = simplexml_load_string($response);\n\n return (string) $stations->station['eva'];\n }", "private function getCommunicationId()\n {\n return uniqid(date(\"Y-m-d-His_\"));\n }", "public function event_id($id){\n $this->db->select('event_id');\n $this->db->from('member');\n $this->db->where('member_id', $id);\n $query = $this->db->get();\n $row = $query->row_array();\n return $row['event_id'];\n }", "private function extractPollID()\n {\n return parent::fetchData(SlackData::COMMANDLINE_INTEGER_INDEX);\n }", "function getInstanceHost() {\n\t\t$info = explode( ' ', (string)$this->instance->instancesSet->item->keyName );\n\t\treturn str_replace( array(',',')'), '', $info[2] );\n\t}", "private function getCurrentVisitorId() {\n $_ga = isset($_COOKIE['_ga']) ? $_COOKIE['_ga'] : null;\n if ($_ga) {\n $arr = explode('.', $_ga);\n return $arr[2] . '.' . $arr[3];\n }\n return null;\n }", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_IDVE_IMPACT:\t$source_id = 5; break;\n\t\t\tcase self::TYPE_PDX_REWORK:\t\t$source_id = 6; break;\n\t\t\tcase self::TYPE_IDVE_IFS:\t\t$source_id = 12; break;\n\t\t\tcase self::TYPE_IDVE_IPDL:\t\t$source_id = 13; break;\n\t\t\tcase self::TYPE_IDVE_ICF:\t\t$source_id = 14; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "public function getFullHost();", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "private function get_host() {\n\t\tif (preg_match('/(http[s]?:)?([\\/]{0,2})([^\\/\\?\\#]+)/', $this->url, $match)) {\n\t\t\tif (empty($match[1])) $match[1] = 'http:';\n\t\t\tif (empty($match[2])) $match[2] = '//';\n\t\t\treturn $match[1] . $match[2] . $match[3];\n\t\t} else {\n\t\t\treturn $this->url;\n\t\t}\n\t}", "public function getHost()\n {\n return $this->isConnected() ? $this->idsn['host'] : false;\n }", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_AGEAN_PERF: \t$source_id = 9; break;\n\t\t\tcase self::TYPE_AGEAN_TITLE: \t$source_id = 10; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "public function getLiveId() {}", "public function getInstanceId() \n {\n \n \n return isset($this->container['ContactID']) ? $this->container['ContactID'] : null; \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }", "public function getId() {\n\t\treturn $this->id_evento;\n\t}", "function getID( $url ){\n\n if( !strpos($url, \"#!v=\") === false ){ //Em caso de ser um link de quando clica nos related\n //In case of be a link from related\n $url = str_replace('#!v=','?v=',$url);\n }\n\n parse_str( parse_url( $url, PHP_URL_QUERY ) );\n\n if( isset( $v ) ){\n return $v;\n } else { //Se não achou, é por que é o link de um video de canal ex: http://www.youtube.com/user/laryssap#p/a/u/1/SAXVMaLL94g\n //If not found, is because is a link from a user channel ex: http://www.youtube.com/user/laryssap#p/a/u/1/SAXVMaLL94g\n return substr( $url, strrpos( $url,'/') + 1, 11);\n }\n }", "function get_host()\n {\n if(isset($this->uri[\"host\"]))\n $host = $this->uri[\"host\"].\":\".$this->uri[\"port\"];\n else\n $host = $this->get_header(\"host\");\n return $host;\n }", "public function getFullIdentifier()\n {\n return $this->getOrganisation().' '.$this->getApplicationEventType();\n }", "function getDeviceIdBySigfoxId($dev_id) {\n try {\n $dbh = conn_db();\n\n $sql = \"SELECT pk_dev\n FROM tb_devices\n WHERE dev_id = :id\";\n\n $stmt = $dbh->prepare($sql);\n $stmt->bindParam(':id', $dev_id);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n $stmt->execute();\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n\n return (int)$stmt->fetch()['pk_dev'];\n }", "function getSingleEvent($eventId) {\r\n\t\t$resEvent = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid, datetime, subject, public, series, tags, requiredteams, documents, notes', #select\r\n\t\t\t'tx_servicemgr_events', #from\r\n\t\t\t'uid='.$eventId.' and hidden=0 and deleted=0', #where\r\n\t\t\t'', '',\r\n\t\t\t'0,1' #limit\r\n\t\t);\r\n\r\n\t\tif ($resEvent) {\r\n\t\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resEvent);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getHostname()\n\t{\n\t\t$ip = $this->getIpAddress();\n\t\t$host = gethostbyaddr($ip);\n\t\treturn $host;\n\t}", "public static function getHost()\n {\n $cfg = static::getCfg();\n\n if (isset($cfg['server_name'])) {\n $sourceUrl = parse_url($cfg['server_name']);\n $host = $sourceUrl['host'];\n\n return $host;\n } else {\n trigger_error('cant read cfg for server_name', E_USER_WARNING);\n }\n }", "function getConferenceId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->getId();\n\t}", "public function getInstanceId() \n {\n \n \n return isset($this->container['UserDefinedFieldID']) ? $this->container['UserDefinedFieldID'] : null; \n \n \n \n \n \n \n \n }", "public function getInstanceId() \n {\n \n \n return isset($this->container['UserDefinedFieldID']) ? $this->container['UserDefinedFieldID'] : null; \n \n \n \n \n \n \n \n }", "private function getHostname(): string\n {\n $host = parse_url($this->config->get('psx_url'), PHP_URL_HOST);\n if (empty($host)) {\n $host = $_SERVER['SERVER_NAME'] ?? 'unknown';\n }\n\n return $host;\n }", "final protected function getCallEvetId($id)\n\t{\n\t\t$id = md5($this->_salt.'-'.$id);\n\t\t$id = \n\t\t\tsubstr($id, 0, 8).'-'.\n\t\t\tsubstr($id, 8, 4).'-'.\n\t\t\tsubstr($id, 12, 4).'-'.\n\t\t\tsubstr($id, 16, 4).'-'.\n\t\t\tsubstr($id, 20, 12);\n\t\treturn $id;\n\t}", "static public function getIdentifier() {\n return \\Drupal::state()->get('acquia_connector.identifier');\n }", "public function get_agiletix_from_wppostid( $id ) {\n\n\t\t$meta = get_post_meta( $id, 'ticketurl', true );\n\t\tif ( ! isset( $meta ) || empty( $meta ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tix_url_parts = wp_parse_url( $meta );\n\t\tif ( ! ( isset( $tix_url_parts['query'] ) ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tparse_str( $tix_url_parts['query'], $tix_url_parts );\n\t\t$evtinfo = explode( '~', $tix_url_parts['evtinfo'] );\n\t\t$evtinfo = $evtinfo[0];\n\t\treturn $evtinfo;\n\t}", "function getHost() \n {\n return null;\n }", "function wct_talks_the_id() {\n\techo wct_talks_get_id();\n}", "function getJoinOnEventID()\n { \n return $this->getJoinOnFieldX('event_id');\n }", "public function getIncidentId()\n {\n if (array_key_exists(\"incidentId\", $this->_propDict)) {\n return $this->_propDict[\"incidentId\"];\n } else {\n return null;\n }\n }", "public function getHost();", "public function getHost();" ]
[ "0.6672849", "0.65184546", "0.6258759", "0.62220293", "0.6138068", "0.6028127", "0.60222685", "0.60109395", "0.5981562", "0.596578", "0.5929788", "0.59025747", "0.58780265", "0.5874352", "0.5869213", "0.58583003", "0.58567953", "0.584162", "0.58062583", "0.58000207", "0.57757884", "0.57755625", "0.5735896", "0.5729667", "0.5710071", "0.57022375", "0.5701335", "0.5693598", "0.5679501", "0.56693226", "0.5668676", "0.565854", "0.56398207", "0.5623655", "0.56197757", "0.56077015", "0.5590417", "0.558671", "0.5569478", "0.5569478", "0.5562749", "0.556199", "0.55422217", "0.5533749", "0.5533749", "0.55191797", "0.5502015", "0.5500577", "0.5500577", "0.5500577", "0.5497563", "0.54939336", "0.5488083", "0.54839736", "0.54803723", "0.5478118", "0.5477171", "0.5476736", "0.5476673", "0.54689324", "0.546756", "0.54662395", "0.54622453", "0.54569155", "0.5451245", "0.5450489", "0.5443928", "0.54366696", "0.5436069", "0.5428273", "0.5408826", "0.5400745", "0.5387413", "0.5387413", "0.53824687", "0.5370544", "0.5365499", "0.53537345", "0.5351826", "0.534776", "0.5344897", "0.53411144", "0.53410804", "0.5340517", "0.53350574", "0.53336674", "0.53305376", "0.5312672", "0.531151", "0.531151", "0.5308168", "0.5300762", "0.5297567", "0.5296935", "0.5296518", "0.5289917", "0.5289533", "0.52866006", "0.5279286", "0.5279286" ]
0.77582455
0
Function to fetch total (count) users following a company May 05,2016
Функция для получения общего (количество) пользователей, следящих за компанией 05 мая 2016 года
function entrp_company_follows($company_id) { //To fetch user followers //SELECT COUNT(entrp_user_follows.clientid) AS followers FROM entrp_user_follows WHERE entrp_user_follows.follows=1 $qry="SELECT COUNT(entrp_company_follows.clientid) AS followers FROM entrp_company_follows WHERE entrp_company_follows.companyid=".$company_id." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $count_followers = $row['followers']; } } else { $count_followers = 0; } return $count_followers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFollowerCount();", "public function getFollowingCount();", "public function getUsersCount();", "public function follow_count() {\n\t\treturn $this->redis()->sCard(\"graph:user:{$this->id}:following\");\n\t}", "public function follower_count() {\n\t\treturn $this->redis()->sCard(\"graph:user:{$this->id}:followed_by\");\n\t}", "function getUserCount()\n{\nsession_start();\t\n $db = getX10Connection();\n\n $sql = \"SELECT * FROM users\";\n $result = $db->query($sql);\n\n $users = 0;\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n if ($row['username'] == $_SESSION['currentUser']) {\n $userNumber = $users;\n };\n $users++;\n }\n }\n return $users;\n}", "function total_users()\n\t{\n\t\tglobal $db;\n\n\t\t$query = $db->query(\"SELECT COUNT(*) as count FROM uplus.users\") or trigger_error($db->error);\n\t\treturn $query->fetch_assoc()['count'];\n\t}", "public function getFollowerCount() {\r\n $stmt = $this->con->prepare(\"SELECT * FROM followers WHERE userTo = ?\");\r\n $username = $this->getUsername();\r\n $stmt->bind_param(\"s\", $username);\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n $query = mysqli_num_rows($result);\r\n return $query;\r\n\r\n }", "function numUsersInCompany($companyId)\n{\n\t$DBH = databaseConnect();\n\t\n\ttry{\n\t$STH = $DBH->prepare(\"Select count(*) as 'count' from users where company_id = :companyId\") ;\n\t$STH->execute(array('companyId' => $companyId));\n\t}\n\tcatch(PDOException $e) {\n\t echo $e->getMessage();\n\t}\n\n\t$count = 0;\n\n\twhile($row = $STH->fetch()) {\n\t print_r($row['count']);\n\t $count = $row['count'];\n\t echo \"<br>\";echo \"<br>\";\n\t}\n\n\treturn $count;\n}", "function bp_core_get_total_member_count() {\r\n\tglobal $wpdb, $bp;\r\n\r\n\tif ( !$count = wp_cache_get( 'bp_total_member_count', 'bp' ) ) {\r\n\t\t$status_sql = bp_core_get_status_sql();\r\n\t\t$count = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM \" . CUSTOM_USER_TABLE . \" WHERE {$status_sql}\" ) );\r\n\t\twp_cache_set( 'bp_total_member_count', $count, 'bp' );\r\n\t}\r\n\r\n\treturn apply_filters( 'bp_core_get_total_member_count', $count );\r\n}", "function getUserCount()\r\n {\r\n return 0;\r\n }", "public static function userRegisterTodayCount();", "function getFollowersAmount(): int\n {\n return $this->db->query('SELECT * FROM friends WHERE friend = ?', $this->userObject['id'])->numRows();\n }", "private static function get_user_counts()\n {\n }", "public function getFollowerCount()\n {\n return $this->request('GET', '/followers/count');\n }", "public function getFollowingCount()\n {\n return $this->request('GET', '/followings/count');\n }", "public function countUsers();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "function user_following($clientid)\n{\n\t//To fetch user following\n //SELECT COUNT(entrp_user_follows.follows) AS following FROM entrp_user_follows WHERE entrp_user_follows.clientid=1\n\t$qry=\"SELECT COUNT(entrp_user_follows.follows) AS following \n\t\t\t FROM entrp_user_follows \n\t\t\t WHERE entrp_user_follows.clientid=\".$clientid.\"\n\t\t\t\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n \t{\n \t\t$count_following \t\t= $row['following'];\n \t}\n\t}\n\telse\n\t{\n\t\t$count_following \t\t\t= 0;\n\t}\n\treturn $count_following;\n}", "public function countAllUsers(){\n $totalusers = self::count_all();\n return $totalusers;\n \n }", "function get_amount_of_users($conn) {\n\t$result = $conn->query(\"SELECT COUNT(`user_id`) as count FROM `users`\");\n\n\treturn $result->fetch(PDO::FETCH_ASSOC)['count'];\n}", "function getTotalNumber()\n{\n\t$dbHandler = DbHandler();\n $query = $dbHandler->prepare\n\t( \n\t\t\"SELECT COUNT(email) \n\t\tAS total \n\t\tFROM `user` \"\n\t);\n\t$query->execute();\n\t$totalUser = $query->fetch(PDO::FETCH_ASSOC);\n\treturn $totalUser['total'];\n}", "public function getTotalCount() {}", "public function getTotalCount() {}", "public function totalUsers()\n {\n return $this->dao->totalUsers(\n $this->listID, $this->loginId, $this->referencedAttributes, $this->searchTerm, $this->searchBy,\n $this->searchIsRegex, $this->confirmed, $this->blacklisted\n );\n }", "public static function verifiedUserCount();", "function getTotalUserReferrals()\n {\n $gettotalreferrals = User::where('referral','=', Auth::user()->invitecode )->get('phone');\n\n $totalreferrals = $gettotalreferrals->count();\n\n return $totalreferrals ;\n }", "function count_following( $user_id ){\n\tglobal $DB;\n\t$result = $DB->prepare('SELECT COUNT(*) AS total \n\t\t\t\t\t\t\tFROM follows\n\t\t\t\t\t\t\tWHERE from_user_id = ?');\n\t$result->execute( array( $user_id ) );\n\t$row = $result->fetch();\n\t//ternary operator example\n\techo $row['total'] == 1 ? '1 Following' : $row['total'] . ' Following' ;\n}", "public function getTotalCount(){}", "function get_registered_vs_anonymous_user_node_visit_count($start_date = 0 , $end_date = REQUEST_TIME) {\n $final_data_array_count = array();\n if (function_exists('mongodb')) {\n $conn = mongodb();\n if ($conn) {\n $collection = $conn->pagedetails;\n $condition = array(\n 'uid' => array(\n '$eq' => 0 ,\n ) ,\n 'viewtime' => array(\n '$gte' => $start_date ,\n '$lte' => $end_date ,\n ) ,\n );\n $anonymous_user_count = $collection->find($condition)->count();\n\n $condition_2 = array(\n 'uid' => array(\n '$ne' => 0 ,\n ) ,\n 'viewtime' => array(\n '$gte' => $start_date ,\n '$lte' => $end_date ,\n ) ,\n );\n $registered_user_count = $collection->find($condition_2)->count();\n\n //Handel case for terms.\n\n $collection_term = $conn->term_view_info;\n // Calculate for anyonomus users.\n $condition_term = array(\n 'viewtime' => array(\n '$gte' => $start_date ,\n '$lte' => $end_date ,\n ) ,\n 'role' => \"Front User\",\n );\n $term_view_count_reg = $collection_term->find($condition_term)->count();\n // Calculate for registred users.\n $condition_term_ann = array(\n 'viewtime' => array(\n '$gte' => $start_date ,\n '$lte' => $end_date ,\n ) ,\n 'role' => 'Anonymous User',\n );\n $term_view_count_ann = $collection_term->find($condition_term_ann)->count();\n $only_registred_count = $registered_user_count + $term_view_count_reg;\n $only_ann_count = $anonymous_user_count + $term_view_count_ann;\n $final_data_array_count = array(\n 'registred' => $only_registred_count ,\n 'anonymous' => $only_ann_count ,\n 'total_count' => $only_registred_count + $only_ann_count ,\n );\n return $final_data_array_count;\n }\n }\n}", "function behance_count() {\n $get_data = $this->remote_get(\"http://www.behance.net/v2/users/{$this->options['behance_id']}?api_key={$this->options['behance_api_key']}\");\n $json_data = ($get_data) ? json_decode($get_data, true) : [];\n return ($json_data and isset($json_data['user']) and isset($json_data['user']['stats']) and isset($json_data['user']['stats']['followers'])) ? $this->format_number($json_data['user']['stats']['followers']) : \"0\";\n }", "function user_followers($clientid)\n{\n\t//To fetch user followers\n\t//SELECT COUNT(entrp_user_follows.clientid) AS followers FROM entrp_user_follows WHERE entrp_user_follows.follows=1\n\t$qry=\"SELECT COUNT(entrp_user_follows.clientid) AS followers \n\t\t\t FROM entrp_user_follows \n\t\t\t WHERE entrp_user_follows.follows=\".$clientid.\"\n\t\t\t\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n \t{\n \t\t$count_followers \t\t= $row['followers'];\n \t}\n\t}\n\telse\n\t{\n\t\t$count_followers \t\t\t= 0;\n\t}\n\treturn $count_followers;\n}", "function get_number_of_users()\r\n{\r\n\t$curso = $_SESSION['curso']; \r\n\t$user_table = Database :: get_main_table(TABLE_MAIN_USER);\r\n\t$course_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER_FD);\r\n\t\t\t\r\n\t$sql=\"SELECT count(u.user_id) as num_alumnos FROM \".$course_table .\" c, \".$user_table.\" u\r\n WHERE c.user_id = u.user_id and u.status = 5 and c.course_code = '\".$curso.\"'\";\r\n\t\r\n\t$res = api_sql_query($sql, __FILE__, __LINE__);\r\n\t$alumno = Database::fetch_array($res);\r\n\treturn $alumno['num_alumnos'];\r\n}", "function total_no_of_users(){ \n $query = $this->db\n ->from('table_user')\n ->get();\n return $query->result();\n }", "public function getTotalNumberOfCompletedLessons()\n {\n $keys = Redis::keys(\"user:{$this->id}:series:*\");\n $total_lessons = 0;\n\n foreach($keys as $key):\n $total_lessons += count(Redis::smembers($key));\n endforeach;\n\n return $total_lessons;\n }", "public function getCount()\n {\n return Table\\Accounts::getTotal();\n }", "public function totalUsersPastMonth()\n {\n return $this->whereBetween('created_at', [now()->subDays(30), now()])\n ->count();\n }", "public function getTotalNumberOfEntriesToday()\n\t{\n\t\t//using accountID\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->compare(\"account_id\",$this->account_id);\n\t\t$criteria->addCondition(\"date(date_created) = date(NOW())\");\n\t\t//$criteria->group = \"ip_address\";\n\t\t$criteria->distinct = true;\t\t\n\t\t\n\t\treturn Records::model()->count($criteria);\n\t}", "public function countUsersStatistic()\n {\n return $this->getEntityManager()->createQuery(\n 'SELECT u.id, SUM(p.quantity) AS pr, COUNT( DISTINCT ca.id) AS me\n FROM AppBundle:User u INDEX BY u.id\n LEFT JOIN u.carts c\n LEFT JOIN c.contracts co\n LEFT JOIN co.contractArtist ca\n LEFT JOIN co.purchases p\n LEFT JOIN u.user_conditions uc\n LEFT JOIN uc.conditions cond\n WHERE u.yb = FALSE \n AND ca.successful = TRUE\n AND u.deleted = FALSE\n AND co.refunded = FALSE\n AND c.paid = TRUE\n GROUP BY u.id\n ')\n ->getResult(Query::HYDRATE_ARRAY);\n }", "function count_followers( $user_id ){\n\tglobal $DB;\n\t$result = $DB->prepare('SELECT COUNT(*) AS total \n\t\t\t\t\t\t\tFROM follows\n\t\t\t\t\t\t\tWHERE to_user_id = ?');\n\t$result->execute( array( $user_id ) );\n\t$row = $result->fetch();\n\t//ternary operator example\n\techo $row['total'] == 1 ? '1 Follower' : $row['total'] . ' Followers' ;\n}", "function github_count() {\n $get_data = $this->remote_get(\"https://api.github.com/users/{$this->options['github_id']}\");\n $json_data = ($get_data) ? json_decode($get_data, true) : [];\n return ($json_data and isset($json_data['followers'])) ? $this->format_number($json_data['followers']) : \"0\";\n }", "public function make_wb_follow_count()\n\t{\n\t\t$this->load->model('common/dashbord_model', 'dashbord_model');\n\t\t$tablename = \"wb_follow_count\";\n\t\tif ($count_time_rst = $this->dashbord_model->get_count_time($tablename))\n\t\t{\n\t\t\t$count_time = $count_time_rst['count_time'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$count_time = date(\"Y-m-d H:i:s\", strtotime(\"today\") - 86400 * 30);\n\t\t}\n\n\t\t$start_time = date(\"Y-m-d H:i:s\", strtotime($count_time) + 3600);\n\n\t\tif ($this->dashbord_model->insert_wb_all_user($start_time))\n\t\t{\n\t\t\t$this->dashbord_model->insert_new_users($start_time);\n\t\t}\n\t}", "public function userCount()\n {\n $sql4=\"SELECT * from user\";\n $result=mysqli_query($this->db,$sql4);\n $user_data=mysqli_fetch_array($result);\n $count_row=$result->num_rows;\n echo \"<span class='badge'>\".$count_row.\"</span>\";\n }", "function UserCount()\n\t{\n\t\t$R=jf::SQL(\"SELECT COUNT(*) AS Result FROM {$this->TablePrefix()}xuser AS XU\");\n\t\treturn $R[0]['Result'];\n\t}", "public function getUserCount()\n {\n $this->db->where('status', '1');\n $this->db->from('user');\n return $this->db->count_all_results();\n }", "function act_usercount(){\n\tglobal $w, $tsUser;\n\t$query = mysql_query('SELECT COUNT(usuario_id) AS total FROM usuarios WHERE user_vip =\"1\" AND rango_vip=\"0\" ');\n\t$data = result_array($query);\n\n\t//\n\treturn $data;\n\t}", "public function getUserCountAction()\n {\n $customer = new Customer;\n\n echo OutputTrait::jsonOutput(\n $customer->getCount(\n DateTrait::getDateSpan($_POST['dateFrom'], $_POST['dateTo'])\n ),\n 'Accepted'\n );\n }", "public static function getCountUserMonth()\n {\n\n $query = new Query;\n $query->select('*')\n ->from('user')\n ->leftJoin('auth_assignment', 'user_id =id')\n ->where([\n 'between',\n 'FROM_UNIXTIME(user.created_at, \"%Y-%m-%d\")',\n date('Y-m-01'),\n date('Y-m-t')\n ])\n ->andWhere(['!=', 'item_name', 'RegisteredUnconfirmed'])\n ->count();\n\n $command = $query->createCommand();\n $countUserMonth = $command->queryAll();\n\n return count($countUserMonth);\n }", "public function howManyUsers()\n\t{\n\t\t$thisMany = $this->databank->checkUserCount();\n\t\t$userCount = count($thisMany);\n\t\t$this->session->set_userdata('userNum', $userCount);\n\t\treturn;\n\t}", "public function count_users() {\n return $this->db->get_var(\"SELECT COUNT(*) FROM `crm.interesado`;\");\n }", "public function getTotalUsers() {\n\n $analytics = $this->connectAnalytics();\n\n try {\n $results = $analytics->data_ga->get(Yii::$app->params['analytics']['analyticsId'], $this->startDate, $this->endDate, 'ga:users')->getTotalsForAllResults();\n\n $data = number_format($results['ga:users'], 0, ',', '.');\n\n } catch(Exception $e) {\n // @todo Yii exception\n echo 'There was an error : - ' . $e->getMessage();\n }\n\n return json_encode($data);\n }", "function j_countAccounts($zohoAuthtoken, $access_token1, $bigcommURL, $min_date_created1, $max_date_created1, $userid, $crmTypeAcc, $accountTypeC) {\n // \n $total_success = 0;\n $min_date_created = $min_date_created1;\n $max_date_created = $max_date_created1;\n $bigcommurl = $bigcommURL . \"/v2/\";\n $access_token = $access_token1;\n //\n if ($accountTypeC === 'new') {\n $url = $bigcommurl . \"customers/count.json\";\n } else {\n $url = $bigcommurl . \"customers/count.json?min_date_created=\" . $min_date_created . \"&max_date_created=\" . $max_date_created;\n }\n //$url = $bigcommurl . \"customers/count.json?min_date_created=\" . $min_date_created . \"&max_date_created=\" . $max_date_created;\n //$url = $bigcommurl . \"customers/count.json\";\n $http_headres = array(\n \"Content-Type: application/json\",\n \"Accept: application/json\",\n \"X-Auth-Client:APP_AUTH_CLIENT_ID\",\n \"X-Auth-Token:\" . trim($access_token)\n );\n //\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $http_headres);\n $return = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n //check if it returns 200, or else return false \n if ($http_code === 200) {\n curl_close($ch);\n $count_arr = json_decode($return, TRUE);\n $count = $count_arr['count'];\n if ($count > 0) {\n $limit = 20;\n $page = ceil($count / $limit);\n $total_success = j_createAccount($page, $limit, $bigcommURL, $zohoAuthtoken, $access_token, $min_date_created1, $max_date_created1, $userid, $crmTypeAcc, $accountTypeC);\n }\n } else {\n $error = curl_error($ch);\n //addErrors($error, $bigCommerceCredentials);\n }\n return $total_success;\n}", "private static function get_cashiers_count()\n {\n return User::where('role', 'cashier')->count();\n }", "function get_paid_user_from_beginning(){\n\t\treturn $this->db->query(\"select count( distinct user_id) as usr from red_member_transactions t1 inner join red_members t2 on t1.user_id=t2.member_id where gateway IN ('AUTHORIZE','PayPal') and t1.status='SUCCESS' and amount_paid > 0\")->row()->usr;\n\t\t\n\t}", "public function getFollowCount() {\r return $this->followCount;\r }", "function UserCount()\n{\n global $log;\n $log->debug(\"Entering UserCount() method ...\");\n global $adb, $table_prefix;\n $result=$adb->pquery(\"select id from \".$table_prefix.\"_users where deleted =0\", array()); // crmv@39110\n $user_count=$adb->num_rows($result);\n $result=$adb->pquery(\"select id from \".$table_prefix.\"_users where deleted =0 AND is_admin != 'on'\", array()); // crmv@39110\n $nonadmin_count = $adb->num_rows($result);\n $admin_count = $user_count-$nonadmin_count;\n $count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\n $log->debug(\"Exiting UserCount method ...\");\n return $count;\n}", "public function follow_followers()\n {\n return 0;\n }", "public function CountUsers() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn User::CountByCompany($this->intId);\n\t\t}", "public function getmyfollowplaylist(){\n return $this->authUser->followers()->get()->count();\n }", "public static function getMyFutureLessonCount()\n {\n if (Auth::check())\n {\n $now = date('Y-m-d');\n $count = static::getAllLessons()->where('deleted', false)->where('first_day', '>', $now)\n ->filter( function ($value ,$key) {\n $matched = false;\n foreach ($value->users as $user)\n {\n if ($user->id == Auth::id())\n {\n $matched = true;\n break;\n }\n }\n return $matched;\n })->count();\n } else { \n $count = 0;\n }\n return $count;\n }", "public function countUsersForCompany($company){\n\n return $this->findWhere([\n 'company_id' => $company->id\n ])->count();\n\n }", "public function countRemainingUsers()\n {\n if (0 == $this->remaining_users) {\n $query = 'SELECT COUNT(*) as total FROM ' . rex::getTablePrefix() . '375_sendlist'\n .' WHERE autosend = '. ($this->autosend_only ? '1' : '0');\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n return $result->getValue('total');\n }\n\n return $this->remaining_users;\n\n }", "public function getTotalOfUsers()\n {\n $id_admin = ID_ADMIN;\n $sql = 'SELECT COUNT(id_user) as counter\n FROM users\n WHERE id_user != :id_admin AND bin != \"yes\"\n ';\n $users = $this->dbConnect($sql, array(\n ':id_admin' => \"$id_admin\"\n ));\n $this->users_count = $users->fetch(\\PDO::FETCH_ASSOC);\n $total_users_count = $this->users_count['counter'];\n return $total_users_count;\n }", "function vasthtml_total_users() {\r\n global $wpdb;\r\n\techo $wpdb->get_var(\"SELECT COUNT(*) FROM $wpdb->users;\");\r\n}", "private function getAuthorsCount(){\n\t\t$this->authorsCount = $this->getField('padUsersCount');\n\t}", "public function getUserCount()\n {\n return $this->family->count();\n }", "function dribbble_count() {\n $get_data = $this->remote_get(\"https://api.dribbble.com/v2/user/?access_token={$this->options['dribbble_access_token']}\");\n $json_data = ($get_data) ? json_decode($get_data, true) : [];\n return ($json_data and isset($json_data['followers_count'])) ? $this->format_number($json_data['followers_count']) : \"0\";\n }", "public function followers( $nick) {\r\n \r\n $sql = \"select count(*) as count from ofRoster where nick ='\".$nick.\"'\";\r\n $result = $this->_conn->query($sql);\r\n $obj = $result->fetch_object();\r\n // execute query\r\n return $obj->count;\r\n }", "static function count_users(){\n $query = self::$PDO->prepare('SELECT '.self::$prefix.'count_users()');\n $query->execute(array());\n return intval($query->fetchAll()[0][0]);\n }", "public function countUsers() {\n $users = count_users();\n return $users['total_users'];\n }", "function get_followers(mysqli $link, string $user_id)\n{\n $sql = \"SELECT subscriptions.*, users.id, users.registered, users.email, users.login, picture,\n (SELECT COUNT(post_id) FROM posts WHERE posts.user_id = subscriptions.follower_id) as posts_count,\n (SELECT COUNT(subscriptions.id) FROM subscriptions WHERE users.id = subscriptions.author_id) as followers_count\n FROM subscriptions\n JOIN users ON users.id = subscriptions.follower_id\n WHERE subscriptions.author_id = ?\";\n $stmt = db_get_prepare_stmt($link, $sql, [$user_id]);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n if (!$result) {\n exit ('error'.mysqli_error($link));\n }\n\n return mysqli_fetch_all($result, MYSQLI_ASSOC);\n}", "private function get_user_counts() {\n\t\tglobal $wpdb;\n\n\t\t$users = (array) count_users();\n\n\t\t$capabilities_meta = $wpdb->prefix . 'capabilities';\n\t\t$date_today = date( 'Y-m-d' );\n\t\t$date_yesterday = date( 'Y-m-d', strtotime( '-1 days' ) );\n\n\t\t$users['job_listers_today'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered >= %s\", $capabilities_meta, '%administrator%', '%job_lister%', $date_today ) );\n\t\t$users['job_listers_yesterday'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered BETWEEN %s AND %s\", $capabilities_meta, '%administrator%', '%job_lister%', $date_yesterday, $date_today ) );\n\n\t\t$users['recruiters_today'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered >= %s\", $capabilities_meta, '%administrator%', '%recruiter%', $date_today ) );\n\t\t$users['recruiters_yesterday'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered BETWEEN %s AND %s\", $capabilities_meta, '%administrator%', '%recruiter%', $date_yesterday, $date_today ) );\n\n\t\t$users['job_seekers_today'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered >= %s\", $capabilities_meta, '%administrator%', '%job_seeker%', $date_today ) );\n\t\t$users['job_seekers_yesterday'] = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = %s AND ($wpdb->usermeta.meta_value NOT LIKE %s) AND $wpdb->usermeta.meta_value LIKE %s AND $wpdb->users.user_registered BETWEEN %s AND %s\", $capabilities_meta, '%administrator%', '%job_seeker%', $date_yesterday, $date_today ) );\n\n\t\treturn $users;\n\t}", "function user_wise_num_checkouts($connect, $user_id){\n\t$query = \"\n\tSELECT count(equipment_checkout.empl_id) as 'checks'\n\tFROM equipment_checkout\n\tWHERE empl_id = '\".$user_id.\"'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "public function real_user_count(){\n \t\treturn count($this->real_users()->select('users.id')->get());\n \t}", "public function total_list() {\n global $wpdb;\n $tblOrdert = $wpdb->prefix . 'member';\n return $wpdb->get_var(\"SELECT COUNT(*) FROM $tblOrdert\");\n }", "public function business_user_follower_count($business_profile_id = '') {\n $s3 = new S3(awsAccessKey, awsSecretKey);\n $userid = $this->session->userdata('aileenuser');\n if ($business_profile_id == '') {\n $business_profile_id = $this->db->get_where('business_profile', array('user_id' => $userid, 'status' => '1'))->row()->business_profile_id;\n }\n\n $contition_array = array('follow_to' => $business_profile_id, 'follow_status' => '1', 'follow_type' => '2', 'business_profile.status' => '1', 'business_profile.is_deleted' => '0');\n\n $join_str_following[0]['table'] = 'follow';\n $join_str_following[0]['join_table_id'] = 'follow.follow_from';\n $join_str_following[0]['from_table_id'] = 'business_profile.business_profile_id';\n $join_str_following[0]['join_type'] = '';\n\n $bus_user_f_er_count = $this->common->select_data_by_condition('business_profile', $contition_array, $data = 'count(*) as follower_count', $sortby = '', $orderby = '', $limit = '', $offset = '', $join_str_following, $groupby = '');\n\n $follower_count = $bus_user_f_er_count[0]['follower_count'];\n\n return $follower_count;\n }", "public function getTotalUsers()\n {\n return $this->totalUsers;\n }", "function visitorGetCount(){\n $s = $this->Mdl_visitor->visitorCount()->result();\n\n $td = $this->Mdl_visitor->visitorCountToday();\n $tM = $this->Mdl_visitor->visitorCountMonth();\n $tY = $this->Mdl_visitor->visitorCountYear();\n \n\n $this->o_put[\"get\"] = $s;\n $this->o_put[\"today\"] = $td[\"visit_today\"];\n $this->o_put[\"yesterday\"] = $td[\"visit_yesterday\"];\n $this->o_put[\"thisMonth\"] = $tM[\"visit_thisMonth\"];\n $this->o_put[\"lastMonth\"] = $tM[\"visit_lastMonth\"];\n $this->o_put[\"thisYear\"] = $tY[\"visit_thisYear\"];\n $this->o_put[\"lastYear\"] = $tY[\"visit_lastYear\"];\n $this->runOutput();\n }", "public static function totalUser()\n {\n $user = User::all();\n $total = $user->count();\n return $total;\n }", "public function getnumofusers()\n\t{\t\t\t\n\t\t$this->writelog(\"getnumofusers() \\n\");\n\t\t$retVal = '';\n\t\ttry\n\t\t{\n\t\t\t//Check memcache\n\t\t\t// initialize class member variables\n\t\t\t$this->_client = new SoapClient($_SERVER['SOAP_CLIENT_URL']);\n\t\t\t$response = $this->_client->getnumofusers();\n\t\t\t$retVal = $response;\t\t\t\t\t\t\n\t\t}\n\t\tcatch (SoapFault $fault) \n\t\t{\n\t\t\t$retVal = \"SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})\";\n\t\t}\n\t\treturn $retVal;\n\t}", "function getCount(UserRequest $request)\n {\n $this->setRequestUrl('/user/count');\n $this->setRequestObject($request);\n return $this->execute()->count;\n }", "function getUserEntries($uid) {\n global $sql;\n $res=$sql->query(\"SELECT COUNT(*) as `amount` FROM fsetups s, ftournaments t WHERE s.uid=$uid AND s.tid=t.id AND t.created>DATE_SUB(NOW(), INTERVAL 1 DAY)\");\n if ($row=$res->fetch_assoc()) {\n return intval($row[\"amount\"]);\n }\n return 0;\n}", "function count_active_users($request) { #API\r\n $countA = $countI = $countO = 0;\r\n\r\n foreach(get_users() as $user)\r\n if(wc_memberships_is_user_active_member($user->ID, 'ops-membership')) \r\n $countO++;\r\n elseif(is_member_active($user->ID)) \r\n $countA++;\r\n else\r\n $countI++;\r\n\r\n return array($countA, $countI, $countO);\r\n}", "public function business_user_following_count($business_profile_id = '') {\n $s3 = new S3(awsAccessKey, awsSecretKey);\n $userid = $this->session->userdata('aileenuser');\n if ($business_profile_id == '') {\n $business_profile_id = $this->db->get_where('business_profile', array('user_id' => $userid, 'status' => '1'))->row()->business_profile_id;\n }\n\n $contition_array = array('follow_from' => $business_profile_id, 'follow_status' => '1', 'follow_type' => '2', 'business_profile.status' => '1', 'business_profile.is_deleted' => '0');\n\n $join_str_following[0]['table'] = 'follow';\n $join_str_following[0]['join_table_id'] = 'follow.follow_to';\n $join_str_following[0]['from_table_id'] = 'business_profile.business_profile_id';\n $join_str_following[0]['join_type'] = '';\n\n $bus_user_f_ing_count = $this->common->select_data_by_condition('business_profile', $contition_array, $data = 'count(*) as following_count', $sortby = '', $orderby = '', $limit = '', $offset = '', $join_str_following, $groupby = '');\n\n $following_count = $bus_user_f_ing_count[0]['following_count'];\n\n return $following_count;\n }", "function getTotalUsers(){\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db\n\t\t->getQuery(true)\n\t\t->select('COUNT(*)')\n\t\t->from($db->quoteName('#__questions_userprofile'))\n\t\t->where($db->quoteName('blocked') . \" = 0\");\n\t\t$db->setQuery( $query );\n\t\t$totalquestions = $db->loadResult();\n\t \treturn $totalquestions;\n }", "function calcNumActiveUsers(){\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n $result = mysql_query($q, $this->connection);\n $this->num_active_users = mysql_numrows($result);\n }", "public function total_user()\n {\n return User::where(\"role_id\",\"=\",3)->count();\n }", "function twitter_count() {\n $get_data = $this->remote_get(\"https://cdn.syndication.twimg.com/widgets/followbutton/info.json?screen_names=\" . $this->options['twitter_id']);\n $json_data = ($get_data) ? json_decode($get_data, true) : [];\n return ($json_data and isset($json_data[0]) and isset($json_data[0]['followers_count'])) ? $this->format_number($json_data[0]['followers_count']) : \"0\";\n }", "function getNewAccount($conn, $month, $year) {\n \n $query = \"SELECT COUNT(id) AS thisCount FROM `tbl_clients` WHERE MONTH(dateCreated) = '$month' AND YEAR(dateCreated) = '$year'\";\n $thisCount = 0;\n $result = mysqli_query($conn, $query);\n while($row = mysqli_fetch_array($result)){\n $thisCount = $row['thisCount'];\n }\n\n return $thisCount; \n }", "public function userCount() {\n\t\t$this->db->select('COUNT(*) AS count');\n\t\t$this->db->where('status', 1);\n\t\t$query = $this->db->get('users');\n\t\treturn $query->row();\n\t}", "public function get_num_of_updates(){\n $token = $this->input->get_post(\"token\");\n $user = $this->userlib->getUserProfile($token);\n \n\t\t// Get number of jobs \n \t$query = \"\n SELECT count(*) AS cnt\n \t\tFROM \".TABLE_USERS_NEW_JOBS.\"\n \t\tWHERE user_id = ?\n \t\";\n \t$data = array($user['id']); \n $results_jobs = $this->db->query($query, $data);\n $results_jobs = $results_jobs->result_array();\n\n\t\t// Get number of candidates\n \t$query = \"\n SELECT count(*) AS cnt\n \t\tFROM \".TABLE_USERS_NEW_CANDIDATES.\"\n WHERE user_id = ?\n \t\";\n \t$data = array($user['id']);\n $results_candidates = $this->db->query($query, $data);\n $results_candidates = $results_candidates->result_array();\n\n \t// Output\n $output = array();\n $output[\"num_of_updates\"] = $results_jobs[0]['cnt'] + $results_candidates[0]['cnt'];\n $this->outputlib->output(STATUS_OK, '', $output);\n }", "function get_user_monthly_number_ofapproved_ads(){\n global $dbase;\n $data=array();\n $current_user_id=$this->gStringId($_SESSION['admin_id']);//Current user id\n $user_type=$_SESSION['admin_type']; //Admin level\n\n $manager=\"Manager\"; \n $Supervisor=\"Supervisor\";\n $Operator=\"Operator\";\n\n $status=\"Approved\";\n include(\"admin_tables.php\");\n\n if($user_type==$manager){\n\n $branch_id=$this->getBranchOfAdmin($current_user_id);//Get current users branch\n \n $sql =\"SELECT count(*) FROM adds WHERE reg_date >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND branch_id='\".$branch_id.\"' AND status='\".$status.\"'\";\n\n } else if($user_type==$Supervisor || $user_type==$Operator){\n\n // $sql =\"SELECT count(*) FROM \".$table.\" WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE()) AND admin_id='\".$current_user_id.\"' AND status='\".$status.\"'\";\n\n $sql =\"SELECT count(*) FROM \".$table.\",adds WHERE \".$table.\".date_assigned >= UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY)) AND \".$table.\".admin_id='\".$current_user_id.\"' AND \".$table.\".status='\".$status.\"' AND adds.id=\".$table.\".ad_id AND adds.status='\".$status.\"'\";\n }\n\n \n\n $result = $dbase->prepare($sql); \n $result->execute(); \n $no = $result->fetchColumn();\n\n $total= array('result' =>$no );\n array_push($data, $total);\n\n return $data;\n }", "function user_wise_num_checkins($connect, $user_id){\n\t$query = \"\n\tSELECT count(equipment_checkout.empl_id) as 'checks'\n\tFROM equipment_checkout\n\tWHERE empl_id = '\".$user_id.\"' AND returned = 'true'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "public function countUsers()\n\t{\n\t\t$req=$this->_bdd->query('SELECT Count(*) AS nbUsers From Users');\n\t\t$data=$req->fetch();\n\t\t$req->closeCursor();\n\t\t$nbUsers=$data['nbUsers'];\n\n\t\treturn $nbUsers;\n\t}", "public function getTotalUsers(){\n $this->db->query('select * from users');\n $result = $this->db->resultset();\n return $this->db->rowCount();\n }", "public function total(): int {\n [$cond, $args] = $this->configure();\n return self::$db->scalar(\"\n SELECT count(*)\n FROM users_notify_quoted AS q\n LEFT JOIN forums_topics AS t ON (t.ID = q.PageID)\n LEFT JOIN forums AS f ON (f.ID = t.ForumID)\n LEFT JOIN artists_group AS a ON (a.ArtistID = q.PageID)\n LEFT JOIN collages AS c ON (c.ID = q.PageID)\n WHERE \" . join(' AND ', $cond), ...$args\n );\n }", "public static function notVerifiedUserCount();" ]
[ "0.6974691", "0.69552404", "0.67665464", "0.6765142", "0.6623989", "0.6610851", "0.6590651", "0.65889543", "0.65856117", "0.65334296", "0.651396", "0.65035725", "0.6496585", "0.6494528", "0.64925444", "0.6480491", "0.64635074", "0.64264363", "0.64264363", "0.64264363", "0.64264363", "0.6422917", "0.6393077", "0.63840324", "0.6349071", "0.6345594", "0.6345594", "0.6336046", "0.63196385", "0.63072604", "0.62946886", "0.62678856", "0.6254257", "0.6254158", "0.62497044", "0.6247666", "0.6239885", "0.6228873", "0.62178904", "0.62116826", "0.6205063", "0.6190997", "0.6189925", "0.61767566", "0.6175236", "0.6172684", "0.61643344", "0.61638176", "0.6158018", "0.6154648", "0.61462134", "0.6144105", "0.6136956", "0.61283135", "0.6123807", "0.61044747", "0.60973865", "0.60969806", "0.6091389", "0.6079652", "0.6062173", "0.6058689", "0.6055583", "0.6053682", "0.6052351", "0.60462385", "0.6043889", "0.6042817", "0.6038836", "0.6038768", "0.60374814", "0.60350776", "0.6033099", "0.6026963", "0.60237586", "0.6017448", "0.60024524", "0.5992289", "0.59852844", "0.59841627", "0.5984087", "0.5976046", "0.5968658", "0.5967386", "0.59640515", "0.59626925", "0.5960207", "0.5951743", "0.5949035", "0.5946768", "0.5933627", "0.59329075", "0.59309906", "0.593036", "0.59111595", "0.5902631", "0.5899296", "0.5898669", "0.5891505", "0.5890904" ]
0.70552003
0
Function to delete company categories May 05,2016 (Not in use now)
Функция удаления категорий компаний 05 мая 2016 года (не используется сейчас)
function delete_company_categories($company_id) { $qry="DELETE FROM entrp_company_categories WHERE companyid=".$company_id." "; setData($qry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteCategory()\n {\n }", "public function deleteCategory()\n { \n Database::_beginTransaction();\n $req = \"DELETE FROM blog_category\n WHERE idc = '\".$this->idc.\"'\";\n $res = Database::_exec($req);\n if(!$res){\n Database::_rollBack();\n } else {\n Database::_commit();\n }\n }", "public function delete_category() {\n\n // Deletes a category\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Categories)->delete_category();\n\n }", "public function cleanCategories() {\n $req = \"DELETE FROM blog_article_category WHERE ida = '\" . $this->ida . \"'\";\n return Database::_exec($req);\n }", "function deleteCategory($catId=0) {\n global $modx;\n if ($catId) {\n $resetTables = array('site_plugins', 'site_snippets', 'site_htmlsnippets', 'site_templates', 'site_tmplvars', 'site_modules');\n foreach ($resetTables as $n=>$v) {\n $useTable = $modx->getFullTableName($v);\n $modx->db->update(array('category'=>0), $useTable, \"category='{$catId}'\");\n }\n $catTable = $modx->getFullTableName('categories');\n $modx->db->delete($catTable, \"id='{$catId}'\");\n }\n}", "function deleteCategory($catId=0) {\r\n global $modx;\r\n if ($catId) {\r\n $resetTables = array('site_plugins', 'site_snippets', 'site_htmlsnippets', 'site_templates', 'site_tmplvars', 'site_modules');\r\n foreach ($resetTables as $n=>$v) {\r\n $useTable = $modx->getFullTableName($v);\r\n $sql = 'update ' . $useTable . ' set category=0 where category=' . $catId . '';\r\n $modx->dbQuery($sql);\r\n }\r\n $catTable = $modx->getFullTableName('categories');\r\n $sql = 'delete from ' . $catTable . ' where id=' . $catId;\r\n $modx->dbQuery($sql);\r\n }\r\n}", "public function deleteCurrentCategory($_items=null) {\n\t\t$db = GetGlobal('db'); \n\t\t$cpGet = _v('rcpmenu.cpGet');\n\t\t//when running inside dac, cat passed as post param, else fetch from cpGet\n\t\t$cat = GetReq('cat') ? GetReq('cat'): $cpGet['cat'];\n\t\t$csep = _m('cmsrt.sep');\n\t\t$fcode = _v('cmsrt.fcode');\n\t\t$lan = $this->lan;\n\t\t$_sql = array();\n\t\t\n\t\t$_cat = explode($csep, $cat); \n\t\t\n\t\tif (!empty($_cat)) { \n\n\t\t\t//based on selected categories\t(delete subcats after selected cat)\n\t\t\tfor ($i=0;$i<4;$i++) { //to 4 not 5 (ITEMS at start)\t\n\t\t\t\tif ($_cat[$i])\n\t\t\t\t\t$cc[] = 'cat'.strval($i+2).'=' . $db->qstr(_m(\"cmsrt.replace_spchars use \".$_cat[$i].\"+1\"));\n\t\t\t}\n\t\t\t$_cc = implode(' AND ', $cc);\n\t\t\t\n\t\t\t$sSQL = \"delete from categories where \" . $_cc;\n\t\t\t//echo $sSQL;\n\t\t\tif ($res = $db->Execute($sSQL)) {\n\n\t\t\t\t$this->_echo('Where ' . $_cc . ' deleted ');\n\t\t\t\treturn true;\t\n\t\t\t}\t\n\t\t}\t\n\t\telse \n\t\t\t$this->_echo('There is no selected category');\n\t\t\n\t\treturn false;\n\t}", "function before_delete_category() {\n\t\tglobal $db, $category_id, $table_prefix;\n\t\t// Get manuals of the category\n\t\t$sql = \"SELECT manual_id FROM \". $table_prefix.\"manuals_list WHERE category_id = \" . $db->tosql($category_id, INTEGER);\n\t\t$db->query($sql);\n\t\t$manuals = array();\n\t\tif ($db->next_record()) {\n\t\t\t$where_arr = array();\n\t\t\tdo {\n\t\t\t\t$manual_id = $db->f(\"manual_id\");\n\t\t\t\t$where_arr[] = \"manual_id = \" . $db->tosql($manual_id, INTEGER);\n\t\t\t} while ($db->next_record());\n\t\t\t\n\t\t\t// Remove articles\n\n\t\t\tif (!empty($where_arr)) {\n\t\t\t\t$sql = \"DELETE FROM \" . $table_prefix . \"manuals_articles WHERE \" . implode(\" AND \", $where_arr);\n\t\t\t\t$db->query($sql);\n\t\t\t}\n\t\t}\n\t\t// remove sites\n\t\t$db->query(\"DELETE FROM \" . $table_prefix . \"manuals_categories_sites WHERE category_id=\" . $db->tosql($category_id, INTEGER));\n\t\t$db->query(\"DELETE FROM \" . $table_prefix . \"manuals_categories_types WHERE category_id=\" . $db->tosql($category_id, INTEGER));\n\t\t$db->query(\"DELETE FROM \" . $table_prefix . \"manuals_categories_subscriptions WHERE category_id=\" . $db->tosql($category_id, INTEGER));\n\t\t$db->query(\"DELETE FROM \" . $table_prefix . \"manuals_list WHERE category_id=\" . $db->tosql($category_id, INTEGER));\n\t\t\n\t}", "public function deletecategory()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'document', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query_desc = $this->podb->deleteFrom('category_document_description')->where('id_category_document', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_desc->execute();\n\t\t\t$query_cat = $this->podb->deleteFrom('category_document')->where('id_category_document', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_cat->execute();\n\t\t\t$this->poflash->success($GLOBALS['_']['document_category_message_3'], 'admin.php?mod=document&act=category');\n\t\t}\n\t}", "public function EliminarCategorias()\n{\n\tself::SetNames();\n\n\tif($_SESSION['acceso'] == \"administrador\" || $_SESSION['acceso'] == \"superadministrador\" ) {\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(decrypt($_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 = decrypt($_GET[\"codcategoria\"]);\n\t\t\t$stmt->execute();\n\n\t\t\techo \"1\";\n\t\t\texit;\n\n\t\t} else {\n\t\t \n\t\t\techo \"2\";\n\t\t\texit;\n\t\t } \n\t\t\t\n\t\t} else {\n\t\t\n\t\techo \"3\";\n\t\texit;\n\t }\t\n}", "public static function cleanIndexCategories(){\n global $FilterProducts;\n \n return Db::getInstance()->Execute(\"\n DELETE FROM \" . _DB_PREFIX_ . \"fpp_option_criterion\n WHERE\n criterion = '\" . $FilterProducts->Criterions->Category . \"'\n \");\n }", "public function delete_category($category_id){ \n $delete_category = category::find($category_id)->delete();\n \n }", "function delete_categoria_servicio($catserv_id)\r\n {\r\n return $this->db->delete('categoria_servicio',array('catserv_id'=>$catserv_id));\r\n }", "public function deleteCategories(\\DataContainer $dc)\n {\n $this->Database->prepare(\"DELETE FROM \" . $this->strCategoriesTable . \" WHERE product_id=?\")\n ->execute($dc->id);\n }", "function deleteofficecategories() {\n $id = $this->uri->segment(3);\n $result = $this->moffice->DeleteOfficeCategories($id);\n $this->session->set_flashdata('userdatasavestatus', $result);\n redirect('office/categories', 'refresh');\n }", "public function removeFromAllCategories() {\n $this->db->query(\"DELETE FROM oxobject2category WHERE OXOBJECTID='\".$this->db->validate($this->id).\"'\");\n return $this->db->affected_rows;\n }", "function deleteCategoryStore()\r\n\t\t\t{\r\n\t\t\t \tglobal $CFG,$objSmarty;\r\n if(isset($_POST['cat_id']) && !empty($_POST['cat_id']))\r\n {\r\n $UpQuery = \"DELETE FROM \".$CFG['table']['store_category'].\" WHERE store_cat_id ='\".$this->filterInput($_POST['cat_id']).\"'\";\r\n \t\t\t\t $UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\r\n }\t\t\t\t\r\n\t\t\t}", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('digitaldownload.component_controller_admincp_categories_clean')) ? eval($sPlugin) : false);\n\t}", "function delete_category() {\n $category_id = get_from_post('category_id');\n $this->db->trans_start();\n $this->category_model->delete($category_id);\n $this->db->trans_complete();\n if ($this->db->trans_status() === FALSE) {\n echo json_encode(array('success' => false, 'message' => 'Db Error Occured'));\n return;\n }\n echo json_encode(array('success' => true, 'message' => 'Category Deleted Successflly!'));\n }", "public function delete()\n {\n\n // borra las subcategorias asociadas\n foreach( $this->categorias_hijas->find_all() as $sub_categoria )\n {\n $sub_categoria->delete();\n }\n\n // finalmente borra la categoria en si\n parent::delete();\n\n }", "public function deleteMovedCategories($_items=null) {\n\t\t$db = GetGlobal('db'); \n\t\t$cpGet = _v('rcpmenu.cpGet');\n\t\t//when running inside dac, cat passed as post param, else fetch from cpGet\n\t\t$cat = GetReq('cat') ? GetReq('cat'): $cpGet['cat'];\n\t\t$csep = _m('cmsrt.sep');\n\t\t$fcode = _v('cmsrt.fcode');\n\t\t$lan = $this->lan;\n\t\t$_sql = array();\n\t\t\n\t\tif (!defined('RCGROUP_DPC')) die('RCGROUP_DPC required');\n\t\t\n\t\t$_cat = explode($csep, $cat); \n\t\t\n\t\t//when dac7 there is no session at runtime\n\t\t//session item codes saved at preset _rcgroup by default\n\t\t$items = (!empty($_items)) ? $_items :\n\t\t\t\t\t(($this->indac7==true) ? \n\t\t\t\t\t\t_m(\"rcgroup.get_collected_items use _rcgroup\") :\n\t\t\t\t\t\t_m(\"rcgroup.get_collected_items\"));\t\t\n\t\t\n\t\tif (!empty($items)) { \n\t\t\n\t\t //case 1 : delete categories based on selected items \n\t\t\t\n\t\t //param\n\t\t\t$slug = GetParam('slugon') ? 1 : 0;\t\n\t\t\t$greeklish = GetParam('sluggreekon') ? 1 : 0;\t\t\t\t\n\t\t\t//print_r($items);\n\t\t\t$x = 1;\n\t\t\tforeach ($items as $zi=>$rec) {\n\t\t\t\t\n\t\t\t\t$cc = array();\t//reset mkcat replacements\n\n\t\t\t\tfor ($i=0;$i<4;$i++) { //to 4 not 5 (ITEMS at start)\n\t\t\t\t\t\n\t\t\t\t\t$m = $i+7; //7 to 11 (items array as return from rcgroup)\n\t\t\t\t\t$cc[] = $rec[$m] ? $db->qstr($rec[$m]) : \"''\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_cc = implode($csep, $cc);\n\t\t\t\t$_id = hash('crc32', implode('', $cc));\n\t\t\t\t\n\t\t\t\t$sSQL = \"select ctgoutline from categories where ctgoutline = '$_id'\"; //based on id\n\t\t\t\t$check = $db->Execute($sSQL);\n\t\t\t\t\n\t\t\t\tif (!$check->fields[0]) {\n\n\t\t\t\t\t$this->_echo($x . ' not exist ' . $_cc);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sSQL = \"delete from categories where ctgoutline='$_id'\";\n\t\t\t\t\t//echo $sSQL;\n\t\t\t\t\t$_sql[$_id] = $sSQL; // save unique array of sql\n\t\t\t\t}\n\t\t\t\t$x+=1;\n\t\t\t}\t\n\t\t\t\n\t\t\tif (!empty($_sql)) {\n\t\t\t\t//SLUG/GREEKLISH HAS NO EFFECT WHEN DELETE CATEGORIES (DELETE AS IS)\n\t\t\t\t//$with = $slug ? ($greeklish ? 'with greeklish slug ':' with slug ') : '';\n\t\t\t\t\n\t\t\t\tforeach ($_sql as $id=>$sSQL) {\n\t\t\t\t\t//echo $sSQL . PHP_EOL;\n\t\t\t\t\t$res = $db->Execute($sSQL);\n\n\t\t\t\t\t$this->_echo($id . ' deleted ');// . $with);\t\n\t\t\t\t}\t\n\t\t\t}\t\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t\t$this->_echo(\"No items selected\");\t\n\t\t\n\t\treturn false;\n\t}", "function model_admin_delete_category($id){\n\t$query = \"DELETE FROM `cmsdb`.`article_categories` WHERE `article_categories`.`id` = '$id'\";\n\tdb_query($query);\n\t$update = \"UPDATE `cmsdb`.`article_revisions` SET `category_id` = '0' WHERE `article_revisions`.`category_id` ='$id'\";\n\tdb_query($update);\n}", "public function manage_categories() {\r\n /* @var $plugin_page string */\r\n global $plugin_page;\r\n\r\n //check the event and redirect to the front page on non-existent event\r\n //handle delete\r\n if (isset($_GET['action'])) {\r\n switch ($_GET['action']) {\r\n case 'delete':\r\n $valid = true;\r\n if (!wp_verify_nonce($_GET['_wpnonce'], 'deleteCategory')) {\r\n $valid = false;\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n $ids = explode(',', $_GET['ids']);\r\n\r\n if (count($ids) > 0 && $valid) {\r\n for ($i = 0; $i < count($ids); $i++) {\r\n $ids[$i] = (int) trim($ids[$i]);\r\n if ($ids[$i] == 0) {\r\n $valid = false;\r\n break;\r\n }\r\n }\r\n\r\n //perform the delete\r\n $deleteModel = Eabi_Ipenelo_Calendar::service()->get('models/Category');\r\n\r\n if ($valid) {\r\n $event = Eabi_Ipenelo_Calendar::service()->get('models/Event');\r\n $rows = 0;\r\n foreach ($ids as $id) {\r\n //check if there are any events\r\n $id = (int) trim($id);\r\n $eventCount = Eabi_Ipenelo_Calendar::service()->get('database')->get_var(\"select count(id) from \" . $event->getTableName() . \" where main_category_id = \" . $id);\r\n if ($eventCount > 0) {\r\n Eabi_Ipenelo_Calendar::addError(sprintf($this->__->l('Category with id %s cannot be deleted because it has events'), $id));\r\n } else {\r\n $rows += Eabi_Ipenelo_Calendar::service()->get('database')->query(\"delete from \" . $deleteModel->getTableName() . \" where id = \" . $id);\r\n }\r\n }\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('Number of categories deleted:') . $rows);\r\n } else {\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n }\r\n wp_redirect(admin_url('admin.php?page=' . $plugin_page));\r\n die();\r\n break;\r\n }\r\n }\r\n\r\n $grid = Eabi_Ipenelo_Calendar::service()->get('grids/Category');\r\n\r\n\r\n echo $grid->render();\r\n\r\n return;\r\n }", "function deleteCategory( $data = null ){\n\t\t$user_id \t\t= $data['user_id'];\n\t\t$category_id \t= $data['category_id'];\n\n\t\techo \"Category Deleted Successfully!\";\n\t}", "public function Deletecategory($id)\n{\n$sql8=\"DELETE FROM categories where id='$id'\";\n$query8=mysqli_query($this->db,$sql8);\nif($query8)\n{\n\necho\"Category deleted\";\n\n}\n}", "public function delete()\n { \n Database::_beginTransaction();\n $req = \"DELETE FROM 'blog_category';\n WHERE idc_parent = '\".$this->idcParent.\"'; \n AND idc = idcParent\";\n Database::_exec($req);\n $req2 = \"DELETE FROM 'blog_category';\n WHERE idc = '\".$this->idc.\"'\";\n Database::_exec($req2);\n if(!Database::_exec($req)){\n Database::_rollBack();\n }elseif(!Database::_exec($req2)){\n Database::_rollBack();\n }else{\n Database::_commit();\n }\n }", "function deleteCategory($where){\n\t\treturn $this->deleteRows($this->_rel_content,$where);\n\t}", "public function deleteCategoryLangauge($data)\r\r\n {\r\r\n $this->_name = 'EB_categorized_tokens_conditions';\r\r\n $where = \" CT_language_id='\" . $data['lang_id'] . \"' \";\r\r\n $deletedata['status'] = 'deleted';\r\r\n $this->updateQuery($deletedata, $where);\r\r\n print_r($data);\r\r\n\r\r\n }", "public function del_cat(){\n\t\tif($this->dbc) $x=$this->dbc->update_data($this->table_name,'cat_id',\"NULL\",$this->id);\n\t\telse $x=false;\n\t\treturn $x;\n\t}", "public function deleteServerCategory(Request $request){\n return $this->serverUC->deleteServerCategory($request->all());\n }", "public function deleteAllCategoryFromFB()\n {\n $categories = $this->getAllActiveCategories();\n foreach ($categories as $category)\n {\n $this->deleteCategoryFromFB($category);\n }\n return;\n }", "public function delete(){\r\n $delete=Category::delete();\r\n call('category', 'index');\r\n }", "function removerCategoria($id);", "function deleteCategories() {\n global $connection;\n\n if (isset($_GET['delete'])) { // ako je kliknuo link 'delete'..\n $the_cat_id = $_GET['delete']; // ubaci vrijednost iz global arraya GET['delete'] u $the_cat_id..\n\n $query = \"DELETE FROM categories WHERE cat_id = {$the_cat_id} \"; // napiši query za deletanje..\n $delete_query = mysqli_query($connection, $query); // i pošalji u bazu na izvršenje\n header(\"Location: categories.php\"); // ponovo učitava stranicu da vidimo promjenu. \n // header() šalje na stranu koju hoćemo ali na vrhu mora biti uključeno ob_start() (output buffer)\n }\n}", "function deleteCategory($categoryId)\n\t\t{\n\t\t\t// delete the category\n\t\t\tmysql_query(\"DELETE FROM argus_categories WHERE category_id = '\".$categoryId.\"' AND status = 'DISABLED'\") or die(mysql_error());\n\t\t\t\n\t\t\treturn;\n\t\t}", "function openlab_delete_bpgd_category_cookie_on_load() {\n\tunset( $_COOKIE['bp-group-documents-category'] );\n}", "public function del_category()\n {\n if ($this->isLoggedIn()) {\n $id = $this->input->post('id');\n $this->Admin_model->delete('category', $id);\n } else {\n redirect(base_url());\n }\n }", "public function delete()\r\n\t{\r\n\t\t$tbl_grade_categories = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);\r\n\t\t$sql = 'DELETE FROM '.$tbl_grade_categories.' WHERE id = '.$this->id;\r\n\t\tapi_sql_query($sql, __FILE__, __LINE__);\r\n\t}", "public function deleteCategoryByID(){\n $check = $this->getSubCategory();\n $bool = true;\n foreach($check as $row){\n if($row->category_id == $this->getCategoryID()){\n $bool = false;\n }\n }\n if($bool==true){\n\n $sql = \"DELETE FROM category WHERE category_id = ?\";\n $this->db->query($sql,array($this->getCategoryID()));\n echo '1';\n return $this->db->affected_rows();\n exit;\n\n }\n }", "public function testInventoryCategoriesABANDONRequestCategoriesAbandonDelete()\n {\n }", "function _ppRemoveInactiveCategories()\n {\n }", "public function testInventoryCategoryDELETERequestCategoriesCategoryIDDelete()\n {\n }", "public function resetCategoriesOrder()\n\t{\n\t\tif (!$this->core->auth->check('categories',$this->id)) {\n\t\t\tthrow new Exception(__('You are not allowed to delete categories'));\n\t\t}\n\t\t\n\t\t$this->categories()->resetOrder();\n\t\t$this->triggerBlog();\n\t}", "public function categoryDestroy($id)\n {\n //\n }", "public function deleteCategoryByAdmin($cb_id) \r\n {\r\n\t $conn = new mysqli($this->getServername(), $this->getUsername(), $this->getPassword(), $this->getDbname());\r\n if ($conn->connect_error) \r\n {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n /* \r\n\t sql = UPDATE users SET u_login='user11', u_passw='user11', u_firstname='Polzovatel', \r\n\t u_lastname='Pervyj', u_mail='user1@user1.com' WHERE u_id='2' ; \r\n\t */ \r\n try {\r\n\t\t $sql = \"DELETE FROM category_book WHERE cb_id = '\".$cb_id.\"' \";\r\n\t\t\t \r\n $result = $conn->query($sql);\r\n\t\t \r\n\t\t $conn->close();\r\n\t\t } catch (Exception $e) \r\n\t\t { \r\n\t\t\techo \"error in database is = \".$e;\r\n\t\t\t}\r\n\t\t\r\n\t \r\n }", "function deleteCategoria($id_categoria){\n $sentencia = $this->db->prepare(\"DELETE FROM categoria WHERE id=?\");\n $sentencia->execute(array($id_categoria));\n }", "function remove_home_category($category)\r\n {\r\n //$service_category_data = json_decode($service_category_data);\r\n $this->load->module_model('cb_home_category', 'home_category_model');\r\n //$CB_Service_category['category'] = $service_category_data->{\"category\"};\r\n //$CB_Service_category['description'] = $service_category_data->{\"description\"};\r\n $success = $this->home_category_model->delete($category);\r\n return $success;\r\n }", "function delete_category_ids ($backup_unique_code) {\n global $CFG;\n $status = true;\n $status = execute_sql(\"DELETE FROM {$CFG->prefix}backup_ids\n WHERE backup_code = '$backup_unique_code'\",false);\n return $status;\n }", "function deleteCategoria($_idCategoria){\n $query = 'DELETE FROM categoria WHERE id_categoria = ?;';\n $stmt = OpenCon() -> prepare($query);\n $stmt -> execute(array($_idCategoria));\n return $stmt;\n }", "function qa_db_category_delete($categoryid)\n{\n\tqa_db_ordered_delete('categories', 'categoryid', $categoryid,\n\t\tqa_db_apply_sub('parentid<=>#', array(qa_db_category_get_parent($categoryid))));\n}", "function delete_category($id)\n {\n return $this->db->delete('category',array('id'=>$id));\n }", "function removeCategory($id, $category){\n }", "function delete_category($cat_id=NULL)\n {\n if($this->session->userdata('logged_in'))\n {\n if(!is_null($cat_id))\n {\n $this->mhome->delete_category($cat_id);\n }\n $this->show_categories();\n }\n else\n {\n redirect('/admin');\n }\n \n }", "public function deleteCategory(Request $request)\n {\n $category_id=$request->id;\n $delete = Category::where('id','=',$category_id)->delete();\n\n return $subCategory = Category::all();\n }", "static function delete_category($term, $tt_id){\n\t\t /*\n\t\t $table = self::get_table_name();\n\t\t global $wpdb;\n\t\t $wpdb->query(\"DELETE FROM `$table` WHERE `term_id` = '$term'\");\n\t\t return;\n\t\t * */\n\t\t \n\t\t if(self::get_global_term() == $term){\n\t\t\tupdate_option('global_category_binding', 0);\n\t\t }\n\t }", "public function indexCategoryEventDelete()\n {\n Mage::getSingleton('index/indexer')->indexEvents(\n Mage_Catalog_Model_Category::ENTITY,\n Mage_Index_Model_Event::TYPE_DELETE\n );\n }", "public function clean()\n {\n $database = JFactory::getDbo();\n \n $query = $database->getQuery(true);\n $query\n ->delete($database->qn('#__jspace_cache'))\n ->where($database->qn('catid').'='.(int)$this->category->id);\n \n $database->setQuery($query);\n $database->execute();\n }", "public function deleteCategories($id)\n {\n trigger_error('Do not use anymore 01!', E_USER_NOTICE);\n }", "public function removeAllModuleSysDmailCategory() {\n\t\t// ACHTUNG: Schleife funkt nur da clone $categories --> siehe http://forge.typo3.org/issues/13147\n\t\tforeach ($this->getModuleSysDmailCategory() as $item) {\n\t\t\t$this->removeModuleSysDmailCategory($item);\n\t\t}\n\t}", "public function delete_conceptos()\r\n\t\t{\r\n\t\t\t$sql=\"DELETE FROM conceptos WHERE fecha < DATE_SUB(CURDATE(), INTERVAL 1 DAY) WHERE compras is NULL\";\r\n\t\t\t$this->query($sql);\r\n\t\t\t$res=$this->execute();\r\n\t\t}", "public function multideletecategory()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'document', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$totaldata = $this->postring->valid($_POST['totaldata'], 'xss');\n\t\t\tif ($totaldata != \"0\") {\n\t\t\t\t$items = $_POST['item'];\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$query_desc = $this->podb->deleteFrom('category_document_description')->where('id_category_document', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query_desc->execute();\n\t\t\t\t\t$query_cat = $this->podb->deleteFrom('category_document')->where('id_category_document', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query_cat->execute();\n\t\t\t\t}\n\t\t\t\t$this->poflash->success($GLOBALS['_']['document_category_message_3'], 'admin.php?mod=document&act=category');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['document_category_message_6'], 'admin.php?mod=document&act=category');\n\t\t\t}\n\t\t}\n\t}", "function delcatok($id){\n\n// del from cat\n$res = mysql_query(\"delete from calendar_cat where cat_id='$id'\");\n\n// del events with cat = $id\n$querysel = \"select id from events where cat='$id'\";\n$resultsel = mysql_query($querysel);\nwhile ($rowsel = mysql_fetch_object($resultsel)){\n$querydel = \"delete from events where id='\".$rowsel->id.\"'\";\n$resultdel = mysql_query($querydel);\n\n}\necho \"<meta http-equiv=\\\"refresh\\\" content=\\\"0; url=calendar.php?op=cats\\\">\";\n\n}", "function deleteChoiceCategory(){\n \t\t$data['userdata']\t= $this->session->userdata('current_user');\n \t\t$catId \t\t\t= $this->input->post('choice_category_id');\n\n\t\t$CatDetail['is_active'] \t= \"0\";\n\t\t$CatDetail['updated_date'] \t= date(\"Y-m-d H:i:s\");\t\n\t\t$result = $this->Choice_model->editChoiceCategory($CatDetail,$catId);\n\n\t\tif($result>0){\n\t\t\t//$this->session->set_flashdata('success_msg', \"Category details delete successfully\");\n\t\t\t$response = array(\"success\"=>\"1\",\"message\"=>\"Category details delete successfully\");\n\t\t}\t\n\t\telse{\n\t\t\t$response = array(\"success\"=>\"0\",\"message\"=>\"Something went wrong while deleted category details\");\n\t\t}\n\t\techo json_encode($response);\n\t\texit;\n\t}", "private function deleteCategoryEngine(){\n $deleteCategoryID = $_REQUEST[\"deleteCategoryID\"]; //gets POSTed categoryID to delete\n \n $categoryModel = $GLOBALS[\"categoryModel\"]; // gets ccategory model\n $delited = $categoryModel->deleteCategory($deleteCategoryID); //delete category from database\n \n if($delited){\n echo json_encode(\"success\");} // if success echo a respond to view\n else {return false;}\n }", "protected function _deleteCategory($c_id) {\n if ($c_id[0] <> 1 && $c_id[0] <> 2) {\n $this->loadModel('Word');\n $category = $this->Category->find('first',array('conditions' => array('id' => $c_id[0])));\n if ($category) {\n $p = $category['Category']['parent_category'];\n if ($category['Category']['has_child'] == 1) {\n $child = $this->Category->getChildCategories($c_id[0]);\n if($child) {\n foreach ($child['ids'] as $c) {\n $this->Word->deleteAll(array('Word.category_id' => $c));\n }\n }\n $this->Category->deleteAll(array('parent_category' => $c_id[0]));\n }\n $this->Word->deleteAll(array('Word.category_id' => $c_id[0]));\n $this->Category->delete($c_id[0]);\n //make has_child = 0 when it does not have any child\n $has_childs = $this->Category->find('all',array('conditions' => array('parent_category' => $p)));\n if (!$has_childs) {\n $parent = $this->Category->find('first',array('conditions' => array('id' => $p)));\n $this->Category->id = $parent['Category']['id'];\n $this->Category->saveField('has_child',0);\n }\n $this->Session->setFlash('Category Successfully Deleted','flash');\n $this->redirect(array(\"controller\" => \"categories\", \"action\" => \"index\"));\n }\n }\n }", "function delete()\n {\n $cateDao = new CategoryDao();\n $row = new Category(1, \"trung\", \"abc\");\n return $cateDao->delete($row);\n }", "public function delete_all_approvers_by_company($company)\n\t{\n\n\t\t\tGeneral::system_audit_trail('Administrator','Disc Act Memos Approval','logfile_admin_notif_approval','Delete Disc Act Memos Approvers of company : '.$company,'DELETE',$company);\n\n\t\t$action = $this->notification_approval_model->delete_all_approvers_by_company($company);\n\t\t$check_with_division = $this->form_approval_model->with_division($company);\n\t\t$this->data['with_division']=$check_with_division;\n\t\t$this->data['classification']='All';\n\t\t$this->data['location']= 'All';\n\t\t$this->data['notification']='All';\n\t\tif($check_with_division > 0)\n\t\t{\n\t\t\t$this->data['get_division'] = $this->form_approval_model->load_division($company);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data['get_department'] = $this->form_approval_model->with_department_viewing($company,'All');\n\t\t}\n\t\t$this->data['flash_id']=$company;\n\t\t$this->data['action_']='deleted';\n\t\t$this->session->set_flashdata('success_deleted',\"deleted\");\n\t\t$this->data['classificationList'] = $this->form_approval_model->classificationList($company);\n\t\t$this->data['locationList'] = $this->form_approval_model->locationList($company);\n\t\t$this->data['notificationList'] = $this->form_approval_model->loadNotification($company);\n\t\t$this->data['company']=$company;\n\t\t$this->data['company_name'] = $this->notification_approval_model->get_company_name($company);\n\t\t$this->load->view('app/notification_approval/manage_notification',$this->data);\n\t}", "function delete_category() {\n global $db_connect;\n if(isset($_GET['del'])) {\n $category_id = $_GET['del'];\n $query = \"DELETE FROM categories WHERE category_id = $category_id\";\n $delete_query_result = mysqli_query($db_connect, $query);\n header(\"Location: rep_categories.php\");\n exit();\n }\n}", "function deleteCategoria($IDcategoria) {\n\tglobal $db;\n\t\n\t$db->exec('DELETE FROM categorias WHERE ID = '.decrypt($IDcategoria));\n}", "public function deleteAction() {\n\t\t$feedDAO = FreshRSS_Factory::createFeedDao();\n\t\t$catDAO = new FreshRSS_CategoryDAO();\n\t\t$url_redirect = array('c' => 'subscription', 'a' => 'index');\n\n\t\tif (Minz_Request::isPost()) {\n\t\t\tinvalidateHttpCache();\n\n\t\t\t$id = Minz_Request::param('id');\n\t\t\tif (!$id) {\n\t\t\t\tMinz_Request::bad(_t('feedback.sub.category.no_id'), $url_redirect);\n\t\t\t}\n\n\t\t\tif ($id === FreshRSS_CategoryDAO::defaultCategoryId) {\n\t\t\t\tMinz_Request::bad(_t('feedback.sub.category.not_delete_default'), $url_redirect);\n\t\t\t}\n\n\t\t\tif ($feedDAO->changeCategory($id, FreshRSS_CategoryDAO::defaultCategoryId) === false) {\n\t\t\t\tMinz_Request::bad(_t('feedback.sub.category.error'), $url_redirect);\n\t\t\t}\n\n\t\t\tif ($catDAO->deleteCategory($id) === false) {\n\t\t\t\tMinz_Request::bad(_t('feedback.sub.category.error'), $url_redirect);\n\t\t\t}\n\n\t\t\t// Remove related queries.\n\t\t\tFreshRSS_Context::$user_conf->queries = remove_query_by_get(\n\t\t\t\t'c_' . $id, FreshRSS_Context::$user_conf->queries);\n\t\t\tFreshRSS_Context::$user_conf->save();\n\n\t\t\tMinz_Request::good(_t('feedback.sub.category.deleted'), $url_redirect);\n\t\t}\n\n\t\tMinz_Request::forward($url_redirect, true);\n\t}", "function delete ()\n {\n $doc_category_id = $this->input->post ( 'doc_category_id' );\n $checkCategoryInDocument = Doctrine::getTable ( 'DocCategory' )->checkCategoryInDocument ( $doc_category_id );\n\n if ( $checkCategoryInDocument === false )\n {\n $docCategory = Doctrine::getTable ( 'DocCategory' )->retrieveById ( $doc_category_id );\n\n if ( $docCategory->delete () )\n {\n $exito = true;\n $msg = $this->translateTag ( 'General' , 'operation_successful' );\n }\n else\n {\n $exito = false;\n $msg = $this->translateTag ( 'Document' , 'category_document_type_cant_be_eliminated' );\n }\n }\n else\n {\n $exito = false;\n $msg = $this->translateTag ( 'Document' , 'category_document_type_cant_be_eliminated' );\n }\n\n $json_data = $this->json->encode ( array ( 'success' => $exito , 'msg' => $msg ) );\n echo $json_data;\n }", "function deleteCategory($id){\n $this->authHelper->checkLogged();\n $this->model->remove($id);\n header(\"Location: \" . BASE_URL);\n }", "function deleteCompanyLedger($db, $cl_no, $del_adm) {\n\n\t\t$query=\"SELECT GROUP_NO, RGN_NO, GRGL_NO\n\t\t\t\t FROM TBL_COMPANY_LEDGER \n\t\t\t\t WHERE CL_NO = '$cl_no' \";\n\t\t\n\t\t//echo $query.\"<br/>\";\n\t\t$result = mysql_query($query,$db);\n\t\t$record = array();\n\n\t\tif ($result <> \"\") {\n\t\t\tfor($i=0;$i < mysql_num_rows($result);$i++) {\n\t\t\t\t$record[$i] = sql_result_array($result,$i);\n\n\t\t\t\t//$TO_CP_NO\t\t= $record[$i][\"TO_CP_NO\"];\n\t\t\t\t//$UNIT_PRICE\t\t= $record[$i][\"UNIT_PRICE\"];\n\t\t\t\t//$INOUT_DATE\t\t= $record[$i][\"INOUT_DATE\"];\n\t\t\t\t//$INOUT_TYPE\t\t= $record[$i][\"INOUT_TYPE\"];\n\t\t\t\t//$REG_DATE\t\t= $record[$i][\"REG_DATE\"];\n\t\t\t\t$RGN_NO\t\t\t= $record[$i][\"RGN_NO\"];\n\t\t\t\t$GRGL_NO\t\t= $record[$i][\"GRGL_NO\"];\n\t\t\t\t$GROUP_NO\t\t= $record[$i][\"GROUP_NO\"];\n\n\t\t\t\t//대입이거나 대체일경우 같이 삭제되는 것으로\n\t\t\t\tif($GROUP_NO != null) { \n\t\t\t\t\t$query = \" UPDATE TBL_COMPANY_LEDGER\n\t\t\t\t\t\t SET DEL_TF = 'Y', DEL_ADM = '$del_adm', DEL_DATE = now()\n\t\t\t\t\t\tWHERE GROUP_NO = $GROUP_NO AND CL_NO <> $cl_no \";\n\n\t\t\t\t\t//echo $query.\"<br/>\";\n\t\t\t\t\t//exit;\n\n\t\t\t\t\tmysql_query($query,$db);\n\t\t\t\t} \n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\n\t\t$query = \" UPDATE TBL_COMPANY_LEDGER\n\t\t\t\t\t SET DEL_TF = 'Y', DEL_ADM = '$del_adm', DEL_DATE = now()\n\t\t\t\t\tWHERE CL_NO = '$cl_no' AND DEL_TF = 'N' \";\n\n\t\t//echo $query;\n\n\t\tif(!mysql_query($query,$db)) {\n\t\t\treturn false;\n\t\t\techo \"<script>alert(\\\"[1]오류가 발생하였습니다 - \".mysql_errno().\":\".mysql_error().\"\\\"); //history.go(-1);</script>\";\n\t\t\texit;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}", "public function testDeleteCategory()\n {\n $user = \\App\\Models\\User::find(1);\n\n $faker = \\Faker\\Factory::create();\n\n $this->browse(function (Browser $browser) use ($user) {\n\n $browser->loginAs($user)\n ->visit(action('\\Gdevilbat\\SpardaCMS\\Modules\\Ecommerce\\Http\\Controllers\\CategoryController@index'))\n ->assertSee('Master Data of Categories')\n ->waitForText('Actions')\n ->clickLink('Actions')\n ->clickLink('Delete')\n ->waitForText('Delete Confirmation')\n ->press('Delete')\n ->waitForText('Master Data of Categories')\n ->assertSee('Successfully Delete Taxonomy!');\n });\n }", "public function deleted(Issue_Categories $issue_Categories)\n {\n echo 'Issue_Categories deleted';\n }", "public function delcat()\n\t{\n\t\t$where = array(\n\n 'id' => $this->input->get('id')\n\n );\n $row = $this->db->get_where('td_question', array('cat_id' => $this->input->get('id')))->num_rows();\n\n \n\n if($row > 0){\n\n \t //For notification storing message\n $this->session->set_flashdata('msg', 'Can not Deleted Already Used in Question !');\n\n redirect(\"admin/add_new/category\");\n\n }else{\n\n \t$this->Master->f_delete('md_category', $where);\n \t //For notification storing message\n $this->session->set_flashdata('msg', 'Successfully deleted!');\n\n redirect(\"admin/add_new/category\");\n\n }\n \n\t}", "public function deleteAction()\n {\n //Load object\n $category = Mage::getModel('acierno_news/category')->load($this->getRequest()->getParam('category_id'));\n\n if(!$category || !$category->getId())\n {\n Mage::getSingleton('adminhtml/session')->addError($this->__('There was an error during the category loading'));\n return $this->_redirect('*/*/');\n }\n\n //delete category\n try{\n $category->delete();\n } catch(Exception $e) {\n Mage::logException($e);\n Mage::getSingleton('adminhtml/session')->addError($this->__('There was an error during the category deleting'));\n return $this->_redirect('*/*/');\n\n }\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The category was successfully deleted'));\n return $this->_redirect('*/*/');\n }", "function deleteCategoryListing($id)\n\t\t{\n\t\n\t\t\t$this->db->where('id', $id);\n\t\n\t\t\t$this->db->delete('expense_cateogry'); \n\t\t\t\n\t\t\treturn $this->db->affected_rows();\n\t\n\t\t}", "public function destroy($key_doc_category)\n {\n\n $key_doc_categories = DB::table('key_doc_categories')\n ->where('title_lao', '=', $key_doc_category)->delete();\n\n\n $LanguageLine = DB::table('language_lines')\n ->where('key', '=', $key_doc_category)->delete();\n\n\n return redirect()->route('manage_key_categories.index')\n ->with('success','Delete Success');\n\n }", "function post_categories_delete($id){\n $id = intval($id);\n //Xóa danh mục\n $sql = \"DELETE FROM post_categories WHERE id = $id\";\n mysql_query($sql) or die(mysql_error());\n}", "public function deleteCategory($del)\n {\n $sql=\"UPDATE category set delete_status = ? , delete_date = ? WHERE id = ? \";\n if($this->db->query($sql,$del)) {\n \n return true;\n }\n return FALSE;\n }", "function catDelete($id=0) {\r\n\t\tif($id > 0) {\r\n\t\t\t$q\t= \"UPDATE assets_cats SET enabled = 0 WHERE id = '\".$id.\"'\";\r\n\t\t\t$this->objDA->query($q);\r\n\t\t\t\r\n\t\t\t$this->smarty->assign('msg','Category deleted.');\r\n\t\t}\r\n\t\t\r\n\t\t$this->catList();\r\n\t}", "public function delete()\n {\n JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n $ids = JRequest::getVar('cid', array(), '', 'array');\n $model = $this->getModel('Vmcat');\n list($resuls,$msg) = $model->delete($ids);\n $this->setMessage($msg);\n// $this->setRedirect(JRoute::_('index.php?option=com_condpower&view=vmcats'), false);\n $this->setRedirect(\n JRoute::_(\n 'index.php?option=' . $this->option . '&view=' . $this->view_list\n . $this->getRedirectToListAppend(), false\n )\n );\n }", "public function delete( $id ){\n $database = new MySQLDatabase();\n\n $this->category_id = $database->escape_value($id);\n\n //Remove survey from database\n $result = $database->query(\"DELETE from `categories` WHERE id = {$this->category_id}\");\n \n if( $result && $database->affected_rows() == 1 ){\n echo 'Deleted category';\n }else{\n echo 'Delete failed';\n }\n }", "public function destroy(CategoriesTechicalAnalysis $categoriesTechicalAnalysis)\n {\n //\n }", "public function uninstall() {\n\t\t// delete options\n\t\tparent::uninstall();\n\t\t\n\t\t// delete categories\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_\".$this->tableName.\"_category\n\t\t\tWHERE\t\tpackageID = \".$this->installation->getpackageID();\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "function delete_categoria_activos ($value='') {\n\t\t\t\n\t\t\t$frm_data = $this->input->post();\n\t\t\t$add_cate_code = $frm_data['add_cate_code'];\n\t\t\t$add_cate_code = $this->Model_general->desencriptar($add_cate_code);\n\t\t\t$deleted = $this->db->query(\"UPDATE categoria_activos c set c.eliminado = '1'\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE c.codigo = '$add_cate_code' \");\n\n\t\t\treturn $deleted;\n\t\t}", "public function deletes_category(){\n $ids = $this->input->post('checkone');\n foreach($ids as $id)\n {\n $this->delete_option_once($id);\n }\n\t\t$this->session->set_flashdata(\"mess\", \"Xóa thành công!\");\n redirect($_SERVER['HTTP_REFERER']);\n }", "public function deleteMemberCategoryAction() {\r\n\r\n $role_id = (int) $this->_getParam('category_id');\r\n $store_id = (int) $this->_getParam('store_id');\r\n $rolesTable = Engine_Api::_()->getDbtable('roles', 'sitestoremember');\r\n $rolesTable->delete(array('role_id = ?' => $role_id, 'store_id = ?' => $store_id));\r\n }", "function deleteHospitalCtgr() {\n if(!isset($this->id) || ($this->id <= 0)) {\n $this->Error[\"Application Error ClssCmpnCtgrDltCmpnCtgrID-Invalid Argument\"] = \"Class CompanyCategory: In deleteCmpnCtgr FIRM_CAT_ID is not set\";\n return false;\n }\n\n $sql = sprintf(\"SELECT hospital_id FROM hospitals_category_list WHERE category_id = %d\", $this->id);\n $this->conn->setsql($sql);\n if($this->conn->getTableRow()) {\n $this->Error[\"SQL ERROR ClssCmpnCtgrDltCmpnCtgr\"] = \"Фирмената категория не може да бъде изтрита! Има свързани с нея фирми!\";\n return false;\n }\n\n $sql = sprintf(\"DELETE FROM hospital_category WHERE id = %d\", $this->id);\n $this->conn->setsql($sql);\n $this->conn->UpdateDB();\n if($this->conn->error) {\n for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n $this->Error[\"SQL ERROR ClssCmpnCtgrDltCmpnCtgr-\".$key] = $this->conn->error[$key];\n }\n return false;\n }\n return true;\n }", "function deletecart(){\n $del = date('Y-m-d', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));\n mysql_query(\"DELETE FROM os_keranjang WHERE tanggal_belanja < '$del'\");\n }", "function delete_products_google_category($p_products_google_categories_array)\n\t{\n\t\tforeach($p_products_google_categories_array as $t_products_google_categories_id) {\n\t\t\t$coo_taxonomy_control = MainFactory::create_object('GoogleTaxonomyControl');\n\t\t\t$coo_taxonomy_control->create_product_google_category();\n\n\t\t\t$coo_taxonomy_control->coo_product_google_category->set_products_google_categories_id($t_products_google_categories_id);\n\t\t\t$coo_taxonomy_control->coo_product_google_category->delete();\n\t\t}\n\n\t\treturn true;\n\t}", "public function onPreDeleteCategory(\\Enlight_Event_EventArgs $eventArgs)\n {\n if ($this->autoUpdateProducts===Config::UPDATE_MANUAL) {\n return;\n }\n $category = $eventArgs->get('entity');\n $this->connectExport->markProductsInToBeDeletedCategories($category);\n }", "function catDelete($id=0) {\r\n\t\tif($id > 0) {\r\n\t\t\t$q\t= \"UPDATE pass_cats SET active = 0 WHERE id = '\".$id.\"'\";\r\n\t\t\t$this->objDA->query($q);\r\n\t\t\t\r\n\t\t\t$this->smarty->assign('msg','Category deleted.');\r\n\t\t}\r\n\t\t\r\n\t\t$this->catList();\r\n\t}", "function fn_delete_seo_names($company_id)\n{\n db_query(\"DELETE FROM ?:seo_names WHERE company_id = ?i\", $company_id);\n db_query(\"DELETE FROM ?:seo_redirects WHERE company_id = ?i\", $company_id);\n}", "function DELETE()\n{\n\t$sql = \"SELECT *\n\t\t\tFROM CATEGORIAS\n\t\t\tWHERE (ID = '$this->id')\";\n\n\t$obj = $this->mysqli->query($sql);\n\n\t//Comprobacion de que la tupla es unica\n\tif( mysqli_num_rows($obj) == 1 ){\n\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM PRODUCTOS_CATEGORIAS\n\t\t\t\tWHERE (ID_CATEGORIA = '$this->id')\";\n\n\t\t$obj = $this->mysqli->query($sql);\n\t\tif( mysqli_num_rows($obj) <= 0 ){\n\t\t\t$sql = \"DELETE \n\t \t\t\tFROM CATEGORIAS\n\t \t\t\tWHERE ID = '$this->id'\"; \n\n\t \t\tinclude '../Model/BD_logger.php';//se incluye el archivo con el log\n\t \t\t//se reliza el log del delete\t\n\t \t\tif (writeAndLog($sql)) return '00005'; \n\t \t}\n\t}\n\treturn '00006';\n}", "public function delete_category(Request $request)\n\t{\n\t\t$category_id = $request->id;\n\t\t$category = $this->category->find($category_id);\n\t\t$category->status = 0;\n\t\t$category->save();\n\n\t\t$foodlist = $this->foodlist->where('category_id',$category_id)->update(['status'=>0]);\n\t\t\n\n\t\treturn redirect('/admin/category_list')->with('success','Category Deleted Successfully');\n\t}", "function delete_categoria_insumo($catinsumo_id)\r\n {\r\n return $this->db->delete('categoria_insumo',array('catinsumo_id'=>$catinsumo_id));\r\n }", "function delete_categoria_trabajo($cattrab_id)\r\n {\r\n return $this->db->delete('categoria_trabajo',array('cattrab_id'=>$cattrab_id));\r\n }", "public function delete($category, $key='');" ]
[ "0.68750715", "0.6843826", "0.6821846", "0.65499544", "0.64259607", "0.6382352", "0.63459516", "0.6332128", "0.6323224", "0.6319958", "0.6201725", "0.60686034", "0.60551167", "0.60512954", "0.6040695", "0.60331166", "0.6023399", "0.6001682", "0.60001594", "0.5999868", "0.59968674", "0.59649163", "0.5931869", "0.59199435", "0.5918529", "0.5912269", "0.5911637", "0.58968484", "0.58966696", "0.5877278", "0.5868301", "0.5867377", "0.5865339", "0.5865158", "0.58574456", "0.58522445", "0.585097", "0.582077", "0.5820226", "0.5819837", "0.58148575", "0.5808525", "0.58079034", "0.57848287", "0.5776458", "0.5769528", "0.57599086", "0.575926", "0.57449394", "0.57446074", "0.574413", "0.5739666", "0.5736086", "0.5734346", "0.57263523", "0.5723993", "0.5715311", "0.5714618", "0.57105535", "0.5707361", "0.57035476", "0.5702344", "0.5676406", "0.56723446", "0.5663118", "0.5653968", "0.56497765", "0.5648648", "0.5641986", "0.5639557", "0.56329006", "0.5630913", "0.5624214", "0.5619888", "0.56093025", "0.5606713", "0.5601721", "0.5597496", "0.5594148", "0.5588008", "0.5588004", "0.55850893", "0.55783725", "0.55771506", "0.5571652", "0.5565305", "0.5563286", "0.5558222", "0.55561686", "0.5552151", "0.55491364", "0.5540123", "0.5538988", "0.5537984", "0.5531872", "0.55310464", "0.5529634", "0.5526948", "0.55232656", "0.55198747" ]
0.75186765
0
Function to fetch company user id from company username May 10,2016
Функция для получения идентификатора пользователя компании из имени пользователя компании 10 мая 2016 года
function getCompanyIdfromCompanyUserName($companyUserName) { $qry="SELECT id FROM company_profiles WHERE company_username='".$companyUserName."' "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $id = $row['id']; } } return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "abstract public function GetUserID(string $username);", "function getCompanyUserNameUsingCompUserRelation($companyID)\n{\n\t$companyUN= '';\n \t$qry=\"SELECT company_username\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyUN\t\t\t=\t$row['company_username'];\n\t\t}\n \t \t\n }\n return $companyUN;\n\n}", "function getCompanyOwnerFromCOMPANYID($companyid)\n{\n\t//SELECT clientid FROM company_profiles WHERE id=1;\n\t$qry=\"SELECT clientid FROM company_profiles \n\t\t\tWHERE id='\".$companyid.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getUserIdfromUserName($userName)\n{\n\t\n\t$qry=\"SELECT clientid FROM entrp_login \n\t\t\tWHERE username='\".$userName.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['clientid']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n\t\n}", "public function getUserCompanyId() {\n\t\treturn ($this->userCompanyId);\n\t}", "function getCompanyIDFromCompUserRelation($userID)\n{\n\t$companyid= '';\n \t$qry=\"SELECT companyid\n\t\t\tFROM entrp_company_members \n\t\t\tWHERE clientid=\".$userID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyid\t\t\t=\t$row['companyid'];\n\t\t}\n \t \t\n }\n return $companyid;\n}", "public function getUserID();", "function fetch_userid($username)\n{\n global $ilance, $myapi;\n \n $sql = $ilance->db->query(\"\n SELECT user_id\n FROM \" . DB_PREFIX . \"users\n WHERE username = '\" . $ilance->db->escape_string($username) . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $user = $ilance->db->fetch_array($sql);\n return $user['user_id'];\n }\n \n return 0;\n}", "function bp_core_get_userid( $username ) {\r\n\tglobal $wpdb;\r\n\r\n\tif ( empty( $username ) )\r\n\t\treturn false;\r\n\r\n\treturn apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM \" . CUSTOM_USER_TABLE . \" WHERE user_login = %s\", $username ) ) );\r\n}", "public function getUserNameIdentifier();", "function user_id_from_username($username)\n\t {\n\t \t$username = sanitize($username);\n\t \treturn mysqli_result(mysqli_query(connect(), \"SELECT user_id FROM users WHERE username = '$username'\"), 0, 'user_id' );\n\t }", "function getCompanyIDfromUserID($userID)\n{\n\t//SELECT id FROM company_profiles WHERE clientid=1;\n\t$companyID\t=\tgetCompanyIDFromCompUserRelation($userID);\n\t\n\t$qry=\"SELECT id FROM company_profiles \n\t\t\tWHERE id='\".$companyID.\"' \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$id\t\t=\t$row['id']; \t\t\t\t\t\n\t\t}\n\t\treturn $id;\n\t}\n\telse\n\t{\n\t\treturn null;\n\t} \n}", "function getUserId($username)\n{\n $sqlUser = \"SELECT id FROM webcontrat_utilisateurs WHERE username='$username';\";\n $rowUser = querySQL($sqlUser, $GLOBALS['connectionW'], true, true);\n $userId = $rowUser['id'];\n return ($userId);\n}", "function user_id_from_username($conn, $username) {\n\t$username = sanitize($username);\n\n\t$query = $conn->query(\"SELECT `user_id` FROM `users` WHERE `username` = '$username'\");\n\n\treturn $query->fetch(PDO::FETCH_ASSOC)['user_id'];\n\t//return mysql_result(mysql_query(\"SELECT `user_id` FROM `users` WHERE `username` = '$username'\"), 0, 'user_id');\n}", "public function getUserID ();", "public function getUserIdByUserName($username);", "function get_user_ID($username)\n {\n $myArray = readDBase(\"user_ID\", \"user\", \"username = ?\", array($username));\n return $myArray[0]['user_ID']; //il exist uniquement un et un seul 'ID' qui Correspond à de 'username' là\n }", "private static function DEPRECATEDgetUsernameFromOpenIdUrl($url) {\n # URL must be a string\n if (!isset($url) || !is_string($url) || strlen($url) == 0) {\n return null;\n }\n\n # it must start with our server, case doesn't matter\n /* (strpos(strtolower($url), strtolower($wgServer)) !== 0) {\n return null;\n }*/\n\n $parts = parse_url($url);\n//pretty_print_r($parts);\n $relative = $parts['path'];\n if (!is_null($parts['query']) && strlen($parts['query']) > 0) {\n preg_match(\"/user_id=(.*?)(?:&|$)/\", $parts['query'], $matches);\n //pretty_print_r($matches);\n $userId=$matches[1];\n $user = User::getObject($userId);\n }\n\n $retval = null;\n if($user) {\n $retval = $user;\n }\n return $retval;\n }", "function username_to_id($connection, $username) {\n $id = mysqli_query($connection,\n \"SELECT user_id FROM users WHERE username LIKE '$username'\")\n ->fetch_assoc()[\"user_id\"];\n return $id;\n}", "function getCompanyNameUsingCompUserRelation($companyID)\n{\n\t$companyN= '';\n \t$qry=\"SELECT company_name\n\t\t\tFROM company_profiles \n\t\t\tWHERE id=\".$companyID.\"\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$companyN\t\t\t=\t$row['company_name'];\n\t\t} \t \t\n }\n return $companyN;\n\n}", "function find_user_by_id($username,$connection)\n {\n $salt_string=\"@!\";\n $username.=$salt_string;\n $_SESSION[\"username\"]=$username;\n $query=\"SELECT user_id FROM user_details WHERE username='$username'\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return $row['user_id'];\n }\n }", "public function getCompanyNameIdentifier();", "function f_getIdfromUser($name)\n\t{\n\t\tglobal $db;\n\t\t$sql_query = \"select user_id from user where user_name = '$name' limit 1\";\n\t\t$result = $db->query($sql_query) or die($db->error);\n\t\t$row = $result->fetch_assoc();\n\t\treturn $row['user_id'];\n\t}", "public static function loginCompany($user)\n {\n $result = DB::select()->from('Company')->where('CompanyName', '=', $user)->execute();\n $res = array();\n foreach($result as $row)\n {\n return $row;\n }\n return -1;\n \n /*$user = $this->conn->real_escape_string($user);\n $pwhash = $this->conn->real_escape_string($pwhash);\n \n $sql = \"SELECT *\n FROM `Company`\n WHERE `CompanyName` = '\".$user.\"'\";\n\n \n $result = $this->conn->query($sql);\n $r = $result->fetch_assoc();\n\n //mysql_free_result($result);\n if($user == $r['CompanyName'] && $pwhash == $r['CompanyPass'])\n {\n return $r['id_pk'];\n \n }\n else {\n return -1;\n }*/\n }", "function userID(){\n \t$username = strtolower($this->username); // sanitization\n\t $token = $this->access_token;\n\t $url = \"https://api.instagram.com/v1/users/search?q=\".$username.\"&access_token=\".$token;\n\t $get = file_get_contents($url);\n\t $json = json_decode($get);\n \n\n\t foreach($json->data as $user){\n\t if($user->username == $username){\n\t return $user->id;\n\t }\n\t }\n\n\t return '00000000'; // return this if nothing is found\n }", "static function get_company_id($company_url) {\n try {\n $url = parse_url($company_url);\n $path = $url[path];\n $path_array = explode (\"/\" , $path);\n $company_id = end($path_array);\n \n return $company_id; \n } catch (Exception $error) {\n echo 'Execption get company id : '.$error->getMessage();\n }\n }", "public function getUserIdentifier(): string;", "function find_username_by_id($user_id,$connection) \n {\n $salt_string=\"@!\";\n $query=\"SELECT username FROM user_details WHERE user_id=$user_id\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return chop($row['username'],$salt_string);\n }\n }", "protected function getUserIdentifier(): string\n {\n return $this->getValidWebsiteUser()->getIdentifier();\n }", "function get_id_user($login)\n{\n return (get_user_id($login));\n}", "public function get_username();", "function get_user_id_from_string($string)\n{\n}", "function getUserId()\n\t{\n\t\t$prism_id = mysql_real_escape_string(getPrismId());\n\t\t$row = getDBResultRecord(\"\n\t\t\tSELECT user_id \n\t\t\tFROM user_table \n\t\t\tWHERE prism_id='$prism_id';\n\t\t\");\n\t\t\n\t\tif(sizeof($row) == 0)\n\t\t{\n\t\t\t$GLOBALS[\"_PLATFORM\"]->sandboxHeader('HTTP/1.1 404 Not Found');\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t$user_id = $row['user_id'];\n\t\treturn $user_id;\n\t}", "function ajan_core_get_userid_from_nicename( $user_nicename ) {\n\tglobal $wpdb;\n\n\tif ( empty( $user_nicename ) )\n\t\treturn false;\n\n\treturn apply_filters( 'ajan_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM {$wpdb->users} WHERE user_nicename = %s\", $user_nicename ) ), $user_nicename );\n}", "function bp_core_get_userid_from_nicename( $user_nicename ) {\r\n\tglobal $wpdb;\r\n\r\n\tif ( empty( $user_nicename ) )\r\n\t\treturn false;\r\n\r\n\treturn apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM \" . CUSTOM_USER_TABLE . \" WHERE user_nicename = %s\", $user_nicename ) ) );\r\n}", "function theUserName(){\n global $connection;\n\n $id = userLoggedIn();\n\n if (isset($id)) {\n $presentUserDetails = \"SELECT * FROM usersdetails WHERE usersId = $id\";\n\n $querypresentUserDetailsUsername = mysqli_query($connection,$presentUserDetails);\n \n if (!$querypresentUserDetailsUsername) {\n \n die(\"could not query the QUERYPRESENTUSERDETAILSUSERNAME \" .mysqli_error($connection));\n }\n \n $fetchPresentUserDetails = mysqli_fetch_assoc($querypresentUserDetailsUsername);\n \n $fetchPresentUserUsername = $fetchPresentUserDetails['userName'];\n return $fetchPresentUserUsername;\n }\n \n}", "public function getOwnerusername() {}", "function getUserId($username) {\n\t\t$con = mysqli_connect(\"\", \"\", \"\", \"\");\n\t\tif (!$con) { die(\"Could not connect: \" . mysqli_error()); }\n\t\t$query = \"SELECT id FROM users WHERE username = '$username'\";\n\t\t$statement = $con->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->get_result();\n\t\t$statement->close();\n\t\twhile($row = mysqli_fetch_assoc($result)) {\n\t\t\treturn $row['id'];\n\t\t}\n\t}", "function getUserId ($username)\n\t\t{\n\t\t\t$query = \"SELECT * from \".$this->tableName.\" WHERE loginname='\";\n\t\t\t$query .= $username.\"'\";\n\t\t\t$rs = $this->db->Execute ($query) or\n\t\t\t\tdie ($this->db->ErrorMsg().$query);\n\t\t\treturn $rs->fields['user_id'];\n\t\t}", "function yz_get_user_id( $username ) {\n $profile_user = get_user_by( 'login', $username );\n return $profile_user->ID;\n}", "public function globalGetUserId(){\n\n\t\t//get the username\n\t\t$username = $this->input->post(\"Username\");\n\n\t\t//call the model function for deactivating the game table\n\t\t$result = $this->md->model_get_userid_by_username(\"useraccount\", $username);\n\n\t\t//echo the user account id\n\t\techo $result[0][\"UserAccountId\"];\n\n\t}", "abstract protected function getUserId() ;", "function id_user($login_user) {\n\t$select_id = \"select ID from userbase where username = '\" . $login_user . \"'\";\n\t$query_id = mysql_query ( $select_id ) or die ( \"error\" );\n\t$nb = mysql_num_rows ( $query_id );\n\tif ($nb != 0) {\n\t\t$id = mysql_result ( $query_id, 0, 'ID' );\n\t\treturn ($id);\n\t} else\n\t\treturn (false);\n}", "function getUserIdByUsername($username) {\n $guid = 0;\n $users = $this->getUsersDetail();\n $count = $users['totalItems'];\n for ($i = 0; $i < $count; $i++) {\n if($users['userList'][$i]['USERNAME'] == $username) {\n $guid = $users['userList'][$i]['GUID'];\n $i = $count;\n }\n }\n return $guid;\n }", "function get_user_id_from_username($username){\n\t$username = sanitize($username);\n\treturn mysql_result(mysql_query(\"SELECT `user_id` FROM `users` WHERE `username`='$username'\"),0); //this will return the corresponding user_id of the user found\n}", "function selectUserId(){\r\n $mysqli = connectdb();\r\n $user= $_SESSION['uname'];\r\n // Define the Query\r\n // For Windows MYSQL String is case insensitive\r\n $result = $mysqli->query(\"SELECT userID from users where userName='$user'\");\r\n \r\n /* Fetch the results of the query */ \r\n while( $row = $result->fetch_assoc()){\r\n $user_id = $row['userID']; \r\n } \r\n return $user_id; \r\n}", "function getCurrentUserId() ;", "function getUserID(Database $database, $username) {\n\n// Prepare and run a MySQL query to select the id attribute from the users table where the username\n// attribute is equal to the $username parameter\n $database->query(\"SELECT `id` FROM `users` WHERE `username` = '$username'\");\n// Create an associative array of the result of the query\n $result = $database->fetchAssoc();\n// Return the user's id\n return $result[\"id\"];\n\n }", "function getUsername();", "function get_user_id() {\n\n\t\tglobal $wpdb;\n\n\t\t$table = $this->make_table_name();\n\t\t$data = $wpdb->get_results( \"SELECT user_id FROM {$table};\" );\n\t\t\n\t\treturn $data;\n\t}", "function fetchUserid($username)\n\t{\n\t\t$res=$this->cgs(\"tbl_users\",\"userid\",\"username\",$username,\"\",\"\",\"\"); \n\t\tif(is_resource($res))\n\t\t\t$row=@mysql_fetch_row($res);\n\t\treturn $row[0];\n\t}", "function getUserIdFromStatus ()\n\t\t{\n\t\tsession_start();\n\t\t\n\t\t$u = $_POST['user'];\n\t\t\n\t\t\n\t\tFoodNutrientsAnalyzer::oldDb();\n\t\t$result = mysql_query(\"SELECT * FROM user WHERE username='$u'\");\n\t\t\t\t\n\t\t\t\twhile($row = mysql_fetch_array($result))\n\t\t\t\t{ \n\t\t\t\t\n\t\t\t\t $x = $row['id'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $x;\n\t\t\n\t\t}", "public function getUserID($username){\n $query = $this->connect->prepare(\"SELECT user_id FROM user WHERE username = ?\");\n $user_id = $this->escape_string($username);\n $query->bind_param('s', $username);\n $query->execute();\n $query->bind_result($user_id);\n $query->fetch();\n $query->close();\n return $user_id;\n }", "function getuserId($eamil){\n $query = <<<STR\nSelect UserPK\nFrom Customer\nWhere email ='$eamil';\nSTR;\n return executeQuery($query);\n \n}", "function user_getid() {\n\tif (!$_SESSION['PE_USER_RESULT']) {\n\t\t$_SESSION['PE_USER_RESULT']=db_query(\"SELECT * FROM site_user WHERE username='\" . user_getname() . \"'\");\n\t}\n\tif ($_SESSION['PE_USER_RESULT'] && db_numrows($_SESSION['PE_USER_RESULT']) > 0) {\n\t\treturn db_result($_SESSION['PE_USER_RESULT'],0,'user_id');\n\t} else {\n\t\treturn false;\n\t}\n}", "function getID($user)\n\t{\n\t\t$request = request(\"SELECT id FROM users WHERE user='\".$user.\"' OR mail='\".$user.\"'\");\n\t\t$user = $request->fetch();\n\t\t$user = $user['id'];\n\t\treturn $user;\n\t}", "function name_to_id($connection, $name) {\r\n\t$safe_name = addslashes($name);\r\n\t$result = $connection->query(\"select user_id\r\n\t\t\t\t\t\t\t\t\tfrom users\r\n\t\t\t\t\t\t\t\t\twhere name = '$safe_name'\r\n\t\t\t\t\t\t\t\t\tLIMIT 0,1\");\r\n\tif(!$result){\r\n\t\tthrow new Exception('Could not look up user \"'.$name.'\".');\r\n\t}\r\n\tif($result->num_rows <= 0){\r\n\t\tthrow new Exception('No user with that the name \"'.$name.'\" was found.');\r\n\t}\r\n\t$row = $result->fetch_object();\r\n\t$user_id = $row->user_id;\r\n\r\n\treturn $user_id;\r\n}", "public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }", "function getUserID($userName){\n\t$url = 'https://api.instagram.com/v1/users/search?q='.$userName.'&client_id='.clientID;\n\t$instagramInfo = connectToInstagram($url);\n\t$results = json_decode($instagramInfo, true);\n\n\treturn $results['data'][0]['id'];//echoing out userID.\n}", "public function getIdFromUserName($username) {\n foreach ($this->getCurrentContext()['users'] as $user) {\n if ($user['name'] == $username) {\n return $user['id'];\n }\n }\n }", "function getuserid($username) {\r\n $sql = \"SELECT id FROM users WHERE `user_name` = '\".$username.\"' LIMIT 1\";\r\n $result = mysql_query($sql);\r\n if(mysql_num_rows($result)) {\r\n $row = mysql_fetch_row($result);\r\n return $row[0];\r\n } else {\r\n return false;\r\n }\r\n }", "function getId($username){\n\t\t\t $db = mysqli_connect('$DATABASEIP', 'worker', '$USERPASS', 'website');\n\t\t\t $get_id_query = \"SELECT `id` FROM `users` WHERE `username` ='\".$_SESSION['user']['username'].\"'\";\n\t\t\t $result = mysqli_query($db, $get_id_query);\n\t\t\t while($row = mysqli_fetch_assoc($result)){\n\t\t\t\t\t return $row['id'];\n\t\t\t }\n\t }", "protected function getUserId() {}", "protected function getUserId() {}", "function idofuser(){\n\t\tif(isset($_SESSION['useridshop']))\n\t\t\t{$userofid = $_SESSION['useridshop']; return($userofid);}}", "public static function getUserID() {\n $token_header = request()->header(\"Authorization\");\n $token = explode(' ', $token_header)[1];\n return User::where('api_token', $token)->value('id');\n }", "public function getUserId() {\n $token = $this->getToken();\n $decoded = $this->jwt::decode($token, $this->settings['secret_key'], array('HS256'));\n $uname = $decoded->username;\n $sql = \"SELECT id FROM user_login WHERE username = '$uname'\";\n $res = $this->conn->query($sql);\n if($res->num_rows > 0) {\n return $res->fetch_row()[0];\n } else {\n return false;\n }\n }", "function getClientId($username){\r\n\t\r\n\t$sel=\"select staffacc_contact.username from staffacc_contactacc,staffacc_contact where staffacc_contactacc.con_id=staffacc_contact.sno and staffacc_contactacc.username = '\".$username.\"'\";\r\n\t$ressel=mysql_query($sel,$this->db);\r\n\t$rssel=mysql_fetch_row($ressel);\r\n\r\n\t$clSelsql = \"SELECT sno from staffacc_cinfo WHERE type IN ('CUST', 'BOTH') AND username='\".$rssel[0].\"'\";\r\n\t$resselSno=mysql_query($clSelsql,$this->db);\r\n\t$rsselSno=mysql_fetch_row($resselSno);\r\n\t$Cval=$rsselSno[0];\r\n\treturn $Cval;\r\n }", "protected abstract function getUserId();", "public function user_id_from_username($username) {\n $sql = \"SELECT user_id FROM users WHERE username = :user\";\n \n try{\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(\":user\", $username);\n $stmt->execute();\n $result = $stmt->fetch();\n $stmt->closeCursor();\n } catch(Exception $e) {\n die($e->getMessage());\n }\n return $result;\n }", "function get_user_id_from_xyz($xyz) {\n $query = new EntityFieldQuery();\n $results = $query->entityCondition('entity_type', 'user')\n ->propertyCondition('status', 1) //1 active user\n ->fieldCondition('field_openid_md5', 'value', $xyz, '=')\n ->execute();\n\n if (empty($results)) {\n return null; //can't find any related user id, return 0\n }\n\n $uid = key($results['user']);\n return $uid;\n}", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "function f_getUserFromId($uid)\n\t{\n\t\tglobal $db;\n\t\t$sql_query = \"select user_name as name from user where user_id = $uid limit 1\";\n\t\t$result = $db->query($sql_query) or die($db->error);\n\t\t$row = $result->fetch_assoc();\n\t\treturn $row['name'];\n\t}", "function username_to_id($username) {\n\t $username = $this->qls->Security->make_safe($username);\n\n\t\t// Make sure it exists\n\t\tif ($this->check_username_existence($username)) {\n $result = $this->qls->SQL->select('id',\n 'users',\n array('username' =>\n array(\n '=',\n $username\n )\n )\n );\n $row = $this->qls->SQL->fetch_array($result);\n return $row['id'];\n\t\t}\n\t\telse {\n\t\t return 0;\n\t\t}\n\t}", "public function usernameId($username='')\n {\n $username=trim($username);\n if (!$username) {\n return false;\n }\n\n $sql=\"SELECT id FROM edxapp.auth_user WHERE username LIKE \".$this->db->quote($username).\";\";\n $q=$this->db->query($sql) or die(print_r($this->db->errorInfo(), true));\n $r=$q->fetch(\\PDO::FETCH_ASSOC);\n \n return $r['id'];\n }", "function getUsername($userid)\n\t{\n\t\t$userRs\t\t= getRow(\"users\",\"username\",\"user_id='$userid'\"); //提取数据的函数,在本文件中\n\t\treturn $userRs['username'];\n\t}", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUsername() {}", "function getUserId($maxid,$name)\n {\n //$finalString = substr($name,0,2).$mobileNo[8].$firstPart.$mobileNo[0] ;\n $day = date(\"d\"); \n $month = date(\"m\"); \n $finalString = \"HM\".substr($name,0,2).$day.\"\".$month.\"\".$maxid;\n return $finalString; \n }", "function fetch_project_ownerid($projectid = 0)\n{\n global $ilance, $myapi;\n $sql = $ilance->db->query(\"SELECT user_id FROM \" . DB_PREFIX . \"projects WHERE project_id = '\".intval($projectid).\"' LIMIT 1\", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return $res['user_id'];\n }\n return 0;\n}", "function getUserId($username){\r\n //open connection\r\n $link = openConnection();\r\n //select all from user where the username is ?\r\n $query = \"SELECT * FROM User WHERE user_name = ?\";\r\n // if ok, execute statement\r\n $stmt = mysqli_prepare($link, $query);\r\n\r\n mysqli_stmt_bind_param($stmt, 's', $username);\r\n\r\n mysqli_stmt_execute($stmt);\r\n\r\n //get the result and fetch array\r\n $result = $stmt->get_result();\r\n $user = $result->fetch_array(MYSQLI_ASSOC);\r\n // Close statement\r\n mysqli_stmt_close($stmt);\r\n\r\n// Close connection\r\n mysqli_close($link);\r\n//returns the id\r\nreturn htmlspecialchars($user['user_id']);\r\n\r\n}", "public static function return_user_id($username,$db) {\n $sql = \"SELECT id FROM users WHERE username='\".$username.\"'\";\n if (!$result = $db->query($sql)) {throw new Exception(\"Unable to grab the the user's ID: \".$db->error,PEAR_LOG_ERR);}\n while ($user = $result->fetch_array()) {\n $id = $user['id'];\n } \n return $id;\n }", "public function checkForCompany($user_id);", "function get_account_owner($accountid) {\n $conn = db_connect();\n $sql = \"select userid from dulaney_stewart_accounts where accountid = $accountid\";\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n \n $sql = \"select name from dulaney_stewart_users where userid = \" . $row[\"userid\"];\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n return $row[\"name\"];\n}", "function get_userid($user) {\n\t\t\t$str = \"SELECT iduser FROM user where user=:user\";\n\t\t\t$sql = $this->cnnx->prepare($str);\n\t\t\t$sql->bindParam(':user', $user);\n\t\t\t$sql->execute();\n\t\t\treturn $sql->fetchAll()[0]['iduser'];\n\t\t}", "public function getUsers($company_id);", "function getUserId () {\r\n\t\t global $con;\r\n\t\t $stmt = $con->prepare(\"select * from users where username = ?\");\r\n\t\t $stmt->execute(array($_SESSION['user']));\r\n\t\t $row = $stmt->fetch();\r\n\t\t return $row['userID'];\r\n\t}", "public function get_cus_id() {\n $db = GetGlobal('db');\n\t\t$UserName = GetGlobal('UserName');\t\t\n\t\t$user = decode($UserName);\n\n\t $sSQL = \"select id from customers where active=1 and code2=\" . $db->qstr($user);\n\t\t$res = $db->Execute($sSQL,2);\n\t\t\n\t\treturn ($res->fields['id']);\t\t\n\t}", "function getCompanyByUserId($user_id){\n $sql = \"SELECT * FROM companys WHERE user_id = ?\";\n $query = $this->db->query($sql, array($user_id));\n if($query->num_rows() == 1 ){\n $arr = $query->result_array();\n $data = $arr[0];\n return $data;\n }else{\n //todo: error handling\n return -1;\n }\n }", "function find_user_by_name($username,$connection)\n {\n $salt_string=\"@!\";\n $_SESSION[\"username\"]=$username;\n $username.=$salt_string;\n $query=\"SELECT name FROM user_details WHERE username='$username'\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return chop($row['name'],$salt_string);\n }\n }", "function getUserID($Username){\n global $con;\n $userId='';\n $stmt3 = $con->prepare(\"SELECT UserID FROM users WHERE Username = ? \");\n $stmt3->execute(array($Username));\n $rows = $stmt3->fetchAll(); \n foreach($rows as $row) {\n\n $userId = $row['UserID'];\n\n }\n\n return $userId;\n }" ]
[ "0.7459984", "0.72976017", "0.7286665", "0.7239125", "0.7231983", "0.7165278", "0.7125658", "0.71221215", "0.71165127", "0.69953156", "0.6988421", "0.6968509", "0.69543606", "0.6925809", "0.6913319", "0.6900381", "0.68816525", "0.68510574", "0.68148464", "0.6804554", "0.67852366", "0.6784212", "0.67791605", "0.67626494", "0.67436373", "0.67412513", "0.674083", "0.6729373", "0.6725065", "0.67222977", "0.67190194", "0.66789657", "0.66676795", "0.66459185", "0.6643697", "0.66339904", "0.6581467", "0.65742457", "0.6573213", "0.65631986", "0.6555975", "0.6554535", "0.6546165", "0.6536139", "0.6520822", "0.65206444", "0.6505953", "0.65033036", "0.6488504", "0.6486121", "0.6479363", "0.64788926", "0.6477389", "0.64597434", "0.6457882", "0.6454035", "0.6440561", "0.6435063", "0.64346844", "0.64346844", "0.6428579", "0.6419617", "0.6418826", "0.6416224", "0.64128214", "0.6411176", "0.64089537", "0.64075494", "0.640668", "0.6405274", "0.63897425", "0.6377394", "0.6372165", "0.6369092", "0.6369092", "0.6369092", "0.6369092", "0.63587475", "0.63559204", "0.63542855", "0.63531494", "0.6352396", "0.6352396", "0.6352396", "0.6352396", "0.6352396", "0.63475657", "0.6340377", "0.63377327", "0.6335131", "0.63280666", "0.6324972", "0.63247645", "0.6320688", "0.6312244", "0.6312075", "0.6310524", "0.6309438", "0.6308742", "0.6307353" ]
0.78413177
0
Function to fetch company categories based on company id May 05,2016
Функция для получения категорий компании на основе идентификатора компании 05 мая 2016 года
function fetch_company_categories($company_id) { $data= array(); $qry="SELECT * FROM entrp_company_categories WHERE companyid=".$company_id." "; $res=getData($qry); $count_res=mysqli_num_rows($res); if($count_res>0) { while($row=mysqli_fetch_array($res)) { $data = json_decode($row['category']); } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCategoryList()\n {\n // $company_id_encode = DbAgent::queryEncode($company_id,DbAgent::$DB_STRING);\n $query = \"SELECT *\n FROM category_t\n WhERE category_t.del_flag = 0\";\n // if($company_id != \"\"){\n // $query .= \" and category_t.company_id = $company_id_encode\";\n // } \n $query .= \" ORDER BY category_t.company_id,category_t.category_id;\";\n \n $records = Database::currentDb()->getMultiRecord($query, $t); \n return $records;\n }", "function getCategories() ;", "function findAllCategories();", "function ciniki_foodmarket_web_categoryList($ciniki, $settings, $business_id, $args) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n\n $strsql = \"SELECT ciniki_foodmarket_categories.id, \"\n . \"ciniki_foodmarket_categories.name, \"\n . \"ciniki_foodmarket_categories.permalink, \"\n . \"ciniki_foodmarket_categories.ctype, \"\n . \"ciniki_foodmarket_categories.image_id \"\n . \"FROM ciniki_foodmarket_categories \"\n . \"WHERE ciniki_foodmarket_categories.business_id = '\" . ciniki_core_dbQuote($ciniki, $business_id) . \"' \"\n . \"AND (ciniki_foodmarket_categories.flags&0x01) = 0x01 \"\n . \"\";\n if( isset($args['parent_id']) && $args['parent_id'] > 0 ) {\n $strsql .= \"AND parent_id = '\" . ciniki_core_dbQuote($ciniki, $args['parent_id']) . \"' \";\n } else {\n $strsql .= \"AND parent_id = 0 \";\n }\n $strsql .= \"ORDER BY sequence, name \";\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.foodmarket', array(\n array('container'=>'categories', 'fname'=>'id', 'fields'=>array('id', 'name', 'permalink', 'ctype', 'image_id')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['categories']) ) {\n return array('stat'=>'ok', 'categories'=>array());\n }\n $categories = $rc['categories'];\n foreach($categories as $cid => $category) {\n if( $category['ctype'] == 10 ) {\n if( !isset($ciniki['session']['customer']['id']) || $ciniki['session']['customer']['id'] < 1 ) {\n unset($categories[$cid]);\n }\n }\n }\n\n return array('stat'=>'ok', 'categories'=>$categories);\n}", "function get_all_category_ids()\n{\n}", "public function getCategories(){\n\t\t// $sql = \"SELECT DISTINCT D.CATEGORY_ID, BD.CATEGORY_NAME, GET_ACTIVE_COUNT(D.CATEGORY_ID) CAT_COUNT FROM LZ_BD_CAT_GROUP_DET D, LZ_BD_CATEGORY BD WHERE D.CATEGORY_ID = BD.CATEGORY_ID\" ;\n\n\n\t\t// $sql = \"SELECT K.CATEGORY_ID CATEGORY_ID,K.CATEGORY_NAME ||'-'|| K.CATEGORY_ID CATEGORY_NAME FROM LZ_BD_CATEGORY K where CATEGORY_ID = 171833 \" ;\n\t\t$sql = \"SELECT K.CATEGORY_ID CATEGORY_ID,K.CATEGORY_NAME ||'-'|| K.CATEGORY_ID CATEGORY_NAME FROM LZ_BD_CATEGORY K ORDER BY DECODE(CATEGORY_ID,177,177)\" ;\n\n\t\t\n\t\t$query = $this->db2->query($sql);\n\t\t$query = $query->result_array();\n\t\treturn $query;\n\t}", "function getCategories($domain_id)\r\n\t\t{\r\n\t\t \tglobal $CFG,$objSmarty;\r\n\t\t\t$sql_rent\t\t=\t\"SELECT store_cat_id,domain_id,cat_name FROM \r\n\t\t\t\t\t\t\t\t\".$CFG['table']['store_category'].\" \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tWHERE domain_id = '\".$this->filterInput($domain_id).\"'\";\r\n\t\t\t$res_rent\t\t=\t$this->ExecuteQuery($sql_rent,'select');\r\n\t\t\t//print_r($res_rent);\r\n\t\t \t$objSmarty->assign('categories',$res_rent);\r\n\t\t}", "public function getCategories() {}", "public function complaintCategories(){\n $categories = ComplaintCategory::all();\n\n return $categories;\n }", "public function get_category_result(){\n\t\t$company_id \t= $this->uri->segment('4');\n\t\n\t\t$this->db->where('company_id',$company_id);\n\n\t\t$query = $this->db->get(\"other_deductions_category\");\n\t\treturn $query->result();\n\t}", "public function pullCategories() {\n $req = \"SELECT idc FROM blog_article_category WHERE ida = '\" . $this->ida . \"'\";\n foreach (Database::_query($req) as $k => $v) {\n $this->categories[] = $v['idc'];\n }\n }", "function getCategory() {\n\n $sql = \" select t1.studentid, t1.scholarnumber,\n t2.collectionname as category\n \n FROM tblstudent as t1,\n tblmastercollection as t2,\n tblstudentdetails as t3\n \n where \n \n t3.studentid = t1.studentid AND \n t2.mastercollectionid = t3.category\n AND t1.instsessassocid = $_SESSION[instsessassocid]\n AND t1.status = 1\n AND t1.deleted = 0 AND t1.tcissued = 0\n ORDER BY t2.collectionname ASC\n \";\n\n $result = dbSelect($sql);\n if (mysqli_num_rows($result) > 0) {\n while ($rows = mysqli_fetch_assoc($result)) {\n $category[] = $rows;\n }\n }\n\n return $category;\n }", "public function getCategories();", "public function getCategories();", "public function getCategories();", "public function getCategories();", "public function getCategories();", "public function getCategories();", "public function getCategories();", "public function getCompanyCategoryById($company_category_id)\n {\n $category_data = self::find($company_category_id);\n \n /*\t関数終亁E */\n return $category_data;\n }", "private function getCategoriesForADay()\n {\n $this->runTest(\n 'Test 34. Get categories for a day',\n 'SELECT analytic.period, category.category_id, SUM(category.count) AS view_count\n FROM analytic_category category,\n analytic_data analytic\n WHERE category.analytic_id = analytic.id\n AND analytic.period >= \"2012-05-01 00:00\"\n AND analytic.period < \"2012-05-02 00:00\"\n GROUP BY category.category_id, analytic.period\n ORDER BY analytic.period ASC,view_count DESC\n LIMIT 100'\n );\n }", "public static function get_categories()\n {\n }", "public function fetchCategories()\n {\n //get a new connection\n $conn = $this->getConnection();\n\n //make a query\n $query = \"SELECT Id,Name FROM categories \";\n\n //Execute query\n $result = mysqli_query($conn, $query);\n\n if ($result->num_rows > 0) {\n $categoryList = new ArrayObject();\n while ($data = mysqli_fetch_row($result)) {\n //get all category\n $category = new Category(); //object of category class\n $category->setId($data[0]);\n $category->setName($data[1]);\n\n $categoryList->append($category);\n }\n $this->closeConnection($conn);\n return $categoryList;\n } else {\n $this->closeConnection($conn);\n return null;\n }\n\n\n }", "function GetSearchCategories() {\n $sql = \"select c.id, c.title from {$this->linkTable} cl \" .\n \"join {$this->categoryTable} c on cl.{$this->linkField} = c.id \" .\n \"join {$this->table} t on cl.{$this->keyField} = t.id where published = 1 and special = 0 \" .\n \"group by c.id, c.title having count(*) > 0\";\n $result = mysql_query($sql);\n $data[0] = 'All';\n while ($row = mysql_fetch_array($result)) {\n $data[$row['id']] = $row['title'];\n }\n return $data;\n }", "public function getCategories() {\n $result = $this->db->query(\"SELECT * FROM oxobject2category WHERE OXOBJECTID='\".$this->db->validate($this->id).\"' ORDER BY OXTIME\"); // ORDER BY oxtime for getting the main category. main category is the one with the lowest oxtime\n if($result->num_rows == 0) return array();\n $cat_ids = array();\n while($data = $result->fetch_object()) {\n $cat_ids[] = $data->OXCATNID;\n }\n return $cat_ids;\n }", "function getCategories()\n {\n $dbMain = db_getDBObject(DEFAULT_DB, true);\n if (defined(\"SELECTED_DOMAIN_ID\")) {\n $dbObj = db_getDBObjectByDomainID(SELECTED_DOMAIN_ID, $dbMain);\n } else {\n $dbObj = db_getDBObject();\n }\n\n unset($dbMain);\n $sql = \"SELECT cat_1_id, cat_2_id, cat_3_id, cat_4_id, cat_5_id FROM Article WHERE id = $this->id\";\n $r = $dbObj->query($sql);\n while ($row = mysqli_fetch_array($r)) {\n if ($row[\"cat_1_id\"]) {\n $categories[] = new ArticleCategory($row[\"cat_1_id\"]);\n }\n if ($row[\"cat_2_id\"]) {\n $categories[] = new ArticleCategory($row[\"cat_2_id\"]);\n }\n if ($row[\"cat_3_id\"]) {\n $categories[] = new ArticleCategory($row[\"cat_3_id\"]);\n }\n if ($row[\"cat_4_id\"]) {\n $categories[] = new ArticleCategory($row[\"cat_4_id\"]);\n }\n if ($row[\"cat_5_id\"]) {\n $categories[] = new ArticleCategory($row[\"cat_5_id\"]);\n }\n }\n\n return $categories;\n }", "public function getCatergory()\n {\n $objCategories = Database::getinstance()->prepare(\"\n SELECT id AS value, tablecategory AS label\n FROM tl_table_category \n WHERE published = '1' \n AND (? BETWEEN start AND stop OR (start = '' AND stop = '')) \n ORDER BY tablecategory\")\n ->execute(time());\n\n $arrCategories = [];\n\n while ($objCategories->next()) {\n $arrCategories[$objCategories->value] = $objCategories->label;\n }\n\n return $arrCategories;\n }", "function getcategories()\n {\n global $con;\n $getcat = $con->prepare(\"SELECT * FROM categories ORDER BY ID ASC\");\n $getcat->execute();\n $cats = $getcat->fetchAll();\n return $cats;\n }", "function getcategories()\n\t{\n\t\t$sql=\"select distinct(cat.id) as id,cat.name,cat.type from king_categories as cat join king_deals as deal on \".time().\" between deal.startdate and deal.enddate and deal.publish=1 where cat.id=deal.catid or cat.id in (select type from king_categories as c join king_deals as d on \".time().\" between d.startdate and d.enddate and d.publish=1 where c.id=d.catid) order by cat.name asc\";\n\t\t$q=$this->db->query($sql);\n\t\t$data=array();\n//\t\tprint_r($q->result_array());\n\t\tif($q->num_rows()>0)\n\t\t{\n\t\t\tforeach($q->result() as $r)\n\t\t\t{\n\t\t\t\t$cat=$r->type;\n\t\t\t\tif(!isset($data[$cat][0]))\n\t\t\t\t\t$data[$cat]=array();\n\t\t\t\t$d['id']=$r->id;\n\t\t\t\t$d['name']=$r->name;\n//\t\t\t\tprint_r($r);\n\t\t\t\tarray_push($data[$cat],$d);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function getCategories()\n\t{\n\t\treturn $this->SelectQuery(\"SELECT * FROM \".$this->tbls['category']['name'].\" WHERE catStatus=1 ORDER BY catName\", $this->tbls['category']['type']);\n\t}", "function get_categories($where = array(), $order_by = NULL, $limit = NULL, $offset = NULL, $return_method = NULL, $assoc_key = NULL)\n\t{\n\t\t$this->CI->load->module_model(COURSE_FOLDER, 'blog_categories_model');\n\t\t$this->CI->blog_categories_model->readonly = TRUE;\n\t\t$tables = $this->CI->config->item('tables');\n\t\t$where[$tables['blog_categories'].'.published'] = 'yes';\n\t\t\n\t\t$categories = $this->CI->blog_categories_model->find_all($where, $order_by, $limit, $offset, $return_method, $assoc_key);\n\t\treturn $categories;\n\t}", "private function getCategory() {\r\n\r\n $infoObj = new \\Model($this->lang . '_category');\r\n $infoObj->where('idw', $this->idw);\r\n $infoObj->where('status', 1);\r\n $infoObj->orderBy('id', 'DESC');\r\n $cols = array('id', 'id_lang', 'title', 'short', 'alias');\r\n $res = $infoObj->get(null, 5, $cols);\r\n\r\n return $res;\r\n }", "public function getCategoriesByCatalog() \n\t{\n\t\t$table = Category::$table;\n\t\t$sqlMale = \"select * from {$table} where gender='male'\";\n\t\t$catesByMale = Category::query($sqlMale);\n\n\t\t$sqlFemale = \"select * from {$table} where gender='female'\";\n\t\t$catesByFemale = Category::query($sqlFemale);\n\n\t\t$data = [\n\t\t\t\"male\" => $catesByMale,\n\t\t\t\"female\" => $catesByFemale\n\t\t];\n\t\t$success = \"Success\";\n\t\t$failure = \"Failure\";\n\t\tFunctions::returnAPI($data, $success, $failure);\n\t}", "public function getCategories()\n {\n try\n {\n $this->ps_R_categories->execute();\n return $this->ps_R_categories->fetchAll();\n }\n catch (Exception $e)\n {\n error_log($e);\n echo 'Website unavailable, please try again later.';\n die();\n }\n }", "public function getAllCategory() \r\n { \r\n\t\r\n $conn = new mysqli($this->getServername(), $this->getUsername(), $this->getPassword(), $this->getDbname());\r\n\t \r\n\t if ($conn->connect_error) \r\n {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n\r\n $sql = \"SELECT * FROM category_book ORDER BY cb_name\";\r\n $result = $conn->query($sql);\r\n\t\t \r\n $categories = array();\r\n\t\t $i=0;\r\n if ($result->num_rows > 0) \r\n {\r\n // output data of each row\r\n\t $flag = FALSE;\r\n\t\r\n while($row = $result->fetch_assoc()) \r\n\t {\r\n\t\t // echo $row[\"b_id\"].\" Book Name: \".$row[\"b_name\"].\" year:\".$row[\"b_year\"].\"<br>\" ;\r\n\t\t\t \r\n\t\t\t \r\n $categories[$i][\"cb_id\"]=$row[\"cb_id\"];\r\n\t\t $categories[$i][\"cb_name\"]=$row[\"cb_name\"];\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t $i++;\r\n } //while\t \r\n\t \r\n } //if\r\n\t\treturn $categories;\r\n\t}", "public function getCompany($id);", "function getCategories($dbLink, $withId = false) {\n\n $categories = [];\n $sql = \"SELECT * FROM `categories`\";\n\n // подготавливаем запрос\n $stmt = db_get_prepare_stmt($dbLink, $sql);\n\n // выполняем запрос\n $resultQuery = mysqli_stmt_execute($stmt);\n\n //(( если запрос не прошел - показать ошибку ))\n $resultQuery ?: displayDataErrorFromDB($dbLink);\n\n //(( 'вытряхиваем' результат из базды данных ))\n $resultQueryDB = mysqli_stmt_get_result($stmt);\n $rowsQueryDB = mysqli_fetch_all($resultQueryDB, MYSQLI_ASSOC);\n\n if ($withId) {\n\n foreach ($rowsQueryDB as $row) {\n $row[\"name\"] = filterUserString($row[\"name\"]);\n $categories[] = $row;\n }\n\n } else {\n\n foreach ($rowsQueryDB as $row) {\n $categories[] = filterUserString($row[\"name\"]);\n }\n\n }\n\n //(( если результат нулевой, возращаем просто пустой массив))\n if (count($categories) === 0) {\n $categories = [];\n return $categories;\n }\n\n // закрываем запрос\n mysqli_stmt_close($stmt);\n\n //(( возвращаем нормальный массив с данными ))\n return $categories;\n}", "public function getCategories() {\n global $local;\n $sql = \"SELECT title_$local AS title,id,main_category FROM categories WHERE main_category = 0\";\n return $this->db->query($sql);\n }", "static public function _getCategory() {\n $req = \"SELECT bc.idc,\n (SELECT title\n FROM blog_revision br\n WHERE br.idc = bc.idc\n ORDER BY idr\n DESC LIMIT 0,1) title\n FROM blog_category bc\n ORDER BY bc.idc LIMIT 0,5\";\n return Database::_query($req);\n }", "public function itemCategoryByCompanyIdAndPageRequest(Request $request )\n {\n $info = $this->checkHeadersCompanyId($request);\n $companyId = $info->content;\n $page = $request->page;\n return $this->itemCategoriesByPage($companyId,$page);\n\n }", "public static function categories(Company $company): ?Collection\n {\n $categories = $company->expenseCategories;\n\n $categoriesCollection = collect([]);\n foreach ($categories as $category) {\n $categoriesCollection->push([\n 'id' => $category->id,\n 'name' => $category->name,\n ]);\n }\n\n return $categoriesCollection;\n }", "function getCategories()\n {\n global $db;\n $q = \"SELECT * FROM `categories`\";\n $s = $db->prepare($q);\n $s->execute();\n return $s->fetchAll();\n }", "public function getAllCategories()\n\t{\n\t\t\t\n\t\t$req=$this->conn->prepare(\"SELECT * FROM cat_actualite\");\n\t\t$req->execute();\n\t $result=$req->get_result(); \n\t $req->close(); \n\t return $result;\n\t}", "public function findCategories()\n\t{\n\t\t$sql = 'SELECT c.cat_id, c.cat_name, c.cat_slug, COUNT(a.art_category_id) as nb_article \n\t\t\t\tFROM Categories c \n\t\t\t\tLEFT JOIN Articles a ON a.art_category_id = c.cat_id \n\t\t\t\tGROUP BY c.cat_id';\n\t\t$result = $this->getDb()->fetchAll($sql);\n\t\t$categories = array();\n\t\tforeach ($result as $row) {\n\t\t\t$categoryId = $row['cat_id'];\n\t\t\t$categories[$categoryId] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $categories;\n\t\t\n\t}", "public function getTodoCompanies() {\n $criteria = new CDbCriteria;\n $criteria->with = array();\n $criteria->join = 'INNER JOIN campaigns_companies cc USING(CompanyID)';\n $criteria->addCondition('CampaignID=:campaignid');\n $criteria->addCondition('NOT EXISTS (' .\n 'SELECT * FROM activities ' .\n 'JOIN activity_types USING(ActivityTypeID) ' .\n 'WHERE CampaignID=cc.CampaignID ' .\n 'AND CompanyID=cc.CompanyID ' .\n \"AND Category NOT IN ('N') \" .\n ')');\n $criteria->params = array(':campaignid' => $this->CampaignID);\n return Company::model()->findAll($criteria);\n }", "public function get_company_classifications($company_id){ \n\t\t\t$this->db->where(array(\n\t\t\t'company_id'\t\t\t=>\t\t$company_id,\n\t\t\t'InActive'\t\t\t=>\t\t0,\n\t\t));\t\n\t\t//$this->db->where('company_id',$company_id);\n\t\t$this->db->order_by('classification_id','asc');\n\t\t$query = $this->db->get(\"classification\");\n\t\treturn $query->result();\n\t}", "public function getCompanyById($company_id){\n $results = DB::table('companies')->where('id', '=', $company_id)->get();\n return $results;\n }", "public function getCompanyContacts($company_id){\n\n $this->db->select('sale_c.*, comp.company_name');\n $this->db->from('sales_contacts sale_c');\n $this->db->join('companies comp','comp.id = sale_c.company');\n //$this->db->join('country cont','cont.id = comp.country');\n $this->db->where('sale_c.company', $company_id);\n $this->db->where('sale_c.status !=', 0);\n $this->db->order_by('sale_c.id', 'desc');\n $query = $this->db->get();\n $query = $query->result_array(); \n return $query;\n }", "function get_categories_for_channel_id($channel_id)\n\t{\n\t\t// --------------------------------------------\n\t\t// Prep Cache, Return if Set\n\t\t// --------------------------------------------\n\n\t\t$cache_name = __FUNCTION__;\n\t\t$cache_hash = $this->_imploder(func_get_args());\n\n\t\tif (isset($this->cached[$cache_name][$cache_hash]))\n\t\t{\n\t\t\treturn $this->cached[$cache_name][$cache_hash];\n\t\t}\n\n\t\t$this->cached[$cache_name][$cache_hash] = array();\n\n\t\t// --------------------------------------------\n\t\t// Perform the Actual Work\n\t\t// --------------------------------------------\n\n\t\t$sql = \"SELECT c.cat_id, c.cat_name, c.parent_id, c.group_id\n\t\t\t\tFROM\texp_categories AS c, exp_channels\n\t\t\t\tWHERE FIND_IN_SET(c.group_id, REPLACE(exp_channels.cat_group, '|', ','))\n\t\t\t\tAND exp_channels.channel_id = '\".ee()->db->escape_str($channel_id).\"' #Categories for Channel ID\";\n\n\t\t$query = ee()->db->query($sql);\n\n\t\treturn $this->cached[$cache_name][$cache_hash] = $query->result_array();\n\t}", "function get_casino_game_categories()\n{\n $casino_game_sql = <<<SQL\n SELECT \"casinoid\", -- 娛樂城id\n \"game_flatform_list\" -- 娛樂城的返水分類\n FROM \"casino_list\"\n ORDER BY \"id\";\n SQL;\n $casino_game_category_result = runSQLall($casino_game_sql);\n $casino_game_categories = [];\n if ($casino_game_category_result[0] > 0) {\n $casino_game_category_result = array_slice($casino_game_category_result, 1); // 切除索引\n foreach ($casino_game_category_result as $val) {\n $casino_game_categories[strtolower($val->casinoid)] = json_decode($val->game_flatform_list, true);\n }\n }\n return $casino_game_categories;\n}", "public function getCompanies()\n {\n return $this->findBy(array(), array('id' => 'DESC'));\n }", "public function getAllCategories($id = null){\n if($id){\n $categories = ExpertCategory::select('category', 'id as value')->where('id', '<>', $id)->orderBy('category', 'asc')->get();\n return $categories;\n }\n\n $categories = ExpertCategory::select('category', 'id as value')->orderBy('category', 'asc')->get();\n return $categories;\n }", "function get_categories() {\n global $CFG;\n // fetch the list of categories\n return get_records_sql(\n \"SELECT cat.id, cat.name\n FROM {$CFG->prefix}course_categories AS cat\n\t\t\t WHERE visible = 1 \n ORDER BY cat.sortorder ASC\"\n );\n }", "public function getCompanies($event_id);", "function GetAllCategories()\n\t{\n\t\t$categories = array();\n\t\t\n\t\tif ($result = $this->db->Query('SELECT * FROM coursecategories ORDER BY ctitle ASC'))\n\t\t{\tif ($this->db->NumRows($result))\n\t\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t\t{\t$categories[$row['cid']] = $row['ctitle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $categories;\t\n\t}", "function getCategories() {\n\t\t$user_handler = new userHandler();\n\t\t$conn = $user_handler->getConnection();\n\t\tif ($conn != null) {\n\t\t\t$query = mysqli_query($conn, 'SELECT * FROM Category');\n\t\t\tif ($query) {\n\t\t\t\t$rows = mysqli_fetch_all($query,MYSQLI_ASSOC);\n\t\t\t\tif (count($rows) > 0) {\t\t\t\t\n\t\t\t\t\treturn $rows;\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t}", "public function getCompanyCategoryByCategory($category_id)\n {\n $category_data = self::where('category_id', $category_id)\n ->where('status', STS_OK)\n ->get();\n \n /*\t関数終亁E */\n return $category_data;\n }", "public function getCategories()\n {\n $categories = array();\n $id = $_SESSION['id'];\n \n if ( null !== $this->getDB() )\n {\n $dbPrep = $this->getDB()->prepare('select bill_name from bills where user_id = :id and bill_type = \"budget\"');\n \n $dbPrep->bindParam(':id', $id, PDO::PARAM_INT);\n \n if ( $dbPrep->execute() && $dbPrep->rowCount() > 0 )\n {\n $categories = $dbPrep->fetchAll(PDO::FETCH_COLUMN);\n return $categories;\n }\n else\n {\n $categories[0] = 0;\n $error = $dbPrep->errorInfo();\n error_log(\"\\n\".$error[2], 3, \"logs/errors.log\");\n return $categories;\n }\n }\n }", "function getCategories(): array;", "function getAllCompanies($connection){\n $query = \"SELECT * FROM forum_company WHERE status='1'\";\n $result = $connection->query($query);\n return $result;\n }", "function GetAllCategories()\n\t{\n\t\t$categories = array();\n\t\t\n\t\tif ($result = $this->db->Query('SELECT * FROM coursecategories WHERE live=1 ORDER BY ctitle ASC'))\n\t\t{\tif ($this->db->NumRows($result))\n\t\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t\t{\t$categories[$row['cid']] = $row['ctitle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $categories;\t\n\t}", "function Get_category()\r\n{\r\n\tglobal $db, $_conf_vars;\r\n\t$cat_arr = Get_Records(prefix('category').' c ' , 'c.cat_id,c.cat_name', \" parent_id = '0' \");\r\n\tif(!empty($cat_arr)){\r\n\t\tfor($cc=0; $cc < sizeof($cat_arr); $cc++)\r\n\t\t{\r\n\t\t\t$cat_arr[$cc]['sub_arr'] = Get_Records(prefix('category'),'cat_name, cat_id',\"parent_id = '\".$cat_arr[$cc]['cat_id'].\"' order by cat_id\");\r\n\t\t}\r\n\t}\r\n\treturn $cat_arr;\r\n}", "function get_all_by_company($id_company = null) {\n $this->db->order_by($this->id, $this->order);\n if ($id_company) {\n $this->db->where(\"company.id_company\", $id_company);\n }\n $this->db->join(\"partisipan\", \"partisipan.id_partisipan=doc.id_partisipan\");\n $this->db->join(\"jenis_doc\", \"jenis_doc.id_jenis_doc=doc.id_jenis_doc\");\n $this->db->join(\"company\", \"company.id_company=partisipan.id_company\");\n $this->db->join(\"company_type\", \"company.id_company_type=company_type.id_company_type\");\n $this->db->where(\"doc.is_deleted\", 0);\n $this->db->where(\"jenis_doc.is_deleted\", 0);\n $this->db->where(\"partisipan.is_deleted\", 0);\n $this->db->where(\"company.is_deleted\", 0);\n $this->db->where(\"company_type.is_deleted\", 0);\n return $this->db->get($this->table)->result();\n }", "function getAllCompanies(PDO $dbh){\n\n $sql = $dbh->prepare(\"SELECT id, display_name FROM civicrm_contact \n WHERE contact_type='Organization' ORDER BY display_name\");\n $sql->execute();\n $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n $companies = array();\n\n foreach($result as $key => $value){\n \n $id = $value[\"id\"];\n $orgName = $value[\"display_name\"];\n $companies[$id] = $orgName;\n }\n\n return $companies;\n\n}", "protected function _getIntuitAnywhereCompanies()\r\n\t{\r\n\t\t$ia_company = new IntuitAnywhere_CompanyMetaData($this->_ia);\r\n\t\treturn $ia_company->listAll();\r\n\t}", "function get_categories(){\n\tglobal $db,$tprefix;\n\t$sql = \"select * from `$tprefix\".\"_dir_cat` order by `cat_name` asc \";\n\n\t$result=$db->query($sql);$k=0;\n\n\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t$cat[$k]['cat_id'] = $row['cat_id'];\n\t\t\t\t$cat[$k]['cat_name'] = $row['cat_name'];\t\t\t\t\n\t\t\t\t\n\t\t\t$k++;\n\t\t\t}\n\n\t\tif(empty($cat)){\n\t\t\treturn FALSE;\n\t\t}\n\t\telse {\n\t\t\treturn $cat;\n\t\t}\n\n\n}", "function get_categories()\n\t{\n\t\tinclude 'Path/include.php';\n\t\t$data = array();\n\t\t$obj = new Index_Model();\n\t\t$result = $obj->get_category(); // getting the result from model function\n\t\tforeach ($result as $value)\n\t\t{\n\t\t\t$data[] = $value;\n\t\t}\n\t\treturn $data;\n\t}", "function categories($args)\n {\n return MidasLoader::loadComponent(\"Metadata\", \"slicerdatastore\")->getAllCategories();\n }", "function list_categories()\r\n{\r\n return SQLQuery(\"SELECT id from $table_name_category\",[],'id');\r\n}", "private function lcp_categories(){\n if ( is_array($this->lcp_category_id) ){\n return array('category__and' => $this->lcp_category_id);\n } else {\n if($this->utils->lcp_not_empty('child_categories') &&\n (($this->params['child_categories'] === 'no' ) ||\n ($this->params['child_categories'] === 'false') )){\n return array('category__in'=> $this->lcp_category_id);\n }\n return array('cat'=> $this->lcp_category_id);\n }\n }", "public static function getCategories() {\n\t\t$dbo =& CF_Factory::getDBO();\n\t\t\n\t\t$query\t=\t'\n\t\t\tSELECT\t\t*\n\t\t\tFROM\t\t' . CF_CATEGORIES_TABLE\n\t\t;\n\t\t$categoryquery = $dbo->query( $query );\n\t\t\n\t\t// If an error occurred, append to the error log and return with an error code\n\t\tif ( $dbo->hasError( $categoryquery ) ) {\n\t\t\t$dbo->submitErrorLog( $categoryquery, 'CF_CocktailManager::getCategories()' );\n\t\t\tthrow new Exception( 'Could not load the category information!', CF_MSG_ERROR );\n\t\t} elseif ( $dbo->num_rows( $categoryquery ) > 0 ) {\n\t\t\t$categories = array();\n\t\t\twhile ( $row = $dbo->getResultObject( $categoryquery )->fetch_object() ) {\n\t\t\t\t$categories[] = array( $row->id, $row->name );\n\t\t\t}\n\t\t\treturn $categories;\n\t\t}\n\t}", "public function getCategories()\n {\n return $this->callApi('/api/smrt/categories');\n }", "public function getCategories2()\n {\n $categories = array();\n $id = $_SESSION['id'];\n \n if ( null !== $this->getDB() )\n {\n $dbPrep = $this->getDB()->prepare('select bill_name, amount from bills where user_id = :id and bill_type = \"budget\"');\n \n $dbPrep->bindParam(':id', $id, PDO::PARAM_INT);\n \n if ( $dbPrep->execute() && $dbPrep->rowCount() > 0 )\n {\n $categories = $dbPrep->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }\n else\n {\n $categories[0] = 0;\n $error = $dbPrep->errorInfo();\n error_log(\"\\n\".$error[2], 3, \"logs/errors.log\");\n return $categories;\n }\n }\n }", "public function getAllCategories() {\n $query = $this->getEntityManager()\n ->createQuery('\n SELECT cat.id, cat.name\n FROM ObjectsInternJumpBundle:CVCategory cat\n ');\n return $query->getResult();\n }", "private function getCategories()\n {\n return Category::where('parent', 0)->pluck('title', 'id');\n }", "public function getCategories() {\n }", "private function fetch_d3_categories() {\n\n\t\t$categories = $this->fetch( $this->category_api_url );\n\n\t\tif ( ! $categories ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t$output = [];\n\n\t\tforeach ( $categories as $i => $cat ) {\n\n\t\t\t$output[ $cat->str_id ] = [\n\t\t\t\t'display_name' => $cat->display_name,\n\t\t\t\t'popularity' => $cat->popularity,\n\t\t\t];\n\n\t\t}\n\n\t\treturn $output;\n\n\t}", "public function getCompany();", "public function getCategory(){\r\n $dbquery= \"SELECT * from categories\";\r\n return $this->query($dbquery);\r\n }", "function getCategories($storeId)\n{\n\t$sql = \"SELECT categories.id, categories.name\n\t\t\tFROM categories\n\t\t\tWHERE store_id=?\";\n\t\n\treturn query($sql, array($storeId));\n\n}", "static function getCategoryList() {\n return SQL::current()->select(array('categorize', 'post_attributes', 'posts'),\n \"__categorize.name,__categorize.clean,__categorize.show_on_home,count(__categorize.id) AS total, concat(:url,__categorize.clean) AS url\",\n array(\"post_attributes.post_id = posts.id\",\n \"post_attributes.name = 'category_id'\",\n \"post_attributes.value = categorize.id\"),\n \"`name` ASC\", array(\":url\" => url(\"category/\")),\n NULL, NULL, \"__categorize.name\")->fetchAll();\n }", "public static function loadCategories() {\n $list = ORM::for_table(self::$table)->select('*');\n $list->order_by_asc('order');\n return $list->find_many();\n }", "function getCategoryById($apiid, $apicatid){\n global $db;\n $sql = \"select * from categories where apicatid=\" . safeStringSQL($apicatid) . \" and apiid=\" . $apiid;\n $result = runQuery($sql, \"check cat\");\n if($result->num_rows==0){\n return null;\n } else {\n $row = $result->fetch_assoc();\n return $row[\"catid\"];\n }\n}", "public function getCategories(){\r\n\t\t/*return $this->select()->from($this -> _name, array('id','menu_name'))->where('status = 1')->query()->fetchAll();\r\n\t}\r\n\r\n\tpublic function getCatID($name) {\r\n\t\t$select = $this -> select();\r\n\t \t$select -> from ($this -> _name, 'id')\r\n\t \t\t -> where(\"name='$name'\");\r\n\t\t\r\n\t\t$stmt = $select->query();\r\n\t\t$result = $stmt->fetchAll();\r\n\t\tif(count($result)) {\r\n\t\t\treturn $result[0]['id'];\r\n\t\t}\r\n\t\treturn 0;*/\r\n\t}", "public function GetCategories() {\n return $this->database->queryGet(\"SELECT * FROM categories\");\n }", "function getAllCategories() {\n $db = testgenConnect();\n $sql = 'SELECT catID, catName FROM category ORDER BY catName ASC';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n\n $categories = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $categories;\n }", "private function get_course_categories() {\n global $DB;\n $category = $DB->get_field_sql(\" SELECT category.name AS Category,\n DATE_FORMAT(FROM_UNIXTIME(firstaccess),'%Y-%m-%d') AS CourseFirstAccess,\n DATE_FORMAT(FROM_UNIXTIME(lastaccess),'%Y-%m-%d') AS CourseLastAccess,\n course.fullname AS Course\n ,(SELECT shortname FROM mdl_role WHERE id=en.roleid) AS ROLE\n FROM mdl_course AS course\n JOIN mdl_course_categories as category ON course.category\n JOIN mdl_enrol AS en ON en.courseid = course.id\n JOIN mdl_user_enrolments AS ue ON ue.enrolid = en.id\n JOIN mdl_user AS user2 ON ue.userid = user2.id\");\n return $category;\n }", "public function category_lookup()\n\t{\n\t\t$categories = $this->category_model->get_categories();\n\t\treturn $categories;\n\t}", "function fetchCategories($catid){\n\t\t$cats=array();\n\t\tif($catid==0){\n\t\t\t$fetchCategories=mysqli_query($GLOBALS['dbcnx'],\"SELECT id,catname FROM \".MAIN_CATEGORY.\" ORDER BY catsort asc LIMIT 6\");\n\t\t}else{\n\t\t\t$fetchCategories=mysqli_query($GLOBALS['dbcnx'],\"SELECT id,catname FROM \".MAIN_CATEGORY.\" WHERE id='$catid' ORDER BY catsort asc LIMIT 6\");\n\t\t}\n\t\tif(mysqli_num_rows($fetchCategories)>0){\n\t\t\twhile($data=mysqli_fetch_array($fetchCategories)){\n\t\t\t\t$cats['categories'][]=$data['catname'];\n\t\t\t\t$cats['id'][]=$data['id'];\n\t\t\t\t$cats['bool']=true;\n\t\t\t}\n\t\t}else{\n\t\t\t$cats['bool']=false;\n\t\t}\n\t\treturn $cats;\n\t}", "public function getCategories(){\n\t\n\t\tif( empty($this->_categories) ){\n\t\t\n\t\t\t$query = \"SELECT a.*, p.* \"\n\t\t\t.\"FROM #__zbrochure_categories AS a \"\n\t\t\t.\"LEFT JOIN #__zbrochure_packages AS p on p.package_id = \".$this->_id.\" \"\n\t\t\t.\"ORDER BY a.cat_name \"\n\t\t\t;\n\t\t\t\t\t\n\t\t\t$this->_db->setQuery( $query );\n\t\t\t$this->_categories = $this->_db->loadObjectList( 'cat_id' );\n\t\t\n\t\t}\n\t\t\n\t\treturn $this->_categories;\n\t\t\n\t}", "public function getCategories(): array;", "public function getAllCategories() {\n $apiKey = 'jumla@1234';\n $path = base_url();\n $url = $path . 'api/ManageProduct_api/getAllCategories';\n //create a new cURL resource\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"X-API-KEY: \" . $apiKey));\n $response_json = curl_exec($ch);\n //close cURL resource\n curl_close($ch);\n $response = json_decode($response_json, true);\n return $response;\n }", "public function getCategorys()\n {\n if(!cache('categorys')){\n $list = CategoryModel::where(true)->select()->toArray();\n cache('categorys',$list);\n }\n return ReturnMsg('1001', cache('categorys'));\n }", "function getCats()\n\t{\n\t\tglobal $db;\n\n\t\t$stmt = $db->prepare(\"SELECT * FROM categories WHERE cat_visibility = 1 ORDER BY cat_id ASC\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "function getAll(){\n $categories = CategoryQuery::create()->orderByBranch()\n ->filterByScope(array('min' => 0))\n ->filterByActive(1)\n ->find();\n return $categories;\n }", "public static function getCompaniesList(){\n return ArrayHelper::map(Company::find()->orderBy('companyname ASC')->all(),'companyid','companyname');\n }", "static function getCategory($id = null) {\n if (!isset($id))\n return SQL::current()->select(\"categorize\",\n \"id,name,clean,show_on_home,concat(:url,clean) AS url\", NULL, \"name ASC\",\n array(\":url\" => url(\"category/\")))->fetchAll();\n # single entry\n return SQL::current()->select(\"categorize\",\n \"id,name,clean,show_on_home,concat(:url,clean) AS url\", \"id = :id\", \"name ASC\",\n array(':id' => $id, \":url\" => url(\"category/\")), 1)->fetchObject();\n }", "public static function CorpList() {\n\t\t $companyArray = array ();\n\t\t\t$criteria=new CDbCriteria(array(\n//\t\t\t\t'order'=>id ASC'\n\t\t\t));\n\t $companyArray= Rs_corp::model()->findAll($criteria);\n\t\t\treturn $companyArray;\n\t}", "public function get_envato_studio_categories(){\n $categories = $this->_cache_get('envato_studio_services');\n if(!$categories){\n $url = $this->url.'/explore/';\n $data = wp_remote_get($url);\n $page_data = is_array($data) && isset($data['body']) ? $data['body'] : '';\n\n //echo htmlspecialchars($page_data);\n // don't want all categores, just parent ones.\n\t /*<a class=\"header__categories__dropdown__top-level__link\" href=\"/explore/business-online-marketing\">Business &amp; Online Marketing</a>\n <ul class=\"header__categories__dropdown__subcategories\" id=\"business-online-marketing\">\n <li class=\"header__categories__dropdown__subcategories__category\">\n <a class=\"header__categories__dropdown__subcategories__category__link\" href=\"/explore/social-media-design\">Social Media Design</a>\n </li>*/\n if(preg_match_all('#<a class=\"header__categories__dropdown__top-level__link\" href=\"/explore/([^\"]+)\">([^<]+)</a>#',$page_data,$matches)){\n //print_r($matches);\n $categories = array();\n foreach($matches[1] as $key=>$slug){\n $categories[$slug] = trim(html_entity_decode($matches[2][$key]));\n }\n //print_r($categories);\n $this->_cache_add('envato_studio_services',$categories);\n }\n }\n return $categories;\n }", "public function getAllCompanyList()\n {\n return $this->model\n ->where('status', '=', '2')\n ->get();\n }" ]
[ "0.6955229", "0.68454957", "0.6625912", "0.65414315", "0.6526536", "0.65259224", "0.6498788", "0.64867806", "0.6475774", "0.64410883", "0.6429175", "0.64260906", "0.6407785", "0.6407785", "0.6407785", "0.6407785", "0.6407785", "0.6407785", "0.6407785", "0.63947487", "0.63762003", "0.6371008", "0.63602066", "0.63381565", "0.6335403", "0.6334088", "0.6333059", "0.6308657", "0.62998766", "0.62915635", "0.6252138", "0.6236964", "0.6227063", "0.6217169", "0.6216072", "0.62114793", "0.6211473", "0.6208625", "0.62082684", "0.6196378", "0.6187817", "0.6187697", "0.61701286", "0.61604804", "0.6159549", "0.61594707", "0.6149609", "0.6147506", "0.6128136", "0.6123433", "0.61055446", "0.61037314", "0.6103501", "0.60959244", "0.6093829", "0.609192", "0.60809666", "0.6076175", "0.6075523", "0.60735893", "0.60727096", "0.60689193", "0.60641736", "0.60634005", "0.6062021", "0.6059241", "0.60583997", "0.6056538", "0.6054451", "0.60525596", "0.605068", "0.60501176", "0.60455215", "0.6040074", "0.6036284", "0.6034711", "0.6034451", "0.60336596", "0.6031785", "0.60313165", "0.60311115", "0.60207397", "0.60201395", "0.6015866", "0.601445", "0.60084206", "0.6007645", "0.6001461", "0.60014164", "0.59998417", "0.59998095", "0.5994213", "0.5985484", "0.59822625", "0.5976542", "0.5976347", "0.59756565", "0.59712803", "0.59667474", "0.59617746" ]
0.77064824
0
Register our REST Server
Зарегистрируем наш REST-сервер
public function hook_rest_server() { add_action( 'rest_api_init', array( $this, 'register_routes' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_rest_routes()\n {\n }", "public function register_rest_routes()\n {\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->get_namespaced_version(),\n\t\t\t$this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_items' ],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => [ $this, 'create_item' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "function register_rest_route($namespace, $resource, $arguments)\n{\n\n global $registered_rest_routes;\n\n if (! $registered_rest_routes) :\n $registered_rest_routes = array();\n endif;\n\n $registered_rest_routes[] = array(\n 'namespace' => $namespace,\n 'resource' => $resource,\n 'arguments' => $arguments,\n );\n}", "public function add_rest_endpoints() {\n register_rest_route( 'dnd', '/save-game', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'save_game' )\n ) );\n\n register_rest_route( 'dnd', '/load-game', array(\n 'methods' => 'GET',\n 'callback' => array( $this, 'load_game' )\n ) );\n }", "public static function register(Server $server);", "public function registerRestRoute() {\n\t\tregister_rest_route( 'syndication/v2', '/embed/(?P<id>\\d+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [$this, 'getEmbed'],\n\t\t\t'permission_callback' => '__return_true',\n\t\t) );\n\t\tregister_rest_route( 'syndication/v2', '/scripts/(?P<js>[a-zA-Z0-9-]+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [$this, 'redirectJSRequest'],\n\t\t\t'permission_callback' => '__return_true',\n\t\t) );\n\t}", "public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'press-sync/v1', '/status', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array( $this, 'get_connection_status_via_api' ),\n\t\t) );\n\n\t\tregister_rest_route( 'press-sync/v1', '/status/(?P<id>\\d+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array( $this, 'get_post_sync_status_via_api' ),\n\t\t) );\n\n\t\tregister_rest_route( 'press-sync/v1', '/sync', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'sync_objects' ),\n\t\t\t'permission_callback' => array( $this, 'validate_sync_key' ),\n\t\t) );\n\n\t\t/* register_rest_route( 'press-sync/v1', '/sync/(?P<id>\\d+)', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'sync_objects' ),\n\t\t) ); */\n\n\t}", "function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->rest_base, array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array( $this, 'get_plugin_defined_hooks_rest_cb' ),\n\t\t\t'permission_callback' => array( $this, 'validate_rest_cb' )\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, $this->rest_base, array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => array( $this, 'update_hook_rest_cb' ),\n\t\t\t'permission_callback' => array( $this, 'validate_rest_cb' )\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, $this->rest_base, array(\n\t\t\t'methods' => 'DELETE',\n\t\t\t'callback' => array( $this, 'delete_hook_rest_cb' ),\n\t\t\t'permission_callback' => array( $this, 'validate_rest_cb' )\n\t\t) );\n\t}", "public function register_routes() {\n foreach ($this->routes as $path => $params) {\n register_rest_route($this->namespace, $this->route . $path, $params);\n }\n }", "public function init_rest() {\n\n $this->container['rest'] = new \\Tropicalista\\Taffy\\REST_API();\n\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'edc/v' . $version;\n\t\t$slug = 'writing';\n register_rest_route( $namespace, '/' . $slug, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_writing' ),\n\t\t\t\t'permission_callback' => array( $this, 'writing_permissions_check' )\n\t\t\t),\n\t\t) );\n\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\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}", "public function register_endpoints() {\n\t\tregister_rest_route( 'obfx-' . $this->slug, '/obfx-analytics', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'refresh_tracking_links' )\n\t\t\t),\n\t\t) );\n\t}", "public function register_routes() {\n\n // api namespace and resource\n $namespace = $this->plugin_name . '/v' . $this->version;\n $resource = 'picpay-notifications';\n\n register_rest_route( $namespace, '/' . $resource, array(\n array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'post' ),\n 'permission_callback' => array( $this, 'post_permissions_check' )\n )\n ) );\n\n }", "public function register_resources($server)\n {\n }", "function register_new_routes() {\n\t$namespace = 'beerkip/v1/';\n\n\t/**\n\t * Register /push POST\n\t */\n\tregister_rest_route( $namespace, 'push', [\n\t\t'methods' => 'POST',\n\t\t'callback' => '\\Beerkip\\Rest_API\\Push\\process',\n\t] );\n\n\t/**\n\t * Register /pull POST\n\t */\n\tregister_rest_route( $namespace, 'pull', [\n\t\t'methods' => 'POST',\n\t\t'callback' => '\\Beerkip\\Rest_API\\Pull\\process',\n\t] );\n}", "public function register_routes() {\n\n register_rest_route( self::get_api_namespace(), '/logo', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_logo' )\n )\n )\n );\n }", "function add_rest_routes() {\n $namespace = 'wpcl/v1';\n $route = '/incoming_call';\n $endpoint = [\n 'methods'=>'POST',\n 'callback'=>[$this, 'handle_incoming_call'],\n 'permission_callback' => '__return_true',\n ];\n\n register_rest_route( $namespace, $route, $endpoint );\n }", "public function registerApiRest()\n {\n return parent::registerApiRest();\n }", "public function register_routes() {\n\t\t\tregister_rest_route( 'wp-monitor-api/v1', '/server/info', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_server_info' ),\n\t\t\t\t'permission_callback' => array( $this, 'permission_check' )\n\t\t\t) );\n\n\t\t\tregister_rest_route( 'wp-monitor-api/v1', '/site/info', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_site_info' ),\n\t\t\t\t'permission_callback' => array( $this, 'permission_check' )\n\t\t\t) );\n\n\t\t\tregister_rest_route( 'wp-monitor-api/v1', '/site/themes', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_site_themes' ),\n\t\t\t\t'permission_callback' => array( $this, 'permission_check' )\n\t\t\t) );\n\n\t\t\tregister_rest_route( 'wp-monitor-api/v1', '/site/plugins', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_site_plugins' ),\n\t\t\t\t'permission_callback' => array( $this, 'permission_check' )\n\t\t\t) );\n\n\t\t\tregister_rest_route( 'wp-monitor-api/v1', '/site/users', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_site_users' ),\n\t\t\t\t'permission_callback' => array( $this, 'permission_check' )\n\t\t\t) );\n\t\t}", "public function register_routes() {\r\n\r\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base .'/metadata', array(\r\n\t\t\tarray(\r\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\r\n\t\t\t\t'callback' => array( $this, 'get_items' ),\r\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' )\r\n\t\t\t),\r\n\t\t\t//'schema' => array( $this, 'get_public_item_schema' ),\r\n\t\t) );\r\n\t}", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'sut/v' . $version;\n\t\t$base = 'echo';\n\n\t\tregister_rest_route( $namespace, '/' . $base . '/(?P<value>\\d+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'echo_plus' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(\n\n\t\t\t\t),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $namespace, '/' . $base . '/schema', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( \\WP_REST_Server::EDITABLE ),\n\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t'permission_callback' => function( $request ) {\n\t\t\t\treturn current_user_can( 'manage_visits' );\n\t\t\t},\n\t\t) );\n\t}", "public function register_endpoints() {\n\t\tregister_rest_route(\n\t\t\tPIRATEFORMS_SLUG, '/v' . intval( PIRATEFORMS_API_VERSION ) . '/get_form/(?P<id>\\d+)/',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_form_html' ),\n\t\t\t)\n\t\t);\n\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permission_check' ),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "function dsol_register_my_rest_routes()\n{\n $controller = new Dsol_Posts_Controller();\n $controller->register_routes();\n}", "public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/validate',\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'parse_url' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'parse_url_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'url' => [\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t\t'validate_callback' => [ $this, 'validate_callback' ],\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\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\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/proxy',\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'proxy_url' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'parse_url_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'url' => [\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t\t'validate_callback' => [ $this, 'validate_callback' ],\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\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}", "protected function registerAuthorizationServer()\n {\n Passport::tokensCan(config('kit-auth.passport-scopes'));\n\n $this->app->singleton(AuthorizationServer::class, function () {\n return tap($this->makeAuthorizationServer(), function (AuthorizationServer $server) {\n $server->setDefaultScope(Passport::$defaultScope);\n\n $this->enableGrants(request(), $server);\n });\n });\n }", "public function register() {\n\t\treturn register_rest_route( static::ROOT_NAMESPACE, '/html', [\n\t\t\t'methods' => Server::READABLE,\n\t\t\t // @todo Make sure we do proper handling of cache longer then 12h.\n\t\t\t'permission_callback' => static function ( Request $request ) {\n\n\t\t\t\t/*\n\t\t\t\t * Since WordPress 4.7 the REST API cannot be disabled completely.\n\t\t\t\t * The \"disabling\" happens by returning falsy or error values from the `rest_authentication_errors`\n\t\t\t\t * filter.\n\t\t\t\t * If that is the case we follow through and and do not authorize the callback.\n\t\t\t\t */\n\t\t\t\t$auth = apply_filters( 'rest_authentication_errors', null );\n\n\t\t\t\treturn $auth\n\t\t\t\t && ! is_wp_error( $auth )\n\t\t\t\t && wp_verify_nonce( $request->get_param( '_wpnonce' ), 'wp_rest' );\n\t\t\t},\n\t\t\t'callback' => static function ( Request $request ) {\n\t\t\t\tView::make_for_rest( $request )->send_html();\n\t\t\t},\n\t\t\t'args' => $this->get_request_arguments(),\n\t\t] );\n\t}", "public function register_endpoints() {\n\t\t\tregister_rest_route(\n\t\t\t\t'content-layout-control/v1',\n\t\t\t\t'/components/gallery/thumb-urls/(?P<ids>.+)',\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'GET',\n\t\t\t\t\t'callback' => array( $this, 'api_get_thumb_urls' ),\n\t\t\t\t\t'permission_callback' => array( CLC_Content_Layout_Control(), 'current_user_can' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t\t'args' => array_merge(\n\t\t\t\t\t\t$this->get_endpoint_args_for_item_schema( \\WP_REST_Server::CREATABLE ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'email' => array(\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'description' => __( 'New user email address.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'username' => array(\n\t\t\t\t\t\t\t\t'required' => 'no' === get_option( 'woocommerce_registration_generate_username', 'yes' ),\n\t\t\t\t\t\t\t\t'description' => __( 'New user username.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'password' => array(\n\t\t\t\t\t\t\t\t'required' => 'no' === get_option( 'woocommerce_registration_generate_password', 'no' ),\n\t\t\t\t\t\t\t\t'description' => __( 'New user password.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)',\n\t\t\tarray(\n\t\t\t\t'args' => array(\n\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t'description' => __( 'Unique identifier for the resource.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'update_item_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( \\WP_REST_Server::EDITABLE ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this, 'delete_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'delete_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'force' => array(\n\t\t\t\t\t\t\t'default' => false,\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t\t'description' => __( 'Required to be true, as resource does not support trashing.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'reassign' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t'description' => __( 'ID to reassign posts to.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t$this->register_batch_route();\n\t}", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'matrix-synapse/v' . $version;\n\t\t$base = 'check_credentials';\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'check_credentials' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'page' => array (\n\t\t\t\t\t\t'required' => false\n\t\t\t\t\t),\n\t\t\t\t\t'per_page' => array (\n\t\t\t\t\t\t'required' => false\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\t}", "public function register_routes() {\n\n\t\tif ( ! $this->routes ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->routes as $key => $args ) {\n\t\t\t$rest_base = $this->rest_base;\n\t\t\t$override = false;\n\n\t\t\tif ( is_bool( end( $args ) ) ) {\n\t\t\t\t$override = array_pop( $args );\n\t\t\t}\n\n\t\t\tif ( ! is_numeric( $key ) ) {\n\t\t\t\t$rest_base = \"{$rest_base}/{$key}\";\n\t\t\t}\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $rest_base, $args, $override );\n\t\t}\n\t}", "function rest_get_server()\n{\n}", "public function register_routes()\n {\n $categories = \\Podlove\\Itunes\\categories(false);\n $categories_enum = [];\n foreach ($categories as $key => $val) {\n array_push( $categories_enum, $val );\n }\n\n register_rest_route($this->namespace, '/'.$this->rest_base, [\n [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_item'],\n 'permission_callback' => [$this, 'get_item_permissions_check'],\n ],\n [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => [$this, 'update_item'],\n 'permission_callback' => [$this, 'update_item_permissions_check'],\n 'args' => [\n 'title' => [\n 'description' => __('Title of the podcast', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'subtitle' => [\n 'description' => __('Extension to the title. Clarify what the podcast is about.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'summary' => [\n 'description' => __('Elaborate description of the podcasts content.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'author_name' => [\n 'description' => __('Name of the podcast author. Publicly displayed in Podcast directories.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'podcast_email' => [\n 'description' => __('Used by iTunes and other Podcast directories to contact you.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n 'validate_callback' => 'is_email',\n ],\n 'mnemonic' => [\n 'description' => __('Abbreviation for your podcast.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'funding_url' => [\n 'description' => __('Can be used by podcatchers show funding/donation links for the podcast.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n 'validate_callback' => '\\Podlove\\Api\\Validation::url'\n ],\n 'funding_label' => [\n 'description' => __('Label for funding/donation URL.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'copyright' => [\n 'description' => __('Copyright notice for content in the channel.', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n ],\n 'expicit' => [\n 'description' => __('Is the overall content of the podcast explicit?', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'boolean',\n ],\n 'category' => [\n 'description' => __('iTunes category of the podcast', 'podlove-podcasting-plugin-for-wordpress'),\n 'type' => 'string',\n 'enum' => $categories_enum,\n ]\n ]\n ]\n ]);\n }", "function my_theme_register_routes() {\n $controller = new RestAPI\\APIController( 'post' );\n $controller->registerRoute();\n}", "public function addRoutes() \n {\n register_rest_route( 'kerigansolutions/v1', '/instagallerytoken',\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'exchangeToken' ],\n 'permission_callback' => '__return_true'\n ]\n );\n\n register_rest_route( 'kerigansolutions/v1', '/instagramdata',\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'getInstagramData' ],\n 'permission_callback' => '__return_true'\n ]\n );\n }", "function routes() {\n\t\t\tregister_rest_route( static::$endpoint, '/spaceapi', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'spaceapi' ),\n\t\t\t) );\n\t\t}", "public function register_routes() {\n\n\t\t\tregister_rest_route( $this->namespace, '/track', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'track_components' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\tregister_rest_route( $this->namespace, '/track/(?P<id>\\d+)?', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'track_components' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_api_tracker_permissions' ),\n\t\t\t\t\t'args' \t=> array(\n\t\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/blog', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_blog' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\tregister_rest_route( $this->namespace, '/blog/(?P<id>\\d+)?', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_blogpost' ),\n\t\t\t\t\t'args' \t=> array(\n\t\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t));\n\n\n\t\t\tregister_rest_route( $this->namespace, '/contact', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'POST',\n\t\t\t\t\t'callback' => array( $this, 'contact_message' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_contact_message_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\t/* =================== */\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type, array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/(?P<id>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/featured', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_featured_courses' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_featured_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/popular', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_popular_courses' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_popular_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/filters(?P<filter>.+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_filtered_courses' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_filtered_courses_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/instructors', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_instructors' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_instructors_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/instructors/(?P<instructor_id>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_instructor' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_instructor_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\n\t\t\t/* Taxonomies controller */\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/taxonomy(?P<taxonomy>.+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_course_terms' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_course_terms_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->type . '/category/(?P<id>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_category' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_category_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' \t\t\t\t=> $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\n\t\t\t) );\n\t\t\t\n\t\t}", "public function register()\n {\n $storage = new \\OAuth2\\Storage\\Memory([]);\n $server = new \\OAuth2\\Server($storage, [], []);\n\n \\Slim\\Environment::mock();\n\n $slim = new \\Slim\\Slim();\n\n Token::register($slim, $server);\n\n $route = $slim->router()->getNamedRoute('token');\n\n $this->assertInstanceOf('\\Slim\\Route', $route);\n $this->assertInstanceOf('\\Chadicus\\Slim\\OAuth2\\Routes\\Token', $route->getCallable());\n $this->assertSame([\\Slim\\Http\\Request::METHOD_POST], $route->getHttpMethods());\n }", "protected function _initRestRoute() {\r\n\r\n\t\t$this->bootstrap('Request');\r\n\t\t$restRoute = new Zend_Rest_Route($this->front, array(), array(\r\n\t\t\t'default' => array('restserver')\r\n\t\t));\r\n\t\t\r\n\t}", "public static function getServerRegisterApp(){\n return self::getServerApp() . \"/api/register/\" ;\n }", "public function Register()\n {\n $this->Name = \"XmlrpcServer\";\n $this->Version = \"1.0.0\";\n $this->Description = \"Provides support for serving up resource records, classification using xmlrpc.\";\n $this->Author = \"Yazna Garcia Vega\";\n $this->Url = \"http://\";\n $this->Email = \"yazna96@gmail.com\";\n $this->Requires = array(\"CWISCore\" => \"2.1.0\");\n $this->EnabledByDefault = FALSE;\n }", "public static function api_register_data() {\n\t\tif ( function_exists( 'register_rest_field' ) ) {\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/manage/taxonomy', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_manage_taxonomies' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t) );\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/manage/taxonomy/merge', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_manage_taxonomies_merge' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t) );\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/manage/taxonomy/bulk', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_manage_taxonomies_bulk_edit' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t) );\n\t\t}\n\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t$this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_mailchimp_status' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [ $this, 'get_items' ],\n\t\t\t\t'permission_callback' => [ $this, 'get_items_permissions_check' ],\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t],\n\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t] );\n\n\t}", "public function register_routes(){\n register_rest_route($this->namespace, '/' . $this->rest_base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_items'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n\t //'args' => $this->get_item_schema()\n ),\n\t array(\n\t\t 'methods' => WP_REST_Server::CREATABLE,\n\t\t 'callback' => array($this, 'create_item'),\n\t\t 'permission_callback' => array($this, 'create_item_permissions_check'),\n\t\t //'args' => $this->get_endpoint_args_for_item_schema(WP_REST_Server::CREATABLE),\n\t ),\n ));\n register_rest_route($this->namespace, '/' . $this->rest_base . '/(?P<collection_id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_item'),\n //'args' => $this->get_collection_params(),\n 'permission_callback' => array($this, 'get_item_permissions_check'),\n ),\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'update_item_permissions_check'),\n ),\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array($this, 'delete_item'),\n 'permission_callback' => array($this, 'delete_item_permissions_check'),\n ),\n ));\n }", "public static function registerRestApiEndpoints() {\n\n\t\tregister_rest_route('la-events-calendar/v1', '/event/intStart=(?P<intStart>\\d+)&intEnd=(?P<intEnd>\\d+)&category=(?P<category>\\d+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array(__CLASS__, 'getEventsEndpoint')\n\t\t));\n\n\t\tregister_rest_route('la-events-calendar/v1', '/event-mobile/page=(?P<page>\\d+)&per_page=(?P<per_page>\\d+)&category=(?P<category>\\d+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array(__CLASS__, 'getEventsMobileEndpoint')\n\t\t));\n\n\t}", "function rest_api_stuff() {\n\t\tregister_rest_route('ap/v1', '/webfinger', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_webfinger'\n\t\t));\n\n\t\tregister_rest_route('ap/v1', '/actor', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_webfinger_actor'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/inbox', array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'get_inbox'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/outbox', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_outbox'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/followers', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_followers'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/likes', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_likes'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/shares', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_shares'\n\t\t));\n\t}", "static function createResourceServer()\n {\n // creating HeimdallResourceServer config\n $config = Heimdall::withResourceConfig(\n new AccessTokenRepository(),\n __DIR__ . '/public.key'\n );\n\n // return a new instance of HeimdallResourceServer\n return Heimdall::initializeResourceServer($config);\n }", "public function register_routes() {\n register_rest_route(\n $this->namespace,\n $this->rest_base,\n [[\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_items' ),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n 'args' => $this->get_collection_params(),\n ]]\n );\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/count' , array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items_count' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'edit' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\n\t\t/*register_rest_route( $this->namespace, '/' . $this->taxonomy, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );*/\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->taxonomy . '/(?P<id>[\\d]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier for the term.' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_mottoes' ),\n\t\t\t), array(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'post_motto' ),\n\t\t\t), array(\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => array( $this, 'delete_motto' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_motto' ),\n\t\t\t)\n\t\t) );\n\t}", "function newspack_iframe_block_register_rest_routes() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound\n\t$iframe_controller = new WP_REST_Newspack_Iframe_Controller();\n\t$iframe_controller->register_routes();\n}", "function register_monday_rest_points() {\n\n\tregister_rest_route(\n\t\t'monday', '/subscribe/create_post',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'subscribe_action',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/subscribe/create_page',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'subscribe_action',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/subscribe/create_user',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'subscribe_action',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/subscribe/create_comment',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'subscribe_action',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/authorize',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'authorize',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/unsubscribe',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'unsubscribe',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/run/create_post',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'create_post',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/run/change_status',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'change_post_status',\n\t\t)\n\t);\n\n\tregister_rest_route(\n\t\t'monday', '/validate',\n\t\tarray(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => 'wp_validate',\n\t\t)\n\t);\n\n}", "function captaincore_register_rest_endpoints() {\n\tregister_rest_route(\n\t\t'captaincore/v1', '/client', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_client_options_func',\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore API\n\tregister_rest_route(\n\t\t'captaincore/v1', '/api', array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'captaincore_api_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore login\n\tregister_rest_route(\n\t\t'captaincore/v1', '/login', array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'captaincore_login_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site/<id>/quicksaves\n\tregister_rest_route(\n\t\t'captaincore/v1', '/site/(?P<id>[\\d]+)/quicksaves', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_site_quicksaves_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site/<id>/captures\n\tregister_rest_route(\n\t\t'captaincore/v1', '/site/(?P<id>[\\d]+)/(?P<environment>[a-zA-Z0-9-]+)/captures', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_site_captures_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site/<id>/snapshots\n\tregister_rest_route(\n\t\t'captaincore/v1', '/site/(?P<id>[\\d]+)/snapshots', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_site_snapshots_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site\n\tregister_rest_route(\n\t\t'captaincore/v1', '/site/(?P<id>[\\d]+)/snapshots/(?P<snapshot_id>[\\d]+)-(?P<token>[a-zA-Z0-9-]+)/(?P<snapshot_name>[a-zA-Z0-9-]+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_site_snapshot_download_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site\n\tregister_rest_route(\n\t\t'captaincore/v1', '/site/(?P<id>[\\d]+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_site_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore site\n\tregister_rest_route(\n\t\t'captaincore/v1', '/sites/', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_sites_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for domain\n\tregister_rest_route(\n\t\t'captaincore/v1', '/domain/(?P<id>[\\d]+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_domain_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for domains\n\tregister_rest_route(\n\t\t'captaincore/v1', '/domains/', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_domains_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for CaptainCore accounts\n\tregister_rest_route(\n\t\t'captaincore/v1', '/accounts/', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_accounts_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Custom endpoint for domains\n\tregister_rest_route(\n\t\t'captaincore/v1', '/keys/', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => 'captaincore_keys_func',\n\t\t\t'show_in_index' => false\n\t\t)\n\t);\n\n\t// Add meta fields to API\n\tregister_rest_field(\n\t\t'captcore_website', 'launch_date',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'closed_date',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'storage',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'address',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'server',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_server',\n\t\t\t'update_callback' => 'slug_update_server',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'visits',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'billing_terms',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'addons',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'preloaded_email',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'preloaded_users',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'default_timezone',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'default_recipes',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_array',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'billing_method',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'billing_email',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'billing_date',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'storage',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'visits',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'paid_by',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_paid_by',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'paid_by_me',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_paid_by_me',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'hosting_price',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'status',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'hosting_plan',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_customer', 'total_price',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_website', 'customer',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_post_meta_cb',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_processlog', 'description',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_process_description',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\tregister_rest_field(\n\t\t'captcore_processlog', 'process',\n\t\tarray(\n\t\t\t'get_callback' => 'slug_get_process',\n\t\t\t'update_callback' => 'slug_update_post_meta_cb',\n\t\t\t'schema' => null,\n\t\t)\n\t);\n\n}", "public function register_routes() {\n\t\tadd_action( 'rest_api_init', function () {\n\n\t\t register_rest_route( 'dashboard/users/v1', '/login', array(\n\t\t 'methods' => 'POST',\n\t\t 'callback' => array($this,'login'),\n\t\t ) );\n\n\t\t register_rest_route( 'dashboard/users/v1', '/get/properties', array(\n\t\t 'methods' => 'POST',\n\t\t 'callback' => array($this,'get_properties'),\n\t\t ) );\n\n\t\t register_rest_route( 'dashboard/test/v1', 'test', array(\n\t\t 'methods' => 'POST',\n\t\t 'callback' => array($this,'test'),\n\t\t ) );\n\t\t} );\n\t}", "public function register()\n\t{\n\n\t\t$this->app['forrest'] = $this->app->share(function($app)\n\t\t{\n\t\t\t$settings = Config::get('forrest::config');\n\n\t\t\t$client = new \\GuzzleHttp\\Client();\n\t\t\t$redirect = new \\Omniphx\\Forrest\\Providers\\Laravel\\LaravelRedirect();\n\t\t\t$storage = new \\Omniphx\\Forrest\\Providers\\Laravel\\LaravelSession();\n\t\t\t$input = new \\Omniphx\\Forrest\\Providers\\Laravel\\LaravelInput();\n\n\t\t\tswitch ($settings['authenticationFlow']) {\n\t\t\t case 'WebServer':\n\t\t\t $authentication = new \\Omniphx\\Forrest\\AuthenticationFlows\\WebServer($client, $redirect, $input, $settings);\n\t\t\t break;\n\t\t\t case 'UserAgent':\n\t\t\t $authentication = new \\Omniphx\\Forrest\\AuthenticationFlows\\UserAgent();\n\t\t\t break;\n\t\t\t case 'UsernamePassword':\n\t\t\t $authentication = new \\Omniphx\\Forrest\\AuthenticationFlows\\UsernamePassword($client, $settings);\n\t\t\t $storage = new \\Omniphx\\Forrest\\Providers\\Laravel\\LaravelCache();\n\t\t\t break;\n\t\t\t}\n\n\t\t\t$resource = new \\Omniphx\\Forrest\\Resource($client, $storage, $settings['defaults']);\n\n\t\t\treturn new RESTClient($resource, $client, $storage, $redirect, $authentication, $settings);\n\t\t});\n\t}", "public function add_api_routes() {\n register_rest_route( $this->namespace, 'token/', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'retrieve_token' ),\n ) );\n\n register_rest_route( $this->namespace, 'token/generate', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'generate_token' ),\n ) );\n\n register_rest_route( $this->namespace, 'token/validate', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'validate_token' ),\n ) );\n\n register_rest_route( $this->namespace, 'token/retrieve', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'retrieve_token' ),\n ) );\n\n register_rest_route( $this->namespace, 'token/revoke', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'revoke_token' ),\n ) );\n\n register_rest_route( $this->namespace, 'token/regenerate', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'regenerate_token' ),\n ) );\n }", "public static function register_rest_namespace($namespaces)\n {\n }", "public function register_routes() {\n\t\t$posts_args = $this->get_shortcode_args();\n\n\t\tregister_rest_route( FrmAPIAppController::$v2_base, '/' . $this->rest_base . '/(?P<id>[\\d]+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => $posts_args,\n\t\t\t),\n\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\t$api_atts = array(\n\t\t\t'get_callback' => array( $this, 'prepare_content_response' ),\n\t\t\t'schema' => array(\n\t\t\t\t'description' => 'The content for the object.',\n\t\t\t\t'type' => 'object',\n\t\t\t\t'properties' => array(\n\t\t\t\t\t'rendered' => array(\n\t\t\t\t\t\t'description' => 'Content for the object, transformed for display.',\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\tif ( function_exists('register_rest_field') ) {\n\t\t\tregister_rest_field( $this->post_type, 'renderedHtml', $api_atts );\n\t\t} else {\n\t\t\tregister_api_field( $this->post_type, 'renderedHtml', $api_atts );\n\t\t}\n\t}", "public function register_routes() {\n register_rest_route( $this->namespace, '/' . $this->base . '/gateways', array(\n array(\n 'methods' => \\WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_avaible_gateways' ),\n 'args' => $this->get_collection_params()\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/process', array(\n array(\n 'methods' => \\WP_REST_Server::CREATABLE,\n 'callback' => array( $this, 'process_payment' ),\n 'args' => $this->get_collection_params()\n ),\n ) );\n }", "public function register() {}", "public function register() {}", "public function register() {}", "function __construct() {\n\n $server = new Zend_Rest_Server();\n $server->setClass('My_Service_Class');\n $server->handle();\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_items' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'get_items_permissions_check' ],\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t],\n\t\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t\t]\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)',\n\t\t\t[\n\t\t\t\t'args' => [\n\t\t\t\t\t'id' => [\n\t\t\t\t\t\t'description' => __( 'Unique identifier for the object.' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_item' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'get_item_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'context' => $this->get_context_param( [ 'default' => 'view' ] ),\n\t\t\t\t\t\t'password' => [\n\t\t\t\t\t\t\t'description' => __( 'The password for the post if it is password protected.' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t\t]\n\t\t);\n\n\t\t$fields = [\n\t\t\t'Courses\\Description_Field' => ALIEMU_ROOT_PATH . '/lib/rest-api/fields/course/class-description-field.php',\n\t\t\t'Courses\\Hours_Field' => ALIEMU_ROOT_PATH . '/lib/rest-api/fields/course/class-hours-field.php',\n\t\t];\n\n\t\tforeach ( $fields as $classname => $path ) {\n\t\t\trequire_once $path;\n\t\t\t$class = __NAMESPACE__ . '\\\\' . $classname;\n\t\t\t$field = new $class();\n\t\t\t$field->register();\n\t\t}\n\t}", "function register_api_password_lost() {\n register_rest_route('api', '/password/lost', [\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => 'api_password_lost',\n ]);\n}", "function create_initial_rest_routes()\n{\n}", "public function pdp_register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'WC_REST_PCart_V1_Controller',\n\t\t\t'WC_REST_PCart_Controller',\n\t\t);\n\t\t\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$this->$controller = new $controller();\n\t\t\t$this->$controller->register_routes();\n\t\t}\n\t}", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register(){}", "public function register(){}", "public function register(){}", "public function register(){}", "public function register_routes()\n\t{\n\t\t$this->route->compile();\n\n\t\t$compiledRoutes = $this->route->getCompiledRoutes();\n\n\t \tforeach($compiledRoutes as $route){\n\t register_rest_route( $route['prefix'], '/' . $route['resource'], $route['options']);\n\t \t}\n\n\t \t$this->route->doRouteWhiteListing();\n\n\t \treturn true;\n\t}", "public function register_routes() {\n $version = '1';\n $namespace = 'angularize/v' . $version;\n $base = 'route';\n $files = 'files';\n\n // Angularize Schema\n register_rest_route( $namespace, '/', array( \n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_angularize_schema' ),\n ));\n\n // /files endpoints\n register_rest_route( $namespace, '/files', array( // /wp-json/angularize/v1/files/cities\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_files' ),\n ) \n ));\n\n register_rest_route( $namespace, '/files/(?P<filename>[\\\\w.-]+)', array( \n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_file' ),\n ));\n\n // /auth endpoints\n register_rest_route( $namespace, '/auth/login', array( \n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'auth_login' ),\n ));\n register_rest_route( $namespace, '/auth/logout', array( \n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'auth_logout' ),\n ));\n register_rest_route( $namespace, '/auth/forgot_password', array( \n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'auth_forgot_password' ),\n ));\n }", "protected function registerAuthorizationServer()\n {\n $this->app->singleton(AuthorizationServer::class, function () {\n return tap($this->makeAuthorizationServer(), function ($server) {\n $server->enableGrantType(\n $this->makeAuthCodeGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n $this->makeRefreshTokenGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n $this->makePasswordGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n new PersonalAccessGrant, new DateInterval('P1Y')\n );\n\n $server->enableGrantType(\n new OAuth2\\ClientCredentialsGrant, Passport::tokensExpireIn()\n );\n\n if (Passport::$implicitGrantEnabled) {\n $server->enableGrantType(\n $this->makeImplicitGrant(), Passport::tokensExpireIn()\n );\n }\n });\n });\n }", "function tux_su_register_rest_api_routes() {\n\n\tregister_rest_route( 'tuxedo-updater/v1', '/get-updates/', array(\n\t\t'methods' => 'GET,POST',\n\t\t'callback' => 'tux_su_get_updates',\n\t\t'args' => array(\n\t\t\t'update_key' => array(\n\t\t\t\t'required' => false,\n\t\t\t\t'description' => __( 'Update key.', 'tuxedo-software-updater' ),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t\t'ids' => array(\n\t\t\t\t'required' => true,\n\t\t\t\t'description' => __( 'Comma separated list of product IDs.', 'tuxedo-software-updater' ),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t\t'versions' => array(\n\t\t\t\t'required' => true,\n\t\t\t\t'description' => __( 'Comma separated list of current versions requesting updates, per product ID.', 'tuxedo-software-updater' ),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t\t'activation_id' => array(\n\t\t\t\t'required' => false,\n\t\t\t\t'description' => __( 'Human readable ID for the current activation.', 'tuxedo-software-updater' ),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t),\n\t) );\n\n}", "public static function register() {}", "public function endpoint ()\n {\n\n // Gets resource from facebook\n register_rest_route( 'kerigansolutions/v1', '/sync-' . $this->postType,\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'sync' ],\n 'permission_callback' => '__return_true'\n ]\n );\n\n // Gets resource from local schema\n register_rest_route( 'kerigansolutions/v1', '/get-' . $this->postType,\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'collection' ],\n 'permission_callback' => '__return_true'\n ]\n );\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace, '/collection/(?P<collection_id>[\\d]+)/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array($this, 'get_items'),\n\t\t\t\t\t'permission_callback' => array($this, 'get_items_permissions_check'),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array($this, 'create_item'),\n\t\t\t\t\t'permission_callback' => array($this, 'create_item_permissions_check'),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::CREATABLE),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t$this->namespace, '/' . $this->rest_base . '/(?P<item_id>[\\d]+)',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array($this, 'get_item'),\n\t\t\t\t\t'permission_callback' => array($this, 'get_item_permissions_check'),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::READABLE),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array($this, 'update_item'),\n\t\t\t\t\t'permission_callback' => array($this, 'update_item_permissions_check'),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::EDITABLE),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array($this, 'delete_item'),\n\t\t\t\t\t'permission_callback' => array($this, 'delete_item_permissions_check'),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'permanently' => array(\n\t\t\t\t\t\t\t'description' => __('To delete permanently, you can pass \\'permanently\\' as true. By default this will only trash collection', 'tainacan'),\n\t\t\t\t\t\t\t'default' => 'false'\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\tregister_rest_route(\n\t\t\t$this->namespace, '/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array($this, 'get_items'),\n\t\t\t\t\t'permission_callback' => array($this, 'get_items_permissions_check'),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t$this->namespace, '/collection/(?P<collection_id>[\\d]+)/' . $this->rest_base . '/(?P<item_id>[\\d]+)/duplicate',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array($this, 'duplicate_item'),\n\t\t\t\t\t'permission_callback' => array($this, 'create_item_permissions_check'),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'copies' => array(\n\t\t\t\t\t\t\t'description' => __('Number of copies to be created', 'tainacan'),\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'type' => 'integer'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'status' => array(\n\t\t\t\t\t\t\t'description' => __('Try to assign the informed status to the duplicates if they validate. By default it will save them as drafts.', 'tainacan'),\n\t\t\t\t\t\t\t'type' => 'string'\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}", "protected function registerRoutes()\n {\n /** http://localhost/ */\n RouterStore::add(\n new WpQueryCondition('index|home|any'),\n new Action(function () {\n return View::display(\n '<h1 style=\"{{{style}}}\">{{{hello}}}</h1>',\n [\n 'hello' => 'Hello Wpci!',\n 'style' => 'line-height: 10; color: white; text-align: center; background: dimgrey',\n ]\n );\n }),\n 'pages.home'\n );\n\n /** http://localhost/wp-json/myapi/v2/hello */\n WpRestCondition::prefix('myapi/v2', function() {\n\n /** TODO: 1 before test don't forget turn on permalinks... not best behaviour */\n RouterStore::add(\n WpRestCondition::get('/hello'),\n new Action(function() {\n return new JsonResponse([\n 'message' => 'Hello Wpci!',\n ]);\n })\n );\n\n });\n }", "public function registerPassportResources()\n {\n Passport::ignoreMigrations();\n Passport::routes();\n Passport::tokensExpireIn(Carbon::now()->addDays(15));\n $this->commands([\n InstallCommand::class,\n ClientCommand::class,\n KeysCommand::class,\n ]);\n }", "public function add_rest_api_routes()\n {\n //Product endpoint\n register_rest_route('clerk', '/product', [\n 'methods' => 'GET',\n 'callback' => [$this, 'product_endpoint_callback'],\n ]);\n\n //Product endpoint\n register_rest_route('clerk', '/page', [\n 'methods' => 'GET',\n 'callback' => [$this, 'page_endpoint_callback'],\n ]);\n\n //Category endpoint\n register_rest_route('clerk', '/category', [\n 'methods' => 'GET',\n 'callback' => [$this, 'category_endpoint_callback'],\n ]);\n\n //Order endpoint\n register_rest_route('clerk', '/order', [\n 'methods' => 'GET',\n 'callback' => [$this, 'order_endpoint_callback'],\n ]);\n\n //Customer endpoint\n register_rest_route('clerk', '/customer', [\n 'methods' => 'GET',\n 'callback' => [$this, 'customer_endpoint_callback'],\n ]);\n\n //Version endpoint\n register_rest_route('clerk', '/version', [\n 'methods' => 'GET',\n 'callback' => [$this, 'version_endpoint_callback'],\n ]);\n\n //Version endpoint\n register_rest_route('clerk', '/plugin', [\n 'methods' => 'GET',\n 'callback' => [$this, 'plugin_endpoint_callback'],\n ]);\n\n //Log endpoint\n register_rest_route('clerk', '/log', [\n 'methods' => 'GET',\n 'callback' => [$this, 'log_endpoint_callback'],\n ]);\n }", "public function register_routes() {\n\t\t$root = $this->api_root;\n\t\t$version = $this->version;\n\n\t\t/**\n\t\t * Get Asks\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/asks', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this->ask_cb_class, 'get_items' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'community' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'ask_type' => array(\n\t\t\t\t\t\t\t'default' => 'talk',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'urldecode'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'page' => array(\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Get a single Ask\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/ask', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this->ask_cb_class, 'get_item' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'ask' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Delete a single ask\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/ask' . '/(?P<id>[\\d]+)', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this->ask_cb_class, 'delete_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Get comments by ask\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/ask' . '/(?P<id>[\\d]+)/comments', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this->ask_cb_class, 'get_comments' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'ask' => array(\n\t\t\t\t\t\t\t'default' => null,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'community' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Get communities\n\t\t *\n\t\t * @todo implement\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/communities', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'not_implemented' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Get a single community\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/community', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'not_implemented' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Delete a single community\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/community' . '/(?P<id>[\\d]+)', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this, 'not_implemented' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Join a community\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/community' . '/(?P<id>[\\d]+)/join', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array( $this->community_cb_class, 'join' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Get comments by community\n\t\t */\n\t\tregister_rest_route( \"{$root}/{$version}\", '/community' . '/(?P<id>[\\d]+)/comments', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this->community_cb_class, 'get_comments' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'community' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$this->nonce_field => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'uid' => array(\n\t\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\n\n\n\t}", "public function register_routes() {\n\t\t\t$version = '1';\n\t\t\t$namespace = LEARNDASH_REST_API_NAMESPACE . '/v' . $version;\n\t\t\t$base = 'sfwd-questions';\n\n\t\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\t\tarray(\n\t\t\t\t 'methods' => WP_REST_Server::READABLE,\n\t\t\t\t 'callback' => array( $this, 'get_items' ),\n\t\t\t\t 'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t 'args' => array(),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $namespace, '/' . $base . '/(?P<id>[\\d]+)', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this, 'delete_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'sanitize_callback' => 'absint',\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}", "public static function register_rest_namespace( $namespaces ) {\n\t\trequire_once WC_ABSPATH . 'includes/wccom-site/rest-api/endpoints/class-wc-rest-wccom-site-installer-controller.php';\n\n\t\t$namespaces['wccom-site/v1'] = array(\n\t\t\t'installer' => 'WC_REST_WCCOM_Site_Installer_Controller',\n\t\t);\n\n\t\treturn $namespaces;\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( 'bp/v1', '/activity', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( 'bp/v1', '/activity/(?P<id>\\d+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\t\t) );\n\n\t}", "public function register_routes() {\r\n\t\t// Route to get analytics profiles list.\r\n\t\tregister_rest_route(\r\n\t\t\t$this->get_namespace(),\r\n\t\t\t$this->endpoint . '/analytics-profiles/',\r\n\t\t\tarray(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\r\n\t\t\t\t\t'callback' => array( $this, 'profiles' ),\r\n\t\t\t\t\t'permission_callback' => array( $this, 'settings_permission' ),\r\n\t\t\t\t\t'args' => array(\r\n\t\t\t\t\t\t'network' => array(\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'type' => 'boolean',\r\n\t\t\t\t\t\t\t'description' => __( 'The network flag.', 'ga_trans' ),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "public function register_api_hooks(){\r\n register_rest_route( $this->rest_url, '/getlanguages', array(\r\n 'methods' => 'GET',\r\n 'callback' => array( $this, 'bamobile_getlanguages' ),\t\r\n 'permission_callback' => array( $this, 'bamobile_get_items_permissions_check' ),\t\t\t\r\n 'args' => array(\t\t\r\n ),\t\t\t\t\t\r\n ) \r\n );\r\n }" ]
[ "0.70180386", "0.70159334", "0.67918795", "0.6787925", "0.6782419", "0.67548156", "0.67526925", "0.6605095", "0.65682477", "0.6473124", "0.64636827", "0.64625096", "0.64606655", "0.64276403", "0.6399448", "0.63880277", "0.63688886", "0.6354456", "0.63367593", "0.6334721", "0.6334433", "0.63277966", "0.63245463", "0.632073", "0.6320636", "0.63163054", "0.62928855", "0.62902445", "0.6268721", "0.62601864", "0.6236764", "0.6227977", "0.62264353", "0.6217496", "0.6211029", "0.62083703", "0.6199246", "0.61977595", "0.61606276", "0.6156219", "0.61523026", "0.615215", "0.6146083", "0.61402845", "0.6139502", "0.61352444", "0.61348706", "0.611687", "0.6116098", "0.6103889", "0.6097623", "0.6087514", "0.6079569", "0.60785127", "0.60727453", "0.60667163", "0.60636866", "0.60595185", "0.60089535", "0.599898", "0.5986678", "0.598153", "0.5970072", "0.59639025", "0.59639025", "0.59639025", "0.5948543", "0.5947581", "0.59426284", "0.5939078", "0.59342647", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.59182185", "0.5907119", "0.5907119", "0.5907119", "0.5907119", "0.5905453", "0.59041995", "0.59015334", "0.5899098", "0.5895272", "0.5888935", "0.5885563", "0.5881167", "0.5879005", "0.58740073", "0.58712596", "0.5866442", "0.58199793", "0.58165205", "0.5815047", "0.5805007" ]
0.7037776
0
Test deserialization of SOAP header
Тест десериализации заголовка SOAP
#[@test] public function testHeader() { $msg= XPSoapMessage::fromString(' <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Header> <targetAddress SOAP-ENV:mustUnderstand="1"> http://tokyo:8004/glue/urn:CorpDataServices </targetAddress> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:getQuote xmlns:ns1="urn:DirectedQuoteProxyService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <stocks xsi:type="xsd:string">AMX</stocks> </ns1:getQuote> </SOAP-ENV:Body> </SOAP-ENV:Envelope> '); $headers= $msg->getHeaders(); $this->assertNotEquals(null, $msg->getHeaders()); $this->assertEquals(1, sizeof ($headers)); foreach ($headers as $h) { $this->assertSubclass($h, 'webservices.soap.xp.XPSoapHeaderElement'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddingSoapHeader()\n {\n AnnotationRegistry::registerUniqueLoader('class_exists');\n\n $serializer = SerializerBuilder::create()\n ->setSerializationVisitor('soap', new SoapSerializationVisitorFactory())\n ->setPropertyNamingStrategy(\n new SerializedNameAnnotationStrategy(\n new IdenticalPropertyNamingStrategy()\n )\n )\n ->configureListeners(\n function (EventDispatcher $dispatcher) {\n $dispatcher->addSubscriber(\n new SoapMessageEventSubscriber()\n );\n $dispatcher->addSubscriber(\n new SoapHeaderEventSubscriber(\n new HeaderLogin('dummy', 'secret123!')\n )\n );\n }\n )\n ->configureHandlers(\n function (HandlerRegistry $registry) {\n $registry->registerSubscribingHandler(new SoapDateHandler());\n }\n )\n ->build();\n\n $xml = simplexml_load_string(\n $serializer->serialize(new Language('Python', 33, new \\DateTime('1994-01-25')), 'soap')\n );\n\n static::assertContains(SoapNamespaceInterface::SOAP_NAMESPACES[SOAP_1_1], $xml->getNamespaces());\n static::assertSame('Envelope', $xml->getName());\n static::assertSame('Header', $xml->xpath('/*[local-name()=\"Envelope\"]/*')[0]->getName());\n static::assertSame('Body', $xml->xpath('/*[local-name()=\"Envelope\"]/*')[1]->getName());\n\n $header = $xml->xpath('//*[local-name()=\"Header\"]/*')[0]->children();\n static::assertSame('dummy', strval($header->username));\n static::assertSame('secret123!', strval($header->password));\n }", "public function testGetHeader() {\n $parser = new Parser();\n $response = new Response();\n\n $parser->response($response);\n\n $parts = [\n join([self::$_message['request_line'], self::$_message['header']], ''),\n self::$_message['body'],\n ];\n\n foreach ($parts as $part) {\n $parser->addData($part);\n }\n\n $this->assertEquals(25, $parser->getHeader('Content-Length'));\n $this->assertEquals(25, $parser->getHeader('content-length'));\n $this->assertEquals(null, $parser->getHeader('undefined'));\n }", "public function testGetHeaders()\n {\n $this->assertEquals(self::HEADERS, $this->__importer->getHeaders());\n }", "public function testHeaderParsing() {\n\t\tRawTransport::$data = \n\t\t\t\"HTTP/1.0 200 OK\\r\\n\".\n\t\t\t\"Host: localhost\\r\\n\".\n\t\t\t\"Host: ambigious\\r\\n\".\n\t\t\t\"Nospace:here\\r\\n\".\n\t\t\t\"Muchspace: there \\r\\n\".\n\t\t\t\"Empty:\\r\\n\".\n\t\t\t\"Empty2: \\r\\n\".\n\t\t\t\"Folded: one\\r\\n\".\n\t\t\t\"\\ttwo\\r\\n\".\n\t\t\t\" three\\r\\n\\r\\n\".\n\t\t\t\"stop\\r\\n\";\n\t\t$response = $this->raw_transport->request('http://example.com/');\n\t\t$expected = array(\n\t\t\t'host' => array(\n\t\t\t\t'localhost',\n\t\t\t\t'ambigious'\n\t\t\t),\n\t\t\t'nospace' => 'here',\n\t\t\t'muchspace' => 'there',\n\t\t\t'empty' => '',\n\t\t\t'empty2' => '',\n\t\t\t'folded' => \"one two three\"\n\t\t);\n\t\t$this->assertEquals($response->headers, $expected);\n\t}", "public function testHeaderParsing() {\n\t\t$transport = new RawTransport();\n\t\t$transport->data =\n\t\t\t\"HTTP/1.0 200 OK\\r\\n\".\n\t\t\t\"Host: localhost\\r\\n\".\n\t\t\t\"Host: ambiguous\\r\\n\".\n\t\t\t\"Nospace:here\\r\\n\".\n\t\t\t\"Muchspace: there \\r\\n\".\n\t\t\t\"Empty:\\r\\n\".\n\t\t\t\"Empty2: \\r\\n\".\n\t\t\t\"Folded: one\\r\\n\".\n\t\t\t\"\\ttwo\\r\\n\".\n\t\t\t\" three\\r\\n\\r\\n\".\n\t\t\t\"stop\\r\\n\";\n\n\t\t$options = array(\n\t\t\t'transport' => $transport\n\t\t);\n\t\t$response = Requests::get('http://example.com/', array(), $options);\n\t\t$expected = new Requests_Response_Headers();\n\t\t$expected['host'] = 'localhost,ambiguous';\n\t\t$expected['nospace'] = 'here';\n\t\t$expected['muchspace'] = 'there';\n\t\t$expected['empty'] = '';\n\t\t$expected['empty2'] = '';\n\t\t$expected['folded'] = 'one two three';\n\t\tforeach ($expected as $key => $value) {\n\t\t\t$this->assertEquals($value, $response->headers[$key]);\n\t\t}\n\n\t\tforeach ($response->headers as $key => $value) {\n\t\t\t$this->assertEquals($value, $expected[$key]);\n\t\t}\n\t}", "public function testHeaders() {\n $parser = new Parser();\n $response = new Response();\n\n $parser->response($response);\n\n $this->assertNull($parser->headers());\n $this->assertEquals([], $parser->headers([]));\n $this->assertEquals([], $parser->headers());\n $this->assertEquals(['val'], $parser->headers(['val']));\n $this->assertEquals(['val', 'test'], $parser->headers(['val', 'test']));\n }", "public function testCanCreateSoapHeadersForStatefullCallAuth()\n {\n $expectedSecurityNodeStructureXml = '<oas:Security xmlns:oas=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd\"\nxmlns:oas1=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n <oas:UsernameToken oas1:Id=\"UsernameToken-1\">\n <oas:Username>WSYYYXXX</oas:Username>\n <oas:Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsssoap-message-security-1.0#Base64Binary\">c2VjcmV0bm9uY2UxMDExMQ==</oas:Nonce>\n <oas:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordDigest\">+LzcaRc+ndGAcZIXmq/N7xGes+k=</oas:Password>\n <oas1:Created>2015-09-30T14:12:15Z</oas1:Created>\n </oas:UsernameToken>\n </oas:Security>';\n\n $sessionHandlerParams = $this->makeSessionHandlerParams();\n $sessionHandler = new SoapHeader4($sessionHandlerParams);\n $sessionHandler->setStateful(true);\n\n $meth = self::getMethod($sessionHandler, 'createSoapHeaders');\n\n /** @var \\SoapHeader[] $result */\n $result = $meth->invoke(\n $sessionHandler,\n ['sessionId' => null, 'sequenceNumber' => null, 'securityToken' => null],\n $sessionHandlerParams,\n 'PNR_Retrieve',\n []\n );\n\n $this->assertCount(6, $result);\n foreach ($result as $tmp) {\n $this->assertInstanceOf('\\SoapHeader', $tmp);\n }\n\n $this->assertInternalType('string', $result[0]->data);\n $this->assertTrue($this->isValidGuid($result[0]->data));\n $this->assertEquals('MessageID', $result[0]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[0]->namespace);\n\n $this->assertInternalType('string', $result[1]->data);\n $this->assertEquals('http://webservices.amadeus.com/PNRRET_11_3_1A', $result[1]->data);\n $this->assertEquals('Action', $result[1]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[1]->namespace);\n\n $this->assertInternalType('string', $result[2]->data);\n $this->assertEquals('https://dummy.webservices.endpoint.com/SOAPADDRESS', $result[2]->data);\n $this->assertEquals('To', $result[2]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[2]->namespace);\n\n $this->assertInstanceOf('\\SoapVar', $result[3]->data);\n $this->assertEquals(XSD_ANYXML, $result[3]->data->enc_type);\n $this->assertEqualXMLStructure($this->toDomElement($expectedSecurityNodeStructureXml), $this->toDomElement($result[3]->data->enc_value), true);\n $this->assertEquals('Security', $result[3]->name);\n $this->assertEquals('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd',\n $result[3]->namespace);\n\n $this->assertInstanceOf('Amadeus\\Client\\Struct\\HeaderV4\\Session', $result[4]->data);\n $this->assertEquals('Start', $result[4]->data->TransactionStatusCode);\n\n $this->assertInstanceOf('Amadeus\\Client\\Struct\\HeaderV4\\SecurityHostedUser', $result[5]->data);\n $this->assertEquals('AMA_SecurityHostedUser', $result[5]->name);\n $this->assertEquals('http://xml.amadeus.com/2010/06/Security_v1', $result[5]->namespace);\n }", "public function readHeader()\n {\n $name = $this->_inputStream->readUTF();\n $mustRead = (bool)$this->_inputStream->readByte();\n $length = $this->_inputStream->readLong();\n\n try {\n $data = $this->_deserializer->readTypeMarker();\n } catch (Exception $e) {\n require_once SHLIB_PATH_TO_ZEND . 'Zendshl/Amf/Exception.php';\n throw new Zendshl_Amf_Exception('Unable to parse ' . $name . ' header data: ' . $e->getMessage() . ' '. $e->getLine(), 0, $e);\n }\n\n $header = new Zendshl_Amf_Value_MessageHeader($name, $mustRead, $data, $length);\n return $header;\n }", "public function testForUncompleteHeaders() {\n $parser = new Parser();\n $response = new Response();\n\n $parser->response($response);\n $parser->addData(self::$_message['request_line']);\n\n $this->assertFalse($parser->isReadCompleted());\n }", "protected abstract function GenerateSoapHeader();", "public function testGetHeader(): void\n {\n $response = $this->response->withHeader('X-Bar', 'baz');\n\n $expected = [\n 'X-Test' => ['test'],\n 'X-Bar' => ['baz'],\n ];\n\n $this->assertEquals($expected, $response->getHeaders());\n\n foreach ($expected as $name => $value) {\n $this->assertEquals($value, $response->getHeader($name));\n }\n }", "function deserialize_headers( $flat_headers ) {\n\t\t$flat_headers = preg_replace( \"/^\" . HTTP_CRLF . \"/\", '', $flat_headers );\n\t\t$tmp_headers = split( HTTP_CRLF, $flat_headers );\n\t\tif (preg_match(\"'HTTP/(\\d\\.\\d)\\s+(\\d+).*'i\", $tmp_headers[0], $matches )) {\n\t\t\t$this->set_header( 'Protocol-Version', $matches[1] );\n\t\t\t$this->set_header( 'Status', $matches[2] );\n\t\t} \n\t\tarray_shift( $tmp_headers );\n\t\tforeach( $tmp_headers as $index=>$value ) {\n\t\t\t$pos = strpos( $value, ':' );\n\t\t\tif ( $pos ) {\n\t\t\t\t$key = substr( $value, 0, $pos );\n\t\t\t\t$value = trim( substr( $value, $pos +1) );\n\t\t\t\tif ( strtoupper($key) == 'SET-COOKIE' )\n\t\t\t\t\t$this->cookies_headers[] = $value;\n\t\t\t\telse\n\t\t\t\t\t$this->set_header( $key, $value );\n\t\t\t}\n\t\t}\n\t}", "public function testGetHeaders()\n {\n $this->assertTrue(true);\n }", "public function getXsiTypeName() {\n return \"SoapHeader\";\n }", "public function testGetHeaders()\n\t{\n\t\t// Fill the header body with an arbitrary value.\n\t\tTestReflection::setValue(\n\t\t\t$this->class,\n\t\t\t'response',\n\t\t\t(object) array(\n\t\t\t\t'cachable' => null,\n\t\t\t\t'headers' => array('ok'),\n\t\t\t\t'body' => null,\n\t\t\t)\n\t\t);\n\n\t\t$this->assertEquals(array('ok'), $this->class->getHeaders());\n\t}", "public function testToArray(): void\n {\n $this->assertToObjectArray(HeaderSchema::class, [\n 'description' => new DescriptionSchema(),\n 'disabled' => false,\n 'key' => 'Connection',\n 'value' => 'keep-alive',\n 'name' => 'Connection'\n ]);\n }", "public function getActualHeaders();", "public function testWebhookHeaders()\n {\n $this->assertObjectHasAttribute('headers', $this->webhook);\n\n // The webhook request headers.\n $headers = $this->webhook->getHeaders();\n $this->assertNotNull($headers);\n $this->assertInternalType('array', $headers);\n }", "public function testConstructPAPDataConstructsHeadersCorrectly()\n {\n $this->mock_function('microtime', 'return 12345;');\n\n $this->payload->expects($this->once())\n ->method('get_priority')\n ->willReturn('deliverbefore');\n\n $this->set_reflection_property_value('auth_token', 'auth_token');\n\n $this->payload->expects($this->once())\n ->method('get_payload')\n ->willReturn('{\"message\":\"test\"}');\n\n $method = $this->reflection->getMethod('construct_pap_data');\n $method->setAccessible(TRUE);\n\n $request_headers = $method->invokeArgs($this->class, [ $this->payload, 'endpoint' ]);\n\n $request_file = file_get_contents(TEST_STATICS . '/Vortex/pap/request_custom_headers.txt');\n\n $this->assertEquals($request_headers, $request_file);\n\n $this->unmock_function('microtime');\n }", "public function test_encoding_decoding_with_indirect_header() : void\n {\n $key = ']V@IaC1%fU,DrVI';\n \n $timestamp = time();\n \n $tokenDecoded = new TokenDecoded();\n $tokenDecoded->setHeader(['xyz' => $timestamp]);\n $tokenEncoded = $tokenDecoded->encode($key);\n \n $header = $tokenEncoded->decode()->getHeader();\n $this->assertTrue(array_key_exists('xyz', $header));\n $this->assertEquals($timestamp, $header['xyz']);\n }", "public function httpMessageResponseHasHeader(UnitTester $I)\n {\n $I->wantToTest('Http\\Message\\Response - hasHeader()');\n\n $data = [\n 'Accept' => [\n 'text/html',\n 'text/json',\n ],\n ];\n\n $response = new Response('php://memory', 200, $data);\n\n $I->assertTrue(\n $response->hasHeader('accept')\n );\n\n $I->assertTrue(\n $response->hasHeader('aCCepT')\n );\n }", "public function testHeaderOnlyLF() {\n\t\tRawTransport::$data = \"HTTP/1.0 200 OK\\r\\nTest: value\\nAnother Test: value\\r\\n\\r\\n\";\n\t\t$response = $this->raw_transport->request('http://example.com/');\n\t\t$expected = array(\n\t\t\t'test' => 'value',\n\t\t\t'another test' => 'value'\n\t\t);\n\t\t$this->assertEquals($response->headers, $expected);\n\t}", "public function getXsiTypeName() {\n return \"SoapResponseHeader\";\n }", "#[@test]\n public function testDeserialization() {\n $transport= new SOAPDummyTransport();\n $transport->setAnswer('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <soapenv:Body soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<ns1:getTestsResponse xmlns:ns1=\"urn://test\">\n <result href=\"#id1\"/>\n</ns1:getTestsResponse>\n<multiRef id=\"id1\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns4:SoapTestType\" xmlns:ns4=\"http://net.xp_framework/soap/types\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">\n <string xsi:type=\"xsd:string\">Test-String</string>\n <integer xsi:type=\"xsd:long\">12345</integer>\n</multiRef>\n </soapenv:Body>\n</soapenv:Envelope>\n ');\n \n $client= new XPSoapClient('http://xp-framework.net/', 'urn://test');\n $client->setTransport($transport);\n $client->registerMapping(\n new \\xml\\QName('http://net.xp_framework/soap/types', 'SoapTestType'),\n \\lang\\XPClass::forName('net.xp_framework.unittest.soap.SoapMappingTestTarget')\n );\n \n $res= $client->invoke('test');\n $this->assertClass($res, 'net.xp_framework.unittest.soap.SoapMappingTestTarget');\n $this->assertEquals('Test-String', $res->getString());\n $this->assertEquals(12345, $res->getInteger());\n }", "public function getRawHeader();", "public function parse_header($header)\n {\n }", "public function testHeaderInjection() {\n\t\t$headers = array(\n\t\t\t'Test' => 'value\\n'\n\t\t);\n\t\t$result = HTTPRequest::flattern($headers);\n\t}", "public function testWithHeader(): void\n {\n $response = $this->response->withHeader('X-Test', 'bar');\n\n $this->assertTrue($response->hasHeader('X-Test'));\n $this->assertEquals('bar', $response->getHeaderLine('X-Test'));\n }", "public function test_remove_header_through_wp() {\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$testee = new Testee();\n\t\t$testee->set_header( $name, $value );\n\t\t$testee->remove_header( $name );\n\n\t\tself::assertSame( [], $testee->get_headers() );\n\n\t\tself::assertSame( [], $testee->getHeaders() );\n\t}", "public function test_remove_header_through_psr7() {\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$testee = ( new Testee() )\n\t\t\t->withHeader( $name, $value )\n\t\t\t->withoutHeader( $name );\n\n\t\tself::assertTrue( empty( $testee->get_headers()[ $name ] ) );\n\n\t\tself::assertNotContains( $value, $testee->getHeader( $name ) );\n\t\tself::assertSame( '', $testee->getHeaderLine( $name ) );\n\t}", "public function testProcessShouldReturnHeader(): void\n {\n $expected = new Header([\n 'dateProcessed' => '070905',\n 'description' => 'DE Returns',\n 'userFinancialInstitution' => 'NAB',\n 'userIdSupplyingFile' => '012345',\n 'userSupplyingFile' => 'NAB',\n 'reelSequenceNumber' => '01',\n ]);\n\n $parser = new Parser($this->getSampleFileContents('DE_return.txt'));\n\n self::assertEquals($expected, $parser->getHeader());\n self::assertEquals(new DateTime('2005-09-07'), $parser->getHeader()->getDateProcessedObject());\n }", "public function test_set_header_through_psr7() {\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$value_as_array = [ $value ];\n\n\t\t$testee = ( new Testee() )->withHeader( $name, $value );\n\n\t\tself::assertSame( $value_as_array, $testee->get_headers()[ $name ] );\n\n\t\tself::assertSame( $value_as_array, $testee->getHeader( $name ) );\n\t\tself::assertSame( $value, $testee->getHeaderLine( $name ) );\n\t}", "public function testComAdobeCqDeserfwImplDeserializationFirewallImpl() {\n\n }", "public function getHeaderValue()\n {\n }", "public function testCanCreateSoapHeadersWhenStatefulAndAuthenticated()\n {\n $sessionHandlerParams = $this->makeSessionHandlerParams();\n $sessionHandler = new SoapHeader4($sessionHandlerParams);\n $sessionHandler->setStateful(true);\n\n $prop = self::getProperty($sessionHandler, 'isAuthenticated');\n $prop->setValue($sessionHandler, true);\n\n $meth = self::getMethod($sessionHandler, 'createSoapHeaders');\n\n /** @var \\SoapHeader[] $result */\n $result = $meth->invoke(\n $sessionHandler,\n ['sessionId' => '01ZWHV5EMT', 'sequenceNumber' => 2, 'securityToken' => '3WY60GB9B0FX2SLIR756QZ4G2'],\n $sessionHandlerParams,\n 'PNR_Retrieve',\n []\n );\n\n $this->assertCount(4, $result);\n foreach ($result as $tmp) {\n $this->assertInstanceOf('\\SoapHeader', $tmp);\n }\n\n $this->assertInternalType('string', $result[0]->data);\n $this->assertTrue($this->isValidGuid($result[0]->data));\n $this->assertEquals('MessageID', $result[0]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[0]->namespace);\n\n $this->assertInternalType('string', $result[1]->data);\n $this->assertEquals('http://webservices.amadeus.com/PNRRET_11_3_1A', $result[1]->data);\n $this->assertEquals('Action', $result[1]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[1]->namespace);\n\n $this->assertInternalType('string', $result[2]->data);\n $this->assertEquals('https://dummy.webservices.endpoint.com/SOAPADDRESS', $result[2]->data);\n $this->assertEquals('To', $result[2]->name);\n $this->assertEquals('http://www.w3.org/2005/08/addressing', $result[2]->namespace);\n\n $this->assertInstanceOf('Amadeus\\Client\\Struct\\HeaderV4\\Session', $result[3]->data);\n $this->assertEquals('InSeries', $result[3]->data->TransactionStatusCode);\n $this->assertEquals('01ZWHV5EMT', $result[3]->data->SessionId);\n $this->assertEquals(2, $result[3]->data->SequenceNumber);\n $this->assertEquals('3WY60GB9B0FX2SLIR756QZ4G2', $result[3]->data->SecurityToken);\n }", "public function testHeaderEqualsFailsIfHeaderIsPresentButNotEqual()\r\n {\r\n $this->assertFailure();\r\n $this->assertions->headerEquals('Content-Type', 'text/xml');\r\n }", "public function fromHeader($header);", "function decodeHeaders() {\n\n #-- normalize linebreaks\n $str = & $this->headers_str;\n// $str = str_replace(\"\\n \", \" \", $str);\n $str = str_replace(\"\\r\", \"\", $str);\n \n #-- strip headline\n $nl = strpos($str, \"\\n\") + 1;\n $this->proto = strtok(substr($str, 0, $nl), \" \");\n $this->status = (int) strtok(\" \");\n $this->status_str = strtok(\"\\000\\r\\n\");\n if ($this->status == 100) {\n $this->full_duplex = 1;\n }\n\n #-- go through lines, split name:value pairs\n foreach (explode(\"\\n\", substr($str, $nl)) as $line) {\n\n $i = trim(strtok($line, \":\"));\n $v = trim(strtok(\"\\000\"));\n\n #-- normalize name look&feel\n $i = strtr(ucwords(strtolower(strtr($i, \"-\", \" \"))), \" \", \"-\");\n\n #-- add to, if key exists\n if (!empty($this->headers[$i])) {\n $this->headers[$i] .= \", \".$v;\n }\n else {\n $this->headers[$i] = $v;\n }\n\n }\n }", "public function doWeSeeTheCorrectHeaders()\n {\n // Assume.\n $headers = [\n \"transaction_id\",\n \"street\",\n \"city\",\n \"zip\",\n \"state\",\n \"beds\",\n \"baths\",\n \"sq__ft\",\n \"type\",\n \"sale_date\",\n \"price\",\n \"latitude\",\n \"longitude\",\n ];\n\n // Action.\n $actualHeaders = $this->sut->getHeaders();\n\n // Assert\n $this->assertEquals($headers, $actualHeaders, 'The headers do not match.');\n }", "public function test_set_header_through_wp() {\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$value_as_array = [ $value ];\n\n\t\t$testee = new Testee();\n\t\t$testee->set_header( $name, $value );\n\n\t\tself::assertSame( $value_as_array, $testee->get_headers()[ $name ] );\n\n\t\tself::assertSame( $value_as_array, $testee->getHeader( $name ) );\n\t\tself::assertSame( $value, $testee->getHeaderLine( $name ) );\n\t}", "function test_get_week_header_en() {\n\t\t$reflection = new \\ReflectionClass( $this->object );\n\n\t\t// Set start of week.\n\t\t$method = $reflection->getMethod( 'set_start_of_week' );\n\t\t$method->setAccessible( true );\n\t\t$method->invoke( $this->object, 1 );\n\n\t\t$expected_array = array(\n\t\t\t'Monday',\n\t\t\t'Tuesday',\n\t\t\t'Wednesday',\n\t\t\t'Thursday',\n\t\t\t'Friday',\n\t\t\t'Saturday',\n\t\t\t'Sunday',\n\t\t);\n\n\t\t$method = $reflection->getMethod( 'get_week_header' );\n\t\t$method->setAccessible( true );\n\t\t$array = $method->invoke( $this->object );\n\n\t\t$this->assertSame( $expected_array, $array );\n\t}", "protected function readHeader()\n {\n $status = $this->readByte();\n $sessionId = $this->readInt();\n if ($status === 1) {\n $this->readByte(); // discard the first byte of the error\n $error = $this->readError();\n throw $error;\n }\n }", "public function testPreRun() {\n $fp = fopen('http://localhost/events/?format=xml','r');\n $meta = stream_get_meta_data($fp);\n $headers = $meta['wrapper_data'];\n foreach ($headers as $header) {\n if (preg_match('/Content-Type:[\\s]?(.*)$/',$header, $matches)) {\n $type = $matches[1];\n }\n }\n $this->assertEquals('text/xml', $type);\n }", "private function readFieldHeader() {\n $field = array(\n 'name' => trim($this->readString(11), \"\\x00\"),\n 'type' => $this->readChar(),\n 'address' => $this->readWord(4),\n 'length' => $this->readWord(),\n 'decimals' => $this->readWord(),\n );\n $this->skip(14);\n $this->fields[] = $field;\n }", "public function testFetchTokenFromHeader()\n {\n $this->mockRequest\n ->expects($this->once())\n ->method('getServerParams')\n ->willReturn([]);\n $this->mockRequest\n ->expects($this->once())\n ->method('getHeader')\n ->with('HEADER_NAME')\n ->willReturn(['token']);\n\n $authentication = $this->stubAuthentication([\n 'environment' => ['ENVIRONMENT_VARIABLE'],\n 'header' => 'HEADER_NAME'\n ]);\n $token = $authentication->fetchToken($this->mockRequest);\n $this->assertEquals('token', $token);\n }", "function parse_header($content)\n{\n $newline = \"\\r\\n\";\n $parts = preg_split(\"/$newline . $newline/\", $content);\n\n $header = array_shift($parts);\n $content = implode($parts, $newline . $newline);\n\n $parts = preg_split(\"/$newline/\", $header);\n foreach ($parts as $part) {\n if (preg_match('/(.*)\\: (.*)/', $part, $matches)) {\n $headers[ $matches[1] ] = $matches[2];\n }\n }\n _logDebug('parse_header -> returning $headers: ' . serialize($headers));\n return $headers;\n}", "public function httpMessageResponseHasHeaderEmpty(UnitTester $I)\n {\n $I->wantToTest('Http\\Message\\Response - hasHeader() - empty');\n\n $response = new Response();\n\n $I->assertFalse(\n $response->hasHeader('empty')\n );\n }", "public function readHeader() {\n $this->dbaseVersionId = $this->readWord();\n\n $year = $this->readWord() + 1900;\n $month = $this->readWord();\n $day = $this->readWord();\n $this->lastModified = mktime(0, 0, 0, $year, $month, $day);\n\n $this->numRecords = $this->readWord(4, true);\n $this->headerLength = $this->readWord(2, true);\n $this->recordLength = $this->readWord(2, true);\n\n $this->skipTo(32);\n\n while ($this->readChar() != \"\\x0d\") {\n $this->undoRead();\n $this->readFieldHeader();\n }\n }", "public function testHeaderOnlyLF() {\n\t\t$transport = new RawTransport();\n\t\t$transport->data = \"HTTP/1.0 200 OK\\r\\nTest: value\\nAnother-Test: value\\r\\n\\r\\n\";\n\n\t\t$options = array(\n\t\t\t'transport' => $transport\n\t\t);\n\t\t$response = Requests::get('http://example.com/', array(), $options);\n\t\t$this->assertEquals('value', $response->headers['test']);\n\t\t$this->assertEquals('value', $response->headers['another-test']);\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new VerifyWebhookSignature(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getAuthAlgo());\n $this->assertNotNull($obj->getCertUrl());\n $this->assertNotNull($obj->getTransmissionId());\n $this->assertNotNull($obj->getTransmissionSig());\n $this->assertNotNull($obj->getTransmissionTime());\n $this->assertNotNull($obj->getWebhookId());\n $this->assertNotNull($obj->getWebhookEvent());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function testSerializationDeserialization()\n {\n $obj = new VerifyWebhookSignatureResponse(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getVerificationStatus());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "#[@test]\n public function testSerialization() {\n $transport= new SOAPDummyTransport();\n $client= new XPSoapClient('http://xp-framework.net/', 'urn://test');\n \n // Re-set transport as constructor created a copy of it!\n $client->setTransport($transport);\n \n $client->registerMapping(\n new \\xml\\QName('http://net.xp_framework/soap/types', 'SoapTestType'),\n \\lang\\XPClass::forName('net.xp_framework.unittest.soap.SoapMappingTestTarget')\n );\n \n try {\n $client->invoke('foo', new SoapMappingTestTarget('Teststring', 12345));\n } catch (\\xml\\XMLFormatException $ignored) {\n // We don't receive a \"real\" answer, which will cause an exception\n }\n \n $msg= $transport->getRequest();\n $body= $msg->_bodyElement();\n $this->assertEquals(\n 'http://net.xp_framework/soap/types', \n $body->nodeAt(0)->nodeAt(0)->getAttribute('xmlns:ns1')\n );\n $this->assertEquals(\n 'ns1:SoapTestType', \n $body->nodeAt(0)->nodeAt(0)->getAttribute('xsi:type')\n );\n }", "protected abstract function getHeader();", "public function testClearHeaders()\n\t{\n\t\t// Fill the header array with an arbitrary value.\n\t\tTestReflection::setValue(\n\t\t\t$this->class,\n\t\t\t'response',\n\t\t\t(object) array(\n\t\t\t\t'cachable' => null,\n\t\t\t\t'headers' => array('foo'),\n\t\t\t\t'body' => array(),\n\t\t\t)\n\t\t);\n\n\t\t$this->class->clearHeaders();\n\n\t\t$this->assertEquals(array(), TestReflection::getValue($this->class, 'response')->headers);\n\t}", "public function testJsonSerialize()\n {\n $array = BlackBerry::create()\n ->setHeader('header')\n ->jsonSerialize();\n\n $this->assertCount(1, $array);\n $this->assertSame('header', $array['blackberry_header']);\n }", "public function testWebhookApiHeaders()\n {\n $this->assertObjectHasAttribute('api_headers', $this->webhook);\n\n // The webhook api request headers.\n $headers = $this->webhook->getApiHeaders();\n $this->assertNotNull($headers);\n $this->assertInternalType('array', $headers);\n }", "public function testWithoutHeader(): void\n {\n $response = $this->response->withoutHeader('X-Test');\n\n $this->assertFalse($response->hasHeader('X-Test'));\n }", "public function testHasHeaderSucceedsIfExpectedHeaderIsPresent()\n {\n $this->assertSuccess();\n $this->assertions->hasHeader('Content-Type');\n }", "private function setSoapHeader() \n {\n if(empty($this->merchantSoapUsername)) {\n throw new exception('Please specify a merchant username for soap trasaction');\n }\n elseif(empty($this->merchantSoapPassword)) {\n throw new exception('Please specify a merchant password for soap trasaction');\n }\n \n //Creating a soap xml\n $headerXml = '<wsse:Security SOAP-ENV:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">';\n $headerXml .= '<wsse:UsernameToken wsu:Id=\"UsernameToken-9\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">';\n $headerXml .= '<wsse:Username>'.$this->merchantSoapUsername.'</wsse:Username>';\n $headerXml .= '<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">'.$this->merchantSoapPassword.'</wsse:Password>';\n $headerXml .= '</wsse:UsernameToken>';\n $headerXml .= '</wsse:Security>';\n $headerbody = new SoapVar($headerXml, XSD_ANYXML, null, null, null); \n \n $ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; //Namespace of the WS. \n $this->soapAuthHeader = new SOAPHeader($ns, 'Security', $headerbody, true); \n }", "public function testUnserialize()\n {\n $expected = true;\n $value = \"\\x03\"; // Amf3 -> true\n\n $data = $this->_adapter->unserialize($value);\n $this->assertEquals($expected, $data);\n }", "public function testRawHeadersCanBeAccessed()\n {\n $headers = array(\n 'Header1' => 'Header 1',\n 'Header2' => 'Header 2'\n );\n\n $request = $this->getRequest();\n $request->setHeaders($headers);\n\n $this->assertSame($headers, $request->getHeaders('default'));\n }", "public function getFullHeader()\n {\n }", "public function testSetHeader()\n\t{\n\t\t// Fill the header body with an arbitrary value.\n\t\tTestReflection::setValue(\n\t\t\t$this->class,\n\t\t\t'response',\n\t\t\t(object) array(\n\t\t\t\t'cachable' => null,\n\t\t\t\t'headers' => array(\n\t\t\t\t\tarray('name' => 'foo', 'value' => 'bar'),\n\t\t\t\t),\n\t\t\t\t'body' => null,\n\t\t\t)\n\t\t);\n\n\t\t$this->class->setHeader('foo', 'car');\n\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\tarray('name' => 'foo', 'value' => 'bar'),\n\t\t\t\tarray('name' => 'foo', 'value' => 'car')\n\t\t\t),\n\t\t\tTestReflection::getValue($this->class, 'response')->headers\n\t\t);\n\n\t\t$this->class->setHeader('foo', 'car', true);\n\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\tarray('name' => 'foo', 'value' => 'car')\n\t\t\t),\n\t\t\tTestReflection::getValue($this->class, 'response')->headers\n\t\t);\n\t}", "private function isHeaderPart(ckWsdlPart $input)\r\n {\r\n return $input->isHeader();\r\n }", "public function testNotHasHeaderFailsIfHeaderIsPresentOnce()\r\n {\r\n $this->assertFailure();\n $this->assertions->notHasHeader('Content-Type');\r\n }", "public function testHeadersCanBeAccessedInJsonFormat()\n {\n $headers = array(\n 'Header1' => 'Header 1',\n 'Header2' => 'Header 2'\n );\n\n $request = $this->getRequest();\n $request->setHeaders($headers);\n\n $expectedHeaders = json_encode($headers);\n\n $this->assertSame($expectedHeaders, $request->getHeaders('json'));\n }", "public function hasHeader(): bool;", "public function test_add_header_through_psr7() {\n\n\t\t$initial = 'something';\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$value_as_array = [ $initial, $value ];\n\n\t\t$testee = ( new Testee() )\n\t\t\t->withHeader( $name, $initial )\n\t\t\t->withAddedHeader( $name, $value );\n\n\t\tself::assertSame( $value_as_array, $testee->get_headers()[ $name ] );\n\n\t\tself::assertSame( $value_as_array, $testee->getHeader( $name ) );\n\t\tself::assertSame( \"{$initial}, {$value}\", $testee->getHeaderLine( $name ) );\n\t}", "function _decode_header ( $str ) {\n\n\t $out = array ();\n\t $part = preg_split ( \"/\\r?\\n/\", $str, -1, PREG_SPLIT_NO_EMPTY );\n\t\tfor( $h = 0; $h < sizeof ( $part ); $h++ ) {\n\n\t\t\tif ( $h != 0 ) {\n\n\t\t\t\t$pos = strpos ( $part[$h], ':' );\n\t\t\t\t$k = strtolower ( str_replace ( ' ', '', substr ( $part[$h], 0, $pos ) ) );\n\t\t\t\t$v = trim ( substr ( $part[$h], ( $pos + 1 ) ) );\n\t\t\t} else {\n\n\t\t\t\t$k = 'status';\n\t $v = explode ( ' ', $part[$h] );\n\t $v = $v[1];\n\t }\n\t if ( $k == 'set-cookie' ) {\n\t\t\t\t$out['cookies'][] = $v;\n\t } else if ( $k == 'content-type' ) {\n\n\t if(($cs = strpos ($v, ';')) !== false ) { $out[$k] = substr ( $v, 0, $cs ); }\n\t else { $out[$k] = $v; }\n\t\t\t} else {\n\t\t\t\t$out[$k] = $v;\n\t\t\t}\n\t }\n\t return $out;\n\t}", "public function getHeaders() {}", "function testUnserialize()\n {\n\n }", "public function testGetRawRecordsExceptHeaders()\n {\n $this->assertNotEquals(0, count($this->__importer->getRawRecordsExceptHeaders()));\n }", "public function getHeaders(){ }", "public function testComAdobeGraniteFragsImplCheckHttpHeaderFlag() {\n\n }", "public function testGetServer()\n {\n $headers = <<<HEADERS\nHTTP/1.1 200 OK\nServer: nginx/1.6.2\nDate: Wed, 18 Mar 2015 01:33:55 GMT\nHEADERS;\n\n $request = new Request;\n $parsed = $request->parseHeader($headers);\n $this->assertSame('nginx/1.6.2', $parsed['Server']);\n }", "public function testProperties(): void\n {\n $header = new HeaderSchema();\n $description = new DescriptionSchema();\n\n $header->setDescription($description);\n $header->setDisabled(true);\n $header->setKey('Connection');\n $header->setValue('keep-alive');\n\n $this->assertProperties($header, [\n 'getDescription' => $description,\n 'isDisabled' => true,\n 'getKey' => 'Connection',\n 'getValue' => 'keep-alive'\n ]);\n }", "abstract public function hasHeader($name);", "public function test_add_header_through_wp() {\n\n\t\t$initial = 'something';\n\n\t\t$name = 'some name here';\n\n\t\t$value = 'some value here';\n\n\t\t$value_as_array = [ $initial, $value ];\n\n\t\t$testee = new Testee();\n\t\t$testee->set_header( $name, $initial );\n\t\t$testee->add_header( $name, $value );\n\n\t\tself::assertSame( $value_as_array, $testee->get_headers()[ $name ] );\n\n\t\tself::assertSame( $value_as_array, $testee->getHeader( $name ) );\n\t\tself::assertSame( \"{$initial}, {$value}\", $testee->getHeaderLine( $name ) );\n\t}", "public function test_Route_Contact_Header()\n {\n\t\t$response = $this->call('GET', '/contact');\n\t\t$this->assertEquals(200, $response->status());\n }", "public function assertHeader($header, $message = '')\n {\n $this->addToAssertionCount(1);\n\n $found = false;\n foreach ($this->getApp()->headers() as $h) {\n if (stripos($h, $header) === 0) {\n $found = true;\n break;\n }\n }\n\n if (!$found) {\n $failure = sprintf('Failed asserting response header \"%s\" found', $header);\n if (!empty($message)) {\n $failure = $message . \"\\n\" . $failure;\n }\n throw new \\PHPUnit_Framework_ExpectationFailedException($failure);\n }\n }", "public function testGcsHeaders() {\n\t\t$request = new OutboundRequest( 'https://eu.sandbox.api-ingenico.com/v1/9991/tokens/123456789', 'DELETE' );\n\t\t$request->setHeader( 'Date', 'Fri, 06 Jun 2014 13:39:43 GMT' );\n\t\t$request->setHeader( 'Content-Type', 'application/json' );\n\t\t$request->setHeader( 'X-GCS-ClientMetaInfo', 'processed header value' );\n\t\t// Should replace newlines and spaces with a single space\n\t\t$request->setHeader( 'X-GCS-ServerMetaInfo', 'processed header\n value' );\n\t\t$request->setHeader( 'X-GCS-CustomerHeader', 'processed header value' );\n\t\t$this->authenticator->signRequest( $request );\n\t\t$headers = $request->getHeaders();\n\t\t$this->assertEquals(\n\t\t\t'GCS v1HMAC:5e45c937b9db33ae:jGWLz3ouN4klE+SkqO5gO+KkbQNM06Rric7E3dcfmqw=',\n\t\t\t$headers['Authorization']\n\t\t);\n\t}", "function header($name) {\n\t\treturn ($result = $this->envelope->header($name)) ? $result : false;\n\t}", "public function getHeader();", "public function getHeader();", "public function getHeader();", "public function testGetAuthenticateHeader()\n {\n $header = $this->testClass->getAuthenticateHeader();\n $this->assertContains('Basic', $header);\n $this->assertContains('Basic-Test-Realm', $header);\n }", "public function testSetHeader()\n {\n $this->todo('stub');\n }", "function _get_random_header_data()\n{\n}", "public function getHeaderDecodeJson(): \\stdClass\n {\n return json_decode($this->getHeader());\n }", "public function getHeaders()\n {\n }", "public function testSetHeaders()\n {\n $successResponse = responder()->success()->respond(null, ['x-foo' => true]);\n $errorResponse = responder()->error()->respond(null, ['x-foo' => false]);\n\n $this->assertEquals(true, $successResponse->headers->get('x-foo'));\n $this->assertEquals(false, $errorResponse->headers->get('x-foo'));\n }", "protected function dumpHeader() {}", "private function normalize_header() {\n\t\tif (!$this->skeleton->built('header')) {\n\t\t\t$header = self::fetch('rma_header', [':rma_id' => $this->id()]);\n\t\t}\n\t\telse {\n\t\t\t$header = $this->skeleton->get('header');\n\t\t\t$this->skeleton->rebuild('header');\n\t\t}\n\n\t\t$date_fields = ['follow_up_date', 'created_on'];\n\t\tforeach ($date_fields as $field) {\n\t\t\t$header[$field] = ck_datetime::datify($header[$field]);\n\t\t}\n\n\t\t$bool_fields = ['closed', 'refund_shipping', 'refund_coupon'];\n\t\tforeach ($bool_fields as $field) {\n\t\t\t$header[$field] = CK\\fn::check_flag($header[$field]);\n\t\t}\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "public function It_should_provide_access_to_the_HTTP_headers()\n\t{\n\t\t$mock_request = new Prack_Mock_Request( new Prack_Test_EnvSerializer() );\n\t\t$mock_response = $mock_request->get( '' );\n\t\t\n\t\t$original_headers = $mock_response->getOriginalHeaders();\n\n\t\t$this->assertTrue( $mock_response->contains( 'Content-Type' ) );\n\t\t$this->assertEquals( 'text/yaml', $mock_response->getHeaders()->get( 'Content-Type' ) );\n\t\t$this->assertEquals( 'text/yaml', $original_headers[ 'Content-Type' ] );\n\t\t$this->assertEquals( 'text/yaml', $mock_response->get( 'Content-Type' ) );\n\t\t$this->assertEquals( 'text/yaml', $mock_response->contentType() );\n\t\t$this->assertGreaterThanOrEqual( 0, $mock_response->contentLength() );\n\t\t$this->assertNull( $mock_response->location() );\n\t}", "public static function should_decode($headers)\n {\n }", "public function testDeserializingEnum()\n {\n $serializer = Serializer::getSerializer();\n $response = $serializer->deserialize(include __DIR__.'/../TestObjects/MockResponseJson.php', MockPayloadResponse::class, 'json');\n $refResponse = new \\ReflectionObject($response);\n $okProperty = $refResponse->getProperty('ok');\n $okProperty->setAccessible(true);\n $this->assertEquals(true, $okProperty->getValue($response));\n $this->assertEquals('Sure. You’d be surprised how far a hug goes with Geordi, or Worf.', $response->string);\n $this->assertEquals(2017, $response->integer);\n $this->assertEquals(MockEnum::ONE(), $response->enum);\n $array1 = [\n MockEnum::THREE(),\n MockEnum::TWO(),\n MockEnum::ONE()\n ];\n $this->assertEquals($array1, $response->array1);\n $this->assertEquals([\"riker\", \"laforge\", \"obrien\"], $response->array2);\n }", "private function isSetHeaderVersion()\n {\n if(isset($this->header['Version'])){\n return $this->__customtrim($this->header['Version']); \n }\n }", "function http_parse_headers($header) {\n if(!function_exists('http_parse_headers')) {\n $retVal = array();\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n foreach( $fields as $field ) {\n if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {\n $match[1] = preg_replace('/(?<=^|[\\x09\\x20\\x2D])./e', 'strtoupper(\"\\0\")', strtolower(trim($match[1])));\n if( isset($retVal[$match[1]]) ) {\n $retVal[$match[1]] = array($retVal[$match[1]], $match[2]);\n } else {\n $retVal[$match[1]] = trim($match[2]);\n }\n }\n }\n return $retVal;\n } else {\n return http_parse_headers($header);\n }\n }", "public function getHeader($header){ }", "public function get_header($key)\n {\n }" ]
[ "0.7334333", "0.6802322", "0.6414256", "0.6364348", "0.626319", "0.6212157", "0.613688", "0.60970306", "0.60029256", "0.59881216", "0.5980635", "0.59353864", "0.58880013", "0.5862513", "0.58504283", "0.5803147", "0.5776766", "0.5756765", "0.57308847", "0.5728367", "0.57116264", "0.56849736", "0.5667645", "0.5652046", "0.56506425", "0.56506103", "0.5633513", "0.5630345", "0.56230533", "0.56138945", "0.5613483", "0.5611583", "0.561034", "0.5588813", "0.5581455", "0.5568854", "0.5545265", "0.5544634", "0.554031", "0.5522706", "0.5519518", "0.5518479", "0.5464172", "0.5453363", "0.5451935", "0.5446711", "0.5440301", "0.5436782", "0.54225576", "0.5405914", "0.54033095", "0.53946066", "0.5388659", "0.5384222", "0.53817904", "0.53791267", "0.53769046", "0.53671575", "0.53536844", "0.53416127", "0.5326237", "0.531379", "0.5309328", "0.53086126", "0.5299946", "0.52988505", "0.5269296", "0.52679646", "0.52576596", "0.5253613", "0.5247484", "0.5247367", "0.5245551", "0.5241951", "0.52389395", "0.52375776", "0.5236415", "0.52333957", "0.52252114", "0.5215898", "0.52149314", "0.5200531", "0.5199157", "0.5199157", "0.5199157", "0.5195985", "0.5182625", "0.51817894", "0.5172905", "0.5172765", "0.5169753", "0.5169431", "0.5154406", "0.5143317", "0.51338375", "0.5127046", "0.51245123", "0.51226974", "0.5118462", "0.51152307" ]
0.73993033
0
Sets the accepted status for a given challenge ID to true.
Устанавливает принятый статус для заданного идентификатора вызова в true.
function acceptChallenge($challengeID): bool { $statementAcceptChallenge = $this->connection->prepare ( "UPDATE challenge SET accepted = 1 WHERE challengeid = ?" ); $statementAcceptChallenge->bind_param("i", $challengeID); if ($statementAcceptChallenge->execute()) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flagChallenge ($user_id, $challenge_id) {\n\t\t// update the challenge status\n\t\t$query = 'UPDATE `tblChallenges` SET `status_id` = 6 WHERE `id` = '. $challenge_id .';';\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// insert record to flagged challenges\n\t\t$query = 'INSERT INTO `tblFlaggedChallenges` (';\n\t\t$query .= '`challenge_id`, `user_id`, `added`) VALUES (';\n\t\t$query .= '\"'. $challenge_id .'\", \"'. $user_id .'\", NOW());';\t\t\t\t\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// send email\n\t\t$mail_res = ApiProletariat::sendEmail(\"bim.picchallenge@gmail.com\", \"Flagged Challenge\", \"Challenge ID: #$user_id\\nFlagged By User: #$user_id\");\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode(array(\n\t\t\t'id' => $challenge_id,\n\t\t\t'result' => $mail_res['result']\n\t\t)));\n\t\treturn (true);\n\t}", "public function setacceptedAction($id = null)\n {\n $answer = $this->questions->find($id);\n $aacronym = $answer->acronym;\n $question = $this->questions->find($answer->question_id);\n\n if ($this->di->user->getUserAcronym() == $question->acronym) {\n if (isset($question->bounty)) {\n $this->dispatcher->forward([\n 'controller' => 'users',\n 'action' => 'updatevalue',\n 'params' => [['acronym' => $aacronym, 'reputation' => $question->bounty ]],\n ]);\n\n $this->questions->update2([\n 'id' => $question->id,\n 'accepted' => $id,\n 'bounty' => null,\n 'bountytime' => null,\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'activities',\n 'action' => 'add',\n 'params' => [['other_id' => $question->id, 'icon' => 'fa fa-dollar', 'acronym' => $aacronym, 'action_desc' => 'awarded a bounty', 'reputation' => $question->bounty]],\n ]);\n } else {\n $this->questions->update2([\n 'id' => $question->id,\n 'accepted' => $id,\n ]);\n }\n\n $this->dispatcher->forward([\n 'controller' => 'activities',\n 'action' => 'add',\n 'params' => [['other_id' => $id, 'icon' => 'fa fa-check-circle', 'acronym' => $question->acronym, 'action_desc' => 'accepted an answer', 'active' => 3]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'users',\n 'action' => 'updatevalue',\n 'params' => [['acronym' => $question->acronym, 'active_value' => 3]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'activities',\n 'action' => 'add',\n 'params' => [['other_id' => $question->id, 'icon' => 'fa fa-check-circle-o', 'acronym' => $aacronym, 'action_desc' => 'answer got accepted', 'reputation' => 10]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'users',\n 'action' => 'updatevalue',\n 'params' => [['acronym' => $aacronym, 'reputation' => 10 ]],\n ]);\n\n\n }\n $url = $this->url->create('questions/id/' . $question->id);\n $this->response->redirect($url);\n }", "function updatePreviewed ($challenge_id) {\n\t\t\n\t\t// update the challenge status\n\t\t$query = 'UPDATE `tblChallenges` SET `hasPreviewed` = \"Y\" WHERE `id` = '. $challenge_id .';';\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode(array(\n\t\t\t'id' => $challenge_id\n\t\t)));\n\t\treturn (true);\n\t}", "public function actionSetInvitationToAccepted() {\n\t\tif(!empty($_GET['notID'])) {\n\n\t\t\t$notID = htmlspecialchars($_GET['notID']);\n\n\t\t\t$notification = UserNotifications::model()->getNotificationByID($notID);\n\t\t\t$notification->notAnswer = 'yes';\n\t\t\t$notification->save();\n\t\t\techo $notification->notID;\n\n\t\t} else {\n\t\t\techo \"Could not mark Notification as Answered\";\n\t\t}\n\t}", "public static function AcceptRequest($id)\n {\n if (isset($_POST['accept'])) {\n $request = $_POST[\"accept\"];\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"UPDATE friendships SET status = 1 WHERE friend_id = :id AND user_id = :friend\");\n $statement->bindValue(\":friend\", $request);\n $statement->bindValue(\":id\", $id);\n $statement->execute();\n }\n }", "public function setAcceptedAwnserToQuestion($questionId, $awnserId)\n {\n $questionService = $this->di->get(\"questionService\");\n\n $question = $questionService->getQuestion($questionId);\n $user = $this->userService->getCurrentLoggedInUser();\n $awnsers = $questionService->getAwnsersByQuestionId($questionId);\n\n if ($question->userId === $user->id) {\n foreach ($awnsers as $storedAwnser) {\n $awnser = new Awnser();\n $awnser->id = $storedAwnser->id;\n $awnser->userId = $storedAwnser->userId;\n $awnser->title = $storedAwnser->title;\n $awnser->content = $storedAwnser->content;\n $awnser->created = $storedAwnser->created;\n $awnser->updated = $storedAwnser->updated;\n $awnser->deleted = $storedAwnser->deleted;\n $awnser->accept = false;\n\n if ($awnserId === $storedAwnser->id) {\n $awnser->accept = true;\n }\n $this->editAwnser($awnser);\n }\n }\n }", "protected function markAccepted(int $historyID)\n {\n $this->herd->getDatabase()->update(\n 'herd_history',\n ['accepted' => true],\n ['id' => $historyID]\n );\n }", "public function accept($id)\n {\n $jobInvitation = JobInvitation::findOrFail($id);\n\n $this->authorize('update', [JobInvitation::class, $jobInvitation]);\n\n if ($jobInvitation->status != 'accepted') {\n $jobInvitation->status = 'accepted';\n $jobInvitation->save();\n\n // send email notification\n if ($jobInvitation->employerUser->email) { \n if (config('mail.queue_send')) {\n Mail::to($jobInvitation->employerUser->email)->queue(new TalentJobInvitationAccepted($jobInvitation));\n } else {\n Mail::to($jobInvitation->employerUser->email)->send(new TalentJobInvitationAccepted($jobInvitation));\n }\n }\n } \n\n return response()->json([\n 'status' => true, \n 'message' => \"Job invitation accepted successfully.\",\n 'data' => JobInvitation::find($jobInvitation->id)\n ], 200);\n }", "function cancelChallenge ($challenge_id) {\n\t\t// update the challenge status\n\t\t$query = 'UPDATE `tblChallenges` SET `status_id` = 3 WHERE `id` = '. $challenge_id .';';\n\t\t$result = mysql_query($query);\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode(array(\n\t\t\t'id' => $challenge_id\n\t\t)));\n\t\treturn (true);\n\t}", "public function setActivated($token_id) {\n if (!$iInvitationId = $this->getByTokenId($token_id)) {\n $this->setErrorMessage($this->getErrorMsg('E0030'));\n return false;\n }\n $field = array('name' => 'is_activated', 'type' => 'i', 'value' => 1);\n return $this->updateSingle($iInvitationId, $field);\n }", "public function accept($id)\n {\n $order = Order::find($id);\n $order -> update([\n 'approval' => 'Accept'\n ]);\n return redirect('/order')->with('edit', 'Berhasil Validasi');\n }", "public function accept_invite() {\n\t\t$this->inviter_id = 0;\n\t\t$this->is_confirmed = 1;\n\t\t$this->date_modified = bp_core_current_time();\n\t}", "public function accept_request() {\n\t\t$this->is_confirmed = 1;\n\t\t$this->date_modified = bp_core_current_time();\n\t}", "public function acceptAction(int $id, int $post_id) : object\n {\n $page = $this->di->get(\"page\");\n //get the status of this answer\n $sql = \"select accepted from comments where post_id=? and id=?;\";\n $res = $this->db->executeFetchAll($sql, [$post_id, $id]);\n\n if ($res[0]->accepted==0) {\n $accepted =1;\n } elseif ($res[0]->accepted==1) {\n $accepted=0;\n }\n //change the status of this answer\n $sql = \"update comments set accepted=? where post_id=? and id=?;\";\n $this->db->execute($sql, [$accepted, $post_id, $id]);\n $response = $this->di->get(\"response\");\n return $response->redirect(\"post/show/$post_id\");\n }", "public function actionBidstatusaccepted($id)\r\n {\r\n\r\n $result['result'] = false;\r\n if(Yii::$app->request->isAjax && Yii::$app->user->identity){\r\n $request = Yii::$app->request;\r\n\r\n $bid = Bids::find()\r\n ->where(['id'=> $id])\r\n ->one();\r\n $bid->updateAttributes(['status' => 1]);\r\n $bid->save(false);\r\n $result['result'] = true;\r\n }\r\n json_encode($result);\r\n }", "public function markAsApproved() {\n $this->status = self::STATUS_APPROVED;\n return $this->save(false);\n }", "public function updateGameId(string $response, string $challengeId): bool {\n if(empty($response) || empty($challengeId)){\n $this->setError(\"Response or FourConnect ID cannot be empty.\");\n return false;\n }\n // The opponent has rejected the proponent's request\n if($response == \"reject\"){\n if(!$this->deleteGame($challengeId)){\n return false;\n }\n }\n // The opponent has accepted the proponent's request\n else if($response == \"accept\"){\n $where=\"challengeId = ?\";\n $set = \"gameId\";\n $gameId = $this->accessControl->generateRandomToken();\n $bindings = array($gameId, $challengeId);\n\n if(!$this->database->update($this->table, $set, $where, $bindings)){\n $this->setError(\"Unable to update the game row.\");\n return false;\n }\n if(!$this->save()){\n $this->setError(\"Unable to save the transaction during updating the game row.\");\n return false;\n }\n //Set the default turn for proponent only\n if(!$this->boardModel->insert($this->getChallengerUsername($gameId), $gameId)){\n $this->setError($this->boardModel->errorToString());\n return false;\n }\n //Set the default Red color for proponent\n if(!$this->chipModel->insert($gameId)){\n $this->setError($this->chipModel->errorToString());\n return false;\n }\n }\n return true;\n }", "public function isAccepted()\n {\n if($this->specimen_status_id == UnhlsSpecimen::ACCEPTED)\n {\n return true;\n }\n else {\n return false;\n }\n }", "public function acceptChallenge($gameId)\r\n {\r\n $team = $this->getTeam();\r\n $teamSchedule = $team->getSchedule();\r\n \r\n // check if any scheduled game exists\r\n $teamSchedule->loadGameEventList(YBCore_Model_Event_Game_Mapper_ScheduledGame::STATUS);\r\n if (false === $teamSchedule->getEventCollection()->isEmpty())\r\n throw new YBCore_Exception_Logic();\r\n \r\n $game = $team->verifyGame($gameId, YBCore_Model_Event_Game_Mapper_Challenge::STATUS);\r\n \r\n // delete any existing challenges\r\n $teamSchedule->loadGameEventList(YBCore_Model_Event_Game_Mapper_Challenge::STATUS);\r\n $challengeList = $teamSchedule->getEventCollection();\r\n if (false === $challengeList->isEmpty())\r\n $team->removeSecureGame($challengeList[0]);\r\n \r\n // change the status and away team of the challenge and save\r\n $game->setAwayTeamId($team->getId());\r\n $game->setStatus(YBCore_Model_Event_Game_Mapper_ScheduledGame::STATUS);\r\n $team->saveSecureGame($game);\r\n }", "public function approve($id)\n {\n //Proves an request in database\n DB::table('timeoff')\n ->where('id', $id)\n ->update(['status' => 'Approved',\n 'approve_denied_by' => Auth::user()->user_name\n ]);\n\n //Success message after setting request to approved in database\n Session::flash('success', 'Time off request approved successfully!');\n\n //Redirects to time off page\n return redirect('/timeoff');\n }", "public function accept_project($proj_id)\n\t\t{\n\t\t\t$this->db->where('proj_id', $proj_id);\n\t\t\t$this->db->update($this->_table,\n\t\t\t\t\t array('status' => 'approved','date_launched' => date('m-d-y') )); // update cs_projects set status = 'pending' where proj_id = {$proj_id}\n\t\t\treturn true;\n\t\t}", "public function markOpenEstimateAsAccepted($estimateId)\n {\n return $this->updateEstimateMessage($estimateId, 'accept');\n }", "public function approve()\n\t\t{\n\t\t\tif ( is_null($this->id) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$query = \"UPDATE `comments` SET `approved` = 1 WHERE `id` = :id LIMIT 1\";\n\t\t\t$sth = $this->db->conn->prepare( $query );\n\t\t\t$sth->bindParam(':id', $this->id, \\PDO::PARAM_INT);\n\t\t\tif ( $sth->execute() )\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function updateStatus($id)\n {\n $conget = Conget::find($id);\n $conget->status = 'Accepter';\n $conget->update();\n return redirect(route('conget.index'));\n }", "public function setMyaskStatus($askId,$status){\r\n\t\t$this->dao->execute('UPDATE '.$this->Vip_ask.' SET status = '.$status.' WHERE id='.$this->dao->quote($askId));\r\n\t\tif($this->dao->affectRows()){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n }", "public function\tMandateIsApproved($id){\n\n\t\tif (isset($_POST['approve'])) {\n\n\t\t\t$status = 'Approved';\n\n\t\t\t$sql = \"UPDATE mandate_form SET mandate_status = '$status' WHERE id = '$id'\";\n\t\t\t$query = $this->conn->prepare($sql);\n\t\t\t$res = $query->execute();\n\t\t\tif ($res) {\n\t\t\t\treturn 'success';\n\t\t\t}else{\n\t\t\t\treturn 'nope';\n\t\t\t}\n\t\t}\n\t}", "function acceptChallenge($user_id, $challenge_id, $img_url) {\n\t\t$challenge_arr = array();\n\t\t\n\t\t// get the user's name\n\t\t$query = 'SELECT `username` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t$challenger_name = mysql_fetch_object(mysql_query($query))->username; \n\t\t\n\t\t// get the subject & the id of the user that created the challenge\n\t\t$query = 'SELECT `subject_id`, `creator_id` FROM `tblChallenges` WHERE `id` = '. $challenge_id .';';\n\t\t$challenge_obj = mysql_fetch_object(mysql_query($query));\n\t\t\n\t\t// get the subject name for this challenge\n\t\t$query = 'SELECT `title` FROM `tblChallengeSubjects` WHERE `id` = '. $challenge_obj->subject_id .';';\n\t\t$subject_name = mysql_fetch_object(mysql_query($query))->title;\n\t\t\n\t\t// get the creator's device info\n\t\t$query = 'SELECT `device_token`, `notifications` FROM `tblUsers` WHERE `id` = '. $challenge_obj->creator_id .';';\t\t\t\n\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\n\t\t$isPush = ($creator_obj->notifications == \"Y\");\n\t\t\n\t\t// send push if allowed\n\t\tif ($isPush)\n\t\t\t$this->sendPush('{\"device_tokens\": [\"'. $creator_obj->device_token .'\"], \"type\":\"1\", \"aps\": {\"alert\": \"'. $challenger_name .' has accepted your '. $subject_name .' snap!\", \"sound\": \"push_01.caf\"}}'); \t\t\t\n\n\t\t// update the challenge to started\n\t\t$query = 'UPDATE `tblChallenges` SET `status_id` = 4, `challenger_id` = \"'. $user_id .'\", `challenger_img` = \"'. $img_url .'\", `updated` = NOW(), `started` = NOW() WHERE `id` = '. $challenge_id .';';\n\t\t$result = mysql_query($query);\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode(array(\n\t\t\t'id' => $challenge_id\n\t\t)));\n\t\treturn (true);\n\t}", "public function approve_user($id) {\n\n $player_query = $this->db->Execute(\"SELECT `id`,`username`,`registered`,`email` FROM `players` WHERE `id`=?\", array($id));\n\n if ($player_query->numrows() == 0) {\n $approve_user = $this->skin->error_box($this->lang->player_not_found);\n return $approve_user;\n } else {\n $player = $player_query->fetchrow();\n $player['registered'] = date(\"d/m/Y H:i\", $player['registered']);\n }\n\n if ($player['verified'] == 1) {\n $approve_user = $this->skin->error_box($this->lang->player_already_approved);\n return $approve_user;\n }\n\n if(isset($_POST['approve'])) {\n $this->db->Execute(\"UPDATE `players` SET `verified`=1 WHERE `id`=?\", array($id));\n $approve_user = $this->skin->success_box($this->lang->player_approved);\n } else {\n $approve_user = $this->skin->approve_user($player);\n }\n return $approve_user;\n\n }", "public function change_status($id)\n\t{\n\t\t$collector = Collector::findOrFail($id);\n\n\t\tif ($collector->credits->where('active', 1)->count() > 0) {\n\t\t\treturn redirect()->action('CollectorController@show')\n\t\t\t\t\t\t\t\t->with('alert', 'Error: El cobrador tiene creditos asociados.');\n\t\t}\n\n\t\t$collector->active = !$collector->active;\n\t\t$collector->save();\n\n\t\treturn redirect()->route('list_collectors')->with('success', 'Exito: Estado del cobrador actualizado!');\n\t}", "function approve() { \n\n\t\t$sql = \"UPDATE flagged SET approved='1' WHERE id='$this->id'\";\n\t\t$db_results = mysql_query($sql, dbh());\n\n\t\treturn true;\n\t\n\t }", "public function setAccept($proposalId, $userId, $accept)\n {\n $this->db->set('accepted', $accept)\n ->where('idDateProposal', $proposalId)\n ->where('idUser', $userId)\n ->update('DateAccept');\n }", "public function respondToRequest($user_id, $friend_id, $accept)\n {\n // friend 1 is the one who sent the request, 2 is responding\n $stmt = $this->conn->prepare('UPDATE Friends \n SET Accepted = ?, Responded = 1\n WHERE Friend1 = ?\n AND Friend2 = ? \n ');\n \n $stmt->bind_param(\"iii\", $accept, $friend_id, $user_id);\n if ($stmt->execute()) {\n $stmt->close();\n \n return true;\n } else {\n return false;\n }\n }", "public function accept()\n {\n $this->setStatus(self::DONE);\n }", "public function status($id)\n\t{\n\t\t$photo_status = \\App\\Photo::where('id',$id)->first();\n\t\tif($photo_status->approve == 'yes')\n\t\t{\n\t\t\t$photo_status->approve = 'no';\n\t\t\t$photo_status->save();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$photo_status->approve = 'yes';\n\t\t\t$photo_status->save();\n\t\t}\n\t\t$message = 'Photo status changed successfully.';\n\t\treturn redirect('/admin/photos')->with('success', $message);\n\t}", "function accept() {\r\n\t\t$sql = \"update runner set R_Status = '1' WHERE id = :id \";\r\n $args = [':id'=>$this->id];\r\n return DB::run($sql,$args);\r\n\t}", "public function admin_accept_request($id) {\n\n $this->User->create();\n $this->User->id = $id;\n\n $user = $this->User->findById($id);\n $user['User']['email'] = $user['User']['email_at_signup'];\n\n if (!$this->User->exists()) {\n throw new NotFoundException(__('Invalid user'));\n }\n $this->request->onlyAllow('post', 'accept_request');\n\n if($this->User->saveField('email',$user['User']['email'])){\n //sends activation email to user\n $this->__send_activation_email($user);\n $this->Session->setFlash(__('The user has been accepted. An activation email has been sent to the user.'));\n } else {\n $this->Session->setFlash(__('The user could not be accepted. Please, try again.'));\n }\n return $this->redirect(array('action' => 'index'));\n }", "public function accept($id, $code = null)\n {\n if (Auth::user()->tokenCan('request.manage')) {\n try {\n if (!$code) {\n $flightRequest = FlightRequest::where('id', $id)->whereNull('code')->firstOrFail();\n } else {\n $flightRequest = FlightRequest::where('id', $id)->where('code', $code)->firstOrFail();\n }\n } catch (ModelNotFoundException $e) {\n return $this->errorNotFound(array($e->getMessage()));\n }\n\n try {\n if ($flightRequest->isRequestee(Auth::user()) || $flightRequest->isAcceptee(Auth::user())) {\n return $this->respondWithError('The authenticated user is already a participant of this request', ['USER_PARTICIPATION'], 400);\n } else {\n $flightRequest->acceptee_id = Auth::id();\n $flightRequest->save();\n\n $requestee = $flightRequest->requestee;\n $requestee->notify(new RequestAccepted(Auth::user(), $requestee, $flightRequest));\n\n if ($flightRequest->callback) {\n $this->requestCall($flightRequest, 'Accepted');\n }\n\n return $this->respondWithObject(new RequestResource($flightRequest));\n }\n } catch (Exception $e) {\n return $this->errorInternalError(array($e->getMessage()));\n }\n } else {\n return $this->errorUnauthorized(['INVALID_SCOPE']);\n }\n }", "public static function update_challenge($idchallenge) {\n\t\t\n\t\t$challenge = Challenge::challenge_exists($idchallenge);\n\t\tif (!$challenge) {\n\t\t\n\t\t\techo(json_encode([\"code\" => 0,\"message\" => \"Error : challenge does not exist\"]));\n\t\t\texit();\n\t\t}\n\t\tglobal $user;\n\t\tif ($user->is_connected(MODERATEUR)) {\n\t\t\t\n\t\t\t$title=(!empty($_POST['title']))? $_POST['title']:\"\";\n\t\t\t$desc=(!empty($_FILES['desc']))? $_FILES['desc']:\"\";\n\t\t\t$date_stop=(!empty($_POST['date_stop']))? $_POST['date_stop']:\"\";\n\t\t\t$db = database::getPDO();\n\t\t\t$query=$db->prepare('UPDATE challenge SET title=:title,description=:desc,datestop=:date_stop WHERE id=:idchallenge');\n\t\t\t$query->bindParam(':idchallenge',$idchallenge,PDO::PARAM_INT);\n\t\t\t$query->bindParam(':title',$title,PDO::PARAM_STR);\n\t\t\t$query->bindParam(':desc',$desc,PDO::PARAM_STR);\n\t\t\t$query->bindParam(':date_stop',$date_stop,PDO::PARAM_STR);\n\t\t\t$query->execute();\n\t\t\t$query->CloseCursor();\n\t\t\techo(json_encode([\"code\" => 1,\"message\" => \"Success : challenge updated\"]));\n\t\t}\n\t\telse {\n\t\t\n\t\t\techo(json_encode([\"code\" => 0, \"message\" => \"Error : moderator and admin only\"]));\n\t\t\texit();\n\t\t}\n\t}", "public function approved($id)\n {\n $review = $this->rp->find($id);\n $review->approved = 1;\n $review->save();\n return redirect('/admin/reviews')->withSuccess('Recensione aggiornata correttamente.');\n }", "public function setInviteStatus($status);", "public function acceptAppointmentById(int $id)\n {\n try {\n $updated = Appointment::whereId($id)->update(['status' => 2]);\n if ($updated)\n return response()->json(['message' => 'Resource updated successfuly'], 200);\n else\n return response()->json(['message' => 'Nothing to update'], 200);\n } catch (\\Exception $e) {\n return response()->json($e, 400);\n }\n }", "public function acceptAction() {\n if($this->getRequest()->getParams()) {\n $referenceId = $this->getRequest()->getParam('referenceId');\n if($referenceId != null) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($referenceId);\n try {\n $order->addStatusHistoryComment('Order has been Accepted by Santander');\n $order->save();\n } catch (Mage_Core_Exception $e) {\n Mage::log('Error during accept Action of Santander: '.$e, null, 'santander.log');\n }\n }\n }\n Mage::getSingleton('core/session')->addSuccess($this->__('Your payment has been accepted.'));\n $this->_redirect('checkout/onepage/success');\n }", "public function approve($id){\r\n\t\t$this->cap->approve_requests($id);\r\n\t\tredirect('Captaincontroller');\r\n\t}", "public function acceptrequest($id)\n\t{\n\t\t$this->load->model(\"generalop\");\n\t\t$this->generalop->acceptprofessional($id);\n\t\tredirect(\"admin/showrequest\");\t\n\t}", "public function X1AcceptChallenge($challenge, $event, $maps, $team_names);", "public function confirmChangingStatus($id)\n {\n $this->selectedUser = User::withTrashed()->findOrFail($id);\n $this->changingStatus = true;\n }", "public function updateChallengeStatus ( $challengeId, $moderationStatus )\n {\n $challenge = $this->getChallenge( $challengeId );\n $challenge->setModerationStatus( $moderationStatus );\n $challenge->setUpdatedTimestamp( date( 'Y-m-d H:i:s' ) );\n\n if( $moderationStatus == 'allow' || $moderationStatus == 'error' ) {\n $challenge->setStatus(BeMaverick_Challenge::CHALLENGE_STATUS_PUBLISHED);\n }else {\n $challenge->setStatus(BeMaverick_Challenge::CHALLENGE_STATUS_HIDDEN);\n // todo email the user that the challenge is taken down.\n if ( $moderationStatus == BeMaverick_Moderation::MODERATION_STATUS_QUEUEDFORAPPROVAL) {\n\n $message = \"Don’t stress, but your challenge was flagged by our system to be moderated. Our team is reviewing it now & we’ll either repost it as soon as we can or will let you know why it has to come down.\";\n\n } else if ( $moderationStatus == BeMaverick_Moderation::MODERATION_STATUS_REJECT ) {\n\n $message = \"Sorry, but we had to remove your content because it violates our community guidelines.\";\n }\n BeMaverick_Util::sendNotificationForModeration($this, $challenge, $message, 'challenge' );\n }\n }", "function changeStatus($id)\n {\n $stats = $this->model->find($id);\n\n if (isset($stats)) {\n $stats->is_active = !$stats->is_active;\n $stats->save();\n return response_api(true, 200, trans('app.updated'), []);\n }\n return response_api(false, 422, null, []);\n\n }", "public function approve($id) {\n $user = \\JWTAuth::parseToken()->authenticate();\n $photo = AcceptedPhotos::where('id', $id)->update(['approved'=> 1]);\n\n ApprovedPhotos::create([\n 'admin_user_id' => $user->id,\n 'photo_id' => $id\n ]);\n\n $total = ApprovedPhotos::select('*')->where('admin_user_id', $user->id)->get()->count();\n\n if (!is_null($photo)) {\n return ['message' => $this->message[\"success\"][\"approve\"], 'total' => $total];\n }\n }", "public function adminForceTeamChangeById(int $playerId) : bool;", "public function accept($id)\n {\n\n $user = auth()->user();\n\n $project = ProjectUser::firstOrCreate(\n ['project_id' => $id, 'user_id' => $user->id],\n ['created_at' => Carbon::now(), 'project_id' => $id, 'user_id' => $user->id],\n );\n if($project->project->user_id != $user->id){\n $project->proposal = today();\n $result = $project->save();\n if($result){\n if($user->notification == true){\n Session::flash('success', 'Votre demande a été envoyée, attendez maintenant l\\'email de confirmation');\n return response()->json(['success' => 'Votre demande a été envoyée, attendez maintenant l\\'email de confirmation'], 200);\n }else{\n Session::flash('success', 'Votre demande a été envoyée, attendez maintenant la confirmation');\n return response()->json(['success' => 'Votre demande a été envoyée, attendez maintenant la confirmation'], 200);\n }\n }else{\n Session::flash('message', 'Une erreur est survenue lors de l\\'acceptation, veuillez réessayer plus tard !');\n return response()->json(['error' => 'Une erreur est survenue lors de l\\'acceptation'], 500);\n }\n }else{\n Session::flash('message', 'Une erreur est survenue, veuillez réessayer plus tard !');\n return response()->json(['error' => 'Vous ne pouvez pas accepter ce projet'], 401);\n }\n }", "public function approve()\n {\n return $this->update(['approved' => true]);\n }", "public function show($id)\n {\n $inscription = Inscription::find($id);\n $inscription->accepted = true;\n $query = $inscription->save();\n\n if ($query) {\n return redirect()->route('inscriptions.index')->with('success', 'Accepted Successfully');\n }\n }", "public function unsetacceptedAction($id = null)\n {\n $answer = $this->questions->find($id);\n $aacronym = $answer->acronym;\n $question = $this->questions->find($answer->question_id);\n if ($this->di->user->getUserAcronym() == $question->acronym) {\n $this->questions->update2([\n 'id' => $question->id,\n 'accepted' => null,\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'activities',\n 'action' => 'add',\n 'params' => [['other_id' => $id, 'icon' => 'fa fa-times-circle', 'acronym' => $question->acronym, 'action_desc' => 'rejected an already accepted answer', 'reputation' => -5]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'users',\n 'action' => 'updatevalue',\n 'params' => [['acronym' => $question->acronym, 'reputation' => -5]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'activities',\n 'action' => 'add',\n 'params' => [['other_id' => $question->id, 'icon' => 'fa fa-times-circle-o', 'acronym' => $aacronym, 'action_desc' => 'accepted answer got rejected', 'reputation' => -5]],\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'users',\n 'action' => 'updatevalue',\n 'params' => [['acronym' => $aacronym, 'reputation' => -5 ]],\n ]);\n\n\n }\n $url = $this->url->create('questions/id/' . $question->id);\n $this->response->redirect($url);\n }", "public function active($id) {\n\t\t$user_id = User::where('id',$id)\n\t\t\t->select('id')\n\t\t\t->first();\n\n\t\t$affected_row = User::where('id', $id)\n\t\t\t->update(['activation_status' => 1]);\n\n\t\tif (!empty($affected_row)) {\n\t\t\treturn redirect('/people/clients/details/'.$user_id->id)->with('message', 'Activate successfully.');\n\t\t}\n\t\t//return redirect('/people/clients')->with('exception', 'Operation failed !');\n\t\treturn redirect('/people/clients/details/'.$user_id->id)->with('exception', 'Operation failed !');\n\t}", "public function changeStatusToActivate($id)\n {\n $findPendingStudent = Pendaftaran::find($id);\n\n if ($findPendingStudent->status == 'pending'){\n $status = 'aktif';\n \n $findPendingStudent->status = $status;\n\n $findPendingStudent->update();\n\n $Response = $findPendingStudent::with('siswas.detail_siswas','programkursuses')->where(['id'=>$findPendingStudent->id])->get();\n\n return apiReturn($Response,\"Berhasil mengubah status siswa menjadi aktif\");\n\n } else {\n\n $Response = $findPendingStudent::with('siswas.detail_siswas','programkursuses')->where(['id'=>$findPendingStudent->id])->get();\n \n return apiFailed($Response,\"Status siswa tidak bisa diupdate\");\n }\n \n }", "public function approveSubmission(int $id): bool\n {\n $submission = $this->submissions->getSubmissionOrThrow($id);\n if($submission->type != 0 && !is_numeric($submission->description)) {\n return false;\n }\n\n if(!empty($submission->twitch_id)) {\n $twitchId = $submission->twitch_id;\n }\n else {\n $twitchId = $this->twitch->getChannelID($submission->name);\n }\n\n if($submission->type != 0) {\n $bot = $this->bots->getBotByIDOrThrow($twitchId);\n if(is_numeric($submission->description)) {\n $bot->type = (int)$submission->description;\n }\n else {\n $bot->type = null;\n }\n $this->bots->updateBot($bot);\n }\n else {\n $channelId = null;\n if(!empty($submission->channel)) {\n if(!empty($submission->channel_id)) {\n $channelId = $submission->channel_id;\n }\n else {\n $channelId = $this->twitch->getChannelID($submission->channel);\n }\n }\n\n $bot = new Bot;\n $bot->twitch_id = $twitchId;\n $bot->name = $submission->name;\n $bot->channel = $submission->channel;\n $bot->channel_id = $channelId;\n\n if(is_numeric($submission->description)) {\n $bot->type = (int)$submission->description;\n $this->bots->addBot($bot);\n }\n else {\n $this->bots->addBot($bot);\n if(!empty($submission->description) && strlen($submission->description) > 5) {\n $this->submissions->append($twitchId, $submission->name, 'From submissions: '.$submission->description, Submissions::CORRECTION, $submission->channel, $channelId);\n }\n }\n }\n\n if($submission->type == 0) {\n $this->submissions->removeSubmission($id);\n }\n else {\n $this->submissions->removeSubmissions($twitchId);\n }\n\n return true;\n }", "public function approve($id){\n User::where('id', $id)->update([\n 'status'=> 1,\n ]);\n return redirect()->back();\n }", "function confirm(int $id)\n {\n $this->query(\n \"UPDATE $this->_table \n SET confirmed = 1\n WHERE id = :id AND confirmed = 0\",\n ['id' => $id]\n )->exec()->affectedRows(self::AFFECTED_ONE);\n }", "function changeContestStatus($ContestID) {\n\n /* Add contest to contest table . */\n /* Update Match Status */\n $this->db->where('EntityID', $ContestID);\n $this->db->limit(1);\n $this->db->update('tbl_entity', array('ModifiedDate' => date('Y-m-d H:i:s'), 'StatusID' => 2));\n return true;\n }", "protected function _enableStatus($id) {\n return $this->_updateStatus($id, AW_Vidtest_Model_Video::VIDEO_STATUS_ENABLED);\n }", "public function activate_user($id = null){\n\t\t// tag as enabled\n\t\tDB::table('users')\n\t\t\t->where('id', $id)\n\t\t\t->update([ 'tag' => 'enabled' ]);\n\t\t\t\n\t\tSession::flash('manage_acc_msg', 'The user\\'s account has been activated!');\n\t\treturn Redirect::to('/acc');\n\t}", "public function approveTransaction($id): bool;", "public function actionActivate(int $id): \\yii\\web\\Response\n {\n $model = $this->findModel($id);\n\n if (!$model->voting->is_active) { // TODO: move to events\n $voting = $model->voting;\n $voting->is_active = true;\n $voting->save();\n }\n\n $query = $model->voting->getQuestions()->where(['is_active' => true, 'is_finished' => false])\n ->andWhere(['<>', 'id', $model->id]);\n if ($query->count()) {\n Yii::$app->session->addFlash('warning', Yii::t(\n 'simialbi/voting/question',\n 'There is another question. Please end it first.'\n ));\n\n return $this->redirect(['voting/view', 'id' => $model->voting_id]);\n }\n\n $model->is_active = true;\n $model->save();\n\n return $this->redirect(['voting/view', 'id' => $model->voting_id]);\n }", "public function setStatus($authenticatorId, $coPersonId, $actorCoPersonId, $locked=false) {\n // First see if this Authenticator is already at this status.\n // We need to see if there is a record already anyway.\n \n $this->_begin();\n \n $args = array();\n $args['conditions']['AuthenticatorStatus.authenticator_id'] = $authenticatorId;\n $args['conditions']['AuthenticatorStatus.co_person_id'] = $coPersonId;\n $args['contain'] = false;\n \n $curStatus = $this->find('first', $args);\n \n // Start constructing the record to save\n \n $data = array(\n 'AuthenticatorStatus' => array(\n 'authenticator_id' => $authenticatorId,\n 'co_person_id' => $coPersonId\n )\n );\n \n $curStatusFlag = AuthenticatorStatusEnum::NotSet;\n \n if(!empty($curStatus)) {\n // Current record, key the data\n $data['AuthenticatorStatus']['id'] = $curStatus['AuthenticatorStatus']['id'];\n \n if(!$locked) {\n if(!isset($curStatus['AuthenticatorStatus']['locked'])\n || !$curStatus['AuthenticatorStatus']['locked']) {\n // Record is not locked, cannot unlock\n $this->_rollback();\n throw new RuntimeException(_txt('er.authr.unlocked'));\n }\n } elseif($locked) {\n if(isset($curStatus['AuthenticatorStatus']['locked'])\n && $curStatus['AuthenticatorStatus']['locked']) {\n // Record is locked, cannot lock\n $this->_rollback();\n throw new RuntimeException(_txt('er.status.already', array(_txt('en.status.authr', null, AuthenticatorStatusEnum::Locked))));\n }\n }\n }\n // else no current record\n \n // Pull the Authenticator description separately from the find above, since\n // on initial status creation Authenticator will be blank.\n \n $description = $this->Authenticator->field('description', array('Authenticator.id' => $authenticatorId));\n \n $comment = \"\";\n \n if(!$locked) {\n $data['AuthenticatorStatus']['locked'] = false;\n $comment = _txt('rs.authr.unlocked', array($description));\n } elseif($locked) {\n $data['AuthenticatorStatus']['locked'] = true;\n $comment = _txt('rs.authr.locked', array($description));\n }\n \n $this->save($data);\n \n // Cut history\n $this->CoPerson->HistoryRecord->record($coPersonId,\n null,\n null,\n $actorCoPersonId,\n ActionEnum::AuthenticatorStatusEdited,\n $comment);\n \n $this->_commit();\n return true;\n }", "function handle_change() {\n\tif ( ! wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wp_flags' ) ) {\n\t\tthrow new \\Exception( __( 'Invalid security nonce.', 'wp-flags' ) );\n\t}\n\n\t$id = filter_input( INPUT_GET, 'flag' );\n\t$status = filter_input( INPUT_GET, 'status' );\n\t$flag = Flags::get( $id );\n\n\tif ( ! $flag->available ) {\n\t\t/* translators: %s is the flag id */\n\t\tthrow new \\Exception( sprintf( __( '\"%s\" Flag is not available.', 'wp-flags' ), $flag->title ) );\n\t}\n\n\tif ( ! $flag->optin ) {\n\t\t/* translators: %s is the flag id */\n\t\tthrow new \\Exception( sprintf( __( '\"%s\" Flag is forced and not op-in.', 'wp-flags' ), $flag->title ) );\n\t}\n\n\t$flag->set( 'active', (bool) $status );\n}", "public function appreq($id, $accept, $conn)\n {\n $sql = \"UPDATE `tbl_user` SET `isblock`='\".$accept.\"' where `user_id`='\".$id.\"'\";\n\n if ($conn->query($sql) === true) {\n header(\"location:viewrequest.php\");\n } else {\n echo $conn->error;\n }\n }", "public function setAcceptOnMatch($acceptOnMatch) : void\n {\n $this->setBoolean('acceptOnMatch', $acceptOnMatch);\n \n }", "function decision_passed( $id ) {\n\n $this->decision_status_change_message( $id, 'passed' );\n\n }", "public function setResourceActive($resourceid, $active = true)\n {\n $xml = $this->sendEditionguardApiRequest(self::API_SET_STATUS_URL, [\n 'resource_id'=>$resourceid,\n 'status'=>$active ? 'active' : 'inactive',\n ]);\n\n // Setting to inactive is currently returning deleted. Setting to active should\n // return a distributionrights object\n if (!isset($xml->response) || (!isset($xml->response->distributionRights) && !isset($xml->response->deleted))) {\n // Unknown response type. Assume it's a raw error.\n throw new \\Exception(\"Error: \\\"{$xml->innerXml()}\\\" while uploading file to EditionGuard\");\n }\n\n return true;\n }", "function approve()\n\t{\n\t\tglobal $db;\n\t\t\n\t\treturn $db->query(\"UPDATE quotes SET approved = 1 WHERE id = \" . $this->id) ? true : false;\n\t}", "public function validateComment($id)\n {\n $reqComment = $this->conn->prepare('UPDATE commentaires SET approved = 1 WHERE id= :id LIMIT 1');\n $reqComment->bindValue(':id', $id, PDO::PARAM_INT);\n $reqComment->execute();\n\n header(\"Location: admin_comments\");\n }", "function approve($hash) {\r\n\t\treturn $this->updateStatus('approved', $hash);\r\n\t}", "public function markAsPending() {\n $this->status = self::STATUS_PENDING;\n \n return $this->save(false);\n }", "public function activate($id)\n {\n $user = $this->model->whereId($id)->whereStatus('New')->first();\n\n if (is_null($user)) {\n return false;\n }\n\n $user->status = 'Active';\n\n if ($user->save()) {\n return true;\n }\n\n return false;\n }", "protected function changePendingCommentsToActive($comment_id){\n Comment::where('id', $comment_id)->update(array('status'=>'active'));\n return redirect()->back()->with('msg','You have marked Pending comment to Active Successfully');\n }", "protected static function set_acceptances_status($policyversionid, $userid = null, $note = null, $lang = null, $status = 1) {\n global $DB, $USER;\n\n // Validate arguments and capabilities.\n if (empty($policyversionid)) {\n return;\n } else if (!is_array($policyversionid)) {\n $policyversionid = [$policyversionid];\n }\n if (!$userid) {\n $userid = $USER->id;\n }\n self::can_accept_policies([$policyversionid], $userid, true);\n\n // Retrieve the list of policy versions that need agreement (do not update existing agreements).\n list($sql, $params) = $DB->get_in_or_equal($policyversionid, SQL_PARAMS_NAMED);\n $sql = \"SELECT v.id AS versionid, a.*\n FROM {tool_policy_versions} v\n LEFT JOIN {tool_policy_acceptances} a ON a.userid = :userid AND a.policyversionid = v.id\n WHERE v.id $sql AND (a.id IS NULL OR a.status <> :status)\";\n\n $needacceptance = $DB->get_records_sql($sql, $params + [\n 'userid' => $userid,\n 'status' => $status,\n ]);\n\n $realuser = manager::get_realuser();\n $updatedata = ['status' => $status, 'lang' => $lang ?: current_language(),\n 'timemodified' => time(), 'usermodified' => $realuser->id, 'note' => $note];\n foreach ($needacceptance as $versionid => $currentacceptance) {\n unset($currentacceptance->versionid);\n if ($currentacceptance->id) {\n $updatedata['id'] = $currentacceptance->id;\n $DB->update_record('tool_policy_acceptances', $updatedata);\n acceptance_updated::create_from_record((object)($updatedata + (array)$currentacceptance))->trigger();\n } else {\n $updatedata['timecreated'] = $updatedata['timemodified'];\n $updatedata['policyversionid'] = $versionid;\n $updatedata['userid'] = $userid;\n $updatedata['id'] = $DB->insert_record('tool_policy_acceptances', $updatedata);\n acceptance_created::create_from_record((object)($updatedata + (array)$currentacceptance))->trigger();\n }\n }\n\n static::update_policyagreed($userid);\n }", "function wp_set_comment_status($comment_id, $comment_status) {\n global $wpdb;\n\n switch($comment_status) {\n\t\tcase 'hold':\n\t\t\t$query = \"UPDATE $wpdb->comments SET comment_approved='0' WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tcase 'approve':\n\t\t\t$query = \"UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tcase 'delete':\n\t\t\t$query = \"DELETE FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n }\n\n if ($wpdb->query($query)) {\n\t\tdo_action('wp_set_comment_status', $comment_id);\n\t\treturn true;\n } else {\n\t\treturn false;\n }\n}", "function wp_set_comment_status($comment_id, $comment_status) {\n global $wpdb;\n\n switch($comment_status) {\n\t\tcase 'hold':\n\t\t\t$query = \"UPDATE $wpdb->comments SET comment_approved='0' WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tcase 'approve':\n\t\t\t$query = \"UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tcase 'delete':\n\t\t\t$query = \"DELETE FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1\";\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n }\n\n if ($wpdb->query($query)) {\n\t\tdo_action('wp_set_comment_status', $comment_id);\n\t\treturn true;\n } else {\n\t\treturn false;\n }\n}", "public function activate_user_status($id){\n\n $sql = \"UPDATE $this->table SET active = 1 WHERE id = $id\";\n return (bool) $this->db->query($sql);\n }", "public function activateMan($id) {\n $query = $this->db->prepare(\"UPDATE `users` SET `authorized` = 1 WHERE `id` = ?\");\n $query->bindValue(1, $id);\n try {\n $query->execute();\n }\n catch(PDOException $e) {\n //print error message\n die($e->getMessage());\n }\n return true; \n }", "public function approve_request_for_captain($id){\r\n\t\t\t\r\n\t\t\t$this->cap->approve_request($id);\t\r\n\t\t\t$this->session->set_flashdata('success',true);\r\n\t\t\t\r\n\t\t\tredirect('Captaincontroller/view_approved_request');\r\n\t\r\n\t}", "public function activate($todoID)\n {\n $this->dao->update(TABLE_TODO)\n ->set('status')->eq('wait')\n ->where('id')->eq((int)$todoID)\n ->exec();\n $this->loadModel('action')->create('todo', $todoID, 'activated', '', 'closed');\n return true;\n }", "public function onAccept( $data ) {\n $data['targetable_id'] = $data['challenge_id'];\n $data['targetable_type'] = 'Challenge';\n //Create the notification\n $notification = $this->notification->create($data);\n }", "public function confirm() {\n $this->confirmed_on = \\Time::now();\n \n $this->update([\n 'confirmed_on' => $this->confirmed_on\n ]);\n\n $this->current = 'pending fulfillment';\n }", "public function confirmCard($id_card){\n try {\n $this->utf8();\n $query = $this->pdo->prepare(\"UPDATE cards\n SET confirmed = 1\n WHERE id=:id_card\n \");\n $query->execute(array(':id_card' => $id_card\n )\n );\n return 1;\n } catch (PDOException $e) {\n return $e;\n } \n }", "public static function do_approve_user($user_id){\n\tglobal $base;\n\t$clean_user = $base->clear_string($user_id);\n\t\n\t$sql = \"UPDATE users SET active = '1' WHERE user_id = '{$clean_user}'\"; \n\t$base->select_table($sql);\n}", "function approveComment( $id ) {\n global $logged_in;\n global $connection;\n \n $query = \"UPDATE comments SET \";\n $query .= \"comment_status = 'Approved' \";\n $query .= \"WHERE comment_id = {$id} \";\n\n $result = mysqli_query($connection, $query);\n\n confirmQuery( $result );\n \n // REFRESHES THE PAGE\n header(\"location: admin_comments.php?{$logged_in}\");\n }", "public function Activate(\n\t\t$respondent_id\n\t);", "public function activate($id)\n {\n // reset all documents active state to non active\n SuitCase::where('current_flag', 1)->update(['current_flag' => 0]);\n\n // activate the given suitcase\n return SuitCase::find($id)->update(['current_flag' => '1']);\n }", "public function approve($id)\n {\n\n $this->TimeClock->id = $id;\n $this->TimeClock->saveField('approved',1);\n \n echo 'ok';\n $this->autoRender = false; \n }", "public function accept(Request $request, $id)\n {\n $student = Student::find($id);\n\n $student->application_status = 'accepted';\n\n $student->save();\n\n return redirect(\"/dashboard/applications\")->with('success', \"Successfully Updated.\");\n }", "public function active($id)\n {\n if (! Gate::allows('settings_manage')) {\n return abort(401);\n }\n $setting = Settings::findOrFail($id);\n $setting->update(['active' => 1]);\n\n flash('Record has been inactivated successfully.')->success()->important();\n\n return redirect()->route('admin.settings.index');\n }", "public function setstatusAction() {\n\t\t$statusid = $this->getRequest ()->getParam ( 'statusid' );\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\tif(is_numeric($id) && is_numeric($statusid)){\n\t\t\tTickets::setStatus($id, $statusid);\n\t\t\t$this->_helper->redirector ( 'edit', 'tickets', 'admin', array('id' => $id, 'mex' => 'The task requested has been done', 'status' => 'success') );\n\t\t}\n\t\t$this->_helper->redirector ( 'list', 'tickets', 'admin', array('mex' => 'There was a problem', 'status' => 'danger') );\n\t}", "public function accepts()\n {\n $this->labmail_model->accepts_pending_request($this->session->user_id, $this->input->get('id'));\n redirect('labmail');\n }", "public function activate($id) {\n $query = $this->db->query(\"UPDATE `\" . DB_PREFIX . \"plan` SET `status` = '1' WHERE `plan_id` = '\" . (int)$id . \"'\");\n return $query;\n }", "function activateQuestion(){\n\t\tif(!empty($this->data['Question']['id'])){\n\t\t\t$existingStatus = $this->Question->find('first', array('conditions' => array('Question.id' => $this->data['Question']['id'])));\n\t\t\t$status = $existingStatus['Question']['status'];\n\t\t\tif($status == 1){\n\t\t\t\t$finalStatus = 0;\n\t\t\t}else{\n\t\t\t\t$finalStatus = 1;\n\t\t\t}\n\t\t\t$this->Question->id = $this->data['Question']['id'];\n\t\t\t$data['Question']['status'] = $finalStatus;\n\t\t\tif($this->Question->save($data)){\n\t\t\t\techo $data['Question']['status']; \n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}", "public function checkPlayersAcceptedMatch($match_id) {\n\t\t\n\t\t$response = [];\n\t\t$response['playersAcceptedMatch'] = Matches::checkPlayersAcceptedMatch($match_id);\n\t\t\n\t\treturn $response;\n\t}", "function confirmuser($id,$opt) {\n\t\t$this->layout = \"frontend\";\n\t\t$admin = $this->Session->read(\"admin\");\n\t\t$this->User->id = $id;\n\t\t\n\t\tif (!$this->User->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid user'));\n\t\t} else {\n\t\t\t$this->User->recursive = 0;\n\t\t\t$user = $this->User->find(\"first\",array(\"conditions\"=>array(\"User.id\"=>$id,\"User.account_id\"=>$this->Session->read(\"Auth.User.account_id\"))));\n\t\t\t$status = ($opt==1)?'Approved and a notification has been sent to user on email '.$user['User']['username']:'Rejected and a notification has been sent to user on email '.$user['User']['username'];\n\t\t\t$status1 = ($opt==1)?'Approved':'Rejected';\n\t\t\tif ($this->sendpasswordmail($user,$opt)) {\n\t\t\t\t$this->User->create();\n\t\t\t\t$this->User->id = $user['User']['id'];\n\t\t\t\t$userdata['User']['remembertoken'] = $this->encryptpass($user['User']['username']);\n\t\t\t\t$userdata['User']['approved'] = ($opt==1)?\"A\":\"N\";\n\t\t\t\t$this->User->save($userdata);\n\t\t\t\t$this->Session->setFlash(\"The user account has been \".$status.\".\", 'default', array(\"class\"=>\"success_message\"));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"The user account can not be \".$status1.\", please try again.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->redirect(\"/viewusers\",(($opt==1)?\"N\":\"A\"));\n\t}", "public function updateStatus($id){\n $this->db->query(\"UPDATE requests SET handled = :handled WHERE request_id = :id\");\n\n $this->db->bind(':handled',true);\n $this->db->bind(':id',$id);\n\n $this->db->execute();\n }" ]
[ "0.6503961", "0.623913", "0.61524296", "0.5956954", "0.5909641", "0.58289325", "0.58206725", "0.57881624", "0.5672585", "0.56722385", "0.55885667", "0.55478865", "0.5533097", "0.55217284", "0.5502786", "0.5496148", "0.54958606", "0.5494372", "0.54610735", "0.5438003", "0.5433743", "0.54324716", "0.5417913", "0.53894204", "0.53813094", "0.5379539", "0.5349835", "0.53310794", "0.53218", "0.5317997", "0.52672243", "0.52451813", "0.52116746", "0.5194064", "0.51812", "0.5179649", "0.5173335", "0.5167014", "0.5158331", "0.5152011", "0.51498973", "0.5126755", "0.5121397", "0.51213276", "0.51141244", "0.5104663", "0.50957835", "0.50849223", "0.50743854", "0.50683177", "0.5064321", "0.5059986", "0.5055187", "0.50532883", "0.5048917", "0.5048071", "0.5048043", "0.50457776", "0.5044709", "0.50400597", "0.503994", "0.5031051", "0.5027019", "0.5026193", "0.50229466", "0.50115377", "0.50072646", "0.50050795", "0.49963254", "0.49926394", "0.49855512", "0.4983624", "0.4978884", "0.49741784", "0.49668336", "0.49604264", "0.49598992", "0.49594268", "0.49594268", "0.4957897", "0.49568108", "0.49549055", "0.49542302", "0.4954204", "0.49513233", "0.4950102", "0.49429116", "0.49415758", "0.49394453", "0.49354425", "0.493529", "0.49315092", "0.49255788", "0.49205866", "0.49201345", "0.4918998", "0.4901571", "0.48833933", "0.4875703", "0.48639417" ]
0.73633313
0
Obtain all challenges for a user, preceded by the depreciated getChallengesData() method. First obtains a list of challenge ID's and initiation status' from the player_challenge table, and inserts these into an array of keypair values. Using the challenge ID's, query for challenge metadata as well as opponent data. As we iterate, append data from the initial array (used to identify challenge ID's), and the fetched data to the array for return. This results in final array being correctly formatted for JSON encoding.
Получить все вызовы для пользователя, используя устаревший метод getChallengesData(). Сначала получить список идентификаторов вызовов и статусов инициации из таблицы player_challenge, а затем вставить эти значения в массив пар ключей. Используя идентификаторы вызовов, запросить метаданные вызова и данные оппонента. По мере итерации добавлять данные из исходного массива (используемого для идентификации идентификаторов вызовов) и полученные данные в массив для возврата. Это приводит к тому, что итоговый массив будет правильно сформирован для кодирования в JSON.
function getChallenges($playerID): array { /* Construct a list of challenge ID's an initiation status'. -1 indicates that a result has not been posted and the match not yet played. */ $statementGetIDList = $this->connection->prepare ( "SELECT challengeid, didinitiate FROM player_challenge WHERE playerid = ? AND didwin = -1" ); /* Prepare and execute statement. */ $playerID = intval($playerID); $statementGetIDList->bind_param("i", $playerID); $statementGetIDList->execute(); $statementGetIDList->bind_result($challengeID, $didInitiate); $challengeList = array(); while ($statementGetIDList->fetch()) { $locatedChallenge = array(); $locatedChallenge["challengeid"] = $challengeID; $locatedChallenge["didinitiate"] = $didInitiate; array_push($challengeList, $locatedChallenge); } $statementGetIDList->close(); /* For each identified challenge, fetch relevant data. */ $challenges = array(); // The final challenges array to be returned. foreach ($challengeList as $c) { /* Statement to fetch opponent data, != playerID refers to the opponent. */ $statementGetOpponent = $this->connection->prepare ( "SELECT playerid, fname, lname, elo, winstreak, hotstreak, matchesplayed, wins, losses, highestelo, clubchamp FROM player WHERE playerid = (SELECT playerid FROM player_challenge WHERE challengeid = ? AND playerid != ?)" ); /* Statement to fetch challenge metadata. */ $statementGetChallengeData = $this->connection->prepare ( "SELECT date, time, (SELECT name FROM club WHERE challenge.clubid = club.clubid ), accepted FROM challenge WHERE challengeid = ?" ); /* Prepare and execute the opponent data statement. */ $statementGetOpponent->bind_param("ii", $c["challengeid"], $playerID); $statementGetOpponent->execute(); $statementGetOpponent->bind_result($opponentID, $fname, $lname, $elo, $winStreak, $hotStreak, $matchesPlayed, $numWins, $numLosses, $highestElo, $clubChamp); $statementGetOpponent->fetch(); $statementGetOpponent->close(); /* Prepare and execute the challenge data statement. */ $statementGetChallengeData->bind_param("i", $c["challengeid"]); $statementGetChallengeData->execute(); $statementGetChallengeData->bind_result($date, $time, $location, $accepted); $statementGetChallengeData->fetch(); $statementGetChallengeData->close(); $challenge = array(); // Array to hold a single challenge. /* Append fetched data to the challenges array. */ $challenge["challengeid"] = $c["challengeid"]; $challenge["didinitiate"] = $c["didinitiate"]; $challenge["opponentid"] = $opponentID; $challenge["fname"] = $fname; $challenge["lname"] = $lname; $challenge["elo"] = $elo; $challenge["winstreak"] = $winStreak; $challenge["hotstreak"] = $hotStreak; $challenge["matchesplayed"] = $matchesPlayed; $challenge["wins"] = $numWins; $challenge["losses"] = $numLosses; $challenge["highestelo"] = $highestElo; $challenge["clubchamp"] = $clubChamp; $challenge["date"] = $date; $challenge["time"] = $time; $challenge["location"] = $location; $challenge["accepted"] = $accepted; $challenge["achieved"] = (new PlayerRequest)->getUserAchievements($opponentID); // Fetch user achievement data. array_push($challenges, $challenge); } return $challenges; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChallengesForUser($user_id) {\n\t\t\n\t\t// get list of past opponents & loop thru\n\t\t$opponentID_arr = $this->challengeOpponents($user_id);\n\t\tforeach($opponentID_arr as $key => $val)\n\t\t\t$opponentChallenges_arr[$user_id .'_'. $val][] = $this->challengesWithOpponent($user_id, $val);\n\t\t\n\t\t// loop thru each paired match & pull off most recent\n\t\t$challengeID_arr = array();\n\t\tforeach($opponentChallenges_arr as $key => $val)\n\t\t\tarray_push($challengeID_arr, key($val[0]));\n\t\t\t\n\t\t\n\t\t// sort by date asc, then reverse to go desc\n\t\tasort($challengeID_arr);\n\t\t$challengeID_arr = array_reverse($challengeID_arr, true);\n\t\t\n\t\t\n\t\t// loop thru the most resent challenge ID per creator/challenger match\n\t\t$cnt = 0;\n\t\t$challenge_arr = array();\n\t\tforeach ($challengeID_arr as $key => $val) {\n\t\t\tarray_push($challenge_arr, $this->getChallengeObj($val));\n\t\t\t\n\t\t\t// stop at 10\n\t\t\tif (++$cnt == 10)\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "function getAllChallengesForUser($user_id) {\n\t\t\n\t\t// get challenges for user\n\t\t$query = 'SELECT `id` FROM `tblChallenges` WHERE (`status_id` != 3 AND `status_id` != 6 AND `status_id` != 8) AND (`creator_id` = '. $user_id .' OR `challenger_id` = '. $user_id .') ORDER BY `updated` DESC;';\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// loop thru the rows\n\t\t$challenge_arr = array();\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t\tarray_push($challenge_arr, $this->getChallengeObj($row['id']));\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "public static function GetChallenges($user){\n $sql = \"SELECT * FROM Points WHERE UserId=?\";\n $aParams = array();\n $aParams[] = $user->ID();\n $aPoints = self::getDB()->executeQuery($sql, $aParams);\n\t\t$sql = \"SELECT COUNT(*) FROM Game\";\n \t$iNumGames = self::getDB()->executeQuery($sql);\n if (count($aPoints) != $iNumGames) \n \t{\n\t\t\tfor($i = 0; $i < $iNumGames; $i++)\n\t\t\t{\n\t \t\t$sql = \"INSERT INTO Points (GameID, UserID, Points, Is_Active) VALUES(?,?,?,?)\";\n\t\t\t\t$aToInsert = array();\n\t\t\t\t$aToInsert[] = $iNumGames;\n\t\t\t\t$aToInsert[] = $user->ID();\n\t\t\t\t$aToInsert[] = \"0\";\n\t\t\t\t$aToInsert[] = \"1\";\n\t\t\t\tself::getDB()->executeQuery($sql, $aToInsert);\n\t\t\t\tself::GetChallenges($user);\n\t \t\t$sql = \"SELECT * FROM Points WHERE UserId=?\";\n\t\t\t\t$aPoints = self::getDB()->executeQuery($sql, $aParams);\n\t\t\t}\n\t\t}\n $aChallenges = array();\n $sql = \"SELECT * FROM Challenge WHERE Game_ID=?\";\n foreach ($aPoints as $point){\n $aChallenges[] = self::getDB()->executeQuery($sql, array($point['gameid']));\n }\n return $aChallenges;\n }", "public function getAllChallenge($user_id)\n\t{\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'users_id' => $user_id,\n\t\t\t)\n\t\t);\n\n\t\t//get all user's challenges \n\t\t$challenges = $this->findAll($c, 'users_has_challenges');\n\n\t\tforeach ($challenges as $challenge) {\n\t\t\t//get challenge one by one and add them in $data\n\t\t\t$data[] = $this->load($challenge->challenges_id)[0];\n\t\t}\n\n\t\treturn $data;\t\n\t}", "function getTeamChallenges($team_id) {\r\n\t\t\t$data = $this->fetch(\"SELECT t.id, t.challenger, t.created, t.completed, t. t.g_challenger, t.challengee, g2.guild AS g_challengee\r\n\t\t\t\t\t\t\t\t FROM (\r\n\t\t\t\t\t\t\t\t SELECT c1.id, c1.challenger, c1.created, c1.completed, g1.guild AS g_challenger, c1.challengee\r\n\t\t\t\t\t\t\t\t FROM \" . $this->prefix . \"guilds g1\r\n\t\t\t\t\t\t\t\t \tJOIN \" . $this->prefix . \"challenges c1\r\n\t\t\t\t\t\t\t\t \tON g1.id = c1.challenger\r\n\t\t\t\t\t\t\t\t ) t \r\n\t\t\t\t\t\t\t\t JOIN \" . $this->prefix . \"guilds g2\r\n\t\t\t\t\t\t\t\t ON g2.id = t.challengee\r\n\t\t\t\t\t\t\t\t WHERE challenger = '$team_id' OR challengee = '$team_id' ORDER BY t.id DESC\r\n\t\t\t\t\t\t\t\t\");\t\r\n\t\t\treturn $data;\r\n\t\t}", "public function getUsers($challenge_id) {\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'challenges_id' => $challenge_id,\n\t\t\t)\n\t\t);\n\n\t\t//Get all challenge's participant\n\t\t$users = $this->findAll($c, 'users_has_challenges');\n\n\t\tforeach ($users as $user) {\n\t\t\t $u = $this->load($user->users_id, 'users')[0];\n\t\t\t unset($u->password);\n\t\t\t unset($u->token_signup);\n\t\t\t $data[];\n\t\t}\n\n\t\treturn $data;\t\n\t}", "public function challenges() {\n $projects = $this->projects()->get();\n $challenges = [];\n foreach ($projects as $project) {\n $challenges += $project->challenges()->get()->all();\n }\n return $challenges;\n }", "function get_data_challenge()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `challenge`\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}", "public function getOngoingTeamChallenges()\n {\n\n $query = $this->db->query(\"SELECT *,TIMEDIFF(finish,now()) from times where teamChallenge=True AND TIMEDIFF(finish,now())>0 ORDER BY TIMEDIFF(finish,now()) ASC ;\");\n\n return $query->result_array();\n\n }", "protected function getAllDatas() \n {\n \n $result = array( 'players' => array() );\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n \n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_name name, player_color color, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n \n // TODO: Gather all information about current game situation (visible by player $current_player_id).\n\t\t\n\t\t// Cards in player hand \n $result['hand'] = $this->populateCards($this->cards->getCardsInLocation( 'hand', $current_player_id ));\n \n \n // Cards in top sentence\n $result['top_sentence'] = $this->populateCards($this->cards->getCardsInLocation( 'top_sentence' ));\n\n // Cards in current sentence\n $result['current_sentence'] = $this->populateCards($this->cards->getCardsInLocation( 'current_sentence' ));\n\n \n // Active Player\n $result['sentence_builder'] = self::getGameStateValue( 'playerBuildingSentence' );\n $result['champion'] = self::getGameStateValue( 'topSentenceBuilder' );\n $result['role'] = self::getGameStateValue( 'role' );\n\n if ($current_player_id == self::getGameStateValue( 'playerBuildingSentence' )) {\n // Working cards\n $result['action_choice'] = $this->populateCards($this->cards->getCardsInLocation( 'action_choice'));\n\n }\n\n $result['contribution'] = $this->getContributionMap();\n \n\t\t\n \n return $result;\n }", "public function getHtml($challenges, $login_user_id)\n\t{\n\t\t$host_challenge_status = array(0,1,4,6);\n\t\t$return_html = '';\n App::import('Model', 'Userchallenge');\n $Userchallenge = new Userchallenge();\n\n\t\tforeach ($challenges as $key => $value) \n\t\t{\n $show_challenge_flag = 0;\n if($login_user_id)\n {\n if(!$this->getHourMinutes($value['Challenge']['start_date'],'','hour') && $value['Challenge']['start_date'] != '0000-00-00 00:00:00')\n {\n $arrfailed = $Userchallenge->getFailedChallenges($login_user_id);\n if($arrfailed)\n {\n if(in_array($value['Challenge']['id'], $arrfailed))\n\t\t\t\t\t\t\t\t{\n $show_challenge_flag = 1;\n\t\t\t\t\t\t\t\t}\t\n }\n else\n {\n\t\t\t\t\t\t\t\t$show_challenge_flag = 1;\n }\n }\n }\n else\n {\n if(!$this->getHourMinutes($value['Challenge']['start_date'],'','hour') && $value['Challenge']['start_date'] != '0000-00-00 00:00:00')\n {\n if(!$Userchallenge->getChallengeActiveUser($value['Challenge']['id']))\n $show_challenge_flag = 1;\n }\n }\n\t\t\t\t\t\n if($show_challenge_flag == 0)\n {\n $get_host = $Userchallenge->getHostArray($value['Challenge']['id']);\n\t\t\t//echo \"<pre>\";print_r($get_host);exit;\n\t\t\t\n\t\t\tif(empty($this->session_user_id))\n\t\t\t\t$anchor = '<strong class=\"title\" style=\"line-height:1;\"><a href=\"javascript:Loginuser();\" style=\"cursor:pointer;\">';\n\t\t\telse\n\t\t\t\t$anchor = '<strong class=\"title\"><a href=\"'.Router::url('/host_challenge_step1/'.$value['Challenge']['permalink'], true).'\" style=\"cursor:pointer;\">';\n\t\t\t\n\t$fullurl = Router::url('/', true);\n\t\t\t$class = 'class=\"column-holder\"';\n\t\t\tif(count($get_host) > 1)\n\t\t\t\t\t$class = 'class=\"column-holder multi\"';\n\t\t\t$return_html .= '<div '.$class.' id=\"challenge_individual_'.$value['Challenge']['id'].'\">\n\t\t\t\t\t\t\t\t\t<article class=\"column\">\n\t\t\t\t\t\t\t\t\t<div style=\"position: absolute; z-index: 5; margin: 3px 0 0 3px;\"><img src=\"'.$fullurl.'img/catuploads/'.$value['categorie']['decal'].'\" border=\"0\" width=\"22\" /></div>\n\t\t\t\t\t\t\t\t\t<div class=\"arrow-up\" style=\"background: url(\\''.$fullurl.'img/badgecolor/'.$value['badgecombo']['comboimg'].'\\');\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"visual-block\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"'.$fullurl.'img/challengeuploads/background/'.$value['Challenge']['hero_image'].'\" width=\"710\" height=\"249\" alt=\"image description\" class=\"bg\">\n\t\t\t\t\t\t\t\t\t\t<figure><a href=\"'.Router::url('/discover/'.$value['Challenge']['permalink'], true).'\" style=\"cursor:pointer;\"><img class=\"alignleft\" src=\"'.$fullurl.'img/challengeuploads/'.$value['Challenge']['hero_image'].'\" width=\"324\" height=\"219\" alt=\"image description\"></a></figure>';\n\t\t\t$notification_time_div = '';\n\t\t\tif(count($get_host) == 0)\n\t\t\t{\n\t\t\t\t$date_flag = 1;\n\t\t\t\t$date_val = $this->getHourMinutes($value['Challenge']['start_date'],'','');\n\t\t\t\tif($value['Challenge']['start_date'] && $date_val == '')\n\t\t\t\t{\n\t\t\t\t\t$date_flag = 0;\n\t\t\t\t}\n\t\t\t\tif($date_flag == 1 || $show_challenge_flag == 0)\n\t\t\t\t{\n\t\t\t\t\t$return_html .= $anchor;\n\t\t\t\t\tif($this->session_user_id == '')\n\t\t\t\t\t\t\t$return_html .= 'Login to ';\n\t\t\t\t\t$return_html .= 'Host This.</a></strong>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$participant_host = $Userchallenge->getParticipantsArray(array('Userchallenge.user_challenge_status in (6,1)', 'Userchallenge.user_challenge_hostid' =>$get_host[0]['Userchallenge']['user_id'], 'Userchallenge.group_id' =>$get_host[0]['Userchallenge']['group_id']));\n\t\t\t\t$return_html .= '<div class=\"about\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"about-holder\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"person-info\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\"><img height=\"101\" width=\"100\" alt=\"image description\" src=\"'.$fullurl.'img/useruploads/'.$get_host[0]['user']['user_profile_picture'].'\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t<dl>\n\t\t\t\t\t\t\t\t\t\t\t\t<dt>'.ucfirst($get_host[0]['user']['user_firstname']).'</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t<dd>Host</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t<dt>+'.count($participant_host).'</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t<dd>Participants</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t</dl>\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<div class=\"persons-list\"><ul>';\n\n\t\t\t\tif($arr = $this->getHourMinutes($get_host[0]['Userchallenge']['started_date'],'','hour'))\n\t\t\t\t{\n\t\t\t\t\tif($arr['days'] == 0 && $arr['hour'] <= 3)\n\t\t\t\t\t{\n\t\t\t\t\t\t$notification_time_div = '<div class=\"notification\" style=\"display:block;background: url(\\''.$fullurl.'images/ico-44.png\\') no-repeat scroll 0 0 #8C1400;\">\n\t\t\t\t\t\t\t<p>Starts in '.$this->getHourMinutes($get_host[0]['Userchallenge']['started_date'],'','').'. Join The Challenge!</p>\n\t\t\t\t\t\t</div>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor($ps=0;$ps<count($participant_host);$ps++)\n\t\t\t\t{\n\t\t\t\t\t$return_html .= '<li><a href=\"#\"><img height=\"50\" width=\"50\" alt=\"image description\" src=\"'.$fullurl.'img/useruploads/'.$participant_host[$ps]['user']['user_profile_picture'].'\"></a></li>';\n\t\t\t\t}\n\t\t\t\t$return_html .= '</ul></div></div></div>';\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($value['Challenge']['why']) > 340) {\n\t\t\t\t$string = substr($value['Challenge']['why'], 0, 340).'...<span style=\"color:#0077C9; cursor:pointer; font-size:12px;\">read more.</span>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$string = $value['Challenge']['why'];\n\t\t\t}\n\t\t\t\t\n\t\t $return_html .= '<span class=\"label blue\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<a href=\"'.Router::url('/discover/'.$value['Challenge']['permalink'], true).'\" class=\"more\" style=\"background: url(\\''.$fullurl.'img/badgecolor/'.$value['badgecombo']['comboimg'].'\\');cursor:pointer;\">\n\t\t\t\t\t\t\t\t\t<div class=\"desctiption\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"more\" style=\"background: url(\\''.$fullurl.'img/badgecolor/'.$value['badgecombo']['comboimg'].'\\');cursor:pointer;\">more</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"txt\">\n\t\t\t\t\t\t\t\t\t\t\t\t<h2>'.$value['Challenge']['name'].'</h2>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>'.$string.'</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<ul class=\"meta\">\n\t\t\t\t\t\t\t\t\t\t<li>In <a onclick=\"showChallenge(this,\\'parent\\',\\'\\',\\''.$value['categorie']['id'].'\\')\" href=\"javascript:void(0);\">'.$value['categorie']['title'].'</a></li>\n\t\t\t\t\t\t\t\t\t\t<li class=\"difficulty\">\n\t\t\t\t\t\t\t\t\t\t\t<div style=\"margin: 0px;\"><img src=\"'. Router::url('/', true) . 'img/diffuploads/' . $value['difficulty']['decal'] .'\" border=\"0\" width=\"25\" style=\" background-color:#CCC;\" /></div>\n\t\t\t\t\t\t\t\t\t\t\t<span>'.$value['difficulty']['title'].' Difficulty</span></li>\n\t\t\t\t\t\t\t\t\t\t<li class=\"people\"><span>60 Finished This</span></li>\n\t\t\t\t\t\t\t\t\t\t<li class=\"points increase\"><span>0 Points</span></li>\n\t\t\t\t\t\t\t\t\t</ul>'.$notification_time_div.'</article>';\n\n\t\t\tif(count($get_host) > 1)\n\t\t\t{\n\t\t\t\t$return_html .= '<div class=\"open-block\">\n\t<span class=\"opener\">\n\t\t\t<a href=\"#\" class=\"open\">'.(count($get_host) - 1).' More Like This</a>\n\t\t\t<a href=\"#\" class=\"close\">Close</a>\n\t</span>\n\t<div class=\"slide\" style=\"display: block;\">\n\t\t\t<div class=\"host-block\">\n\t\t\t\t\t<div class=\"host-this\">\n\t\t\t\t\t\t\t<h2>Host This</h2>\n\t\t\t\t\t\t\t<a href=\"javascript:void(0);\" onclick=\"pickAHost(\\''.$value[\"Challenge\"][\"id\"].'\\',\\'\\',\\''.$value[\"Challenge\"][\"permalink\"].'\\')\"><img height=\"114\" width=\"113\" alt=\"image description\" src=\"images/img-42.png\"></a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"or\">or</span>\n\t\t\t\t\t<div class=\"multi-host\">\n\t\t\t\t\t\t\t<h2>Pick Host</h2><ul>';\n\t\t\t\tfor($ld=0;$ld<count($get_host);$ld++) \n\t\t\t\t{\n\t\t\t\t\tif($ld != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$paricipants_arr = $Userchallenge->getParticipantsArray(array('Userchallenge.user_challenge_status in (6,1)', 'Userchallenge.user_challenge_hostid' =>$get_host[$ld]['Userchallenge']['user_id'], 'Userchallenge.group_id' =>$get_host[$ld]['Userchallenge']['group_id']));\n\t\t\t\t\t\t$return_html .= '<li><a href=\"javascript:void(0)\" onclick=\"pickAHost(\\''.$value[\"Challenge\"][\"id\"].'\\',\\''.$get_host[$ld]['user'][\"id\"].'\\',\\''.$value[\"Challenge\"][\"permalink\"].'\\')\"><img height=\"101\" width=\"100\" alt=\"image description\" src=\"'.$fullurl.'img/useruploads/'.$get_host[$ld]['user']['user_profile_picture'].'\" ><span class=\"overlay\"><strong class=\"number\">+'.count($paricipants_arr).'</strong> Participants</span>';\n\t\t\t\t\t\t//. '<span class=\"time\"></span></a></li>';\n\t\t\t\t\t\tif($arr = $this->getHourMinutes($get_host[$ld]['Userchallenge']['started_date'],'','hour'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($arr['days'] == 0 && $arr['hour'] <= 3)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$return_html .= '<span class=\"time\"></span>';\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return_html .= '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t$return_html .= '\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t</div>\n\t</div>\n</div>';\n\t\t\t}\n\t\t\t$return_html .= '</div>';\n }\n\t\t}\n\t\tif(!$return_html)\n $return_html = '<div align=\"center\">No Challenges Found...</div>';\n\t\treturn $return_html;\n\t}", "public function listChallenges() {\n $challengeList = Challenge::all();\n $orderedList = $challengeList->sortBy(\n 'title',\n SORT_NATURAL|SORT_FLAG_CASE\n )->values()->all();\n return response()->json(['challengeList' => $orderedList], 200);\n }", "public function getChallengeFollowers($user_id)\n\t{\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'users_id' => $user_id,\n\t\t\t)\n\t\t);\n\n\t\t//Get all user's followers \n\t\t$followers = $this->findAll($c, 'follow');\n\n\t\t// Get the last challenge each followers \n\t\t// Add them in $data \n\t\tforeach ($followers as $follow) {\n\t\t\t$cfollow = array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'users_id' => $follow->user_follow,\n\t\t\t\t\t'accept' => 1\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$challenges = $this->findLast($cfollow, 'users_has_challenges');\n\n\t\t\tforeach ($challenges as $challenge) {\n\t\t\t\t$data[] = $this->load($challenge->challenges_id)[0];\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "function calculate_challenges( $args, $assoc_args ) {\n\t\tlist( $args, $assoc_args ) = $this->parse_args($args, $assoc_args);\n\t\tforeach ($args as $user_id) {\n\t\t\tWP_CLI::debug(\"User $user_id.\");\n\t\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\t\t//var_dump($customer->challenges->get_raw_challenges_for_month($this->options->date));\n\t\t\tvar_dump($customer->challenges->get_ordered_challenges_for_month($this->options->date));\n\t\t}\n\t}", "protected function process_players()\n {\n \t// Make sure we have a valid response\n \tif(!$this->hasValidResponse(self::PACKET_PLAYERS))\n \t{\n \t\treturn array();\n \t}\n\n \t// Set the result to a new result instance\n\t\t$result = new GameQ_Result();\n\n \t// Let's preprocess the rules\n \t$data = $this->preProcess_players($this->packets_response[self::PACKET_PLAYERS]);\n\n \t// Create a new buffer\n \t$buf = new GameQ_Buffer($data);\n\n \t// Make sure the data is formatted properly\n \tif(($header = $buf->read(5)) != \"\\xFF\\xFF\\xFF\\xFF\\x44\")\n \t{\n \t\tthrow new GameQ_ProtocolsException(\"Data for \".__METHOD__.\" does not have the proper header (should be 0xFF0xFF0xFF0xFF0x44). Header: \".bin2hex($header));\n \t\treturn array();\n \t}\n\n \t// Pull out the number of players\n \t$num_players = $buf->readInt8();\n\n \t // Player count\n $result->add('num_players', $num_players);\n\n // No players so no need to look any further\n \tif($num_players == 0)\n \t{\n \t\treturn $result->fetch();\n \t}\n\n // Players list\n while ($buf->getLength())\n {\n $result->addPlayer('id', $buf->readInt8());\n $result->addPlayer('name', $buf->readString());\n $result->addPlayer('score', $buf->readInt32Signed());\n $result->addPlayer('time', $buf->readFloat32());\n }\n\n unset($buf);\n\n return $result->fetch();\n }", "function getChallengeData() {\n \treturn json_decode($this->rs['json'],true);\n }", "public function parseGuildChallenge($arrInput){\n\t\t\t$arrChallengeOut\t= array();\n\t\t\tforeach($arrInput['challenge'] as $a_values){\n\t\t\t\t$a_groupout = array();\n\t\t\t\tforeach($a_values['groups'] as $a_groupid => $a_groups){\n\t\t\t\t\t$a_membersout = array();\n\t\t\t\t\tforeach($a_groups['members'] as $a_memid => $a_members){\n\t\t\t\t\t\tif(isset($a_members['character']['name']) && $a_members['character']['name'] != ''){\n\t\t\t\t\t\t\t$memberid = $this->pdh->get('member', 'id', array($a_members['character']['name']));\n\t\t\t\t\t\t\t$a_membersout[] = array(\n\t\t\t\t\t\t\t\t'name'\t\t\t=> $a_members['character']['name'],\n\t\t\t\t\t\t\t\t'realm'\t\t\t=> $a_members['character']['realm'],\n\t\t\t\t\t\t\t\t'guild'\t\t\t=> $a_members['character']['guild'],\n\t\t\t\t\t\t\t\t'class'\t\t\t=> $this->game->obj['armory']->ConvertID($a_members['character']['class'], 'int', 'classes'),\n\t\t\t\t\t\t\t\t'off_realm'\t\t=> ($this->config->get('servername') != $a_members['character']['realm']) ? true : false,\n\t\t\t\t\t\t\t\t'memberid'\t\t=> (isset($memberid) && $memberid > 0) ? $memberid : 0,\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$a_groupout[] = array(\n\t\t\t\t\t\t'name'\t\t=> $a_groups['ranking'],\n\t\t\t\t\t\t'medal'\t\t=> $a_groups['medal'],\n\t\t\t\t\t\t'faction'\t=> $a_groups['faction'],\n\t\t\t\t\t\t'date'\t\t=> $this->time->user_date($this->time->fromformat($a_groups['date'], 1)),\n\t\t\t\t\t\t'time'\t\t=> sprintf('%02d', $a_groups['time']['hours']).':'.sprintf('%02d', $a_groups['time']['minutes']).':'.sprintf('%02d', $a_groups['time']['seconds']),\n\t\t\t\t\t\t'members'\t=> $a_membersout\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$arrChallengeOut[$a_values['map']['id']] = array(\n\t\t\t\t\t'name'\t\t=> $a_values['map']['name'],\n\t\t\t\t\t'icon'\t\t=> $a_values['map']['slug'],\n\t\t\t\t\t'time'\t\t=> '',\n\t\t\t\t\t'group'\t\t=> $a_groupout\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $arrChallengeOut;\n\t\t}", "function acceptChallenge($user_id, $challenge_id, $img_url) {\n\t\t$challenge_arr = array();\n\t\t\n\t\t// get the user's name\n\t\t$query = 'SELECT `username` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t$challenger_name = mysql_fetch_object(mysql_query($query))->username; \n\t\t\n\t\t// get the subject & the id of the user that created the challenge\n\t\t$query = 'SELECT `subject_id`, `creator_id` FROM `tblChallenges` WHERE `id` = '. $challenge_id .';';\n\t\t$challenge_obj = mysql_fetch_object(mysql_query($query));\n\t\t\n\t\t// get the subject name for this challenge\n\t\t$query = 'SELECT `title` FROM `tblChallengeSubjects` WHERE `id` = '. $challenge_obj->subject_id .';';\n\t\t$subject_name = mysql_fetch_object(mysql_query($query))->title;\n\t\t\n\t\t// get the creator's device info\n\t\t$query = 'SELECT `device_token`, `notifications` FROM `tblUsers` WHERE `id` = '. $challenge_obj->creator_id .';';\t\t\t\n\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\n\t\t$isPush = ($creator_obj->notifications == \"Y\");\n\t\t\n\t\t// send push if allowed\n\t\tif ($isPush)\n\t\t\t$this->sendPush('{\"device_tokens\": [\"'. $creator_obj->device_token .'\"], \"type\":\"1\", \"aps\": {\"alert\": \"'. $challenger_name .' has accepted your '. $subject_name .' snap!\", \"sound\": \"push_01.caf\"}}'); \t\t\t\n\n\t\t// update the challenge to started\n\t\t$query = 'UPDATE `tblChallenges` SET `status_id` = 4, `challenger_id` = \"'. $user_id .'\", `challenger_img` = \"'. $img_url .'\", `updated` = NOW(), `started` = NOW() WHERE `id` = '. $challenge_id .';';\n\t\t$result = mysql_query($query);\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode(array(\n\t\t\t'id' => $challenge_id\n\t\t)));\n\t\treturn (true);\n\t}", "function update_weekly_challenge($args, $assoc_args) {\n\t\t$tz = $this->options->timezone;\n\n\t\t// For --settle, make sure default date is last week's challenge\n\t\tif (!empty($assoc_args['settle']) && empty($assoc_args['date'])) {\n\t\t\t$assoc_args['date'] = Carbon::now($tz)->subWeek()->format('Y-m-d');\n\t\t}\n\n\t\t// Handle --all in a different way, meaning all relevant users\n\t\t// (that have signed up for this challenge)\n\t\tif (!empty($assoc_args['all'])) {\n\t\t\tunset($assoc_args['all']);\n\t\t\t$date = empty($assoc_args['date']) ? Carbon::now($tz) : new Carbon($assoc_args['date'], $tz);\n\t\t\t$leaderboard = (new CBWeeklyChallenge(null, $date))->get_leaderboard();\n\t\t\tforeach ($leaderboard as $index => $row) { $args[] = strval($row->user_id); }\n\t\t}\n\n\t\tlist($args, $assoc_args) = $this->parse_args($args, $assoc_args);\n\n\t\t$results = array();\n\t\t$columns = array('user_id', 'joined', 'previous_metric_level', 'metric_level', 'error');\n\t\t$joined_challenges = array();\n\n\t\t$global_challenge = new CBWeeklyChallenge(null, $this->options->date);\n\t\tWP_CLI::debug(\"Challenge that starts $global_challenge->start and ends $global_challenge->end\");\n\n\t\t// Update each customer's progress\n\t\tforeach ($args as $user_id) {\n\t\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\t\t$challenge = new CBWeeklyChallenge($customer, $this->options->date);\n\t\t\tWP_CLI::debug(\"\\tCustomer $user_id...\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif ($challenge->user_has_joined) {\n\t\t\t\t\t$joined_challenges[] = $challenge;\n\t\t\t\t\tWP_CLI::debug(\"\\t\\t-> fetching progress\");\n\t\t\t\t\t$challenge->fetch_user_progress();\n\t\t\t\t\tif (!$this->options->pretend) {\n\t\t\t\t\t\tWP_CLI::debug(\"\\t\\t-> saving progress\");\n\t\t\t\t\t\t$challenge->save_user_progress();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!$this->options->pretend && $this->options->force) {\n\t\t\t\t\t\tWP_CLI::debug(\"\\t\\t-> fetching progress\");\n\t\t\t\t\t\t$challenge->fetch_user_progress();\n\t\t\t\t\t\tWP_CLI::debug(\"\\t\\t-> saving progress\");\n\t\t\t\t\t\t$challenge->save_user_progress();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'joined' => $challenge->user_has_joined ? 'true' : 'false',\n\t\t\t\t\t'previous_metric_level' => $challenge->previous_metric_level,\n\t\t\t\t\t'metric_level' => $challenge->metric_level,\n\t\t\t\t\t'error' => null,\n\t\t\t\t);\n\t\t\t} catch (FitbitNeedsAuth $e) {\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'joined' => $challenge->user_has_joined ? 'true' : 'false',\n\t\t\t\t\t'previous_metric_level' => $challenge->previous_metric_level,\n\t\t\t\t\t'metric_level' => $challenge->metric_level,\n\t\t\t\t\t'error' => $e->getMessage(),\n\t\t\t\t);\n\t\t\t} catch (League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'joined' => $challenge->user_has_joined ? 'true' : 'false',\n\t\t\t\t\t'previous_metric_level' => $challenge->previous_metric_level,\n\t\t\t\t\t'metric_level' => $challenge->metric_level,\n\t\t\t\t\t'error' => $e->getMessage(),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// For the --settle option, we calculate their leaderboard as well\n\t\t// and generate the winners list.\n\t\t// NOTE: This relies on fetch_user_progress() and save_user_progress()\n\t\t// being called for each user above to generate a consistent\n\t\t// leaderboard.\n\t\tif ($this->options->settle) {\n\n\t\t\t$segment = new CBSegment();\n\n\t\t\tforeach ($joined_challenges as $challenge) {\n\t\t\t\tWP_CLI::debug(\"\\tSettling customer \" . $challenge->customer->get_user_id() . \"...\");\n\n\t\t\t\t// Use the already cached copy of the leaderboard to avoid db calls\n\t\t\t\t$challenge->get_leaderboard($global_challenge->get_leaderboard());\n\n\t\t\t\t// Prepare analytics/email trigger data\n\t\t\t\t$rank = $challenge->get_rank();\n\t\t\t\t$params = array(\n\t\t\t\t\t'participants' => sizeof($challenge->get_leaderboard()),\n\t\t\t\t\t'rank' => $rank,\n\t\t\t\t\t'rank_ordinal' => CB::ordinal($rank),\n\t\t\t\t\t'rank_emoji' => $challenge->emoji_for_rank($rank),\n\t\t\t\t\t'rank_points' => $challenge->points_for_rank($rank),\n\t\t\t\t\t'leaderboard_html' => $challenge->render_leaderboard(true),\n\t\t\t\t);\n\n\t\t\t\t// Apply points \n\t\t\t\tif (!$this->options->pretend && !$this->options->no_points) {\n\t\t\t\t\tWP_CLI::debug(\"\\t\\t-> applying points\");\n\t\t\t\t\t$challenge->apply_points();\n\t\t\t\t}\n\n\t\t\t\t// Send analytics event\n\t\t\t\tWP_CLI::debug(\"\\t\\t-> sending analytics event\");\n\t\t\t\t$segment->track($challenge->customer, 'Completed Weekly Challenge', $params, $this->options->pretend);\n\t\t\t\t$segment->flush();\n\t\t\t}\n\n\t\t\tif (!$this->options->pretend) {\n\t\t\t\t$global_challenge->settled = true;\n\t\t\t\t$global_challenge->save_global();\n\t\t\t}\n\n\t\t}\n\n\t\tif (sizeof($results))\n\t\t\tWP_CLI\\Utils\\format_items($this->options->format, $results, $columns);\n\t}", "public function getInvitation($user_id) {\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'users_id' => $user_id,\n\t\t\t)\n\t\t);\n\n\t\t//Get all challenge's participant\n\t\t$challenges = $this->findAll($c, 'users_has_challenges');\n\n\t\t$i = 0;\n\t\tforeach ($challenges as $challenge) {\n\t\t\t$data[] = $this->load($challenge->challenges_id)[0];\n\t\t\t$data[$i]['sender'] += $this->load($challenge->sender, 'users')[0];\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function incoming(): array{\n $columns = \"gameId, player1, challengeId\";\n $where = \"player2 = ?\";\n $bindings = array($this->user->getUserName());\n $result = $this->database->select($this->table, $columns, $where, $bindings);\n $incoming = array();\n\n if($result->rowCount() > 0){\n while($rows = $result->fetch()){\n //Make sure, this game is still pending and has not started game yet and the challenger's last activity must be less than 5 minutes\n if(is_null($rows[\"gameId\"]) && $this->userLastActivityModel->isTimestampValidate($rows[\"player1\"])){\n $challengerName = $this->profileModel->getFirstName($rows[\"player1\"]) . \" \" . $this->profileModel->getLastName($rows[\"player1\"]);\n $incoming[] = [\n 'player1' => $challengerName,\n 'challengeId' => $rows[\"challengeId\"]\n ];\n }\n }\n }\n return $incoming;\n }", "protected function generate_init_expected_data_array(\n $gameId, $username1, $username2, $maxWins, $gameState\n ) {\n $playerId1 = $this->user_ids[$username1];\n $playerId2 = $this->user_ids[$username2];\n $expData = array(\n 'gameId' => $gameId,\n 'gameState' => $gameState,\n 'activePlayerIdx' => NULL,\n 'playerWithInitiativeIdx' => NULL,\n 'roundNumber' => 1,\n 'maxWins' => $maxWins,\n 'description' => '',\n 'previousGameId' => NULL,\n 'currentPlayerIdx' => 0,\n 'timestamp' => 'TIMESTAMP',\n 'validAttackTypeArray' => array(),\n 'gameSkillsInfo' => array(),\n 'playerDataArray' => array(\n array(\n 'playerId' => $playerId1,\n 'capturedDieArray' => array(),\n 'outOfPlayDieArray' => array(),\n 'swingRequestArray' => array(),\n 'optRequestArray' => array(),\n 'prevSwingValueArray' => array(),\n 'prevOptValueArray' => array(),\n 'turboSizeArray' => array(),\n 'waitingOnAction' => TRUE,\n 'roundScore' => NULL,\n 'sideScore' => NULL,\n 'gameScoreArray' => array('W' => 0, 'L' => 0, 'D' => 0),\n 'lastActionTime' => 'TIMESTAMP',\n 'hasDismissedGame' => FALSE,\n 'canStillWin' => NULL,\n 'playerName' => $username1,\n 'playerColor' => '#dd99dd',\n 'isOnVacation' => false,\n 'isChatPrivate' => false,\n ),\n array(\n 'playerId' => $playerId2,\n 'capturedDieArray' => array(),\n 'outOfPlayDieArray' => array(),\n 'swingRequestArray' => array(),\n 'optRequestArray' => array(),\n 'prevSwingValueArray' => array(),\n 'prevOptValueArray' => array(),\n 'turboSizeArray' => array(),\n 'waitingOnAction' => TRUE,\n 'roundScore' => NULL,\n 'sideScore' => NULL,\n 'gameScoreArray' => array('W' => 0, 'L' => 0, 'D' => 0),\n 'lastActionTime' => 'TIMESTAMP',\n 'hasDismissedGame' => FALSE,\n 'canStillWin' => NULL,\n 'playerName' => $username2,\n 'playerColor' => '#ddffdd',\n 'isOnVacation' => false,\n 'isChatPrivate' => false,\n ),\n ),\n 'creatorDataArray' => array(\n 'creatorId' => $playerId1,\n 'creatorName' => $username1,\n ),\n 'gameActionLog' => array(\n array('timestamp' => 'TIMESTAMP', 'player' => '', 'message' => 'Game created by ' . $username1),\n ),\n 'gameActionLogCount' => 1,\n 'gameChatLog' => array(),\n 'gameChatLogCount' => 0,\n 'gameChatEditable' => FALSE,\n 'dieBackgroundType' => 'realistic',\n );\n return $expData;\n }", "protected function getAllDatas()\n {\n $result = array();\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n \n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n\n // if($this->gamestate->state()[\"name\"] == \"selectSoldier\") {\n $sql = \"SELECT soldier_id id, soldier_type type, soldier_name name FROM soldier WHERE player_id = $current_player_id\";\n $result['hand'] = self::getCollectionFromDb( $sql );\n // }\n \n if($current_player_id == self::getActivePlayerId()) {\n $ChosenSoldierId = self::getGameStateValue( 'ChosenSoldierId' );\n $result['ChosenSoldierId'] = $ChosenSoldierId;\n }\n else {\n $result['ChosenSoldierId'] = $this->NO_SOLIDER_ID;\n }\n\n if($this->gamestate->state()[\"name\"] == \"initBoard\") {\n $result['soldier_counter'] = self::getObjectListFromDB(\n \"SELECT *\n FROM soldiercounter\n WHERE player_id = $current_player_id\");\n\n $result['opponent_soldiers'] = [];\n }\n else {\n $result['soldier_counter'] = self::getObjectListFromDB(\n \"SELECT *\n FROM soldiercounter\" );\n\n $result['opponent_soldiers'] = self::getObjectListFromDB(\n \"SELECT soldier_id id, board_x x, board_y y\n FROM board\n WHERE (board_player <> $current_player_id && board_player != 0) \" );\n }\n\n $result['player_soldiers'] = self::getObjectListFromDB(\n \"SELECT soldier_id id, board_x x, board_y y, soldier_type type\n FROM board\n WHERE board_player = $current_player_id \" );\n\n //If your are the second player, invert the board to see soldier at bottom\n if($current_player_id == self::getGameStateValue( 'SecondPlayerID' )) {\n foreach($result['opponent_soldiers'] as &$opponent_soldier) {\n $opponent_soldier['y'] = strval($this->NB_LINES - (int)$opponent_soldier['y']);\n }\n\n foreach($result['player_soldiers'] as &$player_soldier) {\n $player_soldier['y'] = strval($this->NB_LINES - (int)$player_soldier['y']);\n }\n }\n\n return $result;\n }", "function getUserExperiments($user_id){\n $query1\t= \"SELECT Experiments.*, DataSources.`name`,DataSources.`URL` FROM `data_sources` DataSources, `experiments` Experiments \n\t\t\t WHERE Experiments.user_id='\".$user_id.\"' AND DataSources.`db_name`=Experiments.`used_plaza_database`\n\t\t\t ORDER BY Experiments.`last_edit_date` DESC\";\n $res1\t= $this->query($query1);\n $res\t= array();\n foreach($res1 as $r){\n $exp_id\t= $r['Experiments']['experiment_id'];\n $query2\t= \"SELECT COUNT(`transcript_id`) as count FROM `transcripts` WHERE `experiment_id`='\".$exp_id.\"' \";\n $res2\t= $this->query($query2);\n $r[0]\t= $res2[0][0];\n \n\n $query3 \t= \"SELECT * FROM `experiment_jobs` WHERE `experiment_id`='\".$exp_id.\"'\";\n $res3\t= $this->query($query3);\n $rese3\t= array();\n foreach($res3 as $r3){\n\t$rese3[] = $r3['experiment_jobs'];\n }\n $r['experiment_jobs'] = $rese3;\n $res[] \t= $r;\n } \n return $res;\n }", "function getChallenge($id) {\r\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"challenges` WHERE id = '$id'\");\r\n\t\t\t $league_id\t\t= $data['0']['league_id'];\r\n\t\t\t $challenger_id = $data['0']['challenger'];\r\n\t\t\t $challengee_id = $data['0']['challengee'];\r\n\t\t\t $challenger = ezLeaguePub::getTeamName($challenger_id);\r\n\t\t\t $challengee = ezLeaguePub::getTeamName($challengee_id);\r\n\t\t\t $challenger_admin = ezLeaguePub::getTeamAdmin($challenger_id);\r\n\t\t\t $challengee_admin = ezLeaguePub::getTeamAdmin($challengee_id);\r\n\t\t\t if($data['0']['match_date'] != '') { \r\n\t\t\t \t$match_date = date('F d, Y h:ia', strtotime($data['0']['match_date']));\r\n\t\t\t \t if($data['0']['match_hour'] != 0) { \r\n\t\t\t \t \t$match_hour = (strlen($data['0']['match_hour']) == 1 ? '0' . $data['0']['match_hour'] : $data['0']['match_hour']);\r\r\n\t\t\t \t \t$match_min = (strlen($data['0']['match_min']) == 1 ? '0' . $data['0']['match_min'] : $data['0']['match_min']);\r\r\n\t\t\t \t \t$match_time = $match_hour . \":\" . $match_min . \"\" . $data['0']['match_pod'] . \" \" . $data['0']['match_zone'];\r\n\t\t\t \t } else {\r\n\t\t\t\t\t$match_time = 'Match Time Not Set';\r\n\t\t\t \t }\r\n\t\t\t } else {\r\n\t\t\t \t$match_date = 'Match Date Not Set';\r\n\t\t\t \t $match_time = '';\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t $match_completed = $data['0']['completed'];\r\n\t\t\t $match_status = '';\r\n\t\t\t if($match_completed == 1) {\r\n\t\t\t\t\t$match_status = 'Completed';\r\n\t\t\t\t\t$match_completed = 1;\r\n\t\t\t } else {\r\n\t\t\t \t $challenge_status = ezLeaguePub::getChallengeStatus($id);\r\n\t\t \t\t\t switch($challenge_status) {\r\n\t\t \t\t\t \tcase '0':\r\n\t\t \t\t\t \t\t$match_status = 'Pending';\r\n\t\t \t\t\t \t\tbreak;\r\n\t\t \t\t\t \tcase '1':\r\n\t\t \t\t\t \t\t$match_status = 'Accepted';\r\n\t\t \t\t\t \t\tbreak;\r\n\t\t \t\t\t \tcase '2':\r\n\t\t \t\t\t \t\t$match_status = 'Rejected';\r\n\t\t \t\t\t \t\tbreak;\r\n\t\t \t\t\t \tdefault:\r\n\t\t \t\t\t \t\t$match_status = 'Pending';\r\n\t\t \t\t\t \t\tbreak;\r\n\t\t \t\t\t }\r\n\t\t \t\t\t $match_completed = 0;\r\n\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t $challenge = array(\r\n\t\t\t\t \t\t\t\t 'match_created'\t => date('F d, Y', strtotime($data['0']['created'])),\r\n\t\t\t\t \t\t\t\t\t'match_date' \t => $match_date, \r\n\t\t\t\t \t\t\t\t\t'match_time'\t => $match_time,\r\n\t\t\t\t \t\t\t\t\t'match_status'\t => $match_status,\r\n\t\t\t\t \t\t\t\t\t'challengee'\t => $challengee,\r\n\t\t\t\t \t\t\t\t\t'challengee_id' => $challengee_id,\r\n\t\t\t\t \t\t\t\t\t'challengee_admin' => $challengee_admin,\r\n\t\t\t\t \t\t\t\t\t'challenger'\t \t => $challenger,\r\n\t\t\t\t \t\t\t\t\t'challenger_id' \t => $challenger_id,\r\n\t\t\t\t \t\t\t\t\t'challenger_admin' \t => $challenger_admin,\r\n\t\t\t\t \t\t\t\t\t'challenger_accepted' => $data['0']['challenger_accepted'],\r\n\t\t\t\t \t\t\t\t\t'challengee_accepted' => $data['0']['challengee_accepted'],\r\n\t\t\t\t \t\t\t\t\t'match_completed' => $match_completed,\r\n\t\t\t\t \t\t\t\t\t'league_id'\t\t\t => $league_id\r\n\t\t\t\t \t\t\t\t\t);\r\n\t\t\t return $challenge;\r\n\t\t}", "protected function getAllDatas()\r\n {\r\n $result = array();\r\n \r\n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\r\n \r\n // Get information about players\r\n $sql = \"SELECT player_id id, player_score score, player_score_aux swing_counties FROM player\";\r\n $result['players'] = self::getCollectionFromDb( $sql );\r\n \r\n // TODO: Gather all information about current game situation (visible by player $current_player_id).\r\n $result['counties'] = self::getObjectListFromDB(\r\n \"SELECT coord_x x, coord_y y, county_player color, county_lean val, district district_id, district_placement place FROM counties\");\r\n $result['edges'] = self::getEdgesAsObjectList();\r\n $result['districts'] = self::getCollectionFromDb(\r\n \"SELECT id, player_color FROM districts\", true);\r\n \r\n return $result;\r\n }", "protected function getAllDatas()\n {\n $result = array();\n \n $current_player_id = strval(self::getCurrentPlayerId()); // !! We must only return informations visible by this player !!\n \n \n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n \n $r = self::loadState();\n $board = $r[1];\n $pboard = SharedServer___privateUndoableBoard($current_player_id, $board);\n\n\n\n $result['board'] = convertToSimpleJson(Shared_002EBoardModule___toUndoState($pboard));\n $result['version'] = $r[0];\n\n // TODO: Gather all information about current game situation (visible by player $current_player_id).\n \n return $result;\n }", "function getSnappedUsers($user_id) {\n\t\t\t\n\t\t\t// return object\n\t\t\t$user_arr = array();\n\t\t\t\n\t\t\t// list of user ids\n\t\t\t$userID_arr = array();\n\t\t\t\n\t\t\t\n\t\t\t// get the previous challengers\n\t\t\t$query = 'SELECT `challenger_id` FROM `tblChallenges` WHERE `challenger_id` != 0 AND `creator_id` = '. $user_id .' ORDER BY `updated` DESC LIMIT 8;';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// loop thru result ids\n\t\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t$isFound = false;\n\t\t\t\t\n\t\t\t\t// check for an id already in array\n\t\t\t\tforeach ($userID_arr as $key => $val) {\n\t\t\t\t\tif ($val == $row['challenger_id']) {\n\t\t\t\t\t\t$isFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$isFound)\n\t\t\t\t\tarray_push($userID_arr, $row['challenger_id']);\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t// get the previous challenge creators\n\t\t\t$query = 'SELECT `creator_id` FROM `tblChallenges` WHERE `challenger_id` = '. $user_id .' ORDER BY `updated` DESC LIMIT 8;';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// loop thru result ids\n\t\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t$isFound = false;\n\t\t\t\t\n\t\t\t\t// check for an id already in array\n\t\t\t\tforeach ($userID_arr as $key => $val) {\n\t\t\t\t\tif ($val == $row['creator_id']) {\n\t\t\t\t\t\t$isFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$isFound)\n\t\t\t\t\tarray_push($userID_arr, $row['creator_id']);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// get the user for each id\n\t\t\tforeach ($userID_arr as $key => $val)\n\t\t\t\tarray_push($user_arr, $this->userForSearchResult($val));\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\t$this->sendResponse(200, json_encode($user_arr));\n\t\t\treturn (true);\n\t\t}", "public function solveChallengePackets()\n {//N2w::solveChallengePackets();\n /**\n * take in the key and value for each,\n * read create schemas\n * call approriate methods\n * then get the strings\n *\n */\n\n foreach($this->challenge_packets['refined_packets_r'] as $key=>$val){\n //echo \"<br /> $key => $val\";\n $this->solution_packets[$key]['challenge'] = $val;\n $this->solution_packets[$key]['class_name'] = $key;\n $this->solution_packets[$key]['schema'] = $this->getPacketSchema($val);\n $this->solution_packets[$key]['words'] = $this->announcePacket($val);\n $this->solution_packets[$key]['resolved'] = ($this->announcePacket($val))? true:false;\n\n }\n\n\n }", "public function getParticipantsOfTeamChallenge($timeID)\n {\n $this->db->where('timeID', $timeID);\n\n $query = $this->db->get('times');\n\n $searchQuery=$query->row_array();\n\n unset($searchQuery['timeID']);\n unset($searchQuery['cisID']);\n unset($searchQuery['comment']);\n unset($searchQuery['status']);\n unset($searchQuery['teamChallenge']);\n\n $this->db->like($searchQuery);\n\n $results=$this->db->get('times');\n\n $results=$results->result_array();\n\n\n $cisArray=array();\n\n foreach ($results as $value){\n array_push($cisArray,$value['cisID']);\n }\n return $cisArray;\n }", "function queryContestData() {\n global $contest;\n $problems = array();\n $prob_pos = array();\n $n_problems = 0;\n $result = mysql_query(\"select problem_id from contests_problems where contest_id = ${contest['id']} order by problem_id\");\n while ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n $prob_pos[$problems[] = (int)$row[0]] = $n_problems++;\n }\n\n $data = array();\n if ($contest['cur_progress'] < CONTEST_FINISHED) {\n $result = mysql_query(\"select id, submit_time, submitter, problem_id, score from submissions where contest_id = {$contest['id']} and score is not null order by id\");\n } else {\n $result = mysql_query(\"select submission_id, date_add('{$contest['start_time_str']}', interval penalty second), submitter, problem_id, score from contests_submissions where contest_id = {$contest['id']}\");\n }\n while ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n $row[0] = (int)$row[0];\n $row[3] = $prob_pos[$row[3]];\n $row[4] = (int)$row[4];\n $data[] = $row;\n }\n\n $people = array();\n $result = mysql_query(\"select contests_registrants.username, contests_registrants.user_rating, user_info.school,user_info.grade,user_info.real_name from contests_registrants inner join user_info where contest_id = {$contest['id']} and has_participated = 1 and contests_registrants.username = user_info.username\");\n while ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n $row[1] = (int)$row[1];\n $people[] = $row;\n }\n\n return array('problems' => $problems, 'data' => $data, 'people' => $people);\n }", "public function getProfileChallenge($user_id)\n {\n App::import('Model', 'Userchallenge');\n $Userchallenge = new Userchallenge();\n return $this->getProfileHtml($Userchallenge->getChallengeHostArray(array('Userchallenge.user_challenge_status' => '1','Userchallenge.user_id' => $user_id)), 'Active').$this->getProfileHtml($Userchallenge->getChallengeHostArray(array('Userchallenge.user_challenge_status in (0,6)','Userchallenge.user_id' => $user_id)), 'Upcoming').$this->getProfileHtml($Userchallenge->getChallengeHostArray(array('Userchallenge.user_challenge_status' => '2','Userchallenge.user_id' => $user_id)), 'Completed');\n \n }", "public function get_challenges($params=array(),$time = 3600)\n {\n $this->token_checker();\n\n $call = \"challenges\";\n\n if(!empty($params))\n {\n $call .= '?' . http_build_query($params);\n }\n \n $key = ($call.$this->_hash);\n $this->_api_headers();\n $url = $this->_apiUrl .$call;\n $this->_call_api($url, 'GET');\n $result = $this->result;\n\n return $result;\n }", "protected function process_all()\n\t{\n\t\tif(!$this->hasValidResponse(self::PACKET_ALL))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Set the result to a new result instance\n\t\t$result = new GameQ_Result();\n\n\t\t// Parse the response\n\t\t$data = $this->preProcess_all($this->packets_response[self::PACKET_ALL]);\n\n\t\t// Create a new buffer\n\t\t$buf = new GameQ_Buffer($data);\n\n\t\t// Header\n if ($buf->readInt16() !== 65535 or $buf->readString() !== 'infoResponse')\n {\n throw new GameQ_ProtocolsException('Header for response does not match. Buffer:'.$this->packets_response[self::PACKET_ALL]);\n return array();\n }\n\n $result->add('version', $buf->readInt8() . '.' . $buf->readInt8());\n\n // Var / value pairs, delimited by an empty pair\n while ($buf->getLength())\n {\n $var = $buf->readString();\n $val = $buf->readString();\n\n // Something is empty so we are done\n if (empty($var) && empty($val))\n {\n \tbreak;\n }\n\n $result->add($var, $val);\n }\n\n // Now lets parse the players\n\t\t$this->parsePlayers($buf, $result);\n\n\t\tunset($buf, $data);\n\n\t\t// Return the result\n\t\treturn $result->fetch();\n\t}", "public function jsonSerialize(): array\n {\n $data = [\n 'challenge' => $this->challenge(),\n ];\n\n if (! is_null($rpId = $this->rpId())) {\n $data['rpId'] = $rpId;\n }\n\n if (! is_null($timeout = $this->timeout())) {\n $data['timeout'] = $timeout;\n }\n\n if (count($allowCredentials = $this->allowCredentials()->jsonSerialize()) > 0) {\n $data['allowCredentials'] = $allowCredentials;\n }\n\n $userVerification = $this->userVerification();\n if ($userVerification !== UserVerificationRequirement::PREFERRED) {\n $data['userVerification'] = $userVerification->value;\n }\n\n if (count($extensions = $this->extensions()->all()) > 0) {\n $data['extensions'] = $extensions;\n }\n\n return $data;\n }", "public function fetchAllCompetionTeams()\n\t{\n\t\t# get all resgistered players\n\t\t$fetch = \"SELECT competition_teams.id, competitions.competition_name, teams.team_name FROM competition_teams LEFT JOIN teams ON competition_teams.team_id = teams.id LEFT JOIN competitions ON competition_teams.competition_id = competitions.id ORDER BY competition_teams.id DESC\";\n\t\t$result = mysqli_query($this->plug, $fetch);\n\t\t$totalRecords = mysqli_num_rows($result);\n\n\t\tif($totalRecords > 0){\n\t\t\t$data = [];\n\t\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t\t# code...\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}else{\n\t\t\t$data = [];\n\t\t\treturn $data;\n\t\t}\n\t}", "public function prepareAll(array $challenges)\r\n {\r\n $result = array();\r\n foreach ($challenges as $challenge) {\r\n $result[] = $challenge->prepare();\r\n }\r\n\r\n return $result;\r\n }", "public function fetch_locked_continents($user_id)\n\t{\n\t\t$continent_sql = \"SELECT c.* FROM user_entry as ue LEFT JOIN location as l\n ON ue.location_id=l.location_id LEFT JOIN continent as c ON c.continent_id = l.continent_id where ue.user_id='\".$user_id.\"'\";\n\t\t$continent_data=$this->db->get_results($continent_sql);\n\t\tforeach($continent_data as $cont_data)\n\t\t{\n\t\t\t$cont_data_arr[]= array('continent_id'=>$cont_data->continent_id,'continent_name'=>$cont_data->continent_name);\n\t\t\t\n\t\t}\n\n\t\treturn $cont_data_arr;\n\t}", "function submitChallengeWithUsername($user_id, $subject, $img_url, $username) {\n\t\t$challenge_arr = array();\n\t\t\n\t\t// get the targeted user's info\n\t\t$query = 'SELECT `id` FROM `tblUsers` WHERE `username` = \"'. $username .'\";';\n\t\t$challenger_result = mysql_query($query);\n\t\t\n\t\t// user was found based on username\n\t\tif (mysql_num_rows($challenger_result) > 0) {\t\t\t\n\t\t\t$challenger_id = mysql_fetch_object($challenger_result)->id;\n\t\t\t\n\t\t\t// look for default users\n\t\t\t\n\t\t\t// get the subject id for the subject name\n\t\t\t$subject_id = $this->submitSubject($user_id, $subject);\n\t\t\t\n\t\t\t// get the user's info as the creator\n\t\t\t$query = 'SELECT `username`, `fb_id`, `points` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\t\t\t\t\n\t\t\t$points = $creator_obj->points;\n\t\t\t\n\t\t\t// increment the points\n\t\t\t$query = 'UPDATE `tblUsers` SET `points` = \"'. ($points + 1) .'\" WHERE `id` ='. $user_id .';';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// add the new challenge\n\t\t\t$query = 'INSERT INTO `tblChallenges` (';\n\t\t\t$query .= '`id`, `status_id`, `subject_id`, `creator_id`, `creator_img`, `challenger_id`, `challenger_img`, `hasPreviewed`, `votes`, `updated`, `started`, `added`) ';\n\t\t\t$query .= 'VALUES (NULL, \"2\", \"'. $subject_id .'\", \"'. $user_id .'\", \"'. $img_url .'\", \"'. $challenger_id .'\", \"\", \"N\", \"0\", NOW(), NOW(), NOW());';\n\t\t\t$result = mysql_query($query);\n\t\t\t$challenge_id = mysql_insert_id();\n\t\t\t\n\t\t\t// get targeted user's info for push\n\t\t\t$query = 'SELECT `device_token`, `username`, `fb_id`, `notifications` FROM `tblUsers` WHERE `id` = '. $challenger_id .';';\n\t\t\t$challenger_obj = mysql_fetch_object(mysql_query($query));\n\t\t\t\n\t\t\t// send push if allowed\n\t\t\tif ($challenger_obj->notifications == \"Y\")\n\t\t\t\t$this->sendPush('{\"device_tokens\": [\"'. $challenger_obj->device_token .'\"], \"type\":\"1\", \"aps\": {\"alert\": \"'. $creator_obj->username .' has sent you a '. $subject .' snap!\", \"sound\": \"push_01.caf\"}}');\n\t\t \n\t\t\t// get the newly created challenge\n\t\t\t$challenge_arr = $this->getChallengeObj($challenge_id);\n\t\t\t\n\t\t\t\n\t\t\t// auto-accept if sent to default user\n\t\t\t$this->acceptChallengeAsDefaultUser($challenge_id);\n\t\t\t\n\t\t\n\t\t// couldn't find this user\n\t\t} else\n\t\t\t$challenge_arr = array(\"result\" => \"fail\");\t\t\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "function getChallengesForUserBeforeDate($user_id, $prevIDs, $date) {\n\t\t$prevID_arr = explode('|', $prevIDs);\n\t\t\n\t\t\n\t\t// get list of past opponents & loop thru\n\t\t$opponentID_arr = $this->challengeOpponents($user_id);\n\t\t\n\t\t// loop thru prev id & remove from opponent array\n\t\tforeach($prevID_arr as $key => $val) {\n\t\t\t$ind = array_search($val, $opponentID_arr);\n\t\t\t\n\t\t\t// check against previous opponents\n\t\t\tif (is_numeric($ind))\n\t\t\t\tarray_splice($opponentID_arr, $ind, 1);\n\t\t}\n\n\t\t// loop thru opponents & build paired array\n\t\tforeach($opponentID_arr as $key => $val) {\n\t\t\t\n\t\t\t// check against previous opponents\n\t\t\tif (count($this->challengesWithOpponent($user_id, $val, $date)) > 0)\n\t\t\t\t$opponentChallenges_arr[$user_id .'_'. $val][] = $this->challengesWithOpponent($user_id, $val, $date);\n\t\t}\n\t\t\n\t\t\n\t\t// loop thru each paired match & pull off most recent\n\t\t$challengeID_arr = array();\n\t\tforeach($opponentChallenges_arr as $key => $val) \n\t\t\tarray_push($challengeID_arr, key($val[0]));\n\t\t\t\n\t\t\n\t\t// sort by date asc, then reverse to go desc\n\t\tasort($challengeID_arr);\n\t\t$challengeID_arr = array_reverse($challengeID_arr, true);\n\t\t\n\t\t\n\t\t// loop thru the most resent challenge ID per creator/challenger match\n\t\t$cnt = 0;\n\t\t$challenge_arr = array();\n\t\tforeach ($challengeID_arr as $key => $val) {\n\t\t\tarray_push($challenge_arr, $this->getChallengeObj($val));\n\t\t\t\n\t\t\t// stop at 10\n\t\t\tif (++$cnt == 10)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "function get_all_xprofile_contributor_hours_teams() : array {\n\tglobal $wpdb;\n\n\t// This might need a `LIMIT` in the future as more users save values, but it's performant as of August 2022.\n\t// `LIMIT`ing it would require batch processing, which would add a significant amount of complexity.\n\t// A better alternative might be to add a cron job to delete rows from `bpmain_bp_xprofile_data` where\n\t// `hours_per_week` is < 1, or `teams_names` is a (serialized) empty array. BuddyPress saves those as\n\t// values rather than deleting them, and that significantly increases the number of rows returned.\n\t$users = $wpdb->get_results( $wpdb->prepare( '\n\t\tSELECT user_id, GROUP_CONCAT( field_id ) AS field_ids, GROUP_CONCAT( value ) AS field_values\n\t\tFROM `bpmain_bp_xprofile_data`\n\t\tWHERE field_id IN ( %d, %d )\n\t\tGROUP BY user_id',\n\t\tFIELD_IDS['hours_per_week'],\n\t\tFIELD_IDS['team_names']\n\t) );\n\n\t$field_names = array_flip( FIELD_IDS );\n\n\tforeach ( $users as $user_index => & $user ) {\n\t\t$fields = explode( ',', $user->field_ids );\n\t\t$values = explode( ',', $user->field_values );\n\n\t\tforeach ( $fields as $field_index => $id ) {\n\t\t\t/*\n\t\t\t * BuddyPress validates the team name(s) the user provides before saving them in the database, so\n\t\t\t * it should be safe to unserialize, and to assume that they're valid.\n\t\t\t *\n\t\t\t * The database stores team _names_ rather than _IDs_, though, so if a team is ever renamed, this\n\t\t\t * data will be distorted.\n\t\t\t */\n\t\t\t$user->{$field_names[ $id ]} = maybe_unserialize( $values[ $field_index ] );\n\t\t}\n\t\tunset( $user->field_ids, $user->field_values ); // Remove the concatenated data now that it's exploded.\n\n\t\t$user->user_id = absint( $user->user_id );\n\t\t$user->hours_per_week = absint( $user->hours_per_week ?? 0 );\n\t\t$user->team_names = (array) ( $user->team_names ?? array() );\n\n\t\tif ( 0 >= $user->hours_per_week || empty( $user->team_names ) ) {\n\t\t\tunset( $users[ $user_index ] );\n\t\t}\n\t}\n\n\treturn $users;\n}", "public function all() {\n $stmt = $this->pdo->query('SELECT file_data, first_name, last_name, player_status, positions, department, player_number, player_height, player_weight, age, experience, college, employee_id '\n . 'FROM players ');\n $players = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $players[] = [\n 'file_data' => $row['file_data'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'player_status' => $row['player_status'],\n 'positions' => $row['positions'],\n 'department' => $row['department'],\n 'player_number' => $row['player_number'],\n 'player_height' => $row['player_height'],\n 'player_weight' => $row['player_weight'],\n 'age' => $row['age'],\n 'experience' => $row['experience'],\n 'college' => $row['college'],\n 'employee_id' => $row['employee_id']\n ];\n }\n return $players;\n }", "function Fetch_Multiple($track_keys)\n\t\t{\n\t\t\t$return_data = array();\n\t\t\t\n\t\t\tforeach ($track_keys as $track_key)\n\t\t\t{\n\t\t\t\t// This is where you query your database and get the user information for Nirvana\n\t\t\t\t$return_data[$track_key] = \n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name_first' => 'John',\n\t\t\t\t\t\t'name_last' => 'Hargrove'\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $return_data;\n\t\t}", "private function initGame() {\n return [\n \"status\" => self::STARTED,\n \"winner\" => null,\n \"players\" => [\n \"human\" => [\n \"name\" => \"human\",\n \"stats\" => [\n \"maxHp\" => 12,\n \"hp\" => 12,\n \"strength\" => 1,\n \"agility\" => 2, \n ], \n \"weapon\" => [\n \"max_damage\" => 6,\n \"attack\" => 2,\n \"defense\" => 1\n ]\n ],\n \"orc\" => [\n \"name\" => \"orc\",\n \"stats\" => [\n \"maxHp\" => 20,\n \"hp\" => 20,\n \"strength\" => 2,\n \"agility\" => 0, \n ],\n \"weapon\" => [\n \"max_damage\" => 8,\n \"attack\" => 1,\n \"defense\" => 0\n ]\n ]\n ]\n ];\n }", "public function getByUser($user, $challenge=null)\r\n\t{\r\n\t\t$scores = [\r\n\t\t\t'week' => $this->getByUserAndPeriode($user,'week'),\r\n\t\t\t'month' => $this->getByUserAndPeriode($user,'month'),\r\n\t\t\t'total' => $this->getByUserAndPeriode($user),\r\n\t\t];\r\n\t\tif($challenge)\r\n\t\t\t$scores['challenge'] = $this->getByUserAndChallenge($user,$challenge);\r\n\t\treturn $scores;\r\n\r\n\t}", "protected function getAllDatas()\n {\n $result = array();\n $result['shiporder'] = JSON::read('playerorderround');\n $result['diceboard'] = self::getDiceboard();\n $result['playerdice'] = self::getPlayerDice();\n $result['blackhole'] = self::getBlackhole();\n $result['markerposition'] = self::getGameStateValue('markerPosition');\n $result['engineeringTrack'] = Track::getTrackForClient('engineeringTrack'); \n $result['initiativeTrack'] = Track::getTrackForClient('initiativeTrack');\n $result['playerpoints'] = JSON::read('playerpoints');\n $result['shippositions'] = self::getShipPositions();\n $result['pulsars'] = self::getPulsars();\n $result['systems'] = self::getSystems();\n $result['tokens'] = self::getTokens();\n $result['playerboards'] = self::getPlayerboards();\n return $result;\n }", "protected function getAllDatas()\r\n {\r\n $result = array( 'players' => array() );\r\n \r\n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\r\n \r\n // Get information about players\r\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\r\n $sql = \"SELECT player_id id, player_score score FROM player \";\r\n $result['players'] = self::getCollectionFromDb( $sql );\r\n \r\n // TODO: Gather all information about current game situation (visible by player $current_player_id).\r\n $result['hand'] = $this->getFlorenzaCardList(\"WHERE player_id = $current_player_id AND location = 'hand'\");\r\n \r\n \r\n self::debug(\"GET ALL DATAS => TOTALE CARTE = \" . count($result['hand']));\r\n \r\n $players = $this->loadPlayersBasicInfos();\r\n $results['board'] = array();\r\n $results['score'] = array();\r\n $results['artist'] = array();\r\n $results['card_counter'] = array();\r\n foreach($players as $player) {\r\n $id = $player['player_id'];\r\n $result['board'][$id] = $this->getFlorenzaCardList(\"WHERE player_id = $id AND (location = 'board' OR location = 'pending')\");\r\n $result['score'][$id] = $this->getPlayerScorePoint($id, false);\r\n $result['florenzaArtist'][$id] = $this->getArtistCardList(\"WHERE player_id = $id AND location = 'player' AND related_card_type = 'florenza'\");\r\n $result['monument'][$id] = $this->getMonumentCardList(\"WHERE player_id = $id AND location = 'player'\");\r\n $result['monumentArtist'][$id] = $this->getArtistCardList(\"WHERE player_id = $id AND location = 'player' AND related_card_type = 'monument'\");\r\n $result['reservedArtist'][$id] = $this->getArtistCardList(\"WHERE player_id = $id AND location = 'reserved'\");\r\n $result['reservedMonument'][$id] = $this->getMonumentCardList(\"WHERE player_id = $id AND location = 'reserved'\");\r\n $result['card_counter'][$id] = $this->getPlayerHandCount($id);\r\n }\r\n \r\n $result['locationCard'] = $this->getLocationCardList();\r\n $result['artistCard'] = $this->getArtistCardList(\"WHERE location = 'board' AND anonymous = 0\");\r\n $result['anonymousArtistCard'] = $this->getArtistCardList(\"WHERE anonymous = 1\");\r\n $result['monumentCard'] = $this->getMonumentCardList(\"WHERE location = 'board' OR location = 'pending'\");\r\n \r\n $sql = \"SELECT * FROM player_resources WHERE player_id = $current_player_id\";\r\n $result['resources'] = self::getObjectFromDB($sql);\r\n $result['resourcesAvailability'] = $this->getResourcesAvailability();\r\n \r\n $result['captainId'] = $this->getCurrentCaptainId(); \r\n \r\n $result['currentActionNumber'] = self::getGameStateValue(\"current_action_number\");\r\n $result['currentTurnNumber'] = self::getGameStateValue(\"current_turn_number\");\r\n $result['currentRoundNumber'] = self::getGameStateValue(\"current_round_number\");\r\n \r\n return $result;\r\n }", "public function updateChallenges()\n {\n $user_id = Auth::user()->id;\n $user = User::find($user_id);\n if(!empty($user->challenges)){\n $challenges = unserialize($user->challenges);\n }\n else{\n $challenges = array();\n } \n if(request('enable') == 1){\n array_push($challenges, request('challenge'));\n }\n else{\n $challenges = array_diff($challenges, array(request('challenge')));\n }\n $user->challenges = serialize($challenges);\n if($user->save()){\n return 'true';\n }\n Session::flash('message', 'Some problem occured!!');\n return back();\n }", "public function challenges() {\n /**\n * validated can have 3 values :\n * -1: refused\n * 0: pending\n * 1: accepted\n * Yep, a boolean should have been used, but my first solution was to use\n * false: refused\n * true: accepted\n * null: pending\n * and laravel (at least in 5.2) doesn't seem to differenciate null and false\n */\n $pivots = ['submittedOn', 'validated', 'proof_url', 'last_update', 'update_author', 'message'];\n return $this->belongsToMany('App\\Models\\Challenge', 'challenge_validations')->withPivot($pivots)->where('team_id', '=', $this->id);\n }", "function get_participants($con) {\n $sql = \"SELECT users.* \\n\"\n . \"FROM users \\n\"\n . \"INNER JOIN participant \\n\"\n . \"ON users.user_id = participant.user_id LIMIT 0, 30 \";\n\n $user = array();\n $all_users = array();\n $users = mysqli_query($con, $sql);\n while($result = $users->fetch_assoc()) {\n $user[\"Id\"] = $result[\"user_id\"];\n $user[\"UserName\"] = $result[\"username\"];\n $user[\"Password\"] = \"REDACTED\";\n $user[\"FirstName\"] = $result[\"user_first\"];\n $user[\"LastName\"] = $result[\"user_last\"];\n $user[\"Email\"] = $result[\"user_email\"];\n $user[\"ProfilePicture\"] = $result[\"user_profile_picture\"];\n $user[\"State\"] = $result[\"user_state\"];\n $user[\"PhoneNumber\"] = $result[\"user_phone\"];\n $user[\"Zip\"] = $result[\"user_zip\"];\n $user[\"Address\"] = $result[\"user_address\"];\n $user[\"AboutMe\"] = $result[\"user_about_me\"];\n $user[\"City\"] = $result[\"user_city\"];\n\n $user[\"EventsAttending\"] = retrieve_user_events1(\n $con\n , $user[\"Id\"]);\n array_push($all_users, $user);\n }\n return json_encode($all_users, JSON_NUMERIC_CHECK);\n}", "public function entriesJSON(Request $request) {\n $id = $request->input('id');\n $tournament = Tournament::where('id', $id)->first();\n\n // not found\n if (is_null($tournament)) {\n return response()->json(['error' => 'Tournament not found.']);\n }\n // not concluded\n if ($tournament->concluded == 0) {\n return response()->json(['warn' => 'Tournament is not concluded.']);\n }\n\n $result = [];\n $identities = CardIdentity::get();\n $identities_titles=$identities->pluck('title', 'id')->all();\n $identities_factions=$identities->pluck('faction_code', 'id')->all();\n $entries = Entry::where('tournament_id', $id)->where(function($q) {\n $q->where('runner_deck_identity', '!=', '')->orWhere('corp_deck_identity', '!=', '');\n })->get()->all();\n\n foreach($entries as $entry) {\n\n if ($entry['user']) {\n $user_name = User::where('id', $entry['user'])->first()['name'];\n } else {\n $user_name = null;\n }\n\n $entry_array = [\n 'user_id' => $entry['user'],\n 'user_name' => $user_name,\n 'user_import_name' => $entry['import_username'],\n 'rank_swiss' => $entry['rank'],\n 'rank_top' => $entry['rank_top'] ? $entry['rank_top'] : null,\n 'runner_deck_title' => $entry['runner_deck_title'],\n 'runner_deck_identity_id' => $entry['runner_deck_identity'],\n 'runner_deck_url' => $this->deckUrl($entry['runner_deck_id'], $entry['runner_deck_type']),\n 'corp_deck_title' => $entry['corp_deck_title'],\n 'corp_deck_identity_id' => $entry['corp_deck_identity'],\n 'corp_deck_url' => $this->deckUrl($entry['corp_deck_id'], $entry['corp_deck_type']),\n ];\n\n if ($entry['runner_deck_identity']) {\n $entry_array['runner_deck_identity_title'] = $identities_titles[$entry['runner_deck_identity']];\n $entry_array['runner_deck_identity_faction'] = $identities_factions[$entry['runner_deck_identity']];\n }\n\n if ($entry['corp_deck_identity']) {\n $entry_array['corp_deck_identity_title'] = $identities_titles[$entry['corp_deck_identity']];\n $entry_array['corp_deck_identity_faction'] = $identities_factions[$entry['corp_deck_identity']];\n }\n\n array_push($result, $entry_array);\n\n\n }\n\n return response()->json($result);\n }", "public function GetPlayers( )\n\t\t{\n\t\t\tif( !$this->Connected )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tswitch( $this->GetChallenge( self :: A2S_PLAYER, self :: S2A_PLAYER ) )\n\t\t\t{\n\t\t\t\tcase self :: GETCHALLENGE_FAILED:\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcase self :: GETCHALLENGE_ALL_CLEAR:\n\t\t\t\t{\n\t\t\t\t\t$this->Socket->Write( self :: A2S_PLAYER, $this->Challenge );\n\t\t\t\t\t$this->Socket->Read( );\n\t\t\t\t\t\n\t\t\t\t\t$Type = $this->Buffer->GetByte( );\n\t\t\t\t\t\n\t\t\t\t\tif( $Type == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse if( $Type != self :: S2A_PLAYER )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new SourceQueryException( 'GetPlayers: Packet header mismatch. (0x' . DecHex( $Type ) . ')' );\n\t\t\t\t\t}\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\t$Players = Array( );\n\t\t\t$Count = $this->Buffer->GetByte( );\n\t\t\t\n\t\t\twhile( $Count-- > 0 && $this->Buffer->Remaining( ) > 0 )\n\t\t\t{\n\t\t\t\t$Player[ 'Id' ] = $this->Buffer->GetByte( ); // PlayerID, is it just always 0?\n\t\t\t\t$Player[ 'Name' ] = $this->Buffer->GetString( );\n\t\t\t\t$Player[ 'Frags' ] = $this->Buffer->GetLong( );\n\t\t\t\t$Player[ 'Time' ] = (int)$this->Buffer->GetFloat( );\n\t\t\t\t$Player[ 'TimeF' ] = GMDate( ( $Player[ 'Time' ] > 3600 ? \"H:i:s\" : \"i:s\" ), $Player[ 'Time' ] );\n\t\t\t\t\n\t\t\t\t$Players[ ] = $Player;\n\t\t\t}\n\t\t\t\n\t\t\treturn $Players;\n\t\t}", "function submitMatchingChallenge($user_id, $subject, $img_url) {\n\t\t$challenge_arr = array();\t\t\t\n\t\t\n\t\t// get the subject id for subject name\n\t\t$subject_id = $this->submitSubject($user_id, $subject);\n\t\t\n\t\t// prime the list of available challenges\n\t\t$rndChallenge_arr = array();\n\t\t\n\t\t// get any pending challenges for this subject that isn't created by this user\n\t\t$query = 'SELECT `id`, `creator_id` FROM `tblChallenges` WHERE `status_id` = 1 AND `subject_id` = '. $subject_id .' AND `creator_id` != '. $user_id .';';\n\t\t$challenge_result = mysql_query($query);\n\t\t\n\t\t// found some waiting challenges\n\t\tif (mysql_num_rows($challenge_result) > 0) {\t\t\t\n\t\t\t\n\t\t\t// push into available challenge array\n\t\t\twhile ($challenge_row = mysql_fetch_array($challenge_result, MYSQL_BOTH))\n\t\t\t\tarray_push($rndChallenge_arr, $challenge_row);\n\t\t\t\n\t\t\t// pick a random challenge from list\n\t\t\t$rnd_ind = mt_rand(0, count($rndChallenge_arr) - 1);\n\t\t\t$challenge_row = $rndChallenge_arr[$rnd_ind];\n\t\t\t\n\t\t\t// get the challenge creator's info\n\t\t\t$query = 'SELECT `device_token`, `notifications` FROM `tblUsers` WHERE `id` = '. $challenge_row['creator_id'] .';';\n\t\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t// get user's info as the challenger\n\t\t\t$query = 'SELECT `username` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t\t$challenger_obj = mysql_fetch_object(mysql_query($query));\n\t\t\t\n\t\t\t// update the challenge to say it's nowe in session\n\t\t\t$query = 'UPDATE `tblChallenges` SET `status_id` = 4, `challenger_id` = '. $user_id .', `challenger_img` = \"'. $img_url .'\", `updated` = NOW(), `started` = NOW() WHERE `id` = '. $challenge_row['id'] .';';\n\t\t\t$update_result = mysql_query($query);\n\t\t\t\n\t\t\t// send push if creator allows it\n\t\t\tif ($creator_obj->notifications == \"Y\")\n\t\t\t\t$this->sendPush('{\"device_tokens\": [\"'. $creator_obj->device_token .'\"], \"type\":\"1\", \"aps\": {\"alert\": \"'. $challenger_obj->username .' has accepted your '. $subject .' snap!\", \"sound\": \"push_01.caf\"}}');\n\t\t\t\n\t\t \n\t\t\t// get the updated challenge info \n\t\t\t$challenge_arr = $this->getChallengeObj($challenge_row['id']);\n\t\t\n\t\t// no available challenges found with this subject\n\t\t} else {\n\t\t\t\n\t\t\t// get the user's info as creator\n\t\t\t$query = 'SELECT `username`, `fb_id`, `points` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\t\t\t\t\n\t\t\t$points = $creator_obj->points;\t\t\t\n\t\t\t\n\t\t\t// increment the user's points\n\t\t\t$query = 'UPDATE `tblUsers` SET `points` = \"'. ($points + 1) .'\" WHERE `id` ='. $user_id .';';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// add challenge as waiting for someone\n\t\t\t$query = 'INSERT INTO `tblChallenges` (';\n\t\t\t$query .= '`id`, `status_id`, `subject_id`, `creator_id`, `creator_img`, `challenger_id`, `challenger_img`, `hasPreviewed`, `votes`, `updated`, `started`, `added`) ';\n\t\t\t$query .= 'VALUES (NULL, \"1\", \"'. $subject_id .'\", \"'. $user_id .'\", \"'. $img_url .'\", \"0\", \"\", \"N\", \"0\", NOW(), NOW(), NOW());';\n\t\t\t$result = mysql_query($query);\n\t\t\t$challenge_id = mysql_insert_id();\n\t\t\t\n\t\t\t// get the newly created challenge info\n\t\t\t$challenge_arr = $this->getChallengeObj($challenge_id);\t\t\t\t\n\t\t}\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "public function startGame(): array{\n $columns = \"gameId, player1, player2, winner\";\n $where = \"player1 = ? OR player2 = ?\";\n $bindings = array($this->user->getUserName(), $this->user->getUserName());\n $result = $this->database->select($this->table, $columns, $where, $bindings);\n $startGame = array();\n\n if($result->rowCount() > 0){\n while($rows = $result->fetch()){\n //Make sure, game ID is available in order to start the game, both players' last activity must be less than 5 minutes, and the winner column must be empty.\n if(!is_null($rows[\"gameId\"]) && $this->userLastActivityModel->isTimestampValidate($rows[\"player1\"])\n && $this->userLastActivityModel->isTimestampValidate($rows[\"player2\"]) && is_null($rows[\"winner\"])){\n //Assign the opponent's name\n if($this->user->getUserName() === $rows[\"player1\"]){\n $challengerName = $this->profileModel->getFirstName($rows[\"player2\"]) . \" \" . $this->profileModel->getLastName($rows[\"player2\"]);\n }\n else{\n $challengerName = $this->profileModel->getFirstName($rows[\"player1\"]) . \" \" . $this->profileModel->getLastName($rows[\"player1\"]);\n }\n $startGame[] = [\n \"challengerName\" => $challengerName,\n \"url\" => $rows[\"gameId\"] . \"/FourConnect\"\n ];\n }\n }\n }\n return $startGame;\n }", "function getAllPreferences($problem) { // change this to get all preferences\n $rows = array();\n $participants = getParticipantsForProblem($problem);\n foreach ($participants as $participant) {\n $preference = getPreferencesForParticipant($problem, $participant['id']);\n if ($preference[0]) { $participant['preference'] = $preference; }\n else { $participant['preference'] = array(); }\n $rows[] = $participant;\n }\n return $rows;\n}", "private function getGameIdsAndPlaytimes($userId) : array\n {\n // Create the URL.\n $url = $this->baseAPIUrl . 'IPlayerService/GetOwnedGames/v0001/';\n $parameters = '?key=' . $this->apiKey . '&steamid=' . $userId;\n $url = $url . $parameters;\n // Make the request to get a JSON object.\n $jsonObject = $this->performRequest($url);\n // Check if the JSON object has errors. Return an empty object if so.\n if ($this->hasErrors($jsonObject)) {\n return array();\n }\n // Parse the JSON object (Get the response array).\n $response = $jsonObject['response'];\n // Check if the response array is empty. If it is, return an empty array.\n if (count($response) == 0) {\n return array();\n }\n // Parse the JSON object (Get each game ID or playtime).\n $gamesData = $response['games'];\n $gamesArray = array();\n foreach ($gamesData as $gameDatum) {\n $gamesArray[] = ['appid' => $gameDatum['appid'], 'playtime_forever' => $gameDatum['playtime_forever']];\n }\n // Return the array\n return $gamesArray;\n }", "function get_all_membership() {\n\n $sql = \"SELECT * FROM adherent\";\n\n $result = mysqli_query($this->connection, $sql);\n $json = array();\n $emparray = array();\n while($row = mysqli_fetch_assoc($result)) {\n $emparray[] = $row;\n }\n $result = json_encode($emparray);\n $jsonIterator = new RecursiveIteratorIterator(\n new RecursiveArrayIterator(json_decode($result, TRUE)),\n RecursiveIteratorIterator::SELF_FIRST);\n\n $id = '';\n $array = array();\n\n foreach ($jsonIterator as $key => $val) {\n if(is_array($val)) {\n\n } else {\n if($key == 'id_adherent') {\n $id = $val;\n $pp = $this->get_physicalPerson_from_id($id);\n $pp = json_decode($pp, true);\n $pp[0]['status'] = $this->get_status_from_id($id);\n $pp = json_encode($pp);\n array_push($array, $pp);\n }\n }\n }\n\n return $array;\n }", "public function run()\n {\n //give user completed challenges\n $user = User::where('id', 1)->first();\n\n $challenges = Challenge::all();\n $challenges = $challenges->pluck('id')->toArray();\n\n $user->challenges()->syncWithPivotValues($challenges, ['completed_at' => Carbon::now()]);\n\n // give user uncompleted challenges\n $weeklyChallenges = Challenge::inRandomOrder()\n ->limit(3)\n ->get();\n\n $this->userRepository->addWeeklyChallenges($user, $weeklyChallenges);\n }", "private function getData()\n {\n $list = [];\n $userAnswers = $this->entityManager->getRepository(UserAnswer::class)->findAll();\n foreach ($userAnswers as $usr_answ) {\n $list[] = [\n $usr_answ->getUser()->getUsername(),\n $usr_answ->getQuestion()->getContent(),\n $usr_answ->getAnswer()->getContent(),\n $usr_answ->getAnswer()->getId()\n ];\n }\n return $list;\n }", "public function getAsArray(){\n\t\t$playerArray = [];\n\t\t$playerArray['id'] = $this->player->getId();\n\t\t$playerArray['username'] = $this->player->getUser()->getUsername();\n\t\t$playerArray['flipType'] = $this->player->getFlipType();\n\t\t$playerArray['flipTypeAsString'] = Game::getFlipTypeAsString($this->player->getFlipType());\n\t\treturn $playerArray;\n\t}", "public function getPlayers() {\n $rawData = $this->jsonDao->getData();\n $data = json_decode( $rawData );\n return $this->processRawDataToPlayers( $data );\n }", "public function participants(){\n return $this -> belongsToMany('App\\Models\\User','challenge_participants',\n 'challenge_id'\n ,'participant_id') ->withTimestamps();\n }", "public function index()\n {\n // 1) get the challenges\n $challenges = DB::table('challenges')->select('id', 'title', 'description')->get();\n\n return \\Response::json($challenges, 200);\n }", "public function getTeams()\n {\n\n // We need to use the address of the variable because we are going to alter it for the print out.\n foreach ($this->league_data as &$league)\n {\n // Grab relevant data for the SQL query\n\n $sql = \"SELECT name FROM ft_myteams WHERE tid = \".$league['league']['tid'].\" AND sid = \".$league['league']['sid'].\" AND id = \".$league['league']['uid'];\n\n $raw_data_teams = $this->conn->query($sql);\n\n $sql = \"SELECT qbstrt,rbstrt,wrstrt,testrt,kstrt,dstrt,dlstrt,lbstrt,dbstrt,qbflex,rbflex,wrflex,teflex,kflex,dflex,dlflex,lbflex,dbflex FROM ft_myteams WHERE tid = \".$league['league']['tid'].\" AND sid = \".$league['league']['sid'].\" AND id = \".$league['league']['uid'];\n\n $raw_data_positions = $this->conn->query($sql);\n\n $sql = \"SELECT * FROM ft_scoring WHERE sid = \".$league['league']['sid'];\n\n $raw_data_scoringsystem = $this->conn->query($sql);\n\n //print_r($raw_data_scoringsystem);\n\n // Fetch all those players ids\n $sql = \"SELECT pid from ft_myteamplayers WHERE tid = \".$league['league']['tid'].\" AND id = \".$league['league']['uid'];\n\n $raw_data_players = $this->conn->query($sql);\n\n $player_string = $this->resultToArray($raw_data_players);\n\n while($row = $raw_data_teams->fetch_assoc())\n {\n $row['nickname'] = $row['name'];\n $row['lastSync'] = $league['league']['last_sync'];\n $row['userIsOwner'] = true;\n $row['hostTeamId'] = $league['league']['tid'];\n $row['matchups'] = \"\";\n $row['players'] = \"[\".$player_string.\"]\";\n $league['league']['teams'] = $row;\n\n // Add in the positions array\n $row1 = $raw_data_positions->fetch_assoc();\n $league['league']['positions'] = $row1;\n\n // Add in the scoring system\n $scoringSystem = $raw_data_scoringsystem->fetch_assoc();\n $alteredScoringSystem = $this->__transformScoringSystem($scoringSystem);\n $league['league']['scoringSystem'] = $alteredScoringSystem;\n\n }\n\n }\n }", "public function fetchAllRegisteredPlayers()\n\t{\n\t\t# get all resgistered players\n\t\t$fetchPlayers = \"SELECT players.id,players.player_name, players.playing_position, players.team_id, teams.team_name FROM players LEFT JOIN teams ON players.team_id = teams.id ORDER BY players.id DESC\";\n\t\t$result = mysqli_query($this->plug, $fetchPlayers);\n\t\t$totalRecords = mysqli_num_rows($result);\n\n\t\tif($totalRecords > 0){\n\t\t\t$data = [];\n\t\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t\t# code...\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}else{\n\t\t\t$data = [];\n\t\t\treturn $data;\n\t\t}\n\t}", "private function dump_challenge_records ($user_id) {\n $sql = \"DELETE FROM password_reset WHERE user_id='$user_id'\";\n return $this->conn->query($sql);\n }", "public function loadChallenge($base)\n {\n $query=\"Select * from challenge where challenge_number=\".$this->challenge_number;\n $data=$base->fetch_all_array($query);\n $challenge_exist=false;\n if(!empty($data))\n {\n $challenge_exist=true;\n foreach($data as $row)\n {\n $user_number=$row['challenge_originator_number'];\n $game_number=$row['challenge_game_number'];\n $user=new User();\n $user->setUser_number($user_number);\n $user->loadUser($base);\n $game=new Game();\n $game->setGame_number($game_number);\n $game->loadGame($base);\n $this->challenge_originator=$user;\n $this->challenge_game=$game;\n $this->challenge_title=$row['challenge_title'];\n $this->challenge_description=$row['challenge_description'];\n $this->challenge_creation_date=$row['challenge_creation_date'];\n $this->challenge_end_date=$row['challenge_end_date'];\n $this->challenge_winner=new User();\n $this->challenge_winner->setUser_number($row['challenge_winner_number']);\n $winner_exist=$this->challenge_winner->loadUser($base);\n if(!($winner_exist))\n {\n $this->challenge_winner->setUser_id('');\n }\n }\n }\n return($challenge_exist);\n }", "public function getAllRespondentsAnswers()\n {\n $stmt = $this->dbh->prepare('SELECT * FROM surveyResponses');\n $stmt->execute();\n $errorInRecoveringRespondentsAnswers = $stmt->errorInfo();\n if ($errorInRecoveringRespondentsAnswers[0] != '0') {\n throw new Exception('A problem is occurred during the recovering of respondents answers. Error message: ' . $errorInRecoveringRespondentsAnswers[2]);\n } else {\n $respondentsAnswers = [];\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $respondentsAnswers[$row['probe_id']]['gender'] = $row['gender'];\n $respondentsAnswers[$row['probe_id']]['town'] = $row['town'];\n $respondentsAnswers[$row['probe_id']]['postalCode'] = $row['postal_code'];\n $respondentsAnswers[$row['probe_id']]['age'] = $row['age'];\n $respondentsAnswers[$row['probe_id']]['birthYear'] = $row['birth_year'];\n $respondentsAnswers[$row['probe_id']]['skinTone'] = $row['skin_tone'];\n $respondentsAnswers[$row['probe_id']]['skinFeature'] = unserialize($row['skin_feature']);\n $respondentsAnswers[$row['probe_id']]['hairType'] = $row['hair_type'];\n $respondentsAnswers[$row['probe_id']]['faceCosmeticsUse'] = $row['face_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['bodyCosmeticsUse'] = $row['body_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['hairCosmeticsUse'] = $row['hair_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['handCosmeticsUse'] = $row['hand_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['footCosmeticsUse'] = $row['foot_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['beardCosmeticsUse'] = $row['beard_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['purchaseLocation'] = unserialize($row['purchase_location']);\n $respondentsAnswers[$row['probe_id']]['internetPurchaseLocation'] = $row['internet_purchase_location'];\n $respondentsAnswers[$row['probe_id']]['otherTownPurchaseLocation'] = $row['other_town_purchase_location'];\n $respondentsAnswers[$row['probe_id']]['otherPurchaseLocation'] = $row['other_purchase_location'];\n $respondentsAnswers[$row['probe_id']]['preferredUseMode'] = unserialize($row['preferred_use_mode']);\n $respondentsAnswers[$row['probe_id']]['otherPreferredUseMode'] = $row['other_preferred_use_mode'];\n $respondentsAnswers[$row['probe_id']]['needAdvice'] = $row['need_advice'];\n $respondentsAnswers[$row['probe_id']]['whyNeedAdvice'] = $row['why_need_advice'];\n $respondentsAnswers[$row['probe_id']]['skinProductsDifficulties'] = $row['skin_products_difficulties'];\n $respondentsAnswers[$row['probe_id']]['hairProductsDifficulties'] = $row['hair_products_difficulties'];\n if ($row['why_products_difficulties'] == \"-\") {\n $respondentsAnswers[$row['probe_id']]['whyProductsDifficulties'] = $row['why_products_difficulties'];\n } else {\n $respondentsAnswers[$row['probe_id']]['whyProductsDifficulties'] = unserialize($row['why_products_difficulties']);\n }\n $respondentsAnswers[$row['probe_id']]['otherWhyProductsDifficulties'] = $row['other_why_products_difficulties'];\n $respondentsAnswers[$row['probe_id']]['changeHairAppearance'] = unserialize($row['change_hair_appearance']);\n $respondentsAnswers[$row['probe_id']]['otherChangeHairAppearance'] = $row['other_change_hair_appearance'];\n if ($row['place_change_hair_appearance'] == \"-\") {\n $respondentsAnswers[$row['probe_id']]['placeChangeHairAppearance'] = $row['place_change_hair_appearance'];\n } else {\n $respondentsAnswers[$row['probe_id']]['placeChangeHairAppearance'] = unserialize($row['place_change_hair_appearance']);\n }\n $respondentsAnswers[$row['probe_id']]['otherPlaceChangeHairAppearance'] = $row['other_place_change_hair_appearance'];\n $respondentsAnswers[$row['probe_id']]['skinPriceAndFrequencyUse'] = $row['skin_price_and_frequency_use'];\n $respondentsAnswers[$row['probe_id']]['hairPriceAndFrequencyUse'] = $row['hair_price_and_frequency_use'];\n $respondentsAnswers[$row['probe_id']]['cosmeticsPurchaseSatisfaction'] = $row['cosmetics_purchase_satisfaction'];\n $respondentsAnswers[$row['probe_id']]['whyDissatisfactionCosmeticsUse'] = $row['why_dissatisfaction_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['hairCareWaiting'] = unserialize($row['hair_care_waiting']);\n $respondentsAnswers[$row['probe_id']]['otherHairCareWaiting'] = $row['other_hair_care_waiting'];\n $respondentsAnswers[$row['probe_id']]['bodyCareWaiting'] = unserialize($row['body_care_waiting']);\n $respondentsAnswers[$row['probe_id']]['otherBodyCareWaiting'] = $row['other_body_care_waiting'];\n $respondentsAnswers[$row['probe_id']]['packingInformation'] = unserialize($row['packing_information']);\n $respondentsAnswers[$row['probe_id']]['otherPackingInformation'] = $row['other_packing_information'];\n $respondentsAnswers[$row['probe_id']]['packagingType'] = unserialize($row['packaging_type']);\n $respondentsAnswers[$row['probe_id']]['otherPackagingType'] = $row['other_packaging_type'];\n $respondentsAnswers[$row['probe_id']]['homeMeeting'] = $row['home_meeting'];\n $respondentsAnswers[$row['probe_id']]['friendMeeting'] = $row['friend_meeting'];\n $respondentsAnswers[$row['probe_id']]['whyRefuseMeeting'] = $row['why_refuse_meeting'];\n $respondentsAnswers[$row['probe_id']]['hasChild'] = $row['has_child'];\n if ($row['age_category'] == \"-\") {\n $respondentsAnswers[$row['probe_id']]['ageCategory'] = $row['age_category'];\n } else {\n $respondentsAnswers[$row['probe_id']]['ageCategory'] = unserialize($row['age_category']);\n }\n $respondentsAnswers[$row['probe_id']]['applyCosmeticsProducts'] = $row['apply_cosmetics_products'];\n $respondentsAnswers[$row['probe_id']]['whyNoApplyProducts'] = $row['why_no_apply_products'];\n $respondentsAnswers[$row['probe_id']]['frequencyFaceCosmeticsUse'] = $row['frequency_face_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['frequencyHairCosmeticsUse'] = $row['frequency_hair_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['frequencyBodyCosmeticsUse'] = $row['frequency_body_cosmetics_use'];\n if ($row['products_location'] == \"-\") {\n $respondentsAnswers[$row['probe_id']]['productsLocation'] = $row['products_location'];\n } else {\n $respondentsAnswers[$row['probe_id']]['productsLocation'] = unserialize($row['products_location']);\n }\n $respondentsAnswers[$row['probe_id']]['internetProductsLocation'] = $row['internet_products_location'];\n $respondentsAnswers[$row['probe_id']]['otherTownProductsLocation'] = $row['other_town_products_location'];\n $respondentsAnswers[$row['probe_id']]['otherProductsLocation'] = $row['other_products_location'];\n if ($row['favourite_use_mode'] == \"-\") {\n $respondentsAnswers[$row['probe_id']]['favouriteUseMode'] = $row['favourite_use_mode'];\n } else {\n $respondentsAnswers[$row['probe_id']]['favouriteUseMode'] = unserialize($row['favourite_use_mode']);\n }\n $respondentsAnswers[$row['probe_id']]['otherFavouriteUseMode'] = $row['other_favourite_use_mode'];\n $respondentsAnswers[$row['probe_id']]['hairFrequencyAndPriceUse'] = $row['hair_frequency_and_price_use'];\n $respondentsAnswers[$row['probe_id']]['skinFrequencyAndPriceUse'] = $row['skin_frequency_and_price_use'];\n $respondentsAnswers[$row['probe_id']]['childCosmeticsPurchaseSatisfaction'] = $row['child_cosmetics_purchase_satisfaction'];\n $respondentsAnswers[$row['probe_id']]['whyDissatisfactionChildCosmeticsUse'] = $row['why_dissatisfaction_child_cosmetics_use'];\n $respondentsAnswers[$row['probe_id']]['socialMediaUse'] = unserialize($row['social_media_use']);\n $respondentsAnswers[$row['probe_id']]['otherSocialMediaUse'] = $row['other_social_media_use'];\n $respondentsAnswers[$row['probe_id']]['joinPhone'] = $row['join_phone'];\n $respondentsAnswers[$row['probe_id']]['joinMail'] = $row['join_mail'];\n $respondentsAnswers[$row['probe_id']]['phoneNumber'] = $row['phone_number'];\n $respondentsAnswers[$row['probe_id']]['mailAddress'] = $row['mail_address'];\n }\n return $respondentsAnswers;\n }\n }", "public function getAllRelatedPlayers() {\n\t\t$players = $this->getPlayers();\n\n\t\t$q = (new SelectQuery(Database::getConnection()))\n\t\t\t->from(\"matches_players\")\n\t\t\t->fields([\"player_id\"])\n\t\t\t->where(\"team_id = ?\", $this->id);\n\t\t$stmt = $q->prepare();\n\t\t$stmt->execute();\n\t\t$participatingPlayerIds = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t$participatingPlayerIds = array_unique($participatingPlayerIds, SORT_NUMERIC);\n\n\t\t$additionalPlayers = Player::get($participatingPlayerIds);\n\n\t\tforeach($additionalPlayers as $player) {\n\t\t\tif (!array_key_exists($player->id, $players))\n\t\t\t\t$players[] = $player;\n\t\t}\n\n\t\treturn $players;\n\t}", "function getHisOrHerPreferences($userid)\n{\t\n\t$data = array();\n\t$qry = \"SELECT *\n\t\t\t FROM entrp_user_notification_preferences as UP\n\t\t\t WHERE UP.clientid = \".$userid.\"\n\t \";\n\t$res = getData($qry);\n $count_res = mysqli_num_rows($res);\n if($count_res > 0)\n {\n \twhile($row = mysqli_fetch_array($res))\n \t{ \t\t\n \t\t$data['followers'] \t\t\t\t = ($row['follow'] == 1 ? 1 : 0);\n \t\t$data['comments'] \t\t\t\t = ($row['comment'] == 1 ? 1 : 0);\n \t\t$data['likes'] \t\t\t\t\t = ($row['likes'] == 1 ? 1 : 0);\n \t\t$data['mentions'] \t\t\t\t = ($row['mention'] == 1 ? 1 : 0);\n \t\t$data['businessOpportunities'] = ($row['business_opportunity'] == 1 ? 1 : 0);\n \t}\t \t\n }\n else\n { \t\t\n\t\t$data['followers'] = '';\n\t\t$data['comments'] = '';\n\t\t$data['likes'] = '';\n\t\t$data['mentions'] = '';\n\t\t$data['businessOpportunities'] = '';\t \n }\t\n\treturn $data;\n}", "public static function getAllUserData() {\n if (Auth::check()) { \n // save user data to variable $me\n $me = Auth::user();\n // get all habits\n $habits = \\DB::table('habits')->get();\n // get habit tracked by user\n $trackedHabitsDetails = Auth::user()->habits->first();\n if ($trackedHabitsDetails) { \n $trackedHabitsDetails = $trackedHabitsDetails->pivot->pivotParent->habits;\n }\n\n // get tracked and untracked habits\n $trackedHabitsArray = [];\n $untrackedHabitsArray = [];\n \n foreach ($habits as $habit){\n $habitCheck = -1;\n if($trackedHabitsDetails){\n foreach($trackedHabitsDetails as $trackedhabitDetails) {\n if ($trackedhabitDetails->getOriginal('pivot_habit_id') == ($habit->id) ) {\n $habitCheck = $habit->id;\n }\n }\n }\n if( $habitCheck > -1) {\n array_push($trackedHabitsArray, $habit);\n } else {\n array_push($untrackedHabitsArray, $habit);\n }\n }\n\n if (!empty($trackedHabitsArray)) {\n $currentdate = date(\"Y-m-d\");\n foreach ($trackedHabitsArray as $habit) {\n if($habit->type == \"sleep\") {\n $totalsleep = 0;\n $usersleep = \\DB::table('sleeplogs')->where([['user_id', $me->id], ['date_of_sleep', $currentdate]])->get();\n $sleepgoal = \\DB::table('habit_user')->where([['user_id', $me->id], ['habit_id', 1]])->first();\n foreach ($usersleep as $sleep) {\n $totalSleepMinutes = $sleep->deep_minutes + $sleep->wake_minutes + $sleep->rem_minutes + $sleep->light_minutes;\n if($sleep->deep_minutes > $totalsleep){\n $totalsleep = $totalSleepMinutes;\n }\n }\n $data['trackedHabitsInfo']['sleep']['amount'] = $totalsleep;\n $data['trackedHabitsInfo']['sleep']['goal'] = $sleepgoal->goal;\n $data['userProgress']['sleep_progress'] = User::checkHabitProgress($totalsleep, $sleepgoal->goal);\n }\n if($habit->type == \"water\") {\n $userwater = \\DB::table('waterlogs')->where([['user_id', $me->id], ['date', $currentdate]])->first();\n $watergoal = \\DB::table('habit_user')->where([['user_id', $me->id], ['habit_id', 4]])->first();\n $data['trackedHabitsInfo']['water']['amount'] = $userwater->amount;\n $data['trackedHabitsInfo']['water']['goal'] = $watergoal->goal;\n $data['userProgress']['water_progress'] = User::checkHabitProgress($userwater->amount, $watergoal->goal);\n }\n if($habit->type == \"breathing\") {\n $totalbreathing = 0;\n $userbreathing = \\DB::table('breathing')->where([['user_id', $me->id], ['date', $currentdate]])->get();\n $breathinggoal = \\DB::table('habit_user')->where([['user_id', $me->id], ['habit_id', 2]])->first();\n foreach ($userbreathing as $breathing) {\n $totalbreathing++;\n }\n $data['trackedHabitsInfo']['breathing']['amount'] = $totalbreathing;\n $data['trackedHabitsInfo']['breathing']['goal'] = $breathinggoal->goal;\n $data['userProgress']['breathing_progress'] = User::checkHabitProgress($totalbreathing, $breathinggoal->goal);\n }\n if($habit->type == \"exercise\") {\n $usersteps = \\DB::table('activitylogs')->where([['user_id', $me->id], ['date', $currentdate]])->first();\n $stepsgoal = \\DB::table('habit_user')->where([['user_id', $me->id], ['habit_id', 3]])->first();\n $data['trackedHabitsInfo']['steps']['amount'] = $usersteps->steps;\n $data['trackedHabitsInfo']['steps']['goal'] = $stepsgoal->goal;\n $data['userProgress']['steps_progress'] = User::checkHabitProgress($usersteps->steps, $stepsgoal->goal);\n }\n }\n }\n\n $data['userGoalsAchieved'] = false;\n // if any habit is tracked\n if(!empty($data['trackedHabitsInfo'])) {\n $mood = \\DB::table('user_moods')->where([['user_id', $me->id], ['date', date(\"Y-m-d\")]])->first();\n if($mood == null) {\n $data['userGoalsAchieved'] = User::checkIfTrackedGoalsAchieved($data['trackedHabitsInfo']);\n }\n }\n $data['trackedHabitsArray'] = $trackedHabitsArray;\n $data['untrackedHabitsArray'] = $untrackedHabitsArray;\n $data['user'] = $me;\n $data['habits'] = $habits;\n $data['trackedHabitsDetails'] = $trackedHabitsDetails;\n return $data;\n }\n }", "public function create(): array\n {\n //TODO: Catch api failure\n $response = $this->client->sendRequest(new Request('get', 'https://randomuser.me/api/?results=100'));\n $decoded = json_decode($response->getBody()->getContents());\n\n $result = [];\n foreach ($decoded->results as $user) {\n $firstName = mb_strtolower($user->name->first);\n $firstLetter = mb_substr($firstName, 0, 1);\n $firstLetterAsciiCode = ord($firstLetter);\n if ($firstLetterAsciiCode < self::LOWER_A_ASCII_CODE || $firstLetterAsciiCode > self::LOWER_Z_ASCII_CODE) {\n continue;\n }\n if (!isset($result[$firstLetterAsciiCode])) {\n $result[$firstLetterAsciiCode] = [$firstLetter, 1, $firstName];\n } else {\n $result[$firstLetterAsciiCode][1] += 1;\n $result[$firstLetterAsciiCode][2] .= ', '. $firstName;\n }\n }\n ksort($result);\n return $result;\n }", "function getChallenges_associated_to_outfile($file_id){\n $challenges_ids=array();\n\n //fetch execution run that generated the given file or folder\n $execution_data = getExecutionInfo_fromResultId($file_id);\n if (!count($execution_data)){\n $_SESSION['errorData']['Error'][]=\"Cannot infer OEB benchmarking \n challenges associated to the given file.\";\n return $challenges_ids;\n }\n // look for the argument value of 'challenges_ids'\n $args_challenges=(isset($execution_data['arguments']['challenges_ids'])? \n $execution_data['arguments']['challenges_ids'] : array());\n\n // convert from challenge-name (GO, EC, SwissTrees...) to challenge_id -> TODO\n $challenges_ids = $args_challenges;\n return $challenges_ids;\n}", "public function loadAllChallengeInvitations($base)\n {\n $query=\"Select * from challenge_invitation where invitation_challenge_number=\".$this->challenge_number;\n $data=$base->fetch_all_array($query);\n $challenge_invitations_exist=false;\n if(!empty($data))\n {\n $challenge_invitations_exist=true;\n foreach($data as $row)\n {\n $number=$row['invitation_user_number'];\n $user=new User();\n $user->setUser_number($number);\n $user->loadUser($base);\n $invitation=new Challenge_inviattion();\n $invitation->setInvitation_user($user);\n $invitation->setInvitation_challenge($this);\n $invitation->loadChallengeInvitation($base);\n $this->theChallengeInvitations[]=$invitation;\n }\n }\n return($challenge_invitations_exist);\n }", "function report_leoscorm_get_table_data() {\n\tglobal $DB;\n\t$sql = \"SELECT s.id, u.id as uid, firstname, lastname, email, attempt, value from {user} u \n\tJOIN {scorm_scoes_track} s on u.id=s.userid\n\tAND (element='cmi.core.total_time' or element='cmi.core.lesson_status') \n\tGROUP BY attempt,u.id,value\";\n\t$results=$DB->get_records_sql($sql,array());\n\tif (empty($results)) {\n\t return array();\n\t} else {\n\t $us = array();\n\t \n\t //Build the array here from the results\n\t foreach ($results as $r) {\n\t $us[$r->uid]['firstname']=$r->firstname;\n\t $us[$r->uid]['lastname']=$r->lastname;\n\t $us[$r->uid]['email']=$r->email;\n $us[$r->uid]['attempt']=$r->attempt;\t \n\t if (strpos($r->value, ':') !== false) {\n\t $us[$r->uid]['status']=$r->value;\n\t \t} else {\n\t\t $us[$r->uid]['time']=$r->value;\n\t \t}\n\t }\n\t return $us;\n\t}\n\n }", "function clearAllChallenges($username) {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE gameUser1Id = %s OR gameUser2Id = %s\", $username, $username);\n\t}", "function get_players_played_by_team($teamid){\n $results = get_team_results_expanded_new($teamid);\n foreach ($results as $key => $value):\n $output[$key] = array(\n 'qb1' => $value['qb1'],\n 'rb1' => $value['rb1'],\n 'wr1' => $value['wr1'],\n 'pk1' => $value['pk1'],\n 'qb2' => $value['qb2'],\n 'rb2' => $value['rb2'],\n 'wr2' => $value['wr2'],\n 'pk2' => $value['pk2']\n );\n endforeach;\n return $output;\n}", "function getConsecutiveDataC1($user_faculty_id)\n {\n //TokyoTyrantQuery\n $query = \"SELECT ctvo.id_consecutivo_reporte,\n ctvo.consecutivo_actual_reporte\n FROM consecutivo_reporte ctvo\n WHERE ctvo.year_consecutivo_reporte = (SELECT YEAR(CURDATE()))\n AND ctvo.id_estado_consecutivo_reporte = '1'\n AND ctvo.id_tipo_consecutivo_reporte = '1'\n AND ctvo.id_facultad_consecutivo_reporte = ?\";\n //Global connection variable\n global $mysqli;\n\n //Prepare query (true)\n if($stmt = $mysqli->prepare($query))\n {\n $stmt->bind_param(\"i\", $user_faculty_id);\n $stmt->execute();\n $stmt->bind_result($consecutive_id, $current_consecutive);\n $stmt->store_result();\n $stmt->fetch();\n\n if($stmt->num_rows == 1)\n {\n $stmt->close();\n //Session array\n $consecutive_data = array(\n 'consecutive_id' => $consecutive_id,\n 'current_consecutive' => $current_consecutive\n );\n return $consecutive_data;\n }\n $stmt->close();\n }\n\n return false;\n }", "function findKeyValueArray($JoinedContestsUsers, $Rank, $AmountPerUser) {\n $WinnerUsers = array();\n foreach ($JoinedContestsUsers as $Rows) {\n if ($Rows['UserRank'] == $Rank) {\n $Temp['UserID'] = $Rows['UserID'];\n $Temp['FirstName'] = $Rows['FirstName'];\n $Temp['Email'] = $Rows['Email'];\n $Temp['UserWinningAmount'] = $AmountPerUser;\n $Temp['UserRank'] = $Rows['UserRank'];\n $Temp['TotalPoints'] = $Rows['TotalPoints'];\n $Temp['UserTeamID'] = $Rows['UserTeamID'];\n $WinnerUsers[] = $Temp;\n }\n }\n return $WinnerUsers;\n }", "public function get_players_continents($player_id = 0) {\n\t\tcall(__METHOD__);\n\n\t\t$player_id = (int) $player_id;\n\n\t\tif (empty($player_id)) {\n\t\t\t$player_id = $this->current_player;\n\t\t}\n\n\t\t$land = $this->get_players_land($player_id);\n\t\t$land_ids = array_keys($land);\n\n\t\t// calculate if the player controls any continents\n\t\t$continents = [];\n\t\tforeach (self::$CONTINENTS as $cont_id => $cont) {\n\t\t\t$diff = array_diff($cont[TERRITORIES], $land_ids);\n\n\t\t\t// the diff is empty if all the land in the continent is occupied\n\t\t\tif (empty($diff)) {\n\t\t\t\t$continents[$cont_id] = $cont;\n\t\t\t}\n\t\t}\n\n\t\treturn $continents;\n\t}", "function get_questions(array $objective_ids){\n\t\n\t//Check connection\n\t//if ($mysqli->connect_errno) {\n //\techo \"Failed to connect to MySQL: \".$mysqli->connect_errno; }\n //else{\n \t//echo \"Connection Established!\";\n\t//}\n\t\n\t//Query for questions for each objective\n\t$questionsAndAnswers = array();\n\t$questions = array();\n\n\t\n\tforeach($objective_ids as $objective_id){\n\t\t//$sql = \"SELECT question,question_id FROM questions NATURAL JOIN objectives WHERE objective_id=$objective_id;\";\n\t\t$questions[$question[1]] = $question[0];\n\t\t//Check for failure\n\t\t//if (!$result = $mysqli->query($sql)) {\n\t\t//\t//Oh no! The query failed. \n //\techo \"<h2>Sorry, the website is experiencing problems.</h2>\";\n \t//} \n\t\t//Parse and store\n\t\t//while ($row = $result->fetch_assoc()){\n\t\t//\t$questions[$row['question_id']] = $row['question'];\n\t\t//}\t\n\t}\necho 'WOW4</br></br>';\n\t//Break into questions and sets of answers\n\tforeach($questions as $key => $value){\n\t\t\n\t\techo $key.'</br></br></br>';\n\t\techo $value.'</br></br></br>';\n\t\t$questionsAndAnswers[] = explode(\":\",$value);\n\t}\n\t \necho 'WOW5</br></br>';\n\n\t//$mysqli->close();\n\treturn $questionsAndAnswers;\n\n}", "public function get_options_data() {\n global $DB;\n\n $context = $this->context;\n /// bookinglist $bookinglist[optionid][sortnumber] = userobject;\n $bookinglist = array();\n $optionids = array();\n $totalbookings = array();\n\n ///TODO from 2.6 on use get_all_user_name_fields() instead of user_picture\n $mainuserfields = user_picture::fields('u', null);\n $sql = \"SELECT ba.id as answerid, $mainuserfields, ba.optionid, ba.bookingid, ba.userid, ba.timemodified, ba.completed, ba.timecreated, ba.waitinglist\n FROM {booking_answers} ba\n JOIN {user} u\n ON ba.userid = u.id \n WHERE u.deleted = 0 \n AND ba.bookingid = ?\n ORDER BY ba.optionid, ba.timemodified ASC\";\n $rawresponses = $DB->get_records_sql($sql, array($this->id));\n if ($rawresponses) {\n if ($this->checkcanbookusers) {\n if (empty($this->canbookusers)) {\n $this->get_canbook_userids();\n }\n foreach ($rawresponses as $answerid => $userobject) {\n $sortedusers[$userobject->id] = $userobject;\n }\n $validresponses = array_intersect_key($sortedusers, $this->canbookusers);\n } else {\n $validresponses = $rawresponses;\n }\n foreach ($validresponses as $response) {\n if (isset($this->options[$response->optionid])) {\n $bookinglist[$response->optionid][] = $response;\n $optionids[$response->optionid] = $response->optionid;\n }\n }\n foreach ($optionids as $optionid) {\n $totalbookings[$optionid] = count($bookinglist[$optionid]);\n }\n }\n $this->allbookedusers = $bookinglist;\n $this->sort_bookings();\n $this->numberofbookingsperoption = $totalbookings;\n }", "function get_participant($connection, $username, $password) {\n $sql = \"SELECT * FROM users WHERE username = '\"\n . $username\n . \"' AND user_password ='\"\n . $password\n . \"'\" ;\n\n $user = array();\n\n if ($connection) {\n $users = mysqli_query($connection, $sql);\n while ($result = $users->fetch_assoc()) {\n $user[\"Id\"] = $result[\"user_id\"];\n $user[\"UserName\"] = $result[\"username\"];\n $user[\"Password\"] = $result[\"user_password\"];\n $user[\"FirstName\"] = $result[\"user_first\"];\n $user[\"LastName\"] = $result[\"user_last\"];\n $user[\"Email\"] = $result[\"user_email\"];\n $user[\"ProfilePicture\"] = $result[\"user_profile_picture\"];\n $user[\"State\"] = $result[\"user_state\"];\n $user[\"PhoneNumber\"] = $result[\"user_phone\"];\n $user[\"Zip\"] = $result[\"user_zip\"];\n $user[\"Address\"] = $result[\"user_address\"];\n $user[\"AboutMe\"] = $result[\"user_about_me\"];\n $user[\"City\"] = $result[\"user_city\"];\n\n $user[\"EventsAttending\"] = retrieve_user_events(\n $connection\n , $result[\"participant_id\"]);\n }\n return json_encode($user, JSON_NUMERIC_CHECK);\n }\n\n}", "public function getUserGames($userId)\n {\n $db = $this->dbConnect();\n $user_games[\"Evaluation\"] = array();\n $user_games[\"Validated\"] = array();\n $user_games[\"Rejected\"] = array();\n $req = $db->query(\"SELECT * FROM games WHERE userId = $userId ORDER BY gameStatus\");\n while ($data = $req->fetch()) {\n switch ($data[\"gameStatus\"]) {\n case \"Evaluation\":\n array_push($user_games[\"Validated\"], $data);\n break;\n case \"Validated\":\n array_push($user_games[\"Evaluation\"], $data);\n break;\n case \"Rejected\":\n array_push($user_games[\"Rejected\"], $data);\n break;\n default:\n break;\n }\n }\n return $user_games;\n }", "function quiz_get_participants($quizid) {\n/// (users with records in quiz_attempts and quiz_question_versions)\n\n global $CFG;\n\n //Get users from attempts\n $us_attempts = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_attempts a\n WHERE a.quiz = '$quizid' and\n u.id = a.userid\");\n\n //Get users from question_versions\n $us_versions = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_question_versions v\n WHERE v.quiz = '$quizid' and\n u.id = v.userid\");\n\n //Add us_versions to us_attempts\n if ($us_versions) {\n foreach ($us_versions as $us_version) {\n $us_attempts[$us_version->id] = $us_version;\n }\n }\n //Return us_attempts array (it contains an array of unique users)\n return ($us_attempts);\n\n}", "public function _getData(): array\n {\n $result = [\n 'users' => $this->getUsers(),\n ];\n\n return parent::normalizeData($result);\n }", "function submitChallengeWithChallenger($user_id, $subject, $img_url, $challenger_id) {\n\t\t$challenge_arr = array();\n\t\t\n\t\t// get the subject id for the subject name\n\t\t$subject_id = $this->submitSubject($user_id, $subject);\n\t\t\n\t\t// get the user's info as the creator\n\t\t$query = 'SELECT `username`, `fb_id`, `points` FROM `tblUsers` WHERE `id` = '. $user_id .';';\n\t\t$creator_obj = mysql_fetch_object(mysql_query($query));\n\t\t$points = $creator_obj->points;\n\t\t\n\t\t// increment the user's points\n\t\t$query = 'UPDATE `tblUsers` SET `points` = \"'. ($points + 1) .'\" WHERE `id` ='. $user_id .';';\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// add the challenge\n\t\t$query = 'INSERT INTO `tblChallenges` (';\n\t\t$query .= '`id`, `status_id`, `subject_id`, `creator_id`, `creator_img`, `challenger_id`, `challenger_img`, `hasPreviewed`, `votes`, `updated`, `started`, `added`) ';\n\t\t$query .= 'VALUES (NULL, \"2\", \"'. $subject_id .'\", \"'. $user_id .'\", \"'. $img_url .'\", \"'. $challenger_id .'\", \"\", \"N\", \"0\", NOW(), NOW(), NOW());';\n\t\t$result = mysql_query($query);\n\t\t$challenge_id = mysql_insert_id();\n\t\t\n\t\t// get the targeted user's info\n\t\t$query = 'SELECT `device_token`, `username`, `fb_id`, `notifications` FROM `tblUsers` WHERE `id` = '. $challenger_id .';';\n\t\t$challenger_obj = mysql_fetch_object(mysql_query($query));\n\t\t\n\t\t// send push to targeted user if allowed\n\t\tif ($challenger_obj->notifications == \"Y\")\n\t\t\t$this->sendPush('{\"device_tokens\": [\"'. $challenger_obj->device_token .'\"], \"type\":\"1\", \"aps\": {\"alert\": \"'. $creator_obj->username .' has sent you a '. $subject .' snap!\", \"sound\": \"push_01.caf\"}}');\n\t\t\n\t\t// get the newly created challenge\n\t\t$challenge_arr = $this->getChallengeObj($challenge_id);\n\t\t\n\t\t/// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "public function getUserPairs()\n {\n if(!$this->sso->checkKey()) return false;\n $users = $this->loadModel('user')->getPairs('noclosed,nodeleted');\n die(json_encode($users));\n }", "function get_user_skill_sets($userid)\n{\n\t\n\t$data= array();\n\t$qry=\"SELECT * FROM entrp_user_skills \n\t\t\tWHERE user_id=\".$userid.\" \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$data\t\t=\tjson_decode(strtolower($row['skills'])); \t\t\t\t\t\n\t\t}\n\t} \n\treturn $data;\t\n\t\n\t\n}", "private function all_time_users()\n\t{\n\t\t// Table Prefix\r\n\t\t$table_prefix = Kohana::config('database.default.table_prefix');\r\n\t\t$users = array();\r\n\t\t//get the info for the score based on number of ideas\r\n\t\t$sql = 'SELECT users.id as id, users.name as name, users.username as username,COUNT(users.id) * 10 as score FROM `'.$table_prefix.'users` as users\r\n\t\tjoin '.$table_prefix.'incident as incident ON '.$table_prefix.'incident.user_id = users.id\r\n\t\tgroup by users.id';\r\n\t\t$db = new Database();\r\n\t\t$query = $db->query($sql);\r\n\t\t//loop over the data and add it to the $users array\r\n\t\tforeach($query as $user)\r\n\t\t{\r\n\t\t\t$users[$user->id] = array('score'=>$user->score, 'name'=>$user->name, 'username'=>$user->username);\r\n\t\t}\r\n\t\t\r\n\t\t//now get the scores for votes on your own ideas\r\n\t\t$sql = 'SELECT users.id as id, users.name as name, users.username as username,COUNT(users.id) * 2 as score FROM `'.$table_prefix.'users` as users\r\n\t\tjoin '.$table_prefix.'incident as incident ON incident.user_id = users.id\r\n\t\tjoin '.$table_prefix.'score as score ON score.incident_id = incident.id\r\n\t\tWHERE score.vote = 1\r\n\t\tgroup by users.id';\r\n\t\t\r\n\t\t$query = $db->query($sql);\r\n\t\t//loop over the data and add it to the $users array\r\n\t\tforeach($query as $user)\r\n\t\t{\r\n\t\t\tif(!isset($users[$user->id]))\r\n\t\t\t{\r\n\t\t\t\t$users[$user->id] = array('score'=>0, 'name'=>$user->name, 'username'=>$user->username);\r\n\t\t\t}\r\n\t\t\t$users[$user->id]['score'] = $users[$user->id]['score'] + $user->score;\r\n\t\t}\r\n\t\t\r\n\t\t//now get points for your votes\r\n\t\t$sql = 'SELECT users.id as id, users.name as name, users.username as username,COUNT(users.id) as score FROM `'.$table_prefix.'users` as users\r\n\t\tjoin '.$table_prefix.'score as score ON score.user_id = users.id\r\n\t\tgroup by users.id';\r\n\t\t\r\n\t\t$query = $db->query($sql);\r\n\t\t//loop over the data and add it to the $users array\r\n\t\tforeach($query as $user)\r\n\t\t{\r\n\t\t\tif(!isset($users[$user->id]))\r\n\t\t\t{\r\n\t\t\t\t$users[$user->id] = array('score'=>0, 'name'=>$user->name, 'username'=>$user->username);\r\n\t\t\t}\r\n\t\t\t$users[$user->id]['score'] = $users[$user->id]['score'] + $user->score;\r\n\t\t}\n\t\t\n\t\t//now create an array mapping ids to scores so we can sort it\n\t\t$id_to_score = array();\n\t\t\n\t\tforeach($users as $key=>$value)\n\t\t{\n\t\t\t$id_to_score[$key] = $value['score'];\n\t\t}\n\t\t\n\t\tarsort($id_to_score);\n\t\t\n\t\treturn array('id_to_score'=>$id_to_score, 'users'=>$users);\n\t\t\n\t}", "public function getUserTournamentGuessChamps()\n {\n return $this->hasMany(UserTournamentGuessChamp::className(), ['tournamentId' => 'tournamentId']);\n }", "function fetch_user_test_results($file_num)\n\t{\n\t\t$arrUser = array();\n\t\t$pitchArrUser = $this->fetch_pitch_user($file_num);\n\t\t\n\t\tif($pitchArrUser !== null) {\n\t\t\t$pitchArrUser['type'] = \"Pitch Discrimination\";\n\t\t\t$pitchArrUser['app_type'] = \"pitch\";\n\t\t}\n\t\t\n\t\t$timeArrUser = $this->fetch_time_user($file_num);\n\t\tif($timeArrUser !== null) {\n\t\t\t$timeArrUser['type'] = \"Time Discrimination\";\n\t\t\t$timeArrUser['app_type'] = \"time\";\n\t\t}\n\t\t\n\t\t$tonalArrUser = $this->fetch_tonal_user($file_num);\n\t\tif($tonalArrUser !== null) {\n\t\t\t$tonalArrUser['type'] = \"Tonal Memory\";\n\t\t\t$tonalArrUser['app_type'] = \"tonal\";\n\t\t}\n\t\t\n\t\t// array_push($arrUser, $pitchArrUser, $timeArrUser, $tonalArrUser);\n\t\tif($pitchArrUser !== null) {\n\t\t\tarray_push($arrUser, $pitchArrUser);\n\t\t}\n\t\tif($timeArrUser !== null) {\n\t\t\tarray_push($arrUser, $timeArrUser);\n\t\t}\n\t\tif($tonalArrUser !== null) {\n\t\t\tarray_push($arrUser, $tonalArrUser);\n\t\t}\n\t\t\n\t\treturn $arrUser;\n\t}", "private function populateFields()\n {\n // With data_participants, data_forms data_questionnaires, and data_config tables.\n foreach ($this->collection as $model)\n {\n $this->dataParticipants[] = $model['original'];\n $this->dataForms[] = $model->data_form->toArray();\n $this->dataQuestionnaires[] = $model->data_questionnaire->toArray();\n $this->dataConfigs[] = $model->data_config->toArray();\n }\n\n\n // With data_game_phases.\n foreach ($this->collection as $dataParticipantModel)\n {\n foreach ($dataParticipantModel->data_game_phases->toArray() as $phase)\n {\n $this->dataGamePhases[] = $phase;\n }\n }\n\n }", "public static function userObject($user_id, $meta=\"\") {\n\t\t\n\t\t// get user row\n\t\t$query = 'SELECT * FROM `tblUsers` WHERE `id` = \"'. $user_id .'\";';\n\t\t$row = mysql_fetch_object(mysql_query($query));\n\t\t\n\t\t// get total votes\n\t\t$query = 'SELECT `id` FROM `tblChallengeVotes` WHERE `challenger_id` = '. $user_id .';';\n\t\t$votes = mysql_num_rows(mysql_query($query));\n\t\t\n\t\t// get total pokes\n\t\t$query = 'SELECT `id` FROM `tblUserPokes` WHERE `user_id` = '. $user_id .';';\n\t\t$pokes = mysql_num_rows(mysql_query($query));\n\t\t\n\t\t// get total pics\n\t\t$query = 'SELECT `id` FROM `tblChallenges` WHERE `creator_id` = '. $row->id .';';\n\t\t$pics = mysql_num_rows(mysql_query($query));\n\t\t\n\t\t$query = 'SELECT `id` FROM `tblChallenges` WHERE `challenger_id` = '. $row->id .' AND `challenger_img` != \"\";';\n\t\t$pics += mysql_num_rows(mysql_query($query));\n\t\t\n\t\t\n\t\t// return\n\t\treturn(array(\n\t\t\t'id' => $row->id, \n\t\t\t'username' => $row->username,\n\t\t\t'name' => $row->username, \n\t\t\t'token' => $row->device_token, \n\t\t\t'fb_id' => $row->fb_id, \n\t\t\t'gender' => $row->gender, \n\t\t\t'avatar_url' => UserPleb::avatarURLForUser($row),\n\t\t\t'bio' => $row->bio,\n\t\t\t'website' => $row->website,\n\t\t\t'paid' => $row->paid,\n\t\t\t'points' => $row->points, \n\t\t\t'votes' => $votes, \n\t\t\t'pokes' => $pokes, \n\t\t\t'pics' => $pics,\n\t\t\t'notifications' => $row->notifications, \n\t\t\t'meta' => $meta\n\t\t));\n\t}", "function getAllQuestions(){\n\t\t$stmt = $this->con->prepare(\"SELECT questionid, questionbody, questioncategory, questiontype, datecreated, expirationdate, usefulcount, visible, userid FROM question\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($questionid, $questionbody, $questioncategory, $questiontype, $datecreated, $expirationdate, $usefulcount, $visible, $userid);\n\t\t\n\t\t$questions = array(); \n\t\t\n\t\twhile($stmt->fetch()){\n\t\t\t$question = array();\n\t\t\t$question['questionid'] = $questionid; \n\t\t\t$question['questionbody'] = $questionbody;\n\t\t\t$question['questioncategory'] = $questioncategory; \n\t\t\t$question['questiontype'] = $questiontype;\n\t\t\t$question['datecreated'] = $datecreated;\n\t\t\t$question['expirationdate'] = $expirationdate;\n\t\t\t$question['usefulcount'] = $usefulcount; \n\t\t\t$question['visible'] = $visible; \n\t\t\t$question['userid'] = $userid;\n\t\t\t\n\t\t\tarray_push($questions, $question); \n\t\t}\n\t\t\n\t\treturn $questions; \n\t}", "function fetch_user_test_result($file_num)\n\t{\n\t\t$arrUser = array();\n\t\t\n\t\t$pitchArrUser = $this->fetch_pitch_user($file_num);\n\t\tif($pitchArrUser !== null) {\n\t\t\t$pitchArrUser['type'] = \"Pitch Discrimination\";\n\t\t\t$pitchArrUser['app_type'] = \"pitch\";\n\t\t\t$pitchArrUser['test_result'] = $this->_userResults($pitchArrUser['id'], \"pitch\");\n\t\t\t$pitchArrUser['practice_result'] = $this->_userPracticeResults($pitchArrUser['id'], \"pitch\");\n\t\t}\n\t\t\n\t\t$timeArrUser = $this->fetch_time_user($file_num);\n\t\tif($timeArrUser !== null) {\n\t\t\t$timeArrUser['type'] = \"Time Discrimination\";\n\t\t\t$timeArrUser['app_type'] = \"time\";\n\t\t\t$timeArrUser['test_result'] = $this->_userResults($timeArrUser['id'], \"time\");\n\t\t\t$timeArrUser['practice_result'] = $this->_userPracticeResults($timeArrUser['id'], \"time\");\n\t\t}\n\t\t\n\t\t$tonalArrUser = $this->fetch_tonal_user($file_num);\n\t\tif($tonalArrUser !== null) {\n\t\t\t$tonalArrUser['type'] = \"Tonal Memory\";\n\t\t\t$tonalArrUser['app_type'] = \"tonal\";\n\t\t\t$tonalArrUser['test_result'] = $this->_userResults($tonalArrUser['id'], \"tonal\");\n\t\t\t$tonalArrUser['practice_result'] = $this->_userPracticeResults($tonalArrUser['id'], \"tonal\");\n\t\t}\n\t\t\n\t\t// array_push($arrUser, $pitchArrUser, $timeArrUser);\n\t\tif($pitchArrUser !== null) {\n\t\t\tarray_push($arrUser, $pitchArrUser);\n\t\t}\n\t\tif($timeArrUser !== null) {\n\t\t\tarray_push($arrUser, $timeArrUser);\n\t\t}\n\t\tif($tonalArrUser !== null) {\n\t\t\tarray_push($arrUser, $tonalArrUser);\n\t\t}\n\t\t\n\t\treturn $arrUser;\n\t}", "public function _getData(): array\n {\n $result = [\n 'id' => $this->getId(),\n 'question' => $this->getQuestion(),\n 'options' => $this->getOptions(),\n 'total_voter_count' => $this->getTotalVoterCount(),\n 'is_closed' => $this->getIsClosed(),\n 'is_anonymous' => $this->getIsAnonymous(),\n 'type' => $this->getType(),\n 'allows_multiple_answers' => $this->getAllowsMultipleAnswers(),\n 'correct_option_id' => $this->getCorrectOptionId(),\n 'explanation' => $this->getExplanation(),\n 'explanation_entities' => $this->getExplanationEntities(),\n 'open_period' => $this->getOpenPeriod(),\n 'close_date' => $this->getCloseDate(),\n ];\n\n return parent::normalizeData($result);\n }", "private function collectData()\n {\n return $this->cache->remember('Moloni_Countries', function() {\n $availableCountries = $this->countriesApi->getAll();\n\n $countries = [];\n\n foreach($availableCountries as $country) {\n // Checks if country already exists\n // This is needed to prevent US showing up as Hawai, since iso_3166_1 is not unique in Moloni\n if(!isset($countries[strtolower($country['iso_3166_1'])])) {\n $countries[strtolower($country['iso_3166_1'])] = $country['country_id'];\n }\n }\n\n return $countries;\n });\n }", "function get_player_champions(){\n $possebowl = get_posse_bowl();\n $i = 0;\n foreach ($possebowl as $key => $value):\n if($value['result'] == 1):\n $winners[$value['year'].$value['team'].$i] = $value['playerid'];\n $i++;\n endif;\n endforeach;\n return $winners;\n}", "public function getUserChords($request, $response, $args) {\n $chords = User::findOrFail($args['id'])->chords;\n \n if ($chords != null || !empty($chords)) {\n $chords_array = array();\n \n foreach($chords as $chord) {\n $temp = $chord->toArray();\n // displaying number of times practised at end of each row \n // instead of within a pivot array\n $temp[\"NUM_TIMES_PRACT\"] = $chord->getNumTimesPractised();\n array_push($chords_array, $temp);\n }\n return $response->withStatus(200)->withJson($chords_array); \n }\n else {\n return $response->withStatus(500)->withJson(array());\n }\n }" ]
[ "0.66353166", "0.66182715", "0.65480685", "0.6528065", "0.5831964", "0.5786181", "0.5719432", "0.56597257", "0.5641381", "0.5559926", "0.5487983", "0.5466323", "0.5308102", "0.53014857", "0.5279256", "0.5225644", "0.517017", "0.51219106", "0.5120738", "0.50948834", "0.50644076", "0.50527054", "0.5043231", "0.50288737", "0.500231", "0.49696958", "0.49575612", "0.4933425", "0.49311396", "0.49283093", "0.49237713", "0.49197468", "0.4891238", "0.48853812", "0.48559943", "0.4831755", "0.48279706", "0.47908968", "0.4766082", "0.47553566", "0.47481036", "0.473765", "0.47316355", "0.4723644", "0.47053295", "0.4704792", "0.4697691", "0.4683476", "0.4671977", "0.46606115", "0.46516594", "0.46383485", "0.4637079", "0.46227896", "0.46121162", "0.45922074", "0.45864818", "0.45642942", "0.45461828", "0.45193484", "0.4500807", "0.44847152", "0.4478402", "0.44725063", "0.4472497", "0.44712883", "0.44646254", "0.4463719", "0.44492117", "0.44436073", "0.44434494", "0.44338748", "0.44235554", "0.44194624", "0.44184732", "0.44173175", "0.44144422", "0.43961933", "0.43941295", "0.43898535", "0.43806306", "0.4379385", "0.43741325", "0.4372663", "0.43718925", "0.4368163", "0.43461385", "0.4343956", "0.43415228", "0.4339829", "0.43389237", "0.433431", "0.4331246", "0.4323671", "0.43154222", "0.43146247", "0.43104893", "0.43079022", "0.43073666", "0.43065014" ]
0.72299063
0
Identify the current highest Elo at a given users club.
Определите текущий самый высокий Эло в клубе пользователя.
function getClubMaxElo($playerID) { /* Fetch every players Elo from the users club. */ $statementGetElos = $this->connection->prepare ( "SELECT playerid, elo FROM player WHERE clubid = (SELECT clubid FROM player WHERE playerid = ?)" ); $statementGetElos->bind_param("i", $playerID); $statementGetElos->execute(); $statementGetElos->bind_result($userID, $elo); $elos = array(); /* Don't append the users elo. */ while ($statementGetElos->fetch()) { if ($userID != $playerID) { array_push($elos, $elo); } } $statementGetElos->close(); return max($elos); // Return the highest value. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchMaxRankedGiven()\n\t{\n\t\t$fetchCondition = $this->fetchCurrentUser().\"_id = \".$this->getSession(SYSTEM_JUDGE_USER_ID);\n\t\t$sQuery = \"SELECT MAX(vd.score) as maxRanked FROM \".DB_PREFIX.\"vote v,\".DB_PREFIX.\"vote_detail vd WHERE \".$fetchCondition.\" AND v.contest_id='\".$this->contest_id.\"' AND v.judge_round_id='\".$this->judge_round_id.\"' AND v.vote_id=vd.vote_id GROUP BY vd.vote_id \";\n\t\t$rs = mysql_query($sQuery);\n\t\t\n\t\t$maxRanked = 0;\n\t\tif(mysql_num_rows($rs)>0)\n\t\t{\n\t\t\t$res = mysql_fetch_assoc($rs);\n\t\t\t$maxRanked = $res['maxRanked'];\n\t\t}\n\t\treturn $maxRanked;\n\t}", "function highest();", "public function getUserHighestRole()\n\t{\n\t\treturn zbase_cache(zbase_cache_key(zbase_entity($this->entityName), 'getUserRoles_' . $this->id()), function(){\n\t\t\treturn $this->roles()->orderBy('parent_id', 'DESC')->first();\n\t\t}, [zbase_entity($this->entityName)->getTable()], (60 * 24), ['forceCache' => true, 'driver' => 'file']);\n\t}", "public function getYoungestTeam(){\n \tif($this->_apc && apc_exists($this->apc_webkot_young_team)){\n \t\treturn apc_fetch($this->apc_webkot_young_team);\n \t}else{\n\t \ttry{\n\t\t \t$sql = \"SELECT W.id as id, W.name as name, W.firstname as firstname, W.nickname as nickname, T.age as age, W.mail as mail, T.function as function, T.pathimg as img, T.studies as studies,W.userid as userid, W.valuetolike as valuetolike, T.place as place FROM webkot_team_member T, webkot_webkotteur W WHERE (T.webkotteurid = W.id) and (T.year = (select max(year) from webkot_team_member)) order by T.place\";\n\t\t \t$stmt = $this->_db->prepare($sql);\n\t\t $stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t $error = $stmt->errorInfo();\n\t\t\t throw new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir l'equipe la plus recente\");\n\t\t\t }\n\t\t\t\t$team = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){ \n\t\t \t$team[] = new Webkotteur($data);\n\t\t } \n\t\t if($this->_apc){\n\t\t \tapc_store($this->apc_webkot_young_team, $team, 175000);\n\t\t }\n\t\t return $team;\t\n\t \t}catch(PDOException $e){\n\t \tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir l'equipe la plus recente\");\n\t }\n \t}\n }", "function max_bestell_nr() {\n $query = \"SELECT MAX(bestell_nr) AS mx FROM \" . $this->table_name;\n $stmt = $this->conn->prepare($query);\n if ($stmt->execute()) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $row['mx'];\n };\n return -1;\n }", "function getLossesForUser ($user_id)\n\t{\n\t\t$db = new Database();\n\t\t$select = \"select count(*) from GAMES where (player1_user_id = {$user_id} and player1_spins < player2_spins) or (player2_user_id = {$user_id} and player2_spins < player1_spins);\";\n\t\t$result = $db->query($select);\n\t\tif ($losses = mysqli_fetch_array($result)) {\n\t\t\treturn $losses[0];\n\t\t}\n\t\treturn null;\n\t}", "function mrh_get_user_highest_role( $user_id ) {\n\n\t$positions = mrh_get_role_positions();\n\n\t$user = new WP_User( $user_id );\n\n\t$highest_role = '';\n\n\tif ( $user->roles ) {\n\n\t\tforeach ( $user->roles as $role ) {\n\n\t\t\tif ( ! $highest_role ) {\n\n\t\t\t\t$highest_role = $role;\n\n\t\t\t} else if ( $highest_role ) {\n\n\t\t\t\t// Get the position of the highest role.\n\t\t\t\t$h_role_pos = mrh_get_role_position( $highest_role );\n\n\t\t\t\t// Get the position of the current role.\n\t\t\t\t$c_role_pos = mrh_get_role_position( $role );\n\n\t\t\t\t// If the current role is higher than the highest role, it becomes\n\t\t\t\t// the new highest role.\n\t\t\t\tif ( $c_role_pos > $h_role_pos )\n\t\t\t\t\t$highest_role = $role;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $highest_role;\n}", "function highest_rank($db)\n{\n\t$highest_rank_sql = \"select max(rank) from player\";\n\t$statement_highest_rank = $db->prepare($highest_rank_sql);\n\t$statement_highest_rank->execute();\n\t$highest_rank_result = $statement_highest_rank->fetch(PDO::FETCH_ASSOC);\n\t$highest_rank = $highest_rank_result[\"max\"];\n\n\treturn $highest_rank;\n}", "function saisonMaximum(){\n \t// On va récupreer la journée Maximum de la dernière saison \n\tglobal $bdd;\n\t// On récupère la saison maximum\n\t$rMaxSaison = mysqli_query($bdd, 'SELECT max(saison) FROM positions');\n\t$donnees = mysqli_fetch_assoc($rMaxSaison);\n\t$maxSaison = $donnees['max(saison)'];\n\tmysqli_free_result($rMaxSaison);\n\n\treturn $maxSaison;\n}", "function getEloRating($playerID) {\n\t$query = \"select elo from elo where playerID=$playerID ORDER BY id DESC LIMIT 1\";\n\t$result = mysql_query($query);\n\t$row = mysql_fetch_object($result);\n\t$name = $row->elo;\n\treturn $name;\n}", "function get_top_role($u_id,$mysqli) {\n\ninclude('db-config.php');\n\n// get the person for whom this position as meant to be\n$getPosName = $mysqli->prepare('SELECT position_code,position_id FROM position WHERE position_people_id=?') or die('Couldn\\'t check the vote.');\n\n$getPosName->bind_param('s', $u_id); // getting whether this person as voted for the position or not\n$getPosName->execute();\n$getPosName->store_result();\n$getPosName->bind_result($pos_code,$pos_id);\n$base = 0;\nwhile($getPosName->fetch()) {\n\tif(is_role_active($pos_id,$mysqli)){\n\t\tif($base < $score[$pos_code])\n\t\t\t$base = $score[$pos_code];\n\t\n\t}\n$code = array_search($base, $score);\n\nreturn $code;\n\n \n}\n\n}", "public function getLargestChangeId() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"largestChangeId\");\n\t}", "function max_scorer()\n {\n global $players;//using array of objects of player class\n $total=0;//for calculating total run scored by a player\n $max=0;//for keeping maximum run scored\n foreach ($players as $key=>$value)\n {\n foreach($value as $key1=>$value1)\n {\n $total = $total + $value1->run;\n if($total > $max)\n {\n $max=$total;\n $p_name=$key;\n }\n }\n $total=0;\n }\n echo \"Highest Scorer: \" . $p_name . \"<br>\" . \"Score: \" . $max . \"<br><br>\";\n }", "function calcul_elo_last_match()\n{\n\t//on travaille sur le dernier match\n\t$bdd = connect_bdd();\n\t$sql = \"select max(id) id from matchs;\";\n\t$resultat = mysqli_query($bdd,$sql);\n\t$data = mysqli_fetch_assoc($resultat);\t\n\t\n\treturn calcul_elo_by_match($data['id']);\n}", "public function getMaxPosition()\n {\n // Max position\n $max_position = 1;\n\n // Loop each participant\n foreach ($this->getParticipants() as $part)\n {\n if ( ! $part->getLaps()) {\n continue;\n }\n\n if ($part->getGridPosition() AND\n $part->getGridPosition() > $max_position)\n {\n $max_position = $part->getGridPosition();\n }\n\n // Loop each lap\n foreach ($part->getLaps() as $lap)\n {\n // Position is higher than current max\n if ($lap->getPosition() AND\n $lap->getPosition() > $max_position)\n {\n // Set new max\n $max_position = $lap->getPosition();\n }\n }\n }\n\n // Return max position\n return $max_position;\n }", "public function getLatestSaleId()\n\t{\n\t\t$latestEmployeeId = 0;\n\t\t$table = LOAN_INVESTMENT_TB;\n\t\t$where = \"\";\n\t\t\n\t\t$getMaxLoanInvestId = $this->db->select(\"MAX(li_id)\", $table, $where, \"\", \"\");\n\t\tif(count($getMaxLoanInvestId) > 0)\n\t\t{\t\n\t\t\t$latestEmployeeId = $getMaxLoanInvestId[0]['MAX(li_id)'];\n\t\t}\n\t\treturn $latestEmployeeId;\n\t}", "function geting_best_position($id,$position)\n{\n\t$result = mysql_query(\"select * from users where parent_id = '$id' and position = '$position' \");\n\t$num = mysql_num_rows($result);\n\tif($num != 0)\n\t{\n\t\twhile($row = mysql_fetch_array($result))\n\t\t{\n\t\t\t$position_user_id = $row['id_user'];\n\t\t}\n\t\t$best_child = get_chld_best_pos($position_user_id,$position);\t\n\t}\n\telse $best_child = $id;\n\treturn $best_child;\n}", "public function getMostExperienced($limit)\n\t{\n\t\t$highest_levels = $this->_user->orderby('level', 'desc')\n\t\t->take($limit)\n\t\t->get();\t\n\n\t\treturn $highest_levels;\n\t}", "function maxscoreobtenido($link) {\n $score=0;\n $consulta = \"select b.nombre,a.score from bdlt_participacion a inner join bdlt_registro b on a.id_registro=b.id where score <30000 order by score desc LIMIT 1;\";\n if ($resultado = mysqli_query($link, $consulta)) {\n while ($fila = mysqli_fetch_row($resultado)) {\n $score=$fila[0].'<br /> score '.number_format($fila[1], 0, '.', ',');\n }\n /* liberar el conjunto de resultados */\n mysqli_free_result($resultado);\n }\n return $score;\n}", "function news_gethighest_rank(){\n\n global $conf, $lang;\n \n $my_result = dbquery(\"select news_topic_rank from \".$conf[\"db_namespace\"].\"news_topics order by news_topic_rank DESC\");\n $row = mysql_fetch_object($my_result);\n $rank = $row->news_topic_rank;\n mysql_free_result($my_result);\n return $rank;\n}", "public function getLedMostParticipant()\n {\n $led_most_participant = null;\n\n // Check each participant\n foreach ($this->getParticipants() as $participant)\n {\n //No led most participant yet\n if ( ! $led_most_participant)\n {\n // Just set this\n $led_most_participant = $participant;\n\n // Continue to next participant\n continue;\n }\n\n // This participant led more\n if ($participant->getNumberOfLapsLed() >\n $led_most_participant->getNumberOfLapsLed())\n {\n // Set this participant as most led\n $led_most_participant = $participant;\n }\n }\n\n // Return\n return $led_most_participant;\n }", "public function getBestScore($userId)\n {\n $DBConnection = $this->getDBConnection();\n $query = $DBConnection->prepare(\"SELECT bestScore FROM game_users WHERE id = :userId\");\n $query->bindParam(\":userId\", $userId, PDO::PARAM_INT);\n $query->execute();\n $response = $query->fetch();\n return $response[0];\n }", "function getHighestAccountingValue($userID) {\n\n $stmt = mysqli_prepare($this->con, \"SELECT MAX(Value) as 'Max' FROM Accounting WHERE UserID = ?;\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n return $stmt->get_result()->fetch_all(MYSQLI_ASSOC)[0]['Max'];\n }", "public function getLoser() {\n if ($this->getWinner()) {\n $contestants = $this->getMatchContestants();\n foreach($contestants as $eid => $contestant)\n if ($eid != $this->getWinner())\n return $eid;\n }\n return NULL;\n }", "function highestDistance($Contractors = null){\n \tend($Contractors);\n \treturn round(key($Contractors),1);\n }", "public static function getMax()\n {\n \treturn Stat::getByLevel();\n }", "public function getMostViewed() {\n \n }", "public function getMostViewed() {\n \n }", "function getHighestRank($table) {\n\tglobal $mysql_tstatus_table;\n\tif($table == $mysql_tstatus_table) {\n\t\t$sql = \"select id from $table order by rank desc\";\n\t} else {\n\t\t$sql = \"select id from $table order by rank asc\";\n\t}\n\t$result = execsql($sql);\n\t$row = mysql_fetch_row($result);\n\treturn $row[0];\n}", "public function max()\n {\n $data = $this->_get_data();\n return $data['max'];\n }", "private function getMaxCliente(){\n $query = \"SELECT MAX(vent_cli_id) AS id_max \n FROM vent_cliente\n WHERE ISNULL(vent_cli_usr_baja)\";\n $max = $this->mysql->query($query);\n return $max[0][0]['id_max'];\n }", "public function getMaxTeams() {\n return $this->maxTeams; \n }", "public function getUserOpponent()\n\t\t{\n\t\t\treturn ($this->getPlayer()->getId() == Caspar::getUser()->getId()) ? $this->getOpponent() : $this->getPlayer();\n\t\t}", "public function getUsersBestScore()\n {\n $sqlQueryService = new sqlQueryService();\n $query = \"SELECT username, bestScore FROM game_users\";\n $users = $sqlQueryService->sqlQueryService($query);\n foreach ($users as $user) {\n $usersArray[$user[\"username\"]] = $user[\"bestScore\"];\n }\n return $usersArray;\n }", "public function getMaxPlayers();", "public function getDefenderLeague()\n {\n $value = $this->get(self::DEFENDER_LEAGUE);\n return $value === null ? (integer)$value : $value;\n }", "public static function mostCommonSportInTheMostCommonCity(){\n\n $sql = \"SELECT sportcategory.SportCategoryName\n FROM sportcategory\n WHERE sportcategory.SportCategoryCode = \n (SELECT groupsport.SportCategoryCode\n FROM groupsport\n WHERE groupsport.cityCode = (SELECT users.cityCode\n FROM users \n GROUP BY users.cityCode\n ORDER BY COUNT(users.cityCode) DESC \n LIMIT 1)\n GROUP BY groupsport.SportCategoryCode\n ORDER BY COUNT(groupsport.SportCategoryCode) DESC \n LIMIT 1)\";\n \n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->execute();\n \n\t\treturn $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function getLastest (Request $request) \n {\n $userId = $request->input('uid');\n\n $mechineId = $request->input('mid');\n\n $maxId = Temperature::where('user_id', '=', $userId)\n\n ->where('mechine_id', '=', $mechineId)\n\n ->max('id');\n\n $result = Temperature::find($maxId);\n\n return $this->successResponse('data', $result);\n \n }", "public function selectCoverForLastVideo($userid){\n\t\n\tif(is_numeric($userid)){\n\t\t$cover = $this->db->query(\"Select id from \".tbl_videos.\" where `userid`='{$userid}' order by added desc limit 1\");\n\t\t$cover = $cover->fetch_array(MYSQLI_ASSOC);\n\t}\n\t\n\treturn isset($cover) && $cover['id'] > 0 ? $cover['id'] : 0;\n\t\n}", "public function getMaximum()\r\n {\r\n if (!$this->statsOk) {\r\n $this->calcStats();\r\n }\r\n return $this->maximum;\r\n }", "function get_max_profile_id()\n{\n $query = 'SELECT MAX(profile_id) AS id FROM notice';\n\n $profile = new Profile();\n $profile->query($query);\n\n if ($profile->fetch()) {\n return intval($profile->id);\n } else {\n die(\"Something went awry; could not look up max used profile_id.\");\n }\n}", "function max_run()\n {\n global $match_dt;//using array of objects of match class\n $max=0;//for storing max run scored by a team\n foreach($match_dt as $key=>$value)\n {\n foreach($value as $key1=>$value1)\n {\n if($value1->run > $max)\n {\n $max=$value1->run;\n $t_name=$value1->team;\n $match=$key;\n }\n }\n }\n echo \"Max Scorer: \" . $t_name . \"<br>\" . \"Score: \" . $max . \"<br>\" . \"Match: \" . $match . \"<br><br>\";\n }", "public function getLastTeamInserted($userId)\n {\n $queryString=\"SELECT MAX(team_id) as teamId\n FROM teams\";\n $query = $this->db->query($queryString);\n\n /*$this->db->select('team_id');\n $this->db->where('user_id',$userId);\n $query=$this->db->get('teams');*/\n $result=$query->result_array();\n //print_r($result);\n\n return $result[0][\"teamId\"];\n\n }", "function __getMax($model, $scope, $right) {\n\t\tlist($edge) = array_values($model->find($scope, \"MAX({$right}) AS {$right}\", null, -1));\n\t\treturn ife(empty ($edge[$right]), 0, $edge[$right]);\n\t}", "public function getmaximumscore($match);", "public static function getTopRankedPlace() {\n\t\t$candidates = Place::all();\n\n\t\t$maxScore = 0;\n\t\t$top = $candidates->first();\n\t\t$candidates = $candidates->map(function($c) use (&$top, &$maxScore) {\n\t\t\t$score = $c->counters->score;\n\t\t\tif ($score > $maxScore) {\n\t\t\t\t$top = $c;\n\t\t\t\t$maxScore = $score;\n\t\t\t}\n\t\t});\n\n\t\treturn $top;\n\t}", "public static function maxid(){\n\t\t\t$sql = \"SELECT id FROM \".self::$tablename.\" ORDER BY id DESC LIMIT 1\";\n\t\t\t$query = Executor::doit($sql);\n\t\t\treturn Model::one($query[0],new SueloData());\n\t\t}", "function ultimoconsect_sesion() {\n $query = $this->db->query(\"SELECT CASE\n WHEN COUNT(conset_sesion) = 0 THEN 1\t\t\n ELSE MAX(conset_sesion)+1 \n END AS val\n FROM\n convergencia.usuario_tema\n ORDER BY id DESC LIMIT 1\");\n\n $ret = $query->row();\n return $ret->val;\n }", "private function vxTopWealthRank() {\n\t\t$sql = \"SELECT usr_id, usr_money FROM babel_user WHERE usr_sw_top_wealth = 1 ORDER BY usr_money DESC\";\n\t\t$rs = mysql_query($sql);\n\t\t$i = 0;\n\t\twhile ($_u = mysql_fetch_array($rs)) {\n\t\t\t$i++;\n\t\t\t$this->cl->save(strval($i), 'babel_top_wealth_rank_u' . strval($_u['usr_id']));\n\t\t}\n\t\t$this->cl->save(strval($i), 'babel_top_wealth_rank_total');\n\t}", "public function getYouthLeagueId()\n {\n return $this->getObjectId();\n }", "public function highestOnChain($achiever)\n {\n $latestUnlocked = null;\n foreach($this->chain() as $instance) {\n /** @var Achievement $instance */\n /** @var Achiever $achiever */\n if($achiever->hasUnlocked($instance)){\n $latestUnlocked = $achiever->achievementStatus($instance);\n } else {\n return $latestUnlocked;\n }\n }\n return $latestUnlocked;\n }", "function traepedmax($mysqli){\r\n\t\t$req = \"SELECT MAX(idpedidos) FROM pedidos WHERE 1\"; \r\n \t$result = mysqli_query($mysqli,$req);\r\n\t\t$row=mysqli_fetch_array($result,MYSQLI_NUM);\r\n\t\t$cuenta=count($row);\r\n\t\tif(is_null($row)){$pedmax=0;}else{$pedmax=$row[0];}\r\n\t /* liberar la serie de resultados */\r\n\t mysqli_free_result($result);\r\n\t\treturn $pedmax;\r\n\t}", "function oublog_user_outline($course, $user, $mod, $oublog) {\n global $CFG, $DB;\n\n $sql = \"SELECT count(*) AS postcnt, MAX(timeposted) as lastpost\n FROM {oublog_posts} p\n INNER JOIN {oublog_instances} i ON p.oubloginstancesid = i.id\n WHERE p.deletedby IS NULL AND i.userid = ? AND oublogid = ?\";\n\n if ($postinfo = $DB->get_record_sql($sql, array($user->id, $mod->instance))) {\n $result = new stdClass();\n $result->info = get_string('numposts', 'oublog', $postinfo->postcnt);\n $result->time = $postinfo->lastpost;\n\n return($result);\n }\n\n return(null);\n}", "private function lastEan()\n {\n $last = DB::queryFirstRow(\"SELECT last FROM EAN_settings WHERE `range`=%s\", $this->eanScope);\n return $last;\n }", "public function getWinnerId(): int {\r\n if ($this->getScore1() > $this->getScore2()) {\r\n if ($this->getGroup1Id()) {\r\n return $this->getGroup1Id();\r\n }\r\n return $this->getUser1()->getUserId();\r\n } else if ($this->getScore1() == $this->getScore2()) {\r\n return 0;\r\n } else {\r\n if ($this->getGroup2Id()) {\r\n return $this->getGroup2Id();\r\n }\r\n return $this->getUser2()->getUserId();\r\n }\r\n }", "public function getMaximo()\n {\n return $this->maximo;\n }", "protected function getHauteurMaximale()\n {\n if (null === $this->originale) {\n return static::$ORIGINALE_HAUTEUR_MAXIMALE;\n }\n\n return static::$MINIATURE_HAUTEUR_MAXIMALE;\n }", "public function get_max_student() {\n\t\t$query = $this->db->query(\"SELECT * FROM $this->_table_name WHERE studentID = (SELECT MAX(studentID) FROM $this->_table_name)\");\n\t\treturn $query->row();\n\t}", "public function getMonthlyMaxPeople($userParams = array())\n\t{\n\t\t$cbData = $this->get('historical/traffic/stats/', $userParams);\n\t\t$max = isset($cbData->data->{$this->host}->people->max) ? $cbData->data->{$this->host}->people->max : null;\n\t\treturn $max;\n\t}", "public static function groupWithMostUsers(){\n\n $sql = \"SELECT `GroupName`,COUNT(`GroupName`) mycount \n FROM usersgroups \n WHERE `is_accepted` = 1 \n GROUP BY `GroupName` \n ORDER BY mycount DESC \n LIMIT 1\";\n \n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->execute();\n \n\t\treturn $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function getLieu()\r\n {\r\n return $this->lieu;\r\n }", "private function get_max_version_objet()\r\n\t\t{\r\n\t\t\t/**==================================================================\r\n\t\t\t * PREPARATION DE LA REQUETE\r\n\t\t\t ====================================================================*/\t\t\t\r\n\t\t\tswitch ($this->c_type_object)\r\n\t\t\t{\r\n\t\t\t\tcase __IFICHE__:\r\n\t\t\t\t\t$sql = 'SELECT num_version as max_version \r\n\t\t\t\t\t\t\tFROM '.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_max_fiches']['name'].' \r\n\t\t\t\t\t\t\tWHERE id_fiche = '.$this->c_id_object;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase __ICODE__:\r\n\t\t\t\t\t$sql = 'SELECT version as max_version \r\n\t\t\t\t\t\t\tFROM '.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_max_codes']['name'].' \r\n\t\t\t\t\t\t\tWHERE id = '.$this->c_id_object;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\t\t\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$resultat = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t\t\r\n\t\t\treturn mysql_result($resultat,0,'max_version');\r\n\t\t}", "function get_user_last( $user ) {\n $u_last = get_user_data( $user , 'u_last' );\n return $u_last;\n}", "public function getHighestStatId() : StatId\n\t{\n\t\treturn $this->highestStatId;\n\t}", "public function obtenerUltimoCodigoGestor() {\n\n $resultado = mysqli_query($this->connection, \"select max(idGestor) as ultimoCodigoGestor from tbgestor \");\n $ultimoCodigoGestor = 0;\n\n while ($filaTemporal = mysqli_fetch_array($resultado)) {\n $ultimoCodigoGestor = $filaTemporal['ultimoCodigoGestor'];\n }\n return $ultimoCodigoGestor;\n }", "public function getUserMaxShip($uid)\n {\n $sql = \"SELECT ship_id FROM $this->table_user_dock WHERE uid=:uid ORDER BY ship_id DESC LIMIT 0,1\";\n return $this->_rdb->fetchOne($sql, array('uid' => $uid));\n }", "public function getBest()\n {\n return Util::minByKey(\n $this->chromosomes,\n function ($chPair) {\n return $chPair['error'];\n }\n )['chromosome'];\n }", "private function getHighestEntityId()\n {\n $collectionOfProduct = $this->product->getCollection();\n\n // Only to retrieve the last item in shop\n $collectionOfProduct->setOrder('entity_id', 'DESC');\n $firstItem = $collectionOfProduct->getFirstItem();//->setPageSize(1); -TODO Test adding this\n $entityId = $firstItem->getEntityId();\n\n return $entityId;\n }", "public function getExplorationMaxAfford();", "public static function max() {}", "public static function max() {}", "public function getAttackerLeague()\n {\n $value = $this->get(self::ATTACKER_LEAGUE);\n return $value === null ? (integer)$value : $value;\n }", "public function getLeague()\n\t{\n\t\treturn $this->league;\n\t}", "public static function mysql_greatest()\n {\n $args = func_get_args();\n static::checkArgs($args);\n\n return max($args);\n }", "function echoLeaderboard($db){\n try{\n $statement = $db->query('SELECT * FROM user ORDER BY best_score DESC');\n $users = $statement->fetchAll(PDO::FETCH_CLASS, 'User');\n }\n catch (PDOException $exception){\n error_log('Request error: '.$exception->getMessage());\n return false;\n }\n foreach ($users as $key => $value) {\n if ($key>24) {//A maximum of 25 users are shown\n break;\n }\n echo '<tr>\n <td>Numéro '.($key+1).'</td>\n <td>'.$value->getLogin().'</td>';\n if (NULL != $value->getBestScore()) {//If the user has a high score\n echo '<td>'.$value->getBestScore().' pts</td>\n <td>\n <a href=\"mainmenu.php?gameId='.$value->getBestGameId().'\">Partie n°'.$value->getBestGameId().'</a>\n </td>\n </tr>';\n // Anyone can click on the game number to challenge the user\n }\n else{\n echo '<td></td>\n <td></td>\n </tr>';\n }\n }\n}", "function getMostExpensiveWine() {\n global $pdo;\n\n $sql = \"SELECT MAX(i.`cost`) AS \\\"max\\\"\n FROM `inventory` as i\n WHERE i.`on_hand` > 0\";\n\n $statement = $pdo->prepare($sql);\n $statement->execute();\n\n return $statement->fetch(PDO::FETCH_NUM)[0];\n }", "public function getUserTopScores($username, $mode, $key)\n\t{\n\t\t$url = $this->apiurl . 'get_user_best?u='. $username . '&m=' . $mode . '&k=' . $key;\n\t\treturn $this->apiRequest($url);\n\t}", "public function max() {\n\t\tif ($this->is_empty()){\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->p_max($this->get_root())->get_key();\n\t}", "public static function bestPlayerSheldon()\n {\n return GameScore::join('players', 'players.id', '=', 'game_scores.player_id')\n ->where('game_scores.game_id', 1)\n ->select('players.player_name', 'game_scores.score')\n ->orderBy('game_scores.score', 'DESC')\n ->take(6)\n ->get();\n }", "public function getMaximum()\r\r\n {\r\r\n return $this->maximum;\r\r\n }", "function getTimeLast()\r\n{\r\n $timelast = -1;\r\n $statement = get_slave_db_handle()->prepare('SELECT UNIX_TIMESTAMP(NOW()) - MAX(Epoch) FROM PlayerTimeline');\r\n $statement->execute();\r\n if ($row = $statement->fetch()) $timelast = (int)$row[0];\r\n // max 2 hours\r\n if($timelast > 7200) $timelast = 0;\r\n return($timelast);\r\n}", "public static function Max()\n\t{\n\t\treturn $max;\n\t}", "private function get_popular_course_id() {\n global $DB;\n $popular = $DB->get_field_sql (\"SELECT c.id, c.fullname, COUNT(*) AS enrolments\n FROM mdl_course c\n JOIN (SELECT DISTINCT e.courseid, ue.id AS userid\n FROM {user_enrolments} ue\n JOIN {enrol} e ON e.id = ue.enrolid) ue ON ue.courseid = c.id\n GROUP BY c.id\");\n return $popular;\n }", "public function getHighestGoalStatusAttribute()\n {\n // $highest = null;\n\n // foreach ($goals as $key => $goal) {\n // if ((object)$goal[0]['goalStatus']['id'] === 5) {\n // return (object)$goal[0]['goalStatus'];\n // }\n // if ((object)$goal[0]['goalStatus']['id'] !== 6 && $highest === null) {\n // $highest = (object)$goal[0]['goalStatus'];\n // }\n // if (is_null($highest) || $highest->id < (int)$goal[0]['goalStatus']['id']) {\n // $highest = (object)$goal[0]['goalStatus'];\n // }\n // }\n\n // return $highest;\n }", "function get_most_recent_post_of_user($user_id)\n{\n}", "public function get_oldest_superadmin()\n\t{\n\t\t$query = $this->db->from('members')\n\t\t\t->select('member_id')\n\t\t\t->where('group_id', 1)\n\t\t\t->order_by('member_id', 'asc')\n\t\t\t->limit(1);\n\n\t\treturn $query->get()->row('member_id');\n\t}", "function FetchUser() {\n\t\t\n\t\tif (isset($this->mU_id)) {\n\t\t\t$oLoggenOnUser = $this->mU_id;\n\t\t\t//echo \"Found User: \", $loggenOnUser, \"<br />\";\n\t\t}else {\n\t\t\t $oLoggenOnUser = -1;\n\t\t}\n\t\treturn $oLoggenOnUser + 0; //ensures a numerical value is returned\t\n\t}", "public function testHighestScore()\n {\n $game = new DiceGame(100, \"Heidi\", 3, 2);\n $player = $game->getCurrentPlayer();\n $player->setScore(23);\n $game->goToNextRound();\n\n $res = $game->getHighestScore();\n $exp = 23;\n\n $this->assertEquals($res, $exp);\n }", "public function users_highest_significance($userid) {\n\t\t$this->db->where('user_id', $userid);\n\t\t$this->db->order_by('significance', 'DESC');\n\t\t$query = $this->db->get($this->Table, 1);\n\t\treturn (int) $query->row()->significance;\n\t}", "public function maximum();", "public function getLastWinner(){\n $sql = \"SELECT * FROM user WHERE date_win IS NOT NULL AND date_win <> '' ORDER BY date_win DESC\";\n $Pdo = DatabaseService::getInstance()->getPdo();\n try{\n $sth = $Pdo->prepare($sql);\n $sth->execute();\n }catch (Exception $e){\n echo \"Exception occured, code: \" . $e->getCode();\n echo \" with message: \" . $e->getMessage();\n die();\n }\n\n $res = $sth->fetch(PDO::FETCH_ASSOC); //Get the first row (User)\n return $res;\n }", "function best_office_in_wilaya($wilaya_id,$year)\r\n {\r\n global $db;\r\n $best_office = $db->prepare(\"SELECT offices.nom as best_office , SUM(récoltes.quantité) as s_quan FROM récoltes\r\n INNER JOIN offices ON récoltes.office_id = offices.id \r\n INNER JOIN users ON offices.user_id = users.id AND users.wilaya_id = ?\r\n AND YEAR(date) = ? \r\n GROUP BY offices.id\r\n order by s_quan desc\r\n LIMIT 1\");\r\n\r\n $best_office->execute([$wilaya_id,$year]);\r\n\r\n $best_office_result = $best_office->fetch(PDO::FETCH_ASSOC);\r\n return $best_office_result['best_office'].' ('.$best_office_result['s_quan'] .' tonne)';\r\n\r\n }", "public static function getEffeciveRole($roles){\n\t\tHierarchy::$height = array();\n\t\t\n\t\t//calculate height for each designated role\n\t\tforeach($roles as $value){\n\t\t\tHierarchy::$curNode = $value;\n\t\t\tHierarchy::$height[$value] = 1;\n\t\t\tHierarchy::dfs($value);\t\n\t\t}\n\t\t\n\t\t$max = $roles[0];\n\t\tforeach($roles as $value){\n\t\t\tif(Hierarchy::$height[$value] > Hierarchy::$height[$max]){\n\t\t\t\t$max = $value;\n\t\t\t}\n\t\t}\n\t\t//print_r(Hierarchy::$tree);\n//\t\techo $max;\n//\t\tdie();\n\t\treturn $max;\n\t}", "function RetrieveLcmsLastRecordScorew($user_id) {\n\t\t$ext = isset($user_id) && mb_strlen($user_id, 'UTF-8') > 1 ? \" and UsersCredentials.UserName = \" . $this->db->escape($user_id) . \"\" : \"\";\n\t\t$sql = \"select Name,\"\n\t\t\t\t. \"Description,\"\n\t\t\t\t. \"valuesServi,UsersCredentials.UserName as username \"\n\t\t\t\t. \"from \"\n\t\t\t\t. \"socialEnergy.LcmsStoreDataFromServiceScore \"\n\t\t\t\t. \"inner join \"\n\t\t\t\t. \"UsersCredentials on \"\n\t\t\t\t. \"UsersCredentials.User_ID= LcmsStoreDataFromServiceScore.userID \"\n\t\t\t\t. \" \"\n\t\t\t\t. \" $ext \"\n\t\t\t\t. \"order by tmsIntoSystem desc;\";\n\n\n\t\t$result = $this->db->query($sql);\n\t\treturn $result;\n\t}", "protected function getLargeurMaximale()\n {\n if (null === $this->originale) {\n return static::$ORIGINALE_LARGEUR_MAXIMALE;\n }\n\n return static::$MINIATURE_LARGEUR_MAXIMALE;\n }", "public function getReceivedHighfiveUser() {\n return $this->highfive->getReceivedHighfive();\n }", "public function cliente_alumno($alumno){\n $sql = \"SELECT max(alu_nit) as cliente \";\n $sql.= \" FROM app_alumnos\";\n $sql.= \" WHERE alu_cui = '$alumno'\";\n $result = $this->exec_query($sql);\n if (is_array($result)) {\n foreach ($result as $row) {\n $cli = $row[\"cliente\"];\n }\n } else {\n $cli = 0;\n }\n //echo $sql;\n return $cli;\n }", "function getLastCoup($game) {\n return end(getCoups($game));\n}", "public function getLeagueId()\n {\n $value = $this->get(self::LEAGUE_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function getLeagueId()\n {\n $value = $this->get(self::LEAGUE_ID);\n return $value === null ? (integer)$value : $value;\n }" ]
[ "0.5922233", "0.58977103", "0.5889017", "0.57614815", "0.5687641", "0.5588224", "0.55512327", "0.55208766", "0.55103767", "0.54654616", "0.54261214", "0.5416697", "0.5413776", "0.54046285", "0.5384997", "0.5373763", "0.5373605", "0.53517926", "0.5329143", "0.52734214", "0.5243181", "0.5239452", "0.5203862", "0.5189632", "0.5168219", "0.5154591", "0.51486635", "0.51486635", "0.51077664", "0.5080252", "0.5076338", "0.50698835", "0.50684667", "0.5059195", "0.5054433", "0.50478435", "0.5042725", "0.5038894", "0.5035259", "0.5034254", "0.5017917", "0.50165474", "0.5014172", "0.49990878", "0.49964938", "0.49892485", "0.49879396", "0.49836582", "0.49816483", "0.49757335", "0.49739823", "0.49636006", "0.49563086", "0.49545178", "0.49535337", "0.49503732", "0.49437994", "0.49382982", "0.493688", "0.49298242", "0.49287826", "0.4917044", "0.49138194", "0.49130553", "0.49042287", "0.4901344", "0.48996565", "0.48967856", "0.48965842", "0.4896544", "0.4896544", "0.4894084", "0.48898846", "0.4889099", "0.4888087", "0.48859462", "0.48834643", "0.48806408", "0.4877745", "0.4877267", "0.48749012", "0.48729515", "0.48719943", "0.4862854", "0.48612294", "0.48576394", "0.4855675", "0.4854464", "0.48512617", "0.48492587", "0.483716", "0.48348802", "0.4832606", "0.48318338", "0.48239622", "0.48200092", "0.48196608", "0.481478", "0.48128405", "0.48128405" ]
0.75281465
0
An array of class names for supported fields
Массив имен классов для поддерживаемых полей
public static function getSupportedFields(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getSupportedFields(): array;", "static public function getAllowedFields(): array\n {\n // @todo this where some more magic should happen and class introspection to be done\n }", "public static function getClassFields(): array\n {\n static::init();\n return static::$_classFields[get_called_class()];\n }", "public static function getSupportedFields(): array\n {\n return [\n Number::class,\n ];\n }", "public function getFieldTypeClasses() : array\n {\n return [ArrayOfType::class];\n }", "public function getFieldTypeClasses() : array\n {\n return [InnerFormType::class];\n }", "protected static function _initFields()\n {\n $className = get_called_class();\n $optionsMask = [\n 'type' => null,\n 'length' => null,\n 'primary' => null,\n 'unique' => null,\n 'autoincrement' => null,\n 'notnull' => null,\n 'unsigned' => null,\n 'default' => null,\n 'values' => null,\n ];\n\n // apply default values to field definitions\n if (!empty(static::$_classFields[$className])) {\n $fields = [];\n\n foreach (static::$_classFields[$className] as $field => $options) {\n if (is_string($field)) {\n if (is_array($options)) {\n $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field], $options);\n } elseif (is_string($options)) {\n $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field, 'type' => $options]);\n } elseif ($options == null) {\n continue;\n }\n } elseif (is_string($options)) {\n $field = $options;\n $fields[$field] = array_merge($optionsMask, static::$fieldDefaults, ['columnName' => $field]);\n }\n\n if ($field == 'Class') {\n // apply Class enum values\n $fields[$field]['values'] = static::$subClasses;\n }\n\n if (!isset($fields[$field]['blankisnull']) && empty($fields[$field]['notnull'])) {\n $fields[$field]['blankisnull'] = true;\n }\n\n if ($fields[$field]['autoincrement']) {\n $fields[$field]['primary'] = true;\n }\n }\n\n static::$_classFields[$className] = $fields;\n }\n }", "function get_field_types()\n {\n }", "public function getClassFields($className){\n $fields = array();\n $vars = get_class_vars($className);\n foreach($vars as $name=>$value){\n if(in_array($name, $className::$reservedVars) || in_array($name, $className::$reservedVarsChild)) continue;\n $fields[] = $name;\n }\n return $fields;\n }", "public function classcreatefieldprovider() {\n return array(array('idnumber', 101, null));\n }", "public function getSupportedFieldTypes(): array\n {\n $fieldProcessors = $this->getFieldProcessors();\n $supportedFields = [];\n /** @var AbstractFieldProcessor $fieldProcessor */\n foreach ($fieldProcessors as $fieldProcessor) {\n $fields = $fieldProcessor::getSupportedFields();\n $supportedFields = array_merge($supportedFields, $fields);\n }\n\n return $supportedFields;\n }", "public function fields() : array\n {\n return [\n 'xclass' => '',\n ];\n }", "protected static function getFields()\n {\n static $fields = array();\n $called_class = get_called_class();\n if (!array_key_exists($called_class, $fields)) {\n $reflection_class = new ReflectionClass($called_class);\n $propriedades = array();\n foreach ($reflection_class->getProperties() as $propriedade) {\n\t\t\t if ($propriedade->name !==\"db\"){ // ajuste para retirar a propriedade db da lista\n\t\t\t\t $propriedades[] = $propriedade->name;\n\t\t\t\t}\n }\n $fields[$called_class] = $propriedades;\n }\n return $fields[$called_class];\n }", "public static function get_field_types() {\n\t\treturn static::$instances;\n\t}", "public static function tableless_field_types() {\n\n\t\tstatic $field_types = null;\n\n\t\tif ( null === $field_types ) {\n\t\t\t$field_types = array(\n\t\t\t\t'pick',\n\t\t\t\t'file',\n\t\t\t\t'avatar',\n\t\t\t\t'taxonomy',\n\t\t\t\t'comment',\n\t\t\t);\n\n\t\t\t$field_types = apply_filters( 'pods_tableless_field_types', $field_types );\n\t\t}\n\n\t\treturn $field_types;\n\t}", "public function customFieldTypes() {\r\n return [\r\n 'text' => 'Text Field',\r\n 'number' => 'Number Field',\r\n 'textarea' => 'Textarea',\r\n 'date' => 'Date Field',\r\n 'radio' => 'Radio Buttons',\r\n 'checkbox' => 'Checkboxes',\r\n 'dropdown' => 'Dropdown'\r\n ];\r\n }", "public function getFieldHtmlClasses()\r\n {\r\n return property_exists(get_class($this), \"field_html_classes\") ? self::$field_html_classes : array();\r\n }", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public static function getFieldTypes() {\r\n\t\treturn self::$FIELD_TYPES;\r\n\t}", "public static function field_type_array() {\n\t\t\n\t\t$field_type_array = array(\n\t\t\t'search_input'=> 'Search input',\n\t\t\t'select'\t=> 'Select',\n\t\t\t'checkbox'\t=> 'Checkbox',\n\t\t\t'radio'\t\t=> 'Radio'\n\t\t);\n\t\t\n\t\treturn $field_type_array;\n\t}", "protected function fieldTypes() {\n // @todo Either get this dynamically from field plugins or forget it and just hardcode template_whisperer where this is called.\n return ['template_whisperer'];\n }", "public function registerFieldTypes() {}", "public static function field_types() {\n\n\t\t$field_types = array(\n\t\t\t'text',\n\t\t\t'website',\n\t\t\t// 'link',\n\t\t\t'phone',\n\t\t\t'email',\n\t\t\t'password',\n\t\t\t'paragraph',\n\t\t\t'wysiwyg',\n\t\t\t'code',\n\t\t\t'datetime',\n\t\t\t'date',\n\t\t\t'time',\n\t\t\t'number',\n\t\t\t'currency',\n\t\t\t'file',\n\t\t\t'avatar',\n\t\t\t'oembed',\n\t\t\t'pick',\n\t\t\t'boolean',\n\t\t\t'color',\n\t\t\t'slug',\n\t\t);\n\n\t\t$field_types = array_merge( $field_types, array_keys( self::$field_types ) );\n\n\t\t$field_types = array_filter( array_unique( $field_types ) );\n\n\t\t$types = apply_filters( 'pods_api_field_types', $field_types );\n\n\t\t$field_types = pods_transient_get( 'pods_field_types' );\n\n\t\tif ( empty( $field_types ) || count( $types ) != count( $field_types ) ) {\n\t\t\t$field_types = array();\n\n\t\t\tforeach ( $types as $field_type ) {\n\t\t\t\t$file = null;\n\n\t\t\t\tif ( isset( self::$field_types[ $field_type ] ) ) {\n\t\t\t\t\t$file = self::$field_types[ $field_type ]['file'];\n\t\t\t\t}\n\n\t\t\t\tself::field_loader( $field_type, $file );\n\n\t\t\t\tif ( ! isset( self::$loaded[ $field_type ] ) || ! is_object( self::$loaded[ $field_type ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$class_vars = get_class_vars( get_class( self::$loaded[ $field_type ] ) );\n\t\t\t\t// PHP 5.2.x workaround\n\t\t\t\t$field_types[ $field_type ] = $class_vars;\n\t\t\t\t$field_types[ $field_type ]['file'] = $file;\n\t\t\t}\n\n\t\t\tself::$field_types = $field_types;\n\n\t\t\tpods_transient_set( 'pods_field_types', self::$field_types );\n\t\t} else {\n\t\t\tself::$field_types = array_merge( $field_types, self::$field_types );\n\t\t}//end if\n\n\t\treturn self::$field_types;\n\t}", "function getFieldsTypes()\n {\n return array(\n 'campaignId' => 'integer',\n 'advertiserId' => 'integer',\n 'campaignName' => 'string',\n 'startDate' => 'date',\n 'endDate' => 'date',\n 'impressions' => 'integer',\n 'clicks' => 'integer',\n 'priority' => 'integer',\n 'weight' => 'integer',\n 'targetImpressions' => 'integer',\n 'targetClicks' => 'integer',\n 'targetConversions' => 'integer',\n 'revenue' => 'double',\n 'revenueType' => 'integer',\n 'capping' => 'integer',\n 'sessionCapping' => 'integer',\n 'block' => 'integer',\n 'comments' => 'string',\n );\n }", "function get_field_types() {\n\t\t\treturn $this->types;\n\t\t}", "public function all_fields()\r\n {\r\n $allfields = array();\r\n foreach (array_values($this->CLASS_CONTAINER) as $val){\r\n $allfields = array_merge($allfields, $this->{$val});\r\n }\r\n foreach (array_values($this->singular_fields) as $val){\r\n if($this->{$val}) {\r\n $allfields[] = $this->{$val};\r\n }\r\n }\r\n\r\n return $allfields;\r\n }", "public static function repeatable_field_types() {\n\n\t\tstatic $field_types = null;\n\n\t\tif ( null === $field_types ) {\n\t\t\t$field_types = array(\n\t\t\t\t'code',\n\t\t\t\t'color',\n\t\t\t\t'currency',\n\t\t\t\t'date',\n\t\t\t\t'datetime',\n\t\t\t\t'email',\n\t\t\t\t'number',\n\t\t\t\t'paragraph',\n\t\t\t\t'phone',\n\t\t\t\t'text',\n\t\t\t\t'time',\n\t\t\t\t'website',\n\t\t\t\t'wysiwyg',\n\t\t\t);\n\n\t\t\t$field_types = apply_filters( 'pods_repeatable_field_types', $field_types );\n\t\t}\n\n\t\treturn $field_types;\n\t}", "public static function getFieldsTypeInGrid() {\n\t\treturn array();\n\t}", "function field_types_as_array()\n\t{\t\n\t\treturn $this->_db->get_table_column_types($this->get_table_name());\n\t}", "protected function getReferenceFieldTypes(){\r\n $field_definitions = $this->fieldTypeManager->getDefinitions();\r\n $field_definitions = array_filter( $field_definitions, function($definition) use ($field_definitions){\r\n $er_extension = is_subclass_of($definition['class'], $field_definitions['entity_reference']['class']);\r\n $is_er = $definition['class'] === $field_definitions['entity_reference']['class'];\r\n return( $er_extension || $is_er );\r\n });\r\n return array_combine(array_keys($field_definitions), array_map(function($definition){\r\n return $definition['label'];\r\n },$field_definitions));\r\n }", "protected static function getFields()\n\t{\n\t\tstatic $fields = array();\n\t\t$called_class = get_called_class();\n\t\t\n\t\tif (!array_key_exists($called_class, $fields))\n\t\t{\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$db = self::connect();\n\t\t\t\n\t\t\t$sql \t\t= \"SHOW COLUMNS FROM \" . self::getTableName();\n\t\t\t$statement\t= $db->prepare($sql);\n\t\t\t\n\t\t\t$statement->execute();\n\t\t\t\n\t\t\t$result \t= $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t\tforeach ($result as $property):\n\t\t\t\t$properties[] = $property['Field'];\n\t\t\tendforeach;\n\t\t\t\n\t\t\t$fields[$called_class] = $properties;\n\t\t}\n\t\t\n\t\treturn $fields[$called_class];\n\t}", "public function getFieldTypes()\n\t{\n\t\treturn $this->types;\n\t}", "public static function getFieldsType() {\r\n\t\tstatic $fieldstype;\r\n\r\n\t\tif ($fieldstype === null) {\r\n\t\t\t$fieldstype = array();\r\n\t\t\t$fields = static::getFields();\r\n\t\t\t$pdo = static::getPdo();\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$fieldstype[$field] = $pdo->nameToType($field);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $fieldstype;\r\n\t}", "public function get_all_fields() {\n return $this->classFields;\n }", "function _get_field_names()\n {\n return array('nextgen_basic_singlepic_dimensions', 'nextgen_basic_singlepic_link', 'nextgen_basic_singlepic_link_target', 'nextgen_basic_singlepic_float', 'nextgen_basic_singlepic_quality', 'nextgen_basic_singlepic_crop', 'nextgen_basic_singlepic_display_watermark', 'nextgen_basic_singlepic_display_reflection', 'nextgen_basic_templates_template');\n }", "public static function get_fields() : array\n\t{\n\t\tif (isset(static::$field_names)) {\n\t\t\treturn static::$field_names;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "protected function known_field_types() {\n $types = parent::known_field_types();\n $types[] = new question_bank_add_to_quiz_action_column($this);\n $types[] = new question_bank_question_name_text_column($this);\n return $types;\n }", "public function getAvailableFields(): array;", "public function getAvailableFields()\n {\n return array();\n }", "private function _get_fieldtypes()\n {\n $channel_id = isset($this->channel['channel_id']) ? $this->channel['channel_id'] : null ;\n $channel_fields = ee()->channel_data->get_channel_fields($channel_id)->result_array();\n $fields = ee()->channel_data->utility->reindex($channel_fields, 'field_name');\n return $fields;\n }", "public static function classTypes(): array\n {\n return [\n AcmiObjectType::AIR(),\n AcmiObjectType::GROUND(),\n AcmiObjectType::SEA(),\n AcmiObjectType::WEAPON(),\n AcmiObjectType::SENSOR(),\n AcmiObjectType::NAVAID(),\n ];\n }", "public function getFieldsProvider()\n {\n return [\n [\n [],\n (object)[]\n ],\n [\n [['key' => 'value', 'key2' => 'value2']],\n (object)[['key' => 'value', 'key2' => 'value2']]\n ],\n [\n (object)['key' => 'value'],\n (object)['key' => 'value']\n ],\n // Setting invalid fields result in numerically properties\n [\n null,\n (object)[]\n ],\n [\n false,\n (object)[0 => false]\n ],\n [\n 'string',\n (object)[0 => 'string']\n ]\n ];\n }", "public function getFieldTypes() {\n return $this->fieldTypes;\n }", "public static function fields() : array;", "function types() {\n return $this->fields;\n }", "public function fields(): array\n {\n return [\n (object) [\n 'type' => 'Id',\n 'name' => 'id',\n 'comment' => 'not in Doctrine',\n ],\n (object) [\n 'type' => 'Text',\n 'name' => 'name',\n 'comment' => 'not in Doctrine',\n ],\n (object) [\n 'type' => 'Text',\n 'name' => 'guid',\n 'comment' => 'not in Doctrine',\n ],\n ];\n }", "abstract public function fields(): array;", "public function fields() : array {\n return [\n 'primary_email' => [\n 'type' => Type::string()\n ],\n 'secondary_email' => [\n 'type' => Type::string()\n ],\n 'primary_phone' => [\n 'type' => Type::string()\n ],\n 'secondary_phone' => [\n 'type' => Type::string()\n ],\n 'pager_number' => [\n 'type' => Type::string()\n ]\n ];\n }", "protected function getClassField() {}", "public function getFieldDisplayTypes()\r\n {\r\n return property_exists(get_class($this), \"field_display_classes\") ? self::$field_display_classes : array();\r\n }", "protected function known_field_types() {\n $types = parent::known_field_types();\n $types[] = new question_bank_add_to_ipal_action_column($this);\n $types[] = new ipal_question_bank_question_name_text_column($this);\n return $types;\n }", "public static function getFields() {\n return [\n \"name\" => \"VARCHAR(255)\",\n \"image_url\" => \"VARCHAR(255)\",\n \"description\" => \"TEXT\",\n \"order\" => \"INTEGER(11) DEFAULT NULL\",\n \"weight\" => \"FLOAT(10,4)\",\n \"cost\" => \"FLOAT(10,2)\",\n \"active\" => \"TINYINT(1) DEFAULT 0\"\n ];\n }", "public function fieldnames()\n\t{\n\t\treturn array(\n\t\t\t'name' => 'text', \n\t\t\t'price' => 'text', \n\t\t\t'test' => 'text',\n\t\t\t'images' => 'collection'\n\t\t);\n\t}", "public function fields() : array;", "public function fields() : array;", "public function baseFieldDefinitions() {\n return array();\n }", "public function fields()\n {\n return [\n 'select_multiple' => 'name:my multiple select field|type:select|multiple|options:option a,option b,option c|title:test|required',\n 'file_multiple' => 'name:my multiple file field|type:file|title:test|multiple|required',\n 'date_multiple' => 'name:my multiple date field|type:date|title:test|multiple|required',\n 'time_multiple' => 'name:my time field|type:time|multiple|title:test|required',\n ];\n }", "public function fields(): array;", "public static function fields()\n {\n return [\n 'name' => 'text',\n 'crn' => 'text',\n 'domain_name' => 'text',\n 'phone' => 'text',\n 'email' => 'email',\n 'country_code' => 'text',\n 'timezone' => 'text',\n ];\n }", "protected function getFields(): array {\n return [\n 'antique_id' => new Field((new NumberValidator())->setIntegerLength(10), false),\n 'created_at' => new Field((new DateTimeValidator())->allowDate()->allowTime(), false),\n 'title' => new Field((new StringValidator())->setMaxLength(255)),\n 'image_path' => new Field((new StringValidator())->setMaxLength(255)),\n 'detailed_look_description' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'detailed_material_description' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'brief_description' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'historical_context' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'country_of_origin_id' =>new Field((new NumberValidator())->setIntegerLength(10)),\n 'period_of_origin' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'year_of_origin' => new Field((new NumberValidator())->setIntegerLength(4)),\n 'price' => new Field((new NumberValidator())->setDecimal()\n ->setUnsigned()\n ->setIntegerLength(10)\n ->setMaxDecimalDigits(2)),\n 'adress' => new Field((new StringValidator())->setMaxLength(64*1024)),\n 'is_deleted' => new Field( new BitValidator() ),\n 'administrator_id' => new Field((new NumberValidator())->setIntegerLength(10))//administrator_id ce kasnije biti automatski (iz trenutne sesije!)\n ];\n }", "public function get_field_types() {\n\t\t\treturn apply_filters( 'conductor_query_builder_field_types', array(\n\t\t\t\t'parameters',\n\t\t\t\t'operators',\n\t\t\t\t'values'\n\t\t\t), $this );\n\t\t}", "abstract public function getFields(): array;", "public function get_fields()\n {\n return [\n 'isys_obj_type__id' => 'LC__UNIVERSAL__ID',\n 'isys_obj_type__title' => 'LC__UNIVERSAL__TITLE',\n 'isys_obj_type_group__title' => 'LC__CMDB__OBJTYPE__GROUP',\n 'cats' => 'LC__REPORT__FORM__SELECT_PROPERTY_S',\n 'overview' => 'LC__CMDB__CATG__OVERVIEW',\n 'container' => 'LC__CMDB__OBJTYPE__LOCATION',\n 'object_count' => _L('LC_UNIVERSAL__OBJECT') . ' ' . _L('LC__POPUP__DUPLICATE__NUMBER'),\n 'show_in_tree' => 'LC__CMDB__OBJTYPE__SHOW_IN_TREE'\n ];\n }", "protected function getFields(): array\n {\n return [\n 'id',\n 'domain_id',\n 'title',\n 'transformed'\n ];\n }", "protected static function getAvailableFields(): array\n\t{\n\t\treturn [\n\t\t\t'CREATED_BY',\n\t\t\t'ATTENDEES',\n\t\t\t'IS_MEETING',\n\t\t\t'IS_RECURSIVE',\n\t\t\t'MEETING_STATUS',\n\t\t\t'MEETING_HOST',\n\t\t\t'DATE_FROM',\n\t\t\t'DATE_TO',\n\t\t\t'SECTION_ID',\n\t\t\t'FROM_LIMIT',\n\t\t\t'TO_LIMIT',\n\t\t];\n\t}", "public function getFields(): array;", "public function getFields(): array;", "public function fields() : array\n {\n return [\n 'type' => 'primary',\n 'border' => '',\n 'size' => 'md',\n 'xclass' => '',\n ];\n }", "public static function date_field_types() {\n\n\t\tstatic $field_types = null;\n\n\t\tif ( null === $field_types ) {\n\t\t\t$field_types = array( 'date', 'datetime', 'time' );\n\n\t\t\t$field_types = apply_filters( 'pods_tableless_field_types', $field_types );\n\t\t}\n\n\t\treturn $field_types;\n\t}", "protected function getFieldTypes()\n {\n return (new Collection($this->getFields()))\n ->map(function ($options) {\n return $options['type'];\n })\n ->values()\n ->unique()\n ->map(function ($type) {\n return self::$types[$type];\n });\n }", "public function get_supported_fields() {\n return array(\n 'name' => PARAM_TEXT,\n 'intro' => PARAM_TEXT,\n 'url' => PARAM_URL\n );\n }", "private function createFields()\n {\n return [\n (new BooleanField('help'))\n ->addAliases('?')\n ->setDescription('show this help text')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::showHelp'),\n (new BooleanField('version'))\n ->setDescription('show the current version information')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::showVersionInformation'),\n (new BooleanField('quiet'))\n ->setDescription('silence all debug messages')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::setVerboseLevel'),\n (new BooleanField('verbose'))\n ->addAliases('verbose', 'v', 'vv', 'vvv')\n ->setDescription('set the verbosity of output')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::setVerboseLevel'),\n (new BooleanField('stats'))\n ->setDescription('show execution time and memory usage on quit')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::registerStatsShutdownFunction'),\n (new BooleanField('no-ansi'))\n ->setDescription('disable colors debug messages')\n ->setExportHandler(Field::EXPORT_SKIP)\n ->on('parse', __CLASS__.'::disableStyledOutput')\n ];\n }", "protected static function _defineFields()\n {\n $className = get_called_class();\n\n // skip if fields already defined\n if (isset(static::$_classFields[$className])) {\n return;\n }\n\n // merge fields from first ancestor up\n $classes = class_parents($className);\n array_unshift($classes, $className);\n\n static::$_classFields[$className] = [];\n while ($class = array_pop($classes)) {\n if (!empty($class::$fields)) {\n static::$_classFields[$className] = array_merge(static::$_classFields[$className], $class::$fields);\n }\n $attributeFields = $class::_definedAttributeFields();\n if (!empty($attributeFields['fields'])) {\n static::$_classFields[$className] = array_merge(static::$_classFields[$className], $attributeFields['fields']);\n }\n if (!empty($attributeFields['relations'])) {\n $class::$relationships = $attributeFields['relations'];\n }\n }\n }", "public function fields() {\n\t\treturn array();\n\t}", "public function getFields(): array {}", "public function getFields(): array {}", "public function getFieldNames() {\n\t}", "public function fieldNames($fields);", "public function readUploadableFields(\\ReflectionClass $class)\n {\n $fields = array();\n\n foreach ($class->getProperties() as $prop) {\n $field = $this->reader->getPropertyAnnotation($prop, 'Vich\\UploaderBundle\\Mapping\\Annotation\\UploadableField');\n if (null !== $field) {\n $field->setPropertyName($prop->getName());\n $fields[] = $field;\n }\n }\n\n return $fields;\n }", "public function fields() {\n return array();\n }", "public function getRequiredFields(): array;", "public function fields(): array\n {\n return [\n 'pagination' => Bakery::getType('Pagination'),\n 'items' => Bakery::listOf(Bakery::type($this->schema->typename())),\n ];\n }", "function field_names_as_array()\n\t{\n\t\t$fields_and_values \t= get_object_vars($this);\n\t\t$field_names \t\t= array();\n\t\t\n\t\tforeach($fields_and_values as $field => $value)\n\t\t{\n\t\t\tif($field[0] != '_' && !isset($this->_foriegn_keys[$field.'_id']))\n\t\t\t\t$field_names[] = $field;\n\t\t}\t\n\t\t\n\t\treturn $field_names;\n\t}", "public function getFieldtypes()\n {\n // introduce the fieldtype array\n /**\n * no longer TypoScript\n *\t $TSparserObject = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser::class);\n *\t $TSparserObject->parse($this->getOptionalElement('fieldtypes'));\n *\t $fieldtypes = $TSparserObject->setup;\n */\n\n return $this->getOptionalElement('fieldtypes');\n }", "public function getFields()\t{ return array(); }", "protected static function getDbFields()\n\t{\n\t\t//TODO: find a way to cache this value for the child class\n\t\tif(true){\n\t\t\tstatic::$dbFields = array();\n\t\t\t$class = new ReflectionClass(get_called_class());\n\t\t\t$properties = $class->getProperties();\n\t\t\tforeach($properties as $field){\n\t\t\t\tif($field->getName()[0] != \"_\" && !$field->isStatic())\n\t\t\t\t\tstatic::$dbFields[] = $field->getName();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn static::$dbFields;\n\t}", "public function hasFieldProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//name\n\t\t\t\t'somename',\n\t\t\t\t//checkVirtual\n\t\t\t\ttrue\n\t\t\t),\n\t\t\t//set #1\n\t\t\tarray(\n\t\t\t\t//name\n\t\t\t\t'othername',\n\t\t\t\t//checkVirtual\n\t\t\t\tfalse\n\t\t\t),\n\t\t);\n\t}", "public function setFieldProvider()\n {\n return [\n [\n 'key',\n 'value',\n (object)['key' => 'value']\n ],\n [\n 0,\n 1,\n (object)[0 => 1]\n ],\n [\n true,\n false,\n (object)[1 => false]\n ],\n [\n 'field',\n [0, 'abc', 2],\n (object)['field' => [0, 'abc', 2]]\n ],\n [\n 'field',\n (object)['array' => [], 'object' => (object)[]],\n (object)['field' => (object)['array' => [], 'object' => (object)[]]]\n ],\n [\n '',\n 1,\n (object)[]\n ],\n ];\n }", "public function getFieldNames()\n {\n\n }", "public function getFillableFields(): array;", "protected function supportClass()\n {\n return [\n $this->config->getMembreClass(),\n $this->config->getFamilleClass(),\n $this->config->getGeniteurClass(),\n ];\n }", "function register_field_type($class)\n {\n }", "abstract public function get_fields() : array;", "public function getFieldNames();", "public function getFieldNames();", "public static function file_field_types() {\n\n\t\tstatic $field_types = null;\n\n\t\tif ( null === $field_types ) {\n\t\t\t$field_types = array( 'file', 'avatar' );\n\n\t\t\t$field_types = apply_filters( 'pods_file_field_types', $field_types );\n\t\t}\n\n\t\treturn $field_types;\n\t}", "public function getFields(): array\n {\n return [\n 'xpub' => 'text',\n 'api_key' => 'text',\n 'guid' => 'text',\n 'password' => 'password',\n 'second_password' => 'password',\n //'address' => 'text',\n 'auto_min_fee_per_byte' => 'checkbox',\n 'min_fee_per_byte' => 'number',\n ];\n }", "public function fields() {\n return [];\n }" ]
[ "0.7173848", "0.71516335", "0.71513623", "0.70241505", "0.68291664", "0.6818795", "0.6704316", "0.6681499", "0.66428965", "0.6638397", "0.6625429", "0.661209", "0.65699303", "0.6561561", "0.65612495", "0.65556926", "0.65494907", "0.65266585", "0.65266585", "0.65266585", "0.6510709", "0.6471956", "0.6469595", "0.645994", "0.6459698", "0.643029", "0.6380451", "0.6368471", "0.63678795", "0.6343134", "0.6329382", "0.63291305", "0.6318479", "0.63131917", "0.6293033", "0.62799275", "0.6278118", "0.6274073", "0.62660503", "0.62650657", "0.62581605", "0.6242313", "0.62406516", "0.623084", "0.62285674", "0.6224663", "0.6224606", "0.62152964", "0.6208974", "0.6191518", "0.61707944", "0.61673903", "0.61649257", "0.6157922", "0.61173123", "0.61087245", "0.61087245", "0.610403", "0.6098475", "0.60945404", "0.60941637", "0.6089968", "0.6089356", "0.60770017", "0.60725504", "0.6060383", "0.6052666", "0.6050389", "0.6050389", "0.60408473", "0.6040455", "0.60354096", "0.60197556", "0.6016571", "0.60143286", "0.6010921", "0.6002561", "0.6002561", "0.60019463", "0.59970915", "0.5993576", "0.59924984", "0.5991902", "0.5989188", "0.5984577", "0.59794325", "0.5977924", "0.5974534", "0.59661126", "0.59591615", "0.5956785", "0.59516376", "0.59498876", "0.5939072", "0.59353065", "0.5933782", "0.5933782", "0.59257406", "0.5918498", "0.5911804" ]
0.72777975
0
Returns the supported strategies for this field type
Возвращает поддерживаемые стратегии для этого типа поля
public static function getSupportedStrategies(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEngineTypeAllowableValues()\r\n {\r\n return [\r\n self::ENGINE_TYPE_MYSQL,\r\n self::ENGINE_TYPE_MONGODB,\r\n self::ENGINE_TYPE_CLOUD_DATA_GUARD_MYSQL,\r\n ];\r\n }", "public function getPossibleAuthenticationStrategies(): array;", "function workshop_get_strategies() {\n $installed = get_list_of_plugins('mod/workshop/grading');\n $forms = array();\n foreach ($installed as $strategy) {\n $forms[$strategy] = get_string('strategy' . $strategy, 'workshop');\n }\n\n return $forms;\n}", "protected function fieldTypes() {\n // @todo Either get this dynamically from field plugins or forget it and just hardcode template_whisperer where this is called.\n return ['template_whisperer'];\n }", "private function _get_strategies() {\n\t\tif ( ! $this->strategies ) {\n\t\t\t$this->strategies = array();\n\t\t\tforeach ( get_declared_classes() as $class ) {\n\t\t\t\t$reflection = new \\ReflectionClass( $class );\n\t\t\t\tif ( $reflection->implementsInterface( 'WP_DPP\\Post_Title_Styler\\Strategy' ) )\n\t\t\t\t\t$this->strategies[ str_replace( array( __NAMESPACE__, '\\\\' ), '', $class ) ] = $class::get_label();\n\t\t\t}\n\t\t}\n\n\t\treturn $this->strategies;\n\t}", "public function getEngineTypeAllowableValues()\r\n {\r\n return [\r\n self::ENGINE_TYPE_ORACLE_TO_GAUSSDBV5,\r\n ];\r\n }", "public function getEngineTypeAllowableValues()\r\n {\r\n return [\r\n self::ENGINE_TYPE_ORACLE_TO_GAUSSDBV5,\r\n ];\r\n }", "public function getMergeStrategyAllowableValues()\n {\n return [\n self::MERGE_STRATEGY_NO_FAST_FORWARD,\n self::MERGE_STRATEGY_SQUASH,\n self::MERGE_STRATEGY_REBASE,\n self::MERGE_STRATEGY_REBASE_MERGE,\n ];\n }", "public static function supportedAlgorithms() {\n return array_keys(self::$implementations);\n }", "public function getSupportedFieldTypes(): array\n {\n $fieldProcessors = $this->getFieldProcessors();\n $supportedFields = [];\n /** @var AbstractFieldProcessor $fieldProcessor */\n foreach ($fieldProcessors as $fieldProcessor) {\n $fields = $fieldProcessor::getSupportedFields();\n $supportedFields = array_merge($supportedFields, $fields);\n }\n\n return $supportedFields;\n }", "public function get_supported_features() {\n\t\treturn array('multi_options', 'config_templates', 'multi_storage', 'multi_delete', 'conditional_logic', 'manual_authentication');\n\t}", "public function getSupportedTypes();", "public function getSearchModes()\n {\n if ($this->getSearchType() == 'number') {\n return NumberAttribute::getStaticSearchModes();\n } else {\n if ($this->getSearchType() == 'date') {\n return DateAttribute::getStaticSearchModes();\n } else {\n return parent::getSearchModes();\n }\n }\n }", "public static function getSupportedFields(): array;", "public function getStrategy();", "public function getStrategy();", "public function getStrategy();", "public function getStrategy();", "public function typeProvider()\n {\n return [\n [\"background_motion\"],\n [\"background_parallax\"],\n [\"motion\"],\n [\"parallax\"],\n [\"springy\"]\n ];\n }", "public static function get_supported_methods() {\r\n\t\t$methodConfig = Config::inst()->get('PaymentProcessor', 'supported_methods');\r\n\t\t$environment = PaymentGateway::get_environment();\r\n\r\n\t\t// Check if all methods are defined in factory\r\n\t\tforeach ($methodConfig[$environment] as $method) {\r\n\t\t\tif (! PaymentFactory::get_factory_config($method)) {\r\n\t\t\t\tuser_error(\"Method $method not defined in factory\", E_USER_ERROR);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $methodConfig[$environment];\r\n\t}", "static public function available_graders() {\n return array('EqualityGrader' => 'qtype_coderunner_equality_grader',\n 'NearEqualityGrader' => 'qtype_coderunner_near_equality_grader',\n 'RegexGrader' => 'qtype_coderunner_regex_grader',\n 'TemplateGrader' => 'qtype_coderunner_template_grader',\n 'CombinatorTemplateGrader' => 'qtype_coderunner_combinator_template_grader'\n ); \n }", "public function get_supported_factories() {\n\t\treturn $this->factories;\n\t}", "public function get_supported_types() {\n\n\t\treturn $this->supported_types;\n\t}", "public function supports() {\n\t\t// Default support array\n\t\t$supports = array();\n\t\tif ( $this->options( 'use_title' ) ) {\n\t\t\t$supports[] = 'title';\n\t\t}\n\t\tif ( $this->options( 'use_order' ) ) {\n\t\t\t$supports[] = 'page-attributes';\n\t\t}\n\t\tif ( $this->options( 'use_thumbnails' ) ) {\n\t\t\t$supports[] = 'thumbnail';\n\t\t}\n\t\tif ( $this->options( 'use_editor' ) ) {\n\t\t\t$supports[] = 'editor';\n\t\t}\n\t\tif ( $this->options( 'use_revisions' ) ) {\n\t\t\t$supports[] = 'revisions';\n\t\t}\n\t\treturn $supports;\n\t}", "abstract protected function getSupportedFields(): array;", "public static function supportedDrivers()\n {\n /** @var \\Illuminate\\Database\\DatabaseManager $instance */\n return $instance->supportedDrivers();\n }", "public function getDbUseTypeAllowableValues()\r\n {\r\n return [\r\n self::DB_USE_TYPE_MIGRATION,\r\n self::DB_USE_TYPE_SYNC,\r\n self::DB_USE_TYPE_CLOUD_DATA_GUARD,\r\n ];\r\n }", "public function getSupportedEntityTypesList() {\n $definitions = $this->entityTypeManager->getDefinitions();\n\n $supported = [];\n\n foreach ($definitions as $definition) {\n // Only support fieldable entity types.\n if (!$definition->get('field_ui_base_route')) {\n continue;\n }\n\n $supported[$definition->id()] = $definition->getLabel();\n }\n\n return $supported;\n }", "protected function supportedDrivers()\n {\n return [\n Enum::AKO,\n Enum::SSDP,\n Enum::RASHIN,\n Enum::FANAPPLUS,\n ];\n }", "private function _getSupportedFields(){\n\t\tif(!isset(JResearchPublicationBibtexExporter::$_supportedFields)){\t\t\n\t\t\t$db = JFactory::getDBO();\n\t\t\t\n\t\t\t$db->setQuery('SELECT * FROM '.$db->quoteName('#__jresearch_property'));\n\t\t\tJResearchPublicationBibtexExporter::$_supportedFields = $db->loadColumn();\n\t\t}\n\t\t\n\t\treturn JResearchPublicationBibtexExporter::$_supportedFields;\n\t}", "public static function supportedTypes()\n {\n return array(\n self::TYPE_PDO,\n );\n }", "public function getStrategy() {}", "public static function get_supported_algos () {\n return mcrypt_list_algorithms();\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL => Pronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t);\n\t}", "public static function getSupportedFields(): array\n {\n return [\n Number::class,\n ];\n }", "public function getSupportedFeatures()\n {\n return array();\n }", "protected function known_field_types() {\n $types = parent::known_field_types();\n $types[] = new question_bank_add_to_quiz_action_column($this);\n $types[] = new question_bank_question_name_text_column($this);\n return $types;\n }", "public function get_supported_fields() {\n return array(\n 'name' => PARAM_TEXT,\n 'intro' => PARAM_TEXT,\n 'url' => PARAM_URL\n );\n }", "public static function getSupportedMethods()\n {\n $types = self::$available_types;\n\n if ($types) {\n unset($types[0]); // as NONE;\n }\n\n return $types;\n }", "private function _getSupportedTypes(){\n\t\tif(!isset(JResearchPublicationBibtexExporter::$_supportedTypes)){\t\t\n\t\t\t$db = JFactory::getDBO();\n\t\t\t\n\t\t\t$db->setQuery('SELECT * FROM '.$db->quoteName('#__jresearch_publication_type'));\n\t\t\tJResearchPublicationBibtexExporter::$_supportedTypes = $db->loadColumn();\n\t\t}\n\t\t\n\t\treturn JResearchPublicationBibtexExporter::$_supportedTypes;\n\t\t\n\t}", "public function getAuthModeAllowableValues()\n {\n return [\n self::AUTH_MODE_OPEN,\n self::AUTH_MODE_PSK,\n self::AUTH_MODE_OPEN_WITH_RADIUS,\n self::AUTH_MODE__8021X_MERAKI,\n self::AUTH_MODE__8021X_RADIUS,\n self::AUTH_MODE__8021X_GOOGLE,\n self::AUTH_MODE__8021X_LOCALRADIUS,\n self::AUTH_MODE_IPSK_WITH_RADIUS,\n self::AUTH_MODE_IPSK_WITHOUT_RADIUS,\n ];\n }", "public function getStrategy()\n {\n return $this->strategy;\n }", "public function getStrategy()\n {\n return $this->strategy;\n }", "public function getStrategy()\n {\n return $this->strategy; \n }", "function getFieldsTypes()\n {\n return array(\n 'campaignId' => 'integer',\n 'advertiserId' => 'integer',\n 'campaignName' => 'string',\n 'startDate' => 'date',\n 'endDate' => 'date',\n 'impressions' => 'integer',\n 'clicks' => 'integer',\n 'priority' => 'integer',\n 'weight' => 'integer',\n 'targetImpressions' => 'integer',\n 'targetClicks' => 'integer',\n 'targetConversions' => 'integer',\n 'revenue' => 'double',\n 'revenueType' => 'integer',\n 'capping' => 'integer',\n 'sessionCapping' => 'integer',\n 'block' => 'integer',\n 'comments' => 'string',\n );\n }", "public static function getSupported()\n {\n static::initSupported();\n return static::$supported;\n }", "public static function getTechniquesSupported()\n\t{\n\t\t$list = scandir(PATH_TECHNIQUES);\n\t\t$techniques = null;\n\n\t\tforeach ($list as $el)\n\t\t{\n\t\t\tif(is_file(PATH_TECHNIQUES.$el))\n\t\t\t\t$techniques[] = explode(\".\", $el)[0];\n\t\t}\n\n\t\treturn $techniques;\n\t}", "public function loadSupportedMethods()\n {\n $this->quoteHelper->load($this->quoteFields);\n $fields = $this->loadMethods($this->config->getSupportedFieldsCheckCart());\n $this->quoteHelper->cleanup();\n\n return $fields;\n }", "public function getLbAlgorithmAllowableValues()\r\n {\r\n return [\r\n self::LB_ALGORITHM_IP_HASH,\r\n self::LB_ALGORITHM_ROUND_ROBIN,\r\n self::LB_ALGORITHM_SESSION_HASH,\r\n ];\r\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t);\n\t}", "public function getSearchModes()\n {\n // exact match and substring search should be supported by any database.\n // (the LIKE function is ANSI standard SQL, and both substring and wildcard\n // searches can be implemented using LIKE)\n return array(\n 'exact',\n 'substring',\n 'wildcard',\n 'regexp',\n 'greaterthan',\n 'greaterthanequal',\n 'lessthan',\n 'lessthanequal',\n 'between',\n );\n }", "function mod_webquest_strategies(){\r\n\t$strategies = array (WEBQUEST_GS_NONE => get_string('notgraded', 'webquest'),\r\n WEBQUEST_GS_ACCUMULATIVE => get_string('accumulative', 'webquest'),\r\n WEBQUEST_GS_ERRORBANDED => get_string('errorbanded', 'webquest'),\r\n WEBQUEST_GS_CRITERION => get_string('criterion', 'webquest'),\r\n WEBQUEST_GS_RUBRIC => get_string('rubric', 'webquest') );\r\n\treturn $strategies;\r\n}", "protected function getStrategy() {}", "public function getStrategy()\n {\n return $this->_strategy;\n }", "protected static function getAllowedTypes() {\n return array_merge(static::$processorStages, [static::QUERY_PLUGIN]);\n }", "public function getPickingListStrategy(): string\n {\n return static::NAME_MULTI_SHIPMENT_PICKING_STRATEGY_EXAMPLE;\n }", "public function getFeaturesAllowableValues()\n {\n return [\n self::FEATURES_DUAL_SYNC,\n self::FEATURES_SUBMISSION,\n self::FEATURES_SUPPRESSION,\n self::FEATURES_SUPPRESS_BY_URL,\n self::FEATURES_REVIEW_MONITORING,\n self::FEATURES_PUBLISHER_SUGGESTIONS,\n self::FEATURES_ANALYTICS,\n ];\n }", "public function get_field_types() {\n\t\t\treturn apply_filters( 'conductor_query_builder_field_types', array(\n\t\t\t\t'parameters',\n\t\t\t\t'operators',\n\t\t\t\t'values'\n\t\t\t), $this );\n\t\t}", "protected function known_field_types() {\n $types = parent::known_field_types();\n $types[] = new question_bank_add_to_ipal_action_column($this);\n $types[] = new ipal_question_bank_question_name_text_column($this);\n return $types;\n }", "function get_question_field_types() {\n\t\treturn apply_filters( 'camptix_question_field_types', array(\n\t\t\t'text' => __( 'Text input', 'camptix' ),\n\t\t\t'textarea' => __( 'Text area', 'camptix' ),\n\t\t\t'select' => __( 'Dropdown select', 'camptix' ),\n\t\t\t'radio' => __( 'Radio select', 'camptix' ),\n\t\t\t'checkbox' => __( 'Checkbox', 'camptix' ),\n\t\t) );\n\t}", "public function getRecognitionMethodAllowableValues()\n {\n return [\n self::RECOGNITION_METHOD_EVEN_PERIODS,\n self::RECOGNITION_METHOD_PRORATE_DAYS,\n self::RECOGNITION_METHOD_EXACT_DAYS,\n self::RECOGNITION_METHOD_FLEXIBILE_PRORATE_DAYS,\n self::RECOGNITION_METHOD_FLEXIBILE_EXACT_DAYS,\n self::RECOGNITION_METHOD_CASH_RECEIPT,\n ];\n }", "public function getFieldProcessor(FieldInterface $fieldType, $strategy = null)\n {\n $processors = $this->getFieldProcessors();\n\n foreach ($processors as $processor) {\n $reflection = new ReflectionClass($processor);\n /** @var AbstractFieldProcessor $instance */\n $instance = $reflection->newInstanceWithoutConstructor();\n\n if ($strategy && !in_array($strategy, $instance::getSupportedStrategies(), true)) {\n continue;\n }\n\n $fields = $instance::getSupportedFields();\n foreach ($fields as $field) {\n if (!$fieldType instanceof $field) {\n continue;\n }\n\n return $instance;\n }\n }\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_PRODUCT,\n self::TYPE_SERVICE,\n self::TYPE_AGREEMENT,\n self::TYPE_OTHER1,\n self::TYPE_OTHER2,\n ];\n }", "protected function getKnownEngines()\n {\n return array(\n 'webkit' => ['webkit'],\n 'gecko' => ['gecko'],\n 'trident' => ['trident'],\n 'presto' => ['presto'],\n 'khtml' => ['khtml']\n );\n }", "public static function getAvailableFormats()\n {\n return array(\n 'wgs84_dms',\n 'wgs84_dm',\n 'wgs84_dd',\n 'wgs84_decimal',\n 'rt90',\n 'sweref99'\n );\n }", "public function get_query_builder_modes() {\n\t\t\treturn apply_filters( 'conductor_query_builder_modes', $this->query_builder_modes, $this );\n\t\t}", "public function getMethodAllowableValues()\n {\n return [\n self::METHOD_FBR,\n self::METHOD_FBB,\n ];\n }", "public function getAlgos()\n {\n return $this->algoSet->getAlgos();\n }", "private function get_modes() {\n static $modes;\n if ( isset( $modes ) ) {\n return $modes;\n }\n\n $modes = array();\n foreach ( Clanpress_Mode::modes() as $mode ) {\n require_once( Clanpress_Helper::get_modes_path() . $mode . '.php' );\n $mode_class = Clanpress_Helper::get_class( $mode, 'mode' );\n\n $modes[ $mode ] = array(\n 'name' => $mode_class::name(),\n 'description' => $mode_class::description(),\n 'thumbnail' => $mode_class::thumbnail(),\n );\n }\n\n return $modes;\n }", "public function typeProvider() {\n return [\n 'PERSON_ADDRESS' => [\n PersonAddress::class,\n \"/api/person-addresses\",\n [\n 'country_code' => 'NL',\n 'address_line_1' => 'Voorbeeld-adres 12',\n 'postal_code' => '1234 AB',\n 'locality' => 'Delft'\n ]\n ],\n 'PERSON_EMAIL_ADDRESS' => [\n PersonEmailAddress::class,\n \"/api/person-email-addresses\",\n [ 'email_address' => 'test@koornbeurs.nl' ]\n ],\n 'PERSON_PHONE_NUMBER' => [\n PersonPhoneNumber::class,\n \"/api/person-phone-numbers\",\n [ 'phone_number' => '06 34 941 490' ]\n ]\n ];\n }", "public function getAdaptationAllowableValues()\r\n {\r\n return [\r\n self::ADAPTATION_SHORT,\r\n self::ADAPTATION_LONG,\r\n self::ADAPTATION_NONE,\r\n ];\r\n }", "public static function checkers()\n {\n return [\n 'tenant_id' => 'hasTenantId',\n 'level' => 'hasLevel',\n 'kind' => 'hasKind',\n 'formats' => 'hasFormats',\n 'period' => 'hasPeriod'\n ];\n }", "public function getModeAllowableValues()\n {\n return [\n self::MODE_DIRECT,\n ];\n }", "public function getSupportedGateways()\n {\n $composer = Json::decode(file_get_contents(__DIR__ . '/../composer.json'), true);\n return $composer['extra']['gateways'];\n }", "public function getAvailFormatters()\n {\n return $this->listPublicMethods('#crudFormatValue([a-zA-Z]+)#');\n }", "public function getStrategy() : StrategyInterface;", "public function optionProvider() {\n\t\treturn [\n\t\t\t[ '_amn_mi-lite_last_checked', false ],\n\t\t\t[ '_transient_wc_count_comments', false ],\n\t\t\t[ 'active_plugins', false ],\n\t\t\t[ 'akismet_spam_count', false ],\n\t\t\t[ 'bvLastRecvTime', false ],\n\t\t\t[ 'bwp_minify_detector_log', false ],\n\t\t\t[ 'charitable_upgrade_log', false ],\n\t\t\t[ 'comet_cache_options', false ],\n\t\t\t[ 'cp_cfte_last_verified', false ],\n\t\t\t[ 'cron', false ],\n\t\t\t[ 'crontrol_schedules', false ],\n\t\t\t[ 'current_theme_supports_woocommerce', false ],\n\t\t\t[ 'db_version', false ],\n\t\t\t[ 'eps_redirects_404s', false ],\n\t\t\t[ 'ffwd_autoupdate_time', false ],\n\t\t\t[ 'fs_accounts', false ],\n\t\t\t[ 'fusion_dynamic_css_ids', true ],\n\t\t\t[ 'fusion_dynamic_css_posts', true ],\n\t\t\t[ 'icwp_wpsf_plugin_options', false ],\n\t\t\t[ 'jetpack_available_modules', false ],\n\t\t\t[ 'jetpack_sync_settings_post_meta_whitelist', false ],\n\t\t\t[ 'jetpack_sync_settings_disable', false ],\n\t\t\t[ 'jetpack_sync_settings_meta_blacklist', false ],\n\t\t\t[ 'jpsq_sync_checkout', false ],\n\t\t\t[ 'limit_login_retries', false ],\n\t\t\t[ 'mtsnb_stats', false ],\n\t\t\t[ 'mwp_backup_tasks', false ],\n\t\t\t[ 'mwp_maintenace_mode', false ],\n\t\t\t[ 'mwp_worker_configuration', false ],\n\t\t\t[ 'option_tree_settings', false ],\n\t\t\t[ 'pmpro_views', false ],\n\t\t\t[ 'printful_incoming_api_request_log', false ],\n\t\t\t[ 'pum_total_open_count', false ],\n\t\t\t[ 'relpoststh_default_image', true ],\n\t\t\t[ 'rg_gforms_key', false ],\n\t\t\t[ 'sbp_page_time', false ],\n\t\t\t[ 'schema_wp_is_installed', false ],\n\t\t\t[ 'seo_ultimate_module_404s', false ],\n\t\t\t[ 'slimstat_options', false ],\n\t\t\t[ 'stm_custom_style', true ],\n\t\t\t[ 'suffusion_generated_css', true ],\n\t\t\t[ 'SWPA_PLUGIN_ENTRIES_LIVE_TRAFFIC', false ],\n\t\t\t[ 'td_011_log', false ],\n\t\t\t[ 'td_011_remote_cache', true ],\n\t\t\t[ 'tesseract_advertisement_banner', true ],\n\t\t\t[ 'ub-route-cache', true ],\n\t\t\t[ 'uninstall_plugins', false ],\n\t\t\t[ 'vstrsnln_options', false ],\n\t\t\t[ 'wp_notification_bar_activated', false ],\n\t\t\t[ 'wp_user_roles', false ],\n\t\t\t[ 'WpFastestCacheHTML', true ],\n\t\t\t[ 'wphb_scripts_collection', true ],\n\t\t\t[ 'wphb_styles_collection', true ],\n\t\t\t[ 'wplnst_crawler_timestamp', false ],\n\t\t\t[ 'wpsc_feed_list', true ],\n\t\t\t[ 'wpseo_sitemap_1_cache_validator', false ],\n\t\t\t[ 'wpsupercache_count', false ],\n\t\t\t[ 'ws_plugin__optimizemember_cache', true ],\n\t\t\t[ 'ws_plugin__s2member_cache', true ],\n\t\t];\n\t}", "public static function availableDrivers()\n {\n /** @var \\Illuminate\\Database\\DatabaseManager $instance */\n return $instance->availableDrivers();\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public function get_supported_datatypes() {\n return array();\n }", "public function behaviors()\n\t{\n\t\tYii::import('common.extensions.behaviors.password.*');\n\t\treturn [\n\t\t\t// Password behavior strategy\n\t\t\t\"APasswordBehavior\" => array(\n\t\t\t\t\"class\" => \"APasswordBehavior\",\n\t\t\t\t\"defaultStrategyName\" => \"bcrypt\",\n\t\t\t\t\"strategies\" => array(\n\t\t\t\t\t\"bcrypt\" => array(\n\t\t\t\t\t\t\"class\" => \"ABcryptPasswordStrategy\",\n\t\t\t\t\t\t\"workFactor\" => 14,\n\t\t\t\t\t\t\"minLength\" => 8\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t)\n\t\t];\n\t}", "function GetEnabledAlgos()\r\n\t\t{\r\n\t\t\treturn array_values($this->EnabledAlgos);\r\n\t\t}", "public function ListSupportedLoginModes()\n\t{\n\t\treturn array('form');\n\t}", "public function getPriceModes();", "public static function getAvailableProtocols()\n {\n return array(\n DUrl::PROTOCOL_HTTP => 'HTTP',\n DUrl::PROTOCOL_HTTPS => 'HTTPS',\n );\n }", "public function supported_hints() {\n return array();\n }", "abstract public function getAvailableModes(): array;", "public function getModeAllowableValues()\n {\n return [\n self::MODE_TEST,\n self::MODE_LIVE,\n ];\n }", "public function getGenderPreferenceAllowableValues()\n {\n return [\n self::GENDER_PREFERENCE_NONE,\n self::GENDER_PREFERENCE_FEMALE,\n self::GENDER_PREFERENCE_MALE,\n ];\n }", "function get_field_types()\n {\n }", "public function provides()\n {\n return array_merge([\n Factory::class,\n ReadOnly::class,\n ], parent::provides());\n }", "public function getFormats()\n {\n return [\n self::TYPE_STRING2,\n self::TYPE_STRING,\n self::TYPE_FORMULA,\n self::TYPE_NUMERIC,\n self::TYPE_NUMERIC_00,\n self::TYPE_BOOL,\n self::TYPE_NULL,\n self::TYPE_INLINE,\n self::TYPE_ERROR,\n self::TYPE_PERCENT,\n self::TYPE_DATETIME,\n self::TYPE_DATE,\n self::TYPE_PERCENT_00,\n ];\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_DEBIT,\nself::TYPE_CREDIT, ];\n }", "function getProductTagsStrategy()\n {\n $strategy = get_option(GootenWCOptionNames::PRODUCT_TAGS);\n return isset($strategy) && is_string($strategy) ? $strategy : 'none';\n }", "public function provides()\n {\n return [\n 'html',\n 'form',\n 'orchestra.form',\n 'orchestra.form.control',\n 'orchestra.table',\n HtmlBuilder::class,\n FormBuilder::class,\n TemplateContract::class,\n FormControlContract::class,\n ];\n }", "public function customFieldTypes() {\r\n return [\r\n 'text' => 'Text Field',\r\n 'number' => 'Number Field',\r\n 'textarea' => 'Textarea',\r\n 'date' => 'Date Field',\r\n 'radio' => 'Radio Buttons',\r\n 'checkbox' => 'Checkboxes',\r\n 'dropdown' => 'Dropdown'\r\n ];\r\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_PERSON,\n self::TYPE_BUSINESS,\n ];\n }" ]
[ "0.6299996", "0.60379666", "0.6023046", "0.5935905", "0.59177047", "0.5884486", "0.5884486", "0.58735627", "0.5861368", "0.57942873", "0.5747198", "0.5662729", "0.56301415", "0.55726814", "0.5556044", "0.5556044", "0.5556044", "0.5556044", "0.5554475", "0.5541618", "0.55377644", "0.5532627", "0.5503307", "0.5502382", "0.5482653", "0.54697114", "0.5467775", "0.5460051", "0.5451004", "0.54273087", "0.542206", "0.5409823", "0.5408906", "0.54021245", "0.5393307", "0.53929615", "0.5363242", "0.534664", "0.53452617", "0.53363407", "0.5327201", "0.531072", "0.531072", "0.5274126", "0.5264976", "0.5259542", "0.52579784", "0.52528954", "0.5250367", "0.52351904", "0.5234229", "0.5231198", "0.5217772", "0.5215743", "0.5209941", "0.51904887", "0.5173468", "0.51642746", "0.5154033", "0.51397276", "0.5129157", "0.51266056", "0.5122902", "0.5122415", "0.51076734", "0.50972176", "0.50972104", "0.5095111", "0.50948703", "0.5093892", "0.5091165", "0.5090764", "0.5081058", "0.50796586", "0.5074788", "0.5073442", "0.5066141", "0.506349", "0.5062291", "0.5062291", "0.5062291", "0.5062291", "0.5040405", "0.50355345", "0.5035169", "0.50332594", "0.50292224", "0.5023729", "0.50235105", "0.50226235", "0.5004957", "0.49967954", "0.49935758", "0.49930906", "0.49917313", "0.49899787", "0.49893698", "0.4986967", "0.49795753", "0.49790028" ]
0.73182017
0
Creates a CustomJob. A created CustomJob right away will be attempted to be run.
Создает CustomJob. Созданный CustomJob сразу попытается запуститься.
public function CreateCustomJob(\Google\Cloud\AIPlatform\V1\CreateCustomJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CreateCustomJob', $argument, ['\Google\Cloud\AIPlatform\V1\CustomJob', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create($job) {}", "public static function job()\n {\n return new Job();\n }", "public function created(Job $job)\n {\n //\n }", "public function createJob(string $jobId)\n {\n }", "public function CreateJob(\\Google\\Cloud\\Talent\\V4\\CreateJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/CreateJob',\n $argument,\n ['\\Google\\Cloud\\Talent\\V4\\Job', 'decode'],\n $metadata, $options);\n }", "public function createJobObject($payload) {\n $job = new Job([\n 'title' => $payload['name'],\n 'name' => $payload['name'],\n 'description' => $payload['snippet'],\n 'url' => $payload['url'],\n 'sourceId' => $payload['id'],\n ]);\n return $job->setCompany($payload['company'])\n ->setDatePostedAsString($payload['date']);\n }", "public function __construct()\n {\n $this->job = new Job;\n }", "public function createJob($className, $content = null, array $metadata = array())\n {\n /** @var $job \\SxQueue\\Job\\JobInterface */\n $job = $this->jobPluginManager->get($className);\n\n $job->setContent(unserialize($content));\n $job->setMetadata($metadata);\n\n if ($job instanceof QueueAwareInterface) {\n $job->setQueue($this);\n }\n \n return $job;\n }", "private function createJob(Action $action, Server $server)\n {\n $job = new Job();\n\n $job->name = $action->name;\n $job->commands = $this->compileWithBlade($server, $action->script);\n $job->status = Job::PENDING;\n $job->deployment()->associate($this->deployment);\n $job->server()->associate($server);\n $job->save();\n\n return $job;\n }", "public function createJobObject($payload)\n {\n $job = new Job([\n 'description' => trim($payload['description']),\n 'name' => $payload['title'],\n 'title' => $payload['title'],\n 'url' => $payload['link'],\n ]);\n\n // Set date posted\n $job->setDatePostedAsString($payload['pubDate']);\n\n return $job;\n }", "public function createJob($config, $activity, $batch, $settings)\n\t{\n\t\t\n\t\t$entity = new Job;\n\t\t$entity->_id = $entity->_id;\n\t\t$entity->batch_id = $batch->_id;\n\t\t$entity->project = $settings['project'];\n\t\t$entity->documentType = $settings['documentType'];\n\t\t$entity->templateType = $settings['templateType'];\n\t\t$entity->resultType = $settings['resultType'];\n\t\t$entity->type = \"job\";\n\t\t$entity->completion = 1;\n\t\t$entity->expectedWorkerUnitsCount = 450;\n\t\t$entity->finishedAt = new MongoDate;\n\t\t$entity->jobConf_id = $config;\n\t\t$entity->platformJobId = $settings['platformJobId'];\n\t\t$entity->projectedCost = 12.00;\n\t\t$entity->realCost = 11.97;\n\t\t$entity->runningTimeInSeconds = 190714;\n\t\t$entity->softwareAgent_id = $settings['platform'];\n\t\t$entity->startedAt = new MongoDate;\n\t\t$entity->status = \"imported\";\n\t\t$entity->template = \"imported\";\n\t\t$entity->activity_id = $activity;\n\t\t$entity->save();\n\t\t\n\t\tarray_push($this->status['success'], \"Job created (\" . $entity->_id . \")\");\n\t\t\n\t\treturn $entity;\n\t}", "public function createJobExecution(JobInstance $job);", "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "public function creating(Job $job)\n {\n $job->submitter_id = Auth::guard('api')->id();\n }", "public function testJobCreate()\n {\n }", "public function created(Job $job)\n {\n // Save to cache after creating\n $job->refresh();\n $this->putCache($job);\n\n // Increment queue processed value\n if(Cache::tags('queue')->has('queue.size')){\n Cache::tags('queue')->increment('queue.size', 1);\n }else\n {\n Cache::tags('queue')->forever('queue.size', 1);\n }\n }", "public function createJob(array $settings, int $priority);", "public function test_an_authenticated_user_can_create_a_job()\n {\n $user = User::factory()->create();\n\n $this->actingAs($user);\n\n $response = $this->postJson('/jobs', [\n 'title' => 'Create Job Test Job Title',\n 'description' => 'Create Job Test Job Description',\n 'apply_link' => 'https://www.createjobtestapplylink.com'\n ]);\n\n // Assert\n $response->assertStatus(201);\n $this->assertDatabaseHas('jobs', [\n 'title' => 'Create Job Test Job Title'\n ]);\n $this->assertDatabaseCount('jobs', 1);\n }", "protected function createJob($command, $commandArgs = array())\n {\n return new Job($command, $commandArgs);\n }", "public function createJob($params)\n {\n $model = new JobCreateModel();\n $model->scenario = $this->scenario;\n $model->partner_system_id = $this->partnerSystem->id;\n $model->attributes = $params;\n if ($model->validate())\n {\n $transaction = Yii::app()->db->beginTransaction();\n if ($transaction instanceof CDbTransaction) {\n try {\n $model->save();\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollback();\n $model->addError('id', 'Save failed: ' . $e->getMessage());\n }\n }\n }\n return $model;\n }", "public function createJob($data = []) {\n\t\t$this->requestApi('jobs', 'post', json_encode($data));\n\n\t\tif(!$this->isError()) {\n\t\t\treturn $this->getResponseData();\n\t\t}\n\n\t\treturn false;\n }", "public function testCreateImportJob()\n {\n }", "public function create_job($job_type, $manifest, $validate_only, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobType'] = $job_type;\n\t\t$opt['Manifest'] = $manifest;\n\t\t$opt['ValidateOnly'] = $validate_only;\n\n\t\treturn $this->authenticate('CreateJob', $opt, $this->hostname);\n\t}", "public function __construct(Job $tuitionJob)\n {\n $this->tuitionJob = $tuitionJob;\n }", "public function __construct($job)\n {\n $this->job = $job;\n }", "public function __construct( Job $job )\n\t{\n\t\t$this->job = $job;\n\t}", "public function createJobObject($payload = [])\n {\n $job = new Job([\n 'description' => $payload['DescriptionTeaser'],\n 'employmentType' => $payload['EmploymentType'],\n 'title' => $payload['JobTitle'],\n 'name' => $payload['JobTitle'],\n 'url' => $payload['JobDetailsURL'],\n 'educationRequirements' => $payload['EducationRequired'],\n 'experienceRequirements' => $payload['ExperienceRequired'],\n 'sourceId' => $payload['DID'],\n ]);\n\n $pay = $this->parseSalariesFromString($payload['Pay']);\n\n $job->setOccupationalCategoryWithCodeAndTitle(\n $payload['OnetCode'],\n $payload['ONetFriendlyTitle']\n )->setCompany($payload['Company'])\n ->setCompanyUrl($payload['CompanyDetailsURL'])\n ->setLocation(\n $this->parseLocationElement($payload['City'])\n .', '.\n $this->parseLocationElement($payload['State'])\n )\n ->setCity($this->parseLocationElement($payload['City']))\n ->setState($this->parseLocationElement($payload['State']))\n ->setDatePostedAsString($payload['PostedDate'])\n ->setCompanyLogo($payload['CompanyImageURL'])\n ->setMinimumSalary($pay['min'])\n ->setMaximumSalary($pay['max']);\n\n if (isset($payload['Skills']['Skill'])) {\n $job->setSkills($this->parseSkillSet($payload['Skills']['Skill']));\n }\n\n return $job;\n }", "private function createTestJobQueueRecord()\n {\n $id = time();\n $sql = \"INSERT INTO `job_queue` (`id`, `name`, `deleted`, `date_entered`, `date_modified`, `scheduler_id`, `execute_time`, `status`, `resolution`, `message`, `target`, `data`, `requeue`, `retry_count`, `failure_count`, `job_delay`, `client`, `percent_complete`, `job_group`, `module`, `fallible`, `rerun`, `interface`, `assigned_user_id`) VALUES\n('$id', 'JustForTest', 0, '1970-01-01 00:00:01', '1970-01-01 00:00:01', '1', '1970-01-01 00:00:01', 'done', 'success', NULL, '$this->sugarJobName', NULL, 0, NULL, NULL, 0, '1', NULL, NULL, NULL, 0, 0, 1, '1')\";\n $pdo = new SugarPDO(new SugarApp(new NullLogger(), getenv('SUGARCLI_SUGAR_PATH')));\n $pdo->query($sql);\n }", "function jobCreate($userName, $pwd, $jobName, $sql, $resultType, $time) {\n\t\t//connect database\n\n\t\t//detect sql\n\n\t\t//build into dataModelConf\n\n\t\t//return result\n\t}", "function callSample(): void\n{\n $formattedParent = JobServiceClient::locationName('[PROJECT]', '[LOCATION]');\n $customJobDisplayName = '[DISPLAY_NAME]';\n\n create_custom_job_sample($formattedParent, $customJobDisplayName);\n}", "public function createJob($queue, $class, $args = array(), $trackStatus = true)\n {\n return Resque::enqueue ( $queue, $class, $args, $trackStatus );\n }", "protected function _initNewJob($task, $data, $priority = null, $executeAt = null)\n {\n $job = Mage::getModel('mongo/job')->setData(array(\n 'status' => Cm_Mongo_Model_Job::STATUS_READY,\n 'task' => $task,\n 'job_data' => $data,\n 'priority' => $priority,\n 'execute_at' => $executeAt === null ? new MongoDate : $executeAt,\n ));\n return $job;\n }", "function CreateJob()\n {\n global $request, $CurrentUser;\n if($CurrentUser->access!=\"admin\")\n {\n $request['employer_id']=$CurrentUser->companyid;\n $request['status']=1;\n }\n else {\n $request['status']=2;\n }\n if($request['job_name'] && $request['department'] && $request['employment_type'] && $request['description'] && $request['specializations'] && $request['working_environment'] && $request['pax_total'] && $request['grace_period'] && $request['over_time_rounding'] && $request['over_time_minimum'] && $request['from'] && $request['to'] && $request['start_time'] && $request['end_time'] && $request['work_days_type'] && $request['postal_code'] && $request['address'] && $request['unit_no'] && $request['region'] && $request['employer_id'] && $request['location'] && $request['project_name'])\n {\n $result=model_Job::CreateJob($request);\n if($result>0)\n {\n lib_ApiResult::JsonEncode(array('status'=>200,'result'=>'Job Created'));\n }\n else {\n lib_ApiResult::JsonEncode(array('status'=>500,'result'=>'Invalid Input'));\n }\n }\n else {\n lib_ApiResult::JsonEncode(array('status'=>500,'result'=>'Please fill all mandatory fields'));\n }\n }", "public function testAddJob()\n {\n $uuid1 = $this->hypernova->addJob($this->job['name'], $this->job['data']);\n $this->assertEquals($this->job, $this->hypernova->getJob($uuid1));\n\n $uuid2 = $this->hypernova->addJob($this->job);\n $this->assertEquals($this->job, $this->hypernova->getJob($uuid2));\n\n $this->assertEquals([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ], $this->hypernova->getJobs());\n\n $this->hypernova->clearJobs();\n $this->assertEquals([], $this->hypernova->getJobs());\n\n $this->hypernova->setJobs([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ]);\n $this->assertEquals([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ], $this->hypernova->getJobs());\n }", "public function prepeareJob($jobData) {\n if (is_null($this->job))\n $this->job = new PProjectJob();\n\n $this->job->setAttributes($jobData);\n /*\n $this->job->start_hour = PProjectJob::strToMysqlDate($jobData['start_date']);\n $this->job->end_hour = PProjectJob::strToMysqlDate($jobData['end_date']);\n //print_r($jobData);die(); */\n $this->addJobRule($this->job);\n if (isset($jobData['projectJobCustomPayment'])) {\n if ($this->job->getIsNewRecord() || is_null($this->job->jobCustomPayment)) {\n $this->customPaymentDetails = new ProjectJobCustomPayment();\n } else {\n $this->customPaymentDetails = $this->job->jobCustomPayment;\n }\n\n $this->customPaymentDetails->setAttributes($jobData['projectJobCustomPayment']);\n /**\n * In order the paid as type is chosen, it might be provided such\n * values as 2_SPOT, 2_FULL, which means Transcribe QC SPOT or FULL.\n * The value must be worked out and saved in appropriate way\n */\n $this->customPaymentDetails->checkAndFixPayAsAttribute();\n }\n\n // Prepare service metatypes for saving\n if (isset($jobData['service_metatype'])) {\n $this->serviceMetatypes = $jobData['service_metatype'];\n }\n\n // Prepare custom extensions\n if (isset($jobData['custom_extensions'])) {\n $this->customExtensions = $jobData['custom_extensions'];\n }\n\n $project = $this->job->project;\n if ($project instanceof Project && isset($project->video->video_url)) {\n $projectVideoUrl = $project->video->video_url;\n // If this project video has youtube / facebook video url:\n // - check if project video is youtube / facebook video\n // - if youtube / facebook video -- check if we already have a waveform extracted for that video\n // - if no waveform yet -- add task into queue\n if (YoutubeVideoHelper::isYoutubeVideoUrl($projectVideoUrl)) {\n Yii::app()->youtubeProjectCreationAPI->processProjectVideo($project->id);\n } elseif(FacebookVideoHelper::isFacebookVideoUrl($projectVideoUrl)) {\n Yii::app()->facebookProjectCreationAPI->processProjectVideo($project->id);\n // If this job is offloaded to partner:\n // - check if there is video version for that specific vendor\n // - if no such video -- add processing task, which will grab tempNoDRM video,\n // apply watermark and upload to some bucket with download access\n } elseif ($this->job->isPartnerJob()) {\n $partnerVideoHelper = new PartnerVideoHelper($this->job->partner, $project->video->video_url);\n if (!$partnerVideoHelper->isVideoProvided())\n $partnerVideoHelper->processVideo();\n }\n }\n\n return $this;\n }", "public function create(Job $job, array $data)\n {\n $task = App::make(CreateTenant::class);\n\n return $task->fire($job, $data);\n }", "private static function create_cron_jobs()\n {\n }", "private function createTableJob()\n\t{\n\t\t$table = \"job\";\n\t\t$columns = array(\n\t\t\tarray('name', 'TEXT')\n\t\t);\n\t\t$this->createTable($table, $columns);\n\t}", "public function testRescheduleJob(): void\n {\n // Arrange\n $job = new PheanstalkJob(123, json_encode([\n 'type' => 'awesome',\n 'data' => [],\n ]));\n\n $this->connection->expects(static::once())->method('release')->with(\n static::equalTo($job)\n );\n\n $storage = new Pheanstalk($this->connection);\n\n $storedJob = new StoredJob($job, [\n 'tube' => 'default',\n 'delay' => 0,\n 'ttr' => 0,\n 'pri' => PheanstalkInterface::DEFAULT_PRIORITY,\n ]);\n\n // Act\n $storage->rescheduleJob($storedJob, null, null);\n\n // Assert\n // ...\n }", "public function addJob(Job $job);", "public function exampleJob()\n {\n /**\n * Parameter Definition for putting jobs in the queue\n *\n * @param string $data The job data\n * @param int $priority From 0 (most urgent) to 0xFFFFFFFF (least urgent)\n * @param int $delay Seconds to wait before job becomes ready\n * @param int $ttr Time To Run: seconds a job can be reserved for\n */\n\n $jobData = array(\n 'Name' => 'Wait',\n 'Time' => '3'\n );\n\n $this->queue\n ->useTube('testtube')\n ->put(\n json_encode($jobData),\n 10,\n 0,\n 5\n );\n }", "public function getJobManager();", "private function constructJob(Request $request)\n {\n $job = [\n \"tenant_id\" => $this->requester->getTenantId(),\n \"company_id\" => $request->companyId,\n \"eff_begin\" => $request->effBegin,\n \"eff_end\" => $request->effEnd,\n \"code\" => $request->code,\n \"name\" => $request->name,\n \"description\" => $request->description,\n \"job_family_code\" => $request->jobFamilyCode,\n \"job_category_code\" => $request->jobCategoryCode,\n \"ordinal\" => $request->ordinal\n ];\n return $job;\n }", "public function createJobType()\n {\n $job = array(\n 'id' => 0,\n 'name' => $this->vars->name,\n 'billable' => $this->vars->billable == 'on',\n 'enabled' => $this->vars->enabled == 'on',\n 'rate' => $this->vars->rate);\n try {\n $id = $GLOBALS['injector']\n ->getInstance('Hermes_Driver')\n ->updateJobType($job);\n $GLOBALS['notification']->push(_(\"Job type successfully added.\"), 'horde.success');\n } catch (Hermes_Exception $e) {\n $GLOBALS['notification']->push($e->getMessage(), 'horde.error');\n }\n\n return $id;\n }", "public function duplicate(Job $baseJob)\n {\n $job = new Job();\n\n $job->state = JobState::IDLE;\n $job->task = $baseJob->task;\n $job->retries = $baseJob->retries;\n $job->data = $baseJob->data;\n\n return $job;\n }", "public static function factory()\n {\n $cronjob = new self();\n $cronjob->name = 'D2U Courses Kufer Sync';\n return $cronjob;\n }", "public function __construct(Jobs $job)\n {\n $this->job =$job;\n }", "public function addUniqueJob(Job $job);", "public function newJob() {\n\t\t$data = array(\n\t\t 'id_dtype' \t\t=> 1,\n\t\t 'url' \t\t\t=> $this->getRemoteUrl()\n\t\t);\n\n\t\t$this->db->insert('dump_job', $data);\n\t}", "public function create(\\BitmovinApiSdk\\Models\\SimpleEncodingLiveJobRequest $simpleEncodingLiveJobRequest) : \\BitmovinApiSdk\\Models\\SimpleEncodingLiveJobResponse\n {\n $response = $this->httpWrapper->request('POST', '/encoding/simple/jobs/live', [], null, $simpleEncodingLiveJobRequest, true);\n\n return ObjectMapper::map($response, \\BitmovinApiSdk\\Models\\SimpleEncodingLiveJobResponse::class);\n }", "public static function createFromJob($job, $data, $queue = null, $delay = 0)\n {\n $message = static::create($data, $queue, $delay);\n $message->job = $job;\n\n return $message;\n }", "public function __construct($jobData)\n {\n $this->jobData = $jobData;\n }", "public static function createJobAddSkill($testEmail, $testJobName, $skillCatId, $adminUser) {\n $result = JobTest::createEmployerAndJob($testEmail, $testJobName);\n extract($result); //extract yields $jid\n \n //add category\n $job = new \\Classes\\Job($jid);\n $job->skillCategoryId = $skillCatId;\n $job->Save();\n\n //create skill\n $skillObjSave = SkillTest::createSkill(\"Looking Up\",\n $skillCatId, $adminUser);\n $skillId = $skillObjSave->objectId;\n\n //add skill\n \\Classes\\Job::SaveJobSkills($jid, $skillId);\n\n return array('jid' => $jid, 'skillId' => $skillId);\n \n //anything calling this method should also call the below at the end\n //JobTest::deleteJobTestTempRecords($testEmail);\n }", "public function __construct(AstrometryJob $astrometryJob)\n {\n $this->astrometryJob = $astrometryJob;\n }", "public function runJob()\n {\n }", "public abstract function __invoke(Job $job);", "public function createJob($type, $data, $priority = KueApi::PRIORITY_NORMAL, $maxAttempts = 3)\n\t{\n\t\tif (empty($type)) {\n\t\t\tthrow new \\InvalidArgumentException(\"Empty job types not allowed\");\n\t\t}\n\n\t\t$maxAttempts = intval($maxAttempts);\n\t\tif (!$maxAttempts) {\n\t\t\tthrow new \\InvalidArgumentException(\"It is silly to post job with 0 attempts\");\n\t\t}\n\t\t$priority = intval($priority);\n\n\t\t$id = $this->client->incr('q:ids');\n\t\tif (!is_int($id)) {\n\t\t\tthrow new \\RuntimeException(\"Unable to createJob, id not set by redis\");\n\t\t}\n\t\t$backoff = [\n\t\t\t'delay' => 60*1000,\n\t\t\t'type' => 'exponential'\n\t\t];\n\t\t$result = $this->client->sadd('q:job:types', $type);\n\n\t\t$result = $this->client->hmset(\n\t\t\t'q:job:' . $id,\n\t\t\t'max_attempts', $maxAttempts,\n\t\t\t'backoff', json_encode($backoff),\n\t\t\t'type', $type,\n\t\t\t'created_at', Carbon::now(),\n\t\t\t'promote_at', Carbon::now(),\n\t\t\t'updated_at', Carbon::now(),\n\t\t\t'priority', $priority,\n\t\t\t'data', json_encode($data),\n\t\t\t'state', 'inactive'\n\t\t);\n\n\t\t//Create an id for the zset to preserve FIFO order\n\n\t\t$this->client->zadd(\n\t\t\t'q:jobs',\n\t\t\t$priority,\n\t\t\t$this->createZid($id)\n\t\t);\n\n\t\t$this->client->zadd(\n\t\t\t'q:jobs:inactive',\n\t\t\t$priority,\n\t\t\t$this->createZid($id)\n\t\t);\n\n\t\t$this->client->zadd(\n\t\t\t'q:jobs:' . $type . ':inactive',\n\t\t\t$priority,\n\t\t\t$this->createZid($id)\n\t\t);\n\n\t\t$this->client->lpush(\n\t\t\t'q:' . $type . ':jobs',\n\t\t\t1\n\t\t);\n\n\t\treturn $id;\n\t}", "abstract public function runJob();", "public function __construct(PriorityJobs $priorityJob)\n {\n $this->priorityJob = $priorityJob;\n }", "public function createJob(Request $request) {\n \t\n \t// Logging entering method\n \t$this->logger->info(\"======> Entering JobController.createJob()\");\n \t\n \ttry {\n \t\t// Get the variables within $request passed in through the form\n \t\t$titleStart = $request->input('title');\n \t\t$descriptionStart = $request->input('description');\n \t\t$companyStart = $request->input('company');\n \t\t$locationStart = $request->input('location');\n \t\t$startDate = $request->input('startDate');\n \t\t$endDate = $request->input('endDate');\n \t\t\n \t\t// Replace all ' with \\' to allow for ' in SQL statements in the data layer\n \t\t$titleReplace = str_replace(\"'\", \"\\'\", $titleStart);\n \t\t$descriptionReplace = str_replace(\"'\", \"\\'\", $descriptionStart);\n \t\t$companyReplace = str_replace(\"'\", \"\\'\", $companyStart);\n \t\t$locationReplace = str_replace(\"'\", \"\\'\", $locationStart);\n \t\t// Replace all \" with \\\" to allow for \" in SQL statements in the data layer\n \t\t$title = str_replace('\"', '\\\"', $titleReplace);\n \t\t$description = str_replace('\"', '\\\"', $descriptionReplace);\n \t\t$company = str_replace('\"', '\\\"', $companyReplace);\n \t\t$location = str_replace('\"', '\\\"', $locationReplace);\n \t\t\n \t\t// Check if there was an end date inserted, if not set to null\n \t\tif($endDate == \"\") {\n \t\t\t$endDate = null;\n \t\t}\n \t\t\n \t\t// Create a Job object using variables\n \t\t$job = new Job(0, $title, $description, $company, $location, $startDate, $endDate, $_SESSION['currentUser']->getId());\n \t\t\n \t\t// Call create method in JobBusinessService\n \t\t$this->jobService->create($job);\n \t\t\n \t\t// Logging leaving method\n \t\t$this->logger->info(\"======> Leaving JobController.createJob() successfully\");\n \t\t\n \t\t// Redirect to the /profile route\n \t\treturn redirect()->route('profile');\n \t}\n \t// An error occurred\n \tcatch(Exception $e) {\n \t\t// Logging with an error\n \t\t$this->logger->error(\"*** Error: JobController.createJob()\", array(\"message\" => $e->getMessage()));\n \t\treturn view('error');\n \t}\n }", "public function create(Request $request)\n {\n $this->validate(\n $request,\n [\n 'title' => 'required|min:1',\n 'description' => 'required|min:1',\n 'location' => 'required|min:1'\n ]\n );\n $job = $this->job->create($request->all());\n \n return response()->json($job, 201);\n }", "public function getJob(string $jobName): JobInterface;", "protected function newQueuedJob()\n {\n return (new SendQueuedMailable($this))\n ->through(array_merge(\n method_exists($this, 'middleware') ? $this->middleware() : [],\n $this->middleware ?? []\n ));\n }", "public function addJob($task, $data, $priority = null, $executeAt = null)\n {\n $job = Mage::getModel('mongo/job')->setData(array(\n 'status' => Cm_Mongo_Model_Job::STATUS_READY,\n 'task' => $task,\n 'job_data' => $data,\n 'priority' => $priority,\n 'execute_at' => $executeAt === NULL ? time() : $executeAt,\n ));\n $job->save();\n return $job;\n }", "function job($job) {}", "public function __construct($job, $oldTime)\n {\n $this->job = $job;\n $this->oldTime = $oldTime;\n }", "public static function from_request()\n {\n $job_id = Request::get('uuid');\n if (!OCJobManager::job_exist($job_id)) {\n OCJobManager::create_job(\n $job_id,\n Request::get('cid'),\n Request::get('series_id'),\n 'presenter/source',\n Request::get('title'),\n Request::get('creator'),\n Request::get('recordDate'),\n Request::get('startTimeHour'),\n Request::get('startTimeMin'),\n Request::get('contributor'),\n Request::get('subject'),\n Request::get('language'),\n Request::get('description'),\n Request::get('total_file_size'),\n Request::get('file_name'),\n $_FILES['video']['type']\n );\n }\n\n return new OCJob($job_id);\n }", "public abstract function run(\\Pheanstalk\\Job $job);", "public function __construct(JobInstance $jobInstance)\n {\n $this->jobInstance = $jobInstance;\n }", "public function call(Closure $func): Job\n {\n return $this->createTask('closure', $func);\n }", "public function create($job)\n {\n MyLogger2::info(\"Entering JobPostingDataService.create()\");\n try{\n $name = $job->getName();\n $desc = $job->getDescription();\n $ln = $job->getLocation();\n $salary = $job->getSalary();\n $company = \"Company\";\n $stmt = $this->db->prepare(\"INSERT INTO COMPANY (COMPANY) VALUES (:cy)\");\n $stmt->bindParam(':cy', $company);\n $stmt->execute();\n // if number of affected rows within the database is greater than 0, meaning user got successfully entered\n if ($stmt->rowCount() == 1) {\n $stmt = $this->db->prepare(\"INSERT INTO JOBS (NAME, DESCRIPTION, SALARY, LOCATION, COMPANY_ID) VALUES (:nm, :desc, :sc, :ln, LAST_INSERT_ID())\");\n \n \n $stmt->bindParam(':nm', $name);\n $stmt->bindParam(':ln', $ln);\n $stmt->bindParam(':desc', $desc);\n $stmt->bindParam(':sc', $salary);\n\n \n $stmt->execute();\n // if number of affected rows within the database is greater than 0, meaning user got successfully entered\n if ($stmt->rowCount() == 1) {\n MyLogger2::info(\"Exiting JobPostingDataService.create() with job passed\");\n // return true\n return true;\n } // else return false\n else {\n MyLogger2::info(\"Exiting JobPostingDataService.create() with job failed\");\n return false;\n }\n \n }\n else {\n return false;\n }\n }catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n }", "public function __construct(Enlight_Components_Cron_Job $job)\n {\n $data = $job->getData();\n if (is_string($data)) {\n $data = unserialize($data);\n }\n $this->job = $job;\n parent::__construct($job->getAction(), $data);\n }", "public function __construct()\n {\n Log::error('test job hello from constructor');\n }", "public static function create_job($mysqli, $user_id, $location, $job_type, $job_category, $payrate, $start_date,$end_date) \r\n {\r\n \r\n $user_id = $_SESSION['id'];\r\n $sql = \"INSERT INTO jobs VALUES ('0', '$user_id', '$location', '$job_type', '$job_category','$payrate', '$start_date', '$end_date','No','0')\";\r\n $result = $mysqli->query($sql) or die($mysqli->error);\r\n\r\n if($result){\r\n\t\t\t$job_id = $mysqli->insert_id;\r\n\t\t\t$job = new Job($job_id, $user_id, $location, $job_type, $job_category, $payrate, $start_date,$end_date);\r\n\t\t $result = $job;\r\n\t\t}\r\n\t\t\treturn $result;\r\n }", "public function run()\n {\n // One requested job\n MarketplaceJobFactory::new()\n ->withAttributes(['customer_id' => 1, 'business_id' => 1])\n ->withLocation(MarketplaceLocationFactory::new())();\n\n // One pending job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::PENDING_APPROVAL,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::PENDING\n ]);\n\n $marketplaceJob->customer->notify(new WorkerAcceptedJobNotification($marketplaceJob));\n })();\n\n\n\n // One approved job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::APPROVED,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $proposal = $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED\n ]);\n\n $proposal->user->notify(new CustomerReviewedWorkerNotification($marketplaceJob));\n })();\n\n // One in progress job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::IN_PROGRESS,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString()\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $marketplaceJob->customer->notify(new WorkerArrivedNotification($marketplaceJob));\n })();\n\n\n // One freelancer complete\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::COMPLETE,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString(),\n 'completed_at' => Carbon::today()->subHour()->toDateTimeString(),\n 'rating' => 5,\n 'review' => 'Good job!'\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $worker = app()->make(UserRepository::class)->find(2);\n\n // create transfer\n $transfer = app()->make(Connect::class)->createPayout(\n $worker->payoutMethod->stripe_connect_id,\n $marketplaceJob->price\n );\n\n $marketplaceJob->payout()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => centsToDollars($transfer->amount),\n 'stripe_token' => $transfer->id // stripe transfer id\n ]);\n\n })->create();\n\n // One requested job\n MarketplaceJobFactory::new()\n ->withAttributes(['customer_id' => 5, 'business_id' => 2])\n ->withLocation(MarketplaceLocationFactory::new())();\n\n // One pending job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::PENDING_APPROVAL,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::PENDING\n ]);\n\n $marketplaceJob->customer->notify(new WorkerAcceptedJobNotification($marketplaceJob));\n })();\n\n // One approved job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::APPROVED,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $proposal = $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::APPROVED\n ]);\n\n $proposal->user->notify(new CustomerReviewedWorkerNotification($marketplaceJob));\n })();\n\n // One in progress job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::IN_PROGRESS,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString()\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $marketplaceJob->customer->notify(new WorkerArrivedNotification($marketplaceJob));\n })();\n }", "public function test_an_unauthenticated_user_cant_create_a_job()\n {\n $response = $this->postJson('/jobs', [\n 'title' => 'Create Job Test Job Title',\n 'description' => 'Create Job Test Job Description',\n 'apply_link' => 'https://www.createjobtestapplylink.com'\n ]);\n\n // Assert\n $response->assertStatus(401);\n }", "function newJob($jobtype) {\n // Check for correct job type\n if(array_search($jobtype, $this->jobtype) === FALSE) {\n return FALSE;\n }\n \n // Enter new job in spool\n $sql = 'INSERT INTO *PREFIX*aletsch_spool (ocusername, jobtype, jobstatus) VALUES(?,?,?)';\n $args = array(\n $this->OCUserName,\n $jobtype,\n 'hold'\n );\n\n $query = \\OCP\\DB::prepare($sql);\n $query->execute($args);\n \n // Get last inserted id\n $newID = \\OCP\\DB::insertid();\n \n // Reload data from DB\n $this->load();\n \n // Return last insterted ID\n return $newID;\n }", "public function store(StoreJob $request) {\n\n $userid = Auth::guard('web_member')->user()->id;\n $create = Auth::guard('web_member')->user()->job()->create([\n 'user_id' => $userid,\n 'title' => $request->title,\n 'description' => $request->description\n ]);\n\n if ($create) {\n return redirect('job')->with('success', 'Job posted. ');\n } else {\n return redirect('job')->with('error', 'Failed to post job please try again. ');\n }\n }", "public function __construct($applied_job)\n {\n $this->applied_job = $applied_job;\n $this->job = $this->getJobDetail($applied_job->job_id);\n }", "function __construct($name, $address, $job){\n parent::__construct($name, $address);\n $this->job = $job;\n }", "public function create()\n {\n if (!Input::get('job_id'))\n {\n return Response::json([\n 'status' => 'danger',\n 'gtitle' => 'Unable to Create',\n 'gbody' => \"You must select a job.\"\n ]);\n }\n\n $order = new ChangeOrder;\n $order->job_id = Input::get('job_id');\n $order->user_id = Auth::user()->id;\n $order->save();\n return Response::json(['status' => 'success', 'action' => 'reload', 'url' => \"/change/$order->id\"]);\n }", "private function JobCreateOnHover($hoverJob)\n\t{\n\t\t$this->hoverClient = $this->getHoverClient();\n \t\t$jobData = [\n\t\t\t'headers'=>[\n\t\t\t\t'Authorization' => \"Bearer {$this->hoverClient->access_token}\",\n\t\t\t],\n\t\t\t'json' => [\n\t\t\t\t'job' => [\n\t\t\t\t'name' => $hoverJob->name,\n\t\t\t\t'customer_name' => $hoverJob->customer_name,\n\t\t\t\t'customer_email' => $hoverJob->customer_email,\n\t\t\t\t'customer_phone' => $hoverJob->customer_phone,\n\t\t\t\t'location_line_1' => $hoverJob->location_line_1,\n\t\t\t\t'location_line_2' => $hoverJob->location_line_2,\n\t\t\t\t'location_city' => $hoverJob->location_city,\n\t\t\t\t'location_country' => $hoverJob->location_country,\n\t\t\t\t'location_region' => $hoverJob->location_region,\n\t\t\t\t'location_postal_code' => $hoverJob->location_postal_code,\n\t\t\t\t'external_identifier' => $hoverJob->external_identifier,\n\t\t\t\t'deliverable_id'\t=> $hoverJob->deliverable_id,\n\t\t\t],\n\t\t\t'current_user_email' => $hoverJob->user_email,\n\t\t\t]\n\t\t];\n\t\tif((App::environment('local')) || (App::environment('staging')) || (App::environment('qa')) || (getScopeId() == 12)) {\n\t\t\t$jobData['json']['job']['test_state'] = 'complete';\n\t\t}\n \t\tif($hoverJob->hover_job_id) {\n\t\t\t$response = $this->request->request('PUT', \"jobs/{$hoverJob->hover_job_id}\", $jobData);\n\t\t} else {\n\t\t\t$response = $this->request->request('POST', 'jobs', $jobData);\n\t\t}\n \t\t$jsonResponse = json_decode($response->getBody(), 1);\n\t\t$hoverJobId = $jsonResponse['job']['id'];\n\t\t$hoverJob->hover_job_id = $hoverJobId;\n\t\t$hoverJob->state = $jsonResponse['job']['state'];\n\t\t$hoverJob->save();\n\n\t\tif($hoverJobId) {\n\t\t\t$meta['hover_job_id'] = $hoverJobId;\n\t\t\t$title = 'hover_job_'.$hoverJobId;\n\t\t\t$measurement = $this->measurementRepo->save($hoverJob->job_id,\n\t\t\t\t$title,\n\t\t\t\t$values = [],\n\t\t\t\t$this->hoverClient->created_by,\n\t\t\t\t$meta\n\t\t\t);\n\t\t}\n\n \t\treturn $jobData;\n\t}", "public function create(Google_Service_JobService_Company $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('create', array($params), \"Google_Service_JobService_Company\");\n }", "protected function marshalJob(string $payload)\n {\n $queue = $this->worker->getManager()->connection('rafter');\n\n return new RafterJob(\n app(),\n $queue,\n $payload,\n request()->headers,\n $this->queueName(),\n );\n }", "public function __construct()\n {\n $this->authorizeResource(Job::class);\n }", "public function testJobStart()\n {\n }", "public function create(TargetInterface $target, string $type, string $jobId): JobLogInterface;", "public abstract function post(Job &$job);", "function addBatchJobAction(KalturaBatchJob $batchJob)\r\n\t{\r\n\t\tkJobsManager::addJob($batchJob->toObject(), $batchJob->data, $batchJob->jobType, $batchJob->jobSubType);\t\r\n\t}", "public static function createMailJob(\n array $receiver = [],\n tx_mkmailer_models_Template &$templateObj = null\n ) {\n return tx_rnbase::makeInstance(\n 'tx_mkmailer_mail_MailJob',\n $receiver,\n $templateObj\n );\n }", "public function store()\n\t{\n\t\t$input = Exception::all();\n\t\t$validator = Validator::make($input, Contact::getJobRules());\n\n\t\tif($validator->fails()) {\n\t\t\treturn ApiResponse::validation($validator);\n\t\t}\n\n\t\tif(!ine($input, 'type')) {\n\t\t\t$input['type'] = Contact::TYPE_JOB;\n\t\t}\n\n\t\tDB::beginTransaction();\n\t\ttry {\n\t\t\t$contact = $this->execute(\"\\App\\Commands\\ContactCreateCommand\", ['input' => $input, $input['job_id']]);\n\n\t\t\tDB::commit();\n\t\t\treturn ApiResponse::success([\n\t\t\t\t'message' => trans('response.success.saved', ['attribute' => 'Job contact']),\n\t\t\t\t'data' => $this->response->item($contact, new JobContactTransformer)\n\t\t\t]);\n\t\t} catch (EmptyFormSubmitException $e) {\n\t\t\tDB::rollback();\n\t\t\treturn ApiResponse::errorGeneral($e->getMessage());\n\t\t} catch (InvalidContactIdsException $e) {\n\t\t\tDB::rollback();\n\n\t\t\treturn ApiResponse::errorGeneral($e->getMessage());\n\t\t} catch (Exception $e) {\n\t\t\tDB::rollback();\n\n\t\t\treturn ApiResponse::errorInternal(trans('response.error.internal'),$e);\n\t\t}\n\t}", "public function store(CreateJobRequest $request)\n {\n $this->authorize('create', Job::class);\n\n $job = Job::register(\n auth()->user()->recruiter, $request->except('_token')\n );\n $job->save();\n\n // If the data has been correctly validated and the user has creation\n // access we will then create the new job instance associating the\n // recruiter. If no exception thrown we assume everythng was ok.\n // Then broadcast a new JobWasCreatedEvent to notifiy users.\n event(new JobWasCreated($job));\n\n flash()->info(\"El puesto se ha creado correctamente y está pendiente de revisión. Recibirá un e-mail cuando se confirme su aprobación.\");\n\n return redirect()->route('job.index');\n }", "function enqueue($job,$args=NULL,$label=NULL,$channel=NULL) {\n\t\tif (!(is_string($job) || $job instanceof JobInterface))\n\t\t\t$this->fw->error(500,'Only callable strings and Job instances are allowed');\n\t\tif (!($job instanceof JobInterface)) {\n\t\t\t/** @var Job $job */\n\t\t\t$job = new Job($job,$args);\n\t\t}\n\t\t$this->addJob($job,$label,$channel);\n\t}", "public function store(CreateJobRequest $request)\n {\n //\n try {\n $data = $request->validationData();\n $data['slug'] = Str::slug($data['title']);\n $user = auth()->user();\n $user->jobs()->create(array_merge($data, ['company_id' => $user->company->id]));\n }catch (\\Throwable $ex){\n return redirect()->back()->with('error', $ex->getMessage());\n }\n return redirect()->back()->with('success', 'Create job successfully');\n }", "function JobPostType()\n {\n $this->__construct();\n }", "public function testAddJobWithNullQueue(): void\n {\n // Arrange\n $this->connection->expects(static::exactly(2))->method('useTube')->withConsecutive(\n [static::equalTo('default')],\n [static::equalTo('')]\n );\n\n $storage = new Pheanstalk($this->connection);\n\n $job = new Job('name', []);\n\n // Act\n $storage->addJob($job);\n\n // Assert\n // ...\n }", "public function run()\n {\n Job::create(['name' => 'CUINER']);\n Job::create(['name' => 'CAMBRER']);\n Job::create(['name' => 'METRE']);\n }", "public function CancelCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function create() {\n return view('member.job.create');\n }" ]
[ "0.6828253", "0.64805055", "0.6231752", "0.6180873", "0.6113062", "0.59989166", "0.5895712", "0.5875988", "0.5845092", "0.58394456", "0.5824068", "0.57316864", "0.57308066", "0.57308066", "0.57036394", "0.56966877", "0.5651939", "0.5638987", "0.5630156", "0.56100595", "0.55988383", "0.559841", "0.5581321", "0.5575214", "0.55440974", "0.55415577", "0.55345744", "0.5497448", "0.5435613", "0.5432993", "0.54284054", "0.5414195", "0.53748846", "0.53583944", "0.5351027", "0.53404415", "0.5339741", "0.5337285", "0.533184", "0.5330826", "0.53200644", "0.5304732", "0.5302962", "0.52982235", "0.5287017", "0.5285823", "0.5261608", "0.5260259", "0.525522", "0.52512854", "0.5245408", "0.52324367", "0.5170633", "0.5151573", "0.51475173", "0.5134171", "0.51266164", "0.5124984", "0.5124686", "0.51205844", "0.5117542", "0.50974655", "0.50865346", "0.50749433", "0.50593805", "0.50555736", "0.50538975", "0.5052077", "0.50477123", "0.50474614", "0.50464535", "0.5030899", "0.50151473", "0.4983037", "0.49766716", "0.49676427", "0.49556643", "0.49504668", "0.49445194", "0.4939014", "0.49320936", "0.49186876", "0.4903793", "0.49029934", "0.48983914", "0.48948762", "0.48935616", "0.48915732", "0.48912534", "0.48900875", "0.48743874", "0.4867059", "0.4847787", "0.48439336", "0.48381388", "0.48381004", "0.48235866", "0.48210743", "0.48210737", "0.48164865" ]
0.7157244
0
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.
Отменяет CustomJob. Начинает асинхронную отмену для CustomJob. Сервер делает все возможное, чтобы отменить задание, но гарантии успешности отмены нет. Клиенты могут использовать [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] или другие методы, чтобы проверить, успешно ли прошла отмена или завершилось задание несмотря на отмену. При успешной отмене CustomJob не удаляется; вместо этого он становится заданием с [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error], значение которого содержит [google.rpc.Status.code][google.rpc.Status.code] 1, соответствующее `Code.CANCELLED`, и [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] устанавливается в `CANCELLED`.
public function CancelCustomJob(\Google\Cloud\AIPlatform\V1\CancelCustomJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\t$this->setStatus(self::STATUS_CANCELED)->save();\n\t\t$this->getSubscription()->deletePendingJobs();\n\t\t$this->getLogger()->info('The subscription was canceled.');\n\t}", "public function cancel_job($job_id, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobId'] = $job_id;\n\n\t\treturn $this->authenticate('CancelJob', $opt, $this->hostname);\n\t}", "public function cancelJob(string $id);", "public function cancelJob(Application $app, int $jobid)\n {\n $command = new CancelJobCommand($jobid);\n $command->execute();\n $job = $command->commandResponse();\n \n return $app->json($job, 202);\n }", "public function cancelJob(int $jobid): Job;", "public function CancelNasJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelNasJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelNasJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function CancelDataLabelingJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelDataLabelingJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel(string $batchId);", "public function cancelJob($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.canceljob');\n\n $this->runCupsCommand('cancelJob', $params['jobid']);\n }", "public function cancel($jobId)\n {\n $this->ProcessJobs->setStatus($jobId, ProcessJob::STATUS_CANCELED);\n \n /** @var \\App\\Model\\Entity\\ProcessJob $jobEntity */\n $jobEntity = $this->ProcessJobs->get($jobId);\n $event = new Event('Controller.ProcessJobs.statusChange', null, [\n 'userId' => $this->Auth->user('id'),\n 'itemId' => $jobEntity->item_id,\n 'eventType' => ProcessActivityLog::JOB_STATUS_CHANGE_CANCELED\n ]);\n $this->eventManager()->dispatch($event);\n \n $this->respond();\n }", "protected function cancelServiceJobByServiceJobIdRequest($service_job_id, $cancellation_reason_code)\n {\n // verify the required parameter 'service_job_id' is set\n if (null === $service_job_id || (is_array($service_job_id) && 0 === count($service_job_id))) {\n throw new \\InvalidArgumentException('Missing the required parameter $service_job_id when calling cancelServiceJobByServiceJobId');\n }\n // verify the required parameter 'cancellation_reason_code' is set\n if (null === $cancellation_reason_code || (is_array($cancellation_reason_code) && 0 === count($cancellation_reason_code))) {\n throw new \\InvalidArgumentException('Missing the required parameter $cancellation_reason_code when calling cancelServiceJobByServiceJobId');\n }\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (null !== $cancellation_reason_code) {\n $queryParams['cancellationReasonCode'] = ObjectSerializer::toQueryValue($cancellation_reason_code);\n }\n\n // path params\n if (null !== $service_job_id) {\n $resourcePath = str_replace(\n '{'.'serviceJobId'.'}',\n ObjectSerializer::toPathValue($service_job_id),\n $resourcePath\n );\n }\n\n return $this->generateRequest($multipart, $formParams, $queryParams, $resourcePath, $headerParams, 'PUT', $httpBody);\n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelServiceJobByServiceJobIdRequest($serviceJobId, $cancellationReasonCode)\n {\n // verify the required parameter 'serviceJobId' is set\n if ($serviceJobId === null || (is_array($serviceJobId) && count($serviceJobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serviceJobId when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($serviceJobId) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($serviceJobId) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'cancellationReasonCode' is set\n if ($cancellationReasonCode === null || (is_array($cancellationReasonCode) && count($cancellationReasonCode) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $cancellationReasonCode when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($cancellationReasonCode) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($cancellationReasonCode) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n if (!preg_match(\"/^[A-Z0-9_]*$/\", $cancellationReasonCode)) {\n throw new \\InvalidArgumentException(\"invalid value for \\\"cancellationReasonCode\\\" when calling ServiceApi.cancelServiceJobByServiceJobId, must conform to the pattern /^[A-Z0-9_]*$/.\");\n }\n\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($cancellationReasonCode)) {\n $cancellationReasonCode = ObjectSerializer::serializeCollection($cancellationReasonCode, '', true);\n }\n if ($cancellationReasonCode !== null) {\n $queryParams['cancellationReasonCode'] = $cancellationReasonCode;\n }\n\n\n // path params\n if ($serviceJobId !== null) {\n $resourcePath = str_replace(\n '{' . 'serviceJobId' . '}',\n ObjectSerializer::toPathValue($serviceJobId),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function cancel() {}", "public function cancel()\n {\n $this->cancelled = true;\n }", "public function cancelOperation()\n {\n echo \"Cancelling...\\n\";\n $this->cancelled = true;\n posix_kill($this->pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function cancel()\n\t{\n\t\t$this->status = self::CANCELLED;\n\t\t$this->save();\n\t\t$this->delete();\n\t}", "public function cancel($id)\r\n {\r\n $q = new Upload_queue($id);\r\n\r\n // Todo access rights\r\n \r\n if(!$q->id)\r\n {\r\n $this->alert->error('Record not found.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n if($q->state !== $q::STATE_PENDING)\r\n {\r\n $this->alert->error('Cannot cancel upload process. Process is not pending.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n $q->state = $q::STATE_CANCELED;\r\n $q->save();\r\n\r\n $this->alert->success('Job [ID: ' . $q->id . '] was canceled.');\r\n $this->redirect('upload/dataset');\r\n }", "public function cancel()\n {\n assert($this->hasId());\n $this->api->post(\"{$this}/cancel\");\n return $this->reload();\n }", "public function cancel();", "public function cancel();", "public function cancel();", "public function cancel()\n\t\t{\n\n\t\t}", "public function cancel($jobId) {\n\t\t$this->job->delete($jobId);\n\t\tredirect('jobs');\n\t}", "protected function cancelOrder()\n {\n $order = $this->createOrderFromQuote();\n if(\n $order instanceof \\Magento\\Sales\\Api\\Data\\OrderInterface &&\n $order->getEntityId() !== null\n ) {\n $this->orderManagement->cancel($order->getEntityId());\n $order->addCommentToStatusHistory($this->getErrorMessage())\n ->setIsCustomerNotified(false)\n ->setEntityName('invoice')\n ->save();\n $this->rollbackAllPartialPayments($order);\n }\n }", "public function cancel()\n {\n }", "public function cancel(): void\n {\n $this->canceled = true;\n }", "public function testCancelJobById()\n {\n $id = 42;\n $jobHandler = new JobHandler('[access_token]');\n $jobHandler->restartJobById($id);\n $result = $jobHandler->cancelJobById($id);\n $this->assertTrue($result);\n }", "public function CancelHyperparameterTuningJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelHyperparameterTuningJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "final public function Cancel()\n {\n TaskPump::Pump()->Cancel($this);\n }", "function cancel() {\n if($this->active_invoice->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_invoice->canCancel($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n if($this->request->isSubmitted()) {\n db_begin_work();\n \n $this->active_invoice->setStatus(INVOICE_STATUS_CANCELED, $this->logged_user, new DateTimeValue());\n $save = $this->active_invoice->save();\n if($save && !is_error($save)) {\n db_commit();\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if (instance_of($issued_to_user, 'User')) {\n $notify_users = array($issued_to_user);\n if ($issued_to_user->getId() != $this->logged_user->getId()) {\n $notify_users[] = $this->logged_user;\n } // if\n\n ApplicationMailer::send($notify_users, 'invoicing/cancel', array(\n 'closed_by_name' => $this->logged_user->getDisplayName(),\n 'closed_by_url' => $this->logged_user->getViewUrl(),\n 'invoice_number' => $this->active_invoice->getNumber(), \n 'invoice_url' => $this->active_invoice->getCompanyViewUrl(),\n )); \n } // if\n flash_success('Invoice #:number has been canceled', array('number' => $this->active_invoice->getName($short)));\n } else {\n db_rollback();\n flash_error('Failed to cancel invoice #:number', array('number' => $this->active_invoice->getName($short)));\n } // if\n \n $this->redirectToUrl($this->active_invoice->getViewUrl());\n } else {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n }", "public function cancelAction()\n {\n /** @var Oyst_OneClick_Helper_Data $oystHelper */\n $oystHelper = Mage::helper('oyst_oneclick');\n\n $checkoutSession = Mage::getSingleton('checkout/session');\n if (! $checkoutSession->getLastSuccessQuoteId()) {\n $this->_redirect('checkout/cart');\n\n return;\n }\n\n $lastQuoteId = $checkoutSession->getLastQuoteId();\n $lastOrderId = $checkoutSession->getLastOrderId();\n if ($lastOrderId) {\n Mage::getSingleton('core/session')->addError(\n $oystHelper->__(\"Order %s cancelled\", $lastOrderId)\n );\n $orderModel = Mage::getModel('sales/order')->load($lastOrderId);\n\n if ($lastQuoteId && $orderModel->canCancel()) {\n $quote = Mage::getModel('sales/quote')->load($lastQuoteId);\n $quote->setIsActive(true)->save();\n\n $orderModel->cancel();\n $orderModel->setStatus('canceled');\n $orderModel->save();\n\n $this->_redirect('checkout/cart', array('_secure' => true));\n\n return;\n }\n }\n\n $oystHelper->log('Order Cancel Error');\n $this->_redirect('checkout/cart', array('_secure' => true));\n }", "public function cancel(): void\n {\n $this->delete();\n }", "public function onCancel(WorkflowActivityRuntimeContext $context) {\n\t\t// override\n\t}", "public function cancelar()\n {\n //Obtiene el estado cancelado\n $estatus = $this->m_evaluacion_estado->get_by_estado( 'CANCELADO' );\n \n //Recupera la evaluacion para actualizarla\n $evaluacion = $this->m_evaluacion->get_by_Candidato_id( $_POST['candidato_id'] );\n $evaluacion->EvaluacionEstado_id = $estatus->id;\n\n $this->m_evaluacion->update( $evaluacion, $evaluacion->id );\n \n }", "function cancelSession()\n\t{\n\t\tsession()->forget('jobId');\n\t\treturn [\n\t\t\t'message'=>'Job application session cancelled',\n\t\t\t'error'=>false,\n\t\t\t'data'=>null\n\t\t];\n\t}", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function CancelOrder($cust_ref){\n\t\treturn Orders::CancelOrder($this->api_user, $this->api_key, $cust_ref);\n\t}", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t$post = FLEXI_J16GE ? $post['jform'] : $post;\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t//$post = FLEXI_J16GE ? $post['jform'] : $post; //JForm currently not used for tags\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "public function cancel() {\n\n $transid = required_param('transid', PARAM_RAW);\n\n $afullbill = Bill::get_by_transaction($transid);\n $afullbill->onlinetransactionid = $transid;\n $afullbill->paymode = 'paypal';\n $afullbill->status = SHOP_BILL_CANCELLED;\n $afullbill->save(true);\n shop_trace('Paypal Interactive Cancellation');\n\n // Do not cancel shopping cart. User may need another payment method.\n\n $params = array('view' => 'shop', 'shopid' => $this->theshop->id);\n redirect(new moodle_url('/local/shop/front/view.php', $params));\n }", "public function cancel($task) { }", "public function cancelTask()\n\t{\n\t\tif ($this->_task == 'cancel')\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t\t$category = Category::one($id);\n\t\t\t$categoryCheckedOut = $category instanceof Category ? $category->get('checked_out') : 0;\n\n\t\t\tif ($category && User::get('id') == $categoryCheckedOut)\n\t\t\t{\n\t\t\t\t$category->set('checked_out', 0);\n\t\t\t\t$category->set('checked_out_time', null);\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t$extension = Request::getCmd('extension');\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . ($this->_controller ? '&controller=' . $this->_controller : '') . '&extension=' . $extension, false)\n\t\t);\n\t}", "public function cancelComplaint(Request $request)\n {\n $complaint = Complaint::where('id', $request->input('complaintId'))->firstOrFail();\n\n if ($complaint->type == 'claim') {\n $complaint->status = 'cancelled';\n } else {\n $complaint->status = 'stopping';\n }\n $complaint->cancellation_reason = $request->input('cancellation_reason');\n\n\n $complaint->save();\n\n Event::fire(new ComplaintSaveEvent($complaint, $complaint->organization));\n\n return redirect()->back();\n\n }", "public function requestCancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\tif ($this->hasCancelPeriod()) {\n\t\t\t$this->getSubscription()->setCancelRequest(true);\n\t\t\t$this->save();\n\t\t\t$this->sendCancelRequestEmail();\n\t\t\t$this->getLogger()->info('The cancelation of the subscription was requested.');\n\t\t}\n\t\telse {\n\t\t\t$this->cancel();\n\t\t\t$this->sendCancelEmail();\n\t\t}\n\t}", "public function cancel(\\Exception $reason = null);", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$data = $this->input->get('jform', array(), 'array'); // Unfiltered data (no need for filtering)\n\t\t$this->input->set('cid', (int) $data['id']);\n\n\t\t$this->checkin();\n\t}", "public function CancelOperation(\\Google\\Cloud\\Container\\V1beta1\\CancelOperationRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.container.v1beta1.ClusterManager/CancelOperation',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "function cancel($c = NULL) {\n\t\t\t// Error\n\t\t\t$error = NULL;\n\t\t\t// Common errors\n\t\t\tif($error_common = $this->errors(__FUNCTION__)) {\n\t\t\t\t$error = $error_common;\n\t\t\t}\n\t\t\t// No transaction ID\n\t\t\telse if(!$this->transaction) {\n\t\t\t\t$error = \"No transaction ID was passed that we could cancel.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Error\n\t\t\tif($error) {\n\t\t\t\t$results = array(\n\t\t\t\t\t'result' => 0,\n\t\t\t\t\t'message' => $error\n\t\t\t\t);\t\n\t\t\t}\n\t\t\t// Transaction\n\t\t\telse {\n\t\t\t\t// Process\n\t\t\t\t$results = $this->gateway->cancel($this,$c);\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $results;\n\t\t}", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancel( \\Aimeos\\MShop\\Order\\Item\\Iface $order ) : \\Aimeos\\MShop\\Order\\Item\\Iface\n\t{\n\t\t$order->setPaymentStatus( \\Aimeos\\MShop\\Order\\Item\\Base::PAY_CANCELED );\n\t\treturn $this->saveOrder( $order );\n\t}", "public function cancel()\n {\n $this->processPostAction();\n }", "public function cancelAction()\n {\n $event = Mage::getModel('pagbrasil/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPagbrasilQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "public function cancel(\n string $invoiceId,\n bool $forceCancel = false\n ): Invoice {\n try {\n $params = [];\n $params[\"token\"] = $this->tokenCache->getTokenByFacade(Facade::MERCHANT);\n if ($forceCancel) {\n $params[\"forceCancel\"] = $forceCancel;\n }\n\n $responseJson = $this->restCli->delete(\"invoices/\" . $invoiceId, $params);\n } catch (BitPayException $e) {\n throw new InvoiceCancellationException(\n \"failed to serialize Invoice object : \" .\n $e->getMessage(),\n null,\n null,\n $e->getApiCode()\n );\n } catch (Exception $e) {\n throw new InvoiceCancellationException(\"failed to serialize Invoice object : \" . $e->getMessage());\n }\n\n try {\n $mapper = JsonMapperFactory::create();\n\n return $mapper->map(\n json_decode($responseJson, true, 512, JSON_THROW_ON_ERROR),\n new Invoice()\n );\n } catch (Exception $e) {\n throw new InvoiceCancellationException(\n \"failed to deserialize BitPay server response (Invoice) : \" . $e->getMessage()\n );\n }\n }", "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getCcavenuepayStandardQuoteId(true));\n\n\t\t \n\t\t$order_history_comment='';\t\n // cancel order\n if ($session->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n if ($order->getId()) {\n\t\t\t\t \n\t\t\t\t$order_history_comments = $this->getCheckout()->getCcavenuepayErrorMessage();\n\t\t\t\tforeach($order_history_comments as $order_history_comment)\n\t\t\t\t{\n\t\t\t\t\tif($order_history_comment !='') $order->addStatusHistoryComment($order_history_comment,true);\n\t\t\t\t}\t\t\t\n $order->cancel()->save();\n }\n }\n\n /*we are calling getCcavenuepayStandardQuoteId with true parameter, the session object will reset the session if parameter is true.\n so we don't need to manually unset the session*/\n\t\tMage::getSingleton('checkout/session')->addError(\"CcavenuePay Payment has been cancelled and the transaction has been declined.\");\n\t\tif($order_history_comment!='')\tMage::getSingleton('checkout/session')->addError($order_history_comment);\n\t\t$this->_redirect('checkout/cart');\n }", "public function cancelCompanyDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingCompanyDeletion');\n }", "public function cancel()\n {\n if ($this->onGracePeriod()) {\n return $this;\n }\n \n return $this->cancelAt(true);\n }", "public function cancelCbAction()\r\n {\r\n }", "public function cancelQuote(Opportunity $opportunity)\n {\n if (OpportunityStatus::PENDING_QUOTE !== $opportunity->getStatus()) {\n throw new \\BadMethodCallException('This quote was already cancelled.');\n }\n\n $em = $this->getEntityManager();\n\n $opportunity->setStatus(OpportunityStatus::CANCELLED_QUOTE);\n\n $em->flush($opportunity);\n\n return $opportunity;\n }", "public function cancelParcelAsyncWithHttpInfo($command_id, $cancel_parcel_parameters, string $contentType = self::contentTypes['cancelParcel'][0])\n {\n $returnType = '\\Phobetor\\Allegro\\Model\\CancelParcel201Response';\n $request = $this->cancelParcelRequest($command_id, $cancel_parcel_parameters, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "public function cancel( string $hook, $args = [], string $group = '' ) {\n\t\treturn as_unschedule_action( $hook, $args, $group );\n\t}", "public function cancelAction()\n {\n try {\n $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOPSQuoteId());\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n if (false == $this->_getOrder()->getId()) {\n $this->_order = null;\n $this->_getOrder($this->_getCheckout()->getLastQuoteId());\n }\n\n $this->getPaymentHelper()->refillCart($this->_getOrder());\n\n $redirect = 'checkout/cart';\n $this->redirectOpsRequest($redirect);\n\n }", "public function cancelParcelAsync($command_id, $cancel_parcel_parameters, string $contentType = self::contentTypes['cancelParcel'][0])\n {\n return $this->cancelParcelAsyncWithHttpInfo($command_id, $cancel_parcel_parameters, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function OrderCancel($_OrderId)\n\t{\n $order = Mage::getModel('sales/order')->load($_OrderId);\n try {\n $param = array(\n 'PreOrderID' => $order->getIncrementId()\n );\n\t\t $result = $this->getSoapClient()->PreOrderCancel($param);\n } catch(Exception $e) {\n // Log the exception thrown\n //Mage::logException($e);\n Mage::throwException(\n Mage::helper('airline_ecustomerorder')->__($e->faultstring)\n );\n }\n\t\t// Return the Soap response for successful transaction\n\t\treturn $result->OrderCancelResult;\n\t}", "function cancel() {\n\t\t$model = $this->getModel( $this->_sTaskModel, '', $this->_parameters );\n\t\t$model->resetFormFields();\n\t\t$link = $model->getReturnLink();\n\t\t$this->setRedirect($link);\n\t}", "public function cancel($id);", "public function cancel($id);", "public function cancel()\n {\n $isOnline = true;\n if (!$this->canVoid()) {\n $isOnline = false;\n }\n\n if (!$this->hasMessage()) {\n $this->setMessage($isOnline ? __('Canceled order online') : __('Canceled order offline'));\n }\n\n if ($isOnline) {\n $this->_void($isOnline, null, 'cancel');\n }\n\n $this->_eventManager->dispatch('sales_order_payment_cancel', ['payment' => $this]);\n\n return $this;\n }", "public function cancel($invoice_id=null)\n\t{\n\t\t$company_id = $_SESSION['company_id'];\n\t\t\n\t\tif(!is_null($invoice_id)){\n\t\t\t$this->Invoice->query('update invoices set status = 5 where invoice_id ='.$invoice_id.' and company_id ='.$company_id.'');\n\t\t\t$this->Session->setFlash(__('You have successfully cancelled order #'.$invoice_id),'default',array(),'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('There was an error cancelling #'.$invoice_id.'. Please try again.'),'default',array(),'error');\n\t\t\t$this->redirect($this->referer());\t\n\t\t}\n\t}", "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n\t\t\t\t$order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Payment Processing Cancelled')->save();\n\t\t\t\tMage::getModel(\"Swipezoom_InternationalShipping_Model_Carrier_Swipezoom\")->setPaymentAdditionalData(Mage::getSingleton('sales/quote')->load($order->getQuoteId())->getSwipezoomOrderNumber(),Mage::getSingleton('checkout/session')->getLastRealOrderId(),'C');\n\t\t\t}\n }\n\t}", "public function cancelCommit() {\n\n return $this->sendRPC(\"<cancel-commit/>\");\n\n }", "public function cancelService()\n {\n ServiceManager::instance()->cancelService($this);\n }", "static public function cancel(CashReceipt $obj){\n\t\t// Code here...\n\t}", "public function stop(JobInterface $job);", "public function cancelInvoice($reference) {\n\n try {\n $SOAP = $this->SOAP();\n $result = $SOAP->cancelInvoice(array(\n \"context\" => $this->getRequestContext(),\n \"invoiceReference\" => $reference\n ))->return;\n\n if ($result->resultCode != 0) throw new Exception($result->resultCode . ' : ' . $result->resultDescription);\n\n return $result;\n } catch(Exception $e) {\n PrestaShopLogger::addLog($e->getMessage());\n throw new Exception(\"SEQR API - Cancel invoice error\");\n }\n }", "public function cancelDelayedJob($tokenAndTimstamp, $queue, $class, $args = array())\n {\n return ResqueScheduler::removeDelayedJob ( $tokenAndTimstamp, $queue, $class, $args );\n }", "public function cancel($hook, $args = array(), $group = '');", "public function cancel(Request $request)\n {\n $result = $this->service->cancel($request->id);\n\n if ($result) {\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('success', 'Successfully cancelled');\n }\n\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('error', 'Failed to cancel');\n }", "public function cancel($reason = '', $alreadyCanceledInGateway = false)\n {\n //first let gateway update the recurring billing status\n $gateway = $this->getGateway();\n if (!$gateway) {\n //Oops! Something wrong\n return false;\n }\n if (!$alreadyCanceledInGateway) {\n $result = $gateway->recurringCancel($this, $reason);\n if (!$result) {\n trigger_error('ERROR RECURRING: Payment gateway returned false, cancelation had a problem so not proceeding.');\n return false;\n }\n }\n $itemType = $this->getItemType();\n //let the order item update things\n if ($itemType) {\n geoOrderItem::callUpdate('recurringBilling_cancel', $this, $itemType);\n }\n $this->setStatus(self::STATUS_CANCELED);\n $this->save();\n return true;\n }", "public function cancelled(): bool;", "public static function cancel($data)\n {\n $pathUrl = LPC_Configuration::getServiceUrl() . self::CANCEL_ORDER_SERVICE; \n $data = LPC_Util::buildStringFromArray($data); \n \n if (empty($data)) {\n throw new LPC_Exception('Empty message OrderCancelRequest');\n }\n $isPassword = LPC_Configuration::getEnvironment() == 'testing';\n $result = LPC_Util::verifyResponse(LPC_Http::post($pathUrl, $data, $isPassword));\n return $result;\n }", "public function actionCancel($id)\n {\n $model = $this->findModel($id);\n if($model->create_by == Yii::$app->user->id){\n if(!($model->status < WorksystemTask::STATUS_WORKING))\n throw new NotAcceptableHttpException('该任务状态为'.$model->getStatusName ().'!');\n }else{\n throw new NotAcceptableHttpException('无权限操作!');\n }\n $post = Yii::$app->request->post();\n $_wsAction = WorksystemAction::getInstance();\n \n if ($model->load($post)) {\n $_wsAction->CancelTask($model, $post);\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_cancel', [\n 'model' => $model,\n ]);\n }\n }", "public function cancelInvoice($apruveInvoiceId)\n {\n $result = $this->execCurlRequest($this->_getCancelInvoiceUrl($apruveInvoiceId), 'POST');\n return $result;\n }", "public function cancelJobs($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.printername');\n\n $this->runCupsCommand('cancelAllJobs', $params['pname']);\n }", "public function requestcancel()\n\t{\n\t\t$app\t=\tJFactory::getApplication();\n\n\t\t// Getting target id and user id.\n\t\t$user\t=\t$app->input->get('user_id', 0, 'INT');\n\t\t$target\t=\t$app->input->get('target_id', 0, 'INT');\n\n\t\t// Loading friend model for getting id\n\t\t$friendmodel\t=\tFD::model('Friends');\n\t\t$state\t\t\t=\tSOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t$status\t\t\t=\t$friendmodel->isFriends($user, $target, $state);\n\n\t\t$res = new stdClass;\n\n\t\tif (!$status)\n\t\t{\n\t\t\t/* final call to Cancel friend request.\n\t\t\t* $final = $friend->reject();\n\t\t\t*/\n\n\t\t\t$final\t=\tES::friends($target, $user)->cancel();\n\t\t\t$res->result->status = 1;\n\t\t\t$this->plugin->setResponse($res);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->result->status = 0;\n\t\t}\n\n\t\t$this->plugin->setResponse($res);\n\t}", "public function processCancelRequest(){\n\t\tif ($this->checkWorkflow(self::STATUS_CANCELED) && $this->isCancelRequested()) {\n\t\t\t$this->getSubscription()->setCancelCount($this->getSubscription()->getCancelCount() + 1);\n\t\t\tif ($this->getSubscription()->getCancelCount() == $this->getSubscription()->getCancelPeriod()) {\n\t\t\t\t$this->cancel();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->save();\n\t\t\t}\n\t\t}\n\t}", "public function cancelItem(Request $request)\n {\n $result = app(OrderItemService::class)->cancel($request->id);\n\n if ($result) {\n return back()->with('success', 'Successfully cancelled');\n }\n\n return back()->with('error', 'Failed to cancel');\n }", "public function isCancelAble() {}", "final public function set_cancelled() { $this->cancelled = TRUE; }", "public function cancel($orderId)\n {\n $order = BatchOrder::owned()->findOrFail($orderId);\n $order->status = BatchOrder::CANCELLED_STATUS;\n $order->save();\n\n return new BatchOrderResource(BatchOrder::owned()->findOrFail($orderId));\n }", "public function cancelRecord() {\n return $this->getClass()->declineRecord();\n }", "function cancel()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tcheck_access($this, 'cancel_promotion_application');\n\t\t$this->load->model('_job');\n\t\t\n\t\t$data['area'] = 'cancel_promotion_application';\n\t\t$data['job'] = $this->_job->populate_session();\n\t\t$this->load->view('job/my_profile', $data); \n\t}", "public function cancel($hook, $args = array(), $group = '')\n {\n }", "public function doCancel(Request $request, $id)\n\t{\n\t\t$request->validate(\n\t\t\t[\n\t\t\t\t'cancellation_note' => 'required|max:255',\n\t\t\t]\n\t\t);\n\n\t\t$order = Order::findOrFail($id);\n\t\t\n\t\t$cancelOrder = \\DB::transaction(\n\t\t\tfunction () use ($order, $request) {\n\t\t\t\t$params = [\n\t\t\t\t\t'status' => Order::CANCELLED,\n\t\t\t\t\t'cancelled_by' => \\Auth::user()->id,\n\t\t\t\t\t'cancelled_at' => now(),\n\t\t\t\t\t'cancellation_note' => $request->input('cancellation_note'),\n\t\t\t\t];\n\n\t\t\t\tif ($cancelOrder = $order->update($params) && $order->orderItems->count() > 0) {\n\t\t\t\t\tforeach ($order->orderItems as $item) {\n\t\t\t\t\t\tProductInventory::increaseStock($item->product_id, $item->qty);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $cancelOrder;\n\t\t\t}\n\t\t);\n\n\t\t\\Session::flash('success', 'The order has been cancelled');\n\n\t\treturn redirect('admin/orders');\n\t}", "public function cancel()\n\t{\n\t\t$GLOBALS['ilCtrl']->returnToParent($this);\n\t}", "function cancel()\n\t{\n\t\tilUtil::sendInfo($this->lng->txt(\"msg_cancel\"),true);\n\n\t\t$this->ctrl->redirectByClass(\"ilobjilinccoursegui\");\n\t}", "protected function _mailSendCancel()\n\t{\n\t\t$this->DB->update( 'bulk_mail', array(\t'mail_active'\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'mail_updated'\t=> time(),\n\t\t\t\t\t\t\t\t\t\t \t\t), \"mail_active=1\" );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->DB->update( 'task_manager', array( 'task_enabled' => 0 ), \"task_key='bulkmail'\" );\n\t\t\n\t\t$this->registry->output->global_message = $this->lang->words['b_cancelled'];\n\t\t$this->_mailStart();\n\t}", "public function cancel(mixed $timer): void\n {\n }" ]
[ "0.6740561", "0.67306876", "0.66296685", "0.6477405", "0.6413668", "0.62767917", "0.61814004", "0.6180634", "0.6151152", "0.61309147", "0.61019987", "0.60067624", "0.5961885", "0.5955048", "0.59482276", "0.59351224", "0.59008837", "0.5887221", "0.5863935", "0.5735192", "0.56936234", "0.56936234", "0.56936234", "0.5690073", "0.5687937", "0.5685565", "0.56713694", "0.5657553", "0.5629946", "0.55942273", "0.55628204", "0.5544851", "0.55358845", "0.5506729", "0.55052465", "0.543967", "0.5428964", "0.5388574", "0.5387608", "0.5377234", "0.53705597", "0.536074", "0.5357417", "0.53487486", "0.5347208", "0.534399", "0.5332868", "0.5330514", "0.53267366", "0.53194034", "0.5310181", "0.5301086", "0.5285115", "0.52740514", "0.527398", "0.5256173", "0.52442735", "0.5232942", "0.52224386", "0.52193904", "0.5213057", "0.52077883", "0.52048844", "0.5204257", "0.51890844", "0.51840216", "0.5178595", "0.5174831", "0.5174831", "0.51639104", "0.5158559", "0.51529276", "0.5150054", "0.5142742", "0.51423734", "0.51249814", "0.5106217", "0.51009613", "0.50937325", "0.5090247", "0.5089959", "0.50744087", "0.50700635", "0.5064119", "0.5060492", "0.5057435", "0.5048877", "0.5047518", "0.50361127", "0.5021208", "0.50195473", "0.50184435", "0.5013541", "0.5012286", "0.4988117", "0.4963904", "0.49613547", "0.495383", "0.4953328", "0.49493366" ]
0.78898513
0
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
Отменяет DataLabelingJob. Успех отмены не гарантируется.
public function CancelDataLabelingJob(\Google\Cloud\AIPlatform\V1\CancelDataLabelingJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancelJob(string $id);", "public function cancel() {}", "public function cancel()\n {\n $this->cancelled = true;\n }", "public function cancel()\n\t\t{\n\n\t\t}", "public function cancelOperation()\n {\n echo \"Cancelling...\\n\";\n $this->cancelled = true;\n posix_kill($this->pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function cancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\t$this->setStatus(self::STATUS_CANCELED)->save();\n\t\t$this->getSubscription()->deletePendingJobs();\n\t\t$this->getLogger()->info('The subscription was canceled.');\n\t}", "public function cancel();", "public function cancel();", "public function cancel();", "public function cancel(string $batchId);", "public function cancel()\n\t{\n\t\t$this->status = self::CANCELLED;\n\t\t$this->save();\n\t\t$this->delete();\n\t}", "public function cancel()\n {\n }", "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "final public function Cancel()\n {\n TaskPump::Pump()->Cancel($this);\n }", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function cancel($id)\r\n {\r\n $q = new Upload_queue($id);\r\n\r\n // Todo access rights\r\n \r\n if(!$q->id)\r\n {\r\n $this->alert->error('Record not found.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n if($q->state !== $q::STATE_PENDING)\r\n {\r\n $this->alert->error('Cannot cancel upload process. Process is not pending.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n $q->state = $q::STATE_CANCELED;\r\n $q->save();\r\n\r\n $this->alert->success('Job [ID: ' . $q->id . '] was canceled.');\r\n $this->redirect('upload/dataset');\r\n }", "public function cancelJob(int $jobid): Job;", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "public function cancel(): void\n {\n $this->canceled = true;\n }", "public function cancel()\r\n\t{\r\n\t\t$this->_statement=null;\r\n\t}", "public function cancelar()\n {\n //Obtiene el estado cancelado\n $estatus = $this->m_evaluacion_estado->get_by_estado( 'CANCELADO' );\n \n //Recupera la evaluacion para actualizarla\n $evaluacion = $this->m_evaluacion->get_by_Candidato_id( $_POST['candidato_id'] );\n $evaluacion->EvaluacionEstado_id = $estatus->id;\n\n $this->m_evaluacion->update( $evaluacion, $evaluacion->id );\n \n }", "public function cancel(): void\n {\n $this->delete();\n }", "public function cancelTask()\n\t{\n\t\tif ($this->_task == 'cancel')\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t\t$category = Category::one($id);\n\t\t\t$categoryCheckedOut = $category instanceof Category ? $category->get('checked_out') : 0;\n\n\t\t\tif ($category && User::get('id') == $categoryCheckedOut)\n\t\t\t{\n\t\t\t\t$category->set('checked_out', 0);\n\t\t\t\t$category->set('checked_out_time', null);\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t$extension = Request::getCmd('extension');\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . ($this->_controller ? '&controller=' . $this->_controller : '') . '&extension=' . $extension, false)\n\t\t);\n\t}", "function cancel();", "public function cancel($id);", "public function cancel($id);", "public function cancel()\n {\n assert($this->hasId());\n $this->api->post(\"{$this}/cancel\");\n return $this->reload();\n }", "public function cancel() {\n global $DB;\n parent::cancel();\n $DB->delete_records('gradingform_sfrbric_fillings', array('instanceid' => $this->get_id()));\n $DB->delete_records('gradingform_sfrbric_grades', array('instanceid' => $this->get_id()));\n }", "public function cancel()\n\t{\n\t\t$GLOBALS['ilCtrl']->returnToParent($this);\n\t}", "public function cancelJob($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.canceljob');\n\n $this->runCupsCommand('cancelJob', $params['jobid']);\n }", "public function cancel()\n\t{\n\t\t$mysql_query = \"DELETE FROM `$this->table` WHERE `$this->table`.`$this->primary_key` = $this->id LIMIT 1\";\n\t\t$this->db_wrapper->query($mysql_query);\n\t}", "public function cancel_job($job_id, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobId'] = $job_id;\n\n\t\treturn $this->authenticate('CancelJob', $opt, $this->hostname);\n\t}", "public function cancel(\\Exception $reason = null);", "public function cancel($jobId) {\n\t\t$this->job->delete($jobId);\n\t\tredirect('jobs');\n\t}", "protected function cancelQueueing() { }", "function cancel() {\n\t\t$model = $this->getModel( $this->_sTaskModel, '', $this->_parameters );\n\t\t$model->resetFormFields();\n\t\t$link = $model->getReturnLink();\n\t\t$this->setRedirect($link);\n\t}", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$data = $this->input->get('jform', array(), 'array'); // Unfiltered data (no need for filtering)\n\t\t$this->input->set('cid', (int) $data['id']);\n\n\t\t$this->checkin();\n\t}", "public function cancel($task) { }", "public function cancelRecord() {\n return $this->getClass()->declineRecord();\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t//$post = FLEXI_J16GE ? $post['jform'] : $post; //JForm currently not used for tags\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "public function cancel($hook, $args = array(), $group = '');", "public function cancel()\n {\n $this->processPostAction();\n }", "public function cancelSubscription($data)\n {\n $id = (int) $data['id'];\n $sql = 'DELETE FROM #__jms_plan_subscrs' .\n ' WHERE id = ' . (int) $id\n ;\n $this->_db->setQuery($sql);\n\n $this->_db->query();\n }", "public function cancel_process()\n {\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t$post = FLEXI_J16GE ? $post['jform'] : $post;\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "function cancelSession()\n\t{\n\t\tsession()->forget('jobId');\n\t\treturn [\n\t\t\t'message'=>'Job application session cancelled',\n\t\t\t'error'=>false,\n\t\t\t'data'=>null\n\t\t];\n\t}", "public function cancel( string $hook, $args = [], string $group = '' ) {\n\t\treturn as_unschedule_action( $hook, $args, $group );\n\t}", "public function cancelJob(Application $app, int $jobid)\n {\n $command = new CancelJobCommand($jobid);\n $command->execute();\n $job = $command->commandResponse();\n \n return $app->json($job, 202);\n }", "public function onCancel(WorkflowActivityRuntimeContext $context) {\n\t\t// override\n\t}", "public function cancelCbAction()\r\n {\r\n }", "public function cancel($hook, $args = array(), $group = '')\n {\n }", "public function testCancelJobById()\n {\n $id = 42;\n $jobHandler = new JobHandler('[access_token]');\n $jobHandler->restartJobById($id);\n $result = $jobHandler->cancelJobById($id);\n $this->assertTrue($result);\n }", "final public function set_cancelled() { $this->cancelled = TRUE; }", "function cancel() {\n $msg = JText::_('Operation cancelled');\n $this->setRedirect('index.php?option=com_shortlink', $msg);\n }", "public function isCancelled();", "public function isCancelled();", "public function isCancelled();", "public function isCancelled();", "public function requestcancel()\n\t{\n\t\t$app\t=\tJFactory::getApplication();\n\n\t\t// Getting target id and user id.\n\t\t$user\t=\t$app->input->get('user_id', 0, 'INT');\n\t\t$target\t=\t$app->input->get('target_id', 0, 'INT');\n\n\t\t// Loading friend model for getting id\n\t\t$friendmodel\t=\tFD::model('Friends');\n\t\t$state\t\t\t=\tSOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t$status\t\t\t=\t$friendmodel->isFriends($user, $target, $state);\n\n\t\t$res = new stdClass;\n\n\t\tif (!$status)\n\t\t{\n\t\t\t/* final call to Cancel friend request.\n\t\t\t* $final = $friend->reject();\n\t\t\t*/\n\n\t\t\t$final\t=\tES::friends($target, $user)->cancel();\n\t\t\t$res->result->status = 1;\n\t\t\t$this->plugin->setResponse($res);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->result->status = 0;\n\t\t}\n\n\t\t$this->plugin->setResponse($res);\n\t}", "public function cancelCompanyDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingCompanyDeletion');\n }", "protected function subscriptionCancelled(array $requestData)\n {\n return;\n }", "function cancel()\n\t{\n\t\tilUtil::sendInfo($this->lng->txt(\"msg_cancel\"),true);\n\n\t\t$this->ctrl->redirectByClass(\"ilobjilinccoursegui\");\n\t}", "public function CancelCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelDownload(ContextInterface $ctx, CancelDownloadRequest $request): void;", "public function cancelled(): bool;", "public function cancelNow()\n {\n return $this->cancelAt(false);\n }", "public function cancelPickup() {\n\n }", "public function CancelHyperparameterTuningJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelHyperparameterTuningJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function requestCancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\tif ($this->hasCancelPeriod()) {\n\t\t\t$this->getSubscription()->setCancelRequest(true);\n\t\t\t$this->save();\n\t\t\t$this->sendCancelRequestEmail();\n\t\t\t$this->getLogger()->info('The cancelation of the subscription was requested.');\n\t\t}\n\t\telse {\n\t\t\t$this->cancel();\n\t\t\t$this->sendCancelEmail();\n\t\t}\n\t}", "public function cancel()\r\n\t{\r\n\t\t$connection = $this->getBoundConnection();\r\n\t\treturn $connection->getPDO()->rollBack();\r\n\t}", "public function cancel()\n {\n\n foreach ($this->tickets as $ticket)\n {\n $ticket->release();\n }\n }", "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$id\t\t= JRequest::getVar( 'id', 0, '', 'int' );\n\t\t$db\t\t=& JFactory::getDBO();\n\t\t$row\t=& JTable::getInstance('mfpoll', 'Table');\n\n\t\t$row->checkin( $id );\n\t\t$this->setRedirect( 'index.php?option=com_mfpolls' );\n\t}", "public function cancelCommit() {\n\n return $this->sendRPC(\"<cancel-commit/>\");\n\n }", "public function cancel()\n {\n if ($this->onGracePeriod()) {\n return $this;\n }\n \n return $this->cancelAt(true);\n }", "public function cancel() {\n\n $transid = required_param('transid', PARAM_RAW);\n\n $afullbill = Bill::get_by_transaction($transid);\n $afullbill->onlinetransactionid = $transid;\n $afullbill->paymode = 'paypal';\n $afullbill->status = SHOP_BILL_CANCELLED;\n $afullbill->save(true);\n shop_trace('Paypal Interactive Cancellation');\n\n // Do not cancel shopping cart. User may need another payment method.\n\n $params = array('view' => 'shop', 'shopid' => $this->theshop->id);\n redirect(new moodle_url('/local/shop/front/view.php', $params));\n }", "public function cancelAction()\n {\n \n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel($jobId)\n {\n $this->ProcessJobs->setStatus($jobId, ProcessJob::STATUS_CANCELED);\n \n /** @var \\App\\Model\\Entity\\ProcessJob $jobEntity */\n $jobEntity = $this->ProcessJobs->get($jobId);\n $event = new Event('Controller.ProcessJobs.statusChange', null, [\n 'userId' => $this->Auth->user('id'),\n 'itemId' => $jobEntity->item_id,\n 'eventType' => ProcessActivityLog::JOB_STATUS_CHANGE_CANCELED\n ]);\n $this->eventManager()->dispatch($event);\n \n $this->respond();\n }", "public function cancel( $pspReference );", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancelAction()\n {\n $event = Mage::getModel('pagbrasil/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPagbrasilQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "function abortConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "public function isCancelAble() {}", "public function cancelComplaint(Request $request)\n {\n $complaint = Complaint::where('id', $request->input('complaintId'))->firstOrFail();\n\n if ($complaint->type == 'claim') {\n $complaint->status = 'cancelled';\n } else {\n $complaint->status = 'stopping';\n }\n $complaint->cancellation_reason = $request->input('cancellation_reason');\n\n\n $complaint->save();\n\n Event::fire(new ComplaintSaveEvent($complaint, $complaint->organization));\n\n return redirect()->back();\n\n }", "public function cancelSubmit(array &$form, FormStateInterface $form_state) {\n $queue_id = $this->getRequest()->get('queue');\n $this->returnToReview($queue_id, $form_state);\n }", "public function CancelNasJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelNasJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelNasJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel(mixed $timer): void\n {\n }", "protected function finishJob()\n {\n // remove job file\n $file = $this->app['utils']->sanitizePath(\n sprintf('%s/temp/jobs/autosync_job_%s', SYNCDATA_PATH, SYNCDATA_JOBID)\n );\n unlink($file);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_PROGRESS\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_ERROR\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_FINISHED\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_ERRORCOUNT\"]);\n }", "public function cancel($reason = '', $cost = 0)\n {\n $this->validatePreviousState([\n null,\n $this::STATE_OPENED,\n $this::STATE_COMMERCE_CHECKOUT,\n $this::STATE_COMMERCE_RESERVED,\n $this::STATE_COMMERCE_BACK_ORDERED,\n $this::STATE_ORDERED_PENDING,\n $this::STATE_INVENTORY_ON_HOLD,\n ], $this::STATE_CANCELLED);\n\n $beforeQuantity = $this->quantity;\n $beforeState = $this->state;\n\n $this->quantity = 0;\n $this->state = $this::STATE_CANCELLED;\n\n $event = 'inventory.transaction.cancelled';\n\n if (!$reason) {\n $reason = $this->getTransactionReason('cancelled');\n }\n\n switch ($beforeState) {\n case $this::STATE_COMMERCE_CHECKOUT:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n case $this::STATE_COMMERCE_RESERVED:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n case $this::STATE_INVENTORY_ON_HOLD:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n default:\n return $this->processSave($event);\n }\n }", "public function processStop($label, $success = true, $responseCode = '', $message = '', $data = null)\n {\n $timestamp = $this->getTimestamp();\n $this->stop(Action::PROCESS, $label, $success, $responseCode, $message, $data, $timestamp);\n }", "public function __destruct() {\n Loop::cancel($this->poll);\n Loop::cancel($this->await);\n }", "public function delete()\n {\n $this->job->delete();\n }", "public function processCancelRequest(){\n\t\tif ($this->checkWorkflow(self::STATUS_CANCELED) && $this->isCancelRequested()) {\n\t\t\t$this->getSubscription()->setCancelCount($this->getSubscription()->getCancelCount() + 1);\n\t\t\tif ($this->getSubscription()->getCancelCount() == $this->getSubscription()->getCancelPeriod()) {\n\t\t\t\t$this->cancel();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->save();\n\t\t\t}\n\t\t}\n\t}", "function cancel_task($assigneeid) {\r\n global $DB;\r\n\r\n // Set \"cancelled\" = 1 for old assignee record\r\n $assignee = $DB->get_record('poasassignment_assignee', array('id' => $assigneeid));\r\n $assignee->cancelled = 1;\r\n $DB->update_record('poasassignment_assignee', $assignee);\r\n\r\n // Create new assignee record\r\n $newassignee = new stdClass();\r\n $newassignee->userid = $assignee->userid;\r\n $newassignee->timetaken = 0;\r\n $newassignee->taskid = 0;\r\n $newassignee->poasassignmentid = $assignee->poasassignmentid;\r\n\r\n $DB->insert_record('poasassignment_assignee', $newassignee);\r\n\r\n // Delete grade from gradebook\r\n global $CFG;\r\n require_once($CFG->libdir.'/gradelib.php');\r\n $record = new stdClass();\r\n $record->userid = $assignee->userid;\r\n $record->rawgrade = null;\r\n grade_update(\r\n 'mod/poasassignment',\r\n $this->poasassignment->course,\r\n 'mod',\r\n 'poasassignment',\r\n $this->poasassignment->id,\r\n 0,\r\n $record,\r\n null\r\n );\r\n }", "public function actionCancel($id)\n {\n $model = $this->findModel($id);\n if($model->create_by == Yii::$app->user->id){\n if(!($model->status < WorksystemTask::STATUS_WORKING))\n throw new NotAcceptableHttpException('该任务状态为'.$model->getStatusName ().'!');\n }else{\n throw new NotAcceptableHttpException('无权限操作!');\n }\n $post = Yii::$app->request->post();\n $_wsAction = WorksystemAction::getInstance();\n \n if ($model->load($post)) {\n $_wsAction->CancelTask($model, $post);\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_cancel', [\n 'model' => $model,\n ]);\n }\n }", "function cancel()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\t$this->setRedirect( 'index.php?option=com_fabrik&c=connection' );\r\n\t\t// Initialize variables\r\n\t\t$db\t\t=& JFactory::getDBO();\r\n\t\t$post\t= JRequest::get( 'post' );\r\n\t\t$row\t=& JTable::getInstance('connection', 'Table');\r\n\t\t$row->bind( $post );\r\n\t\t$row->checkin();\r\n\t}", "public function unsetCancelReason(): void\n {\n $this->cancelReason = [];\n }", "public function cancelDelayedJob($tokenAndTimstamp, $queue, $class, $args = array())\n {\n return ResqueScheduler::removeDelayedJob ( $tokenAndTimstamp, $queue, $class, $args );\n }", "function cancel_task(int $tid)\n\t{\n\t\treturn Kernel::cancelTask($tid); \n\t}", "public function markAsCancelled()\n {\n $this->fill([\n 'paddle_status' => Paddle::STATUS_CANCELLED,\n 'ends_at' => Carbon::now(),\n ])->save();\n }" ]
[ "0.6962837", "0.67892504", "0.6720551", "0.6699085", "0.6675865", "0.66618764", "0.6633632", "0.6633632", "0.6633632", "0.66257644", "0.6560391", "0.647641", "0.6452896", "0.64215726", "0.6408621", "0.63618976", "0.6352493", "0.6221184", "0.6190519", "0.6187844", "0.6144897", "0.61377496", "0.6010973", "0.6005048", "0.60028064", "0.60028064", "0.5994474", "0.59921557", "0.59901214", "0.59753305", "0.5966048", "0.59512746", "0.59450173", "0.5937104", "0.59266293", "0.5878242", "0.5874552", "0.5871371", "0.5857322", "0.5828762", "0.5821748", "0.5794761", "0.5750631", "0.5750015", "0.57495636", "0.5711761", "0.5675525", "0.5638635", "0.563724", "0.56368756", "0.562692", "0.56216985", "0.56056273", "0.55981183", "0.55852574", "0.55852574", "0.55852574", "0.55852574", "0.5575004", "0.55447704", "0.55403423", "0.55233234", "0.5514986", "0.55111265", "0.5497895", "0.54840153", "0.5476835", "0.5470935", "0.5450227", "0.5445967", "0.5421774", "0.54174095", "0.53942585", "0.5366492", "0.5364471", "0.53627783", "0.53618723", "0.5353252", "0.5352576", "0.53483707", "0.53470385", "0.53422636", "0.5341423", "0.53397465", "0.53377634", "0.5337334", "0.5335212", "0.53335935", "0.53187746", "0.5309954", "0.5278465", "0.52761465", "0.52723324", "0.52589315", "0.52561605", "0.52529377", "0.52527785", "0.5238751", "0.5228077", "0.5222415" ]
0.73982286
0
Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.
Отменяет HyperparameterTuningJob. Начинает асинхронную отмену HyperparameterTuningJob. Сервер делает все возможное, чтобы отменить задание, но гарантии успешности отмены нет. Клиенты могут использовать [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] или другие методы, чтобы проверить, успешно ли прошла отмена или завершилось ли задание несмотря на отмену. При успешной отмене HyperparameterTuningJob не удаляется; вместо этого он становится заданием с [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error], значение которого содержит [google.rpc.Status.code][google.rpc.Status.code] 1, соответствующее `Code.CANCELLED`, и [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] устанавливается в `CANCELLED`.
public function CancelHyperparameterTuningJob(\Google\Cloud\AIPlatform\V1\CancelHyperparameterTuningJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancelJob(string $id);", "public function cancel_job($job_id, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobId'] = $job_id;\n\n\t\treturn $this->authenticate('CancelJob', $opt, $this->hostname);\n\t}", "public function cancelJob(int $jobid): Job;", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function cancel(string $batchId);", "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel() {}", "public function cancelOperation()\n {\n echo \"Cancelling...\\n\";\n $this->cancelled = true;\n posix_kill($this->pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function cancel(\\Exception $reason = null);", "public function cancelJob(Application $app, int $jobid)\n {\n $command = new CancelJobCommand($jobid);\n $command->execute();\n $job = $command->commandResponse();\n \n return $app->json($job, 202);\n }", "public function cancel();", "public function cancel();", "public function cancel();", "public function cancel()\n {\n if ($this->onGracePeriod()) {\n return $this;\n }\n \n return $this->cancelAt(true);\n }", "public function cancelJob($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.canceljob');\n\n $this->runCupsCommand('cancelJob', $params['jobid']);\n }", "public function cancel($id)\r\n {\r\n $q = new Upload_queue($id);\r\n\r\n // Todo access rights\r\n \r\n if(!$q->id)\r\n {\r\n $this->alert->error('Record not found.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n if($q->state !== $q::STATE_PENDING)\r\n {\r\n $this->alert->error('Cannot cancel upload process. Process is not pending.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n $q->state = $q::STATE_CANCELED;\r\n $q->save();\r\n\r\n $this->alert->success('Job [ID: ' . $q->id . '] was canceled.');\r\n $this->redirect('upload/dataset');\r\n }", "public function CancelDataLabelingJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelDataLabelingJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel()\n {\n $this->cancelled = true;\n }", "public function cancel()\n\t\t{\n\n\t\t}", "public function cancel(): void\n {\n $this->delete();\n }", "public function cancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\t$this->setStatus(self::STATUS_CANCELED)->save();\n\t\t$this->getSubscription()->deletePendingJobs();\n\t\t$this->getLogger()->info('The subscription was canceled.');\n\t}", "public function cancel()\n {\n }", "public function cancel()\n\t{\n\t\t$this->status = self::CANCELLED;\n\t\t$this->save();\n\t\t$this->delete();\n\t}", "public function cancel(): void\n {\n $this->canceled = true;\n }", "public function cancel(mixed $timer): void\n {\n }", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "public function cancelar()\n {\n //Obtiene el estado cancelado\n $estatus = $this->m_evaluacion_estado->get_by_estado( 'CANCELADO' );\n \n //Recupera la evaluacion para actualizarla\n $evaluacion = $this->m_evaluacion->get_by_Candidato_id( $_POST['candidato_id'] );\n $evaluacion->EvaluacionEstado_id = $estatus->id;\n\n $this->m_evaluacion->update( $evaluacion, $evaluacion->id );\n \n }", "public function cancel($jobId) {\n\t\t$this->job->delete($jobId);\n\t\tredirect('jobs');\n\t}", "public function CancelCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function stop(JobInterface $job);", "final public function Cancel()\n {\n TaskPump::Pump()->Cancel($this);\n }", "public function cancel()\n {\n assert($this->hasId());\n $this->api->post(\"{$this}/cancel\");\n return $this->reload();\n }", "public function cancel($task) { }", "public function cancelTask()\n\t{\n\t\tif ($this->_task == 'cancel')\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t\t$category = Category::one($id);\n\t\t\t$categoryCheckedOut = $category instanceof Category ? $category->get('checked_out') : 0;\n\n\t\t\tif ($category && User::get('id') == $categoryCheckedOut)\n\t\t\t{\n\t\t\t\t$category->set('checked_out', 0);\n\t\t\t\t$category->set('checked_out_time', null);\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t$extension = Request::getCmd('extension');\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . ($this->_controller ? '&controller=' . $this->_controller : '') . '&extension=' . $extension, false)\n\t\t);\n\t}", "public function cancel()\r\n\t{\r\n\t\t$this->_statement=null;\r\n\t}", "public function cancelTimer(TimerInterface $timer);", "public function cancel($id);", "public function cancel($id);", "protected function cancelQueueing() { }", "public function cancel()\n\t{\n\t\t$mysql_query = \"DELETE FROM `$this->table` WHERE `$this->table`.`$this->primary_key` = $this->id LIMIT 1\";\n\t\t$this->db_wrapper->query($mysql_query);\n\t}", "function cancel();", "function abortJobAction($jobId, $jobType)\r\n\t{\r\n\t\t$dbJobType = kPluginableEnumsManager::apiToCore('BatchJobType', $jobType);\r\n\t\tkJobsManager::abortJob($jobId, $dbJobType);\r\n\t\treturn $this->getStatusAction($jobId, $jobType);\r\n\t}", "public function cancelOverTime($requestId)\n {\n $modelOverTimeRequest = new QcOverTimeRequest();\n return $modelOverTimeRequest->deleteInfo($requestId);\n }", "public function cancel(): CancelRequestBuilder {\n return new CancelRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel()\n\t{\n\t\t$GLOBALS['ilCtrl']->returnToParent($this);\n\t}", "public function cancelQuote(Opportunity $opportunity)\n {\n if (OpportunityStatus::PENDING_QUOTE !== $opportunity->getStatus()) {\n throw new \\BadMethodCallException('This quote was already cancelled.');\n }\n\n $em = $this->getEntityManager();\n\n $opportunity->setStatus(OpportunityStatus::CANCELLED_QUOTE);\n\n $em->flush($opportunity);\n\n return $opportunity;\n }", "public function cancelService()\n {\n ServiceManager::instance()->cancelService($this);\n }", "public function cancel()\n {\n $this->processPostAction();\n }", "public function cancelCbAction()\r\n {\r\n }", "public function cancelComplaint(Request $request)\n {\n $complaint = Complaint::where('id', $request->input('complaintId'))->firstOrFail();\n\n if ($complaint->type == 'claim') {\n $complaint->status = 'cancelled';\n } else {\n $complaint->status = 'stopping';\n }\n $complaint->cancellation_reason = $request->input('cancellation_reason');\n\n\n $complaint->save();\n\n Event::fire(new ComplaintSaveEvent($complaint, $complaint->organization));\n\n return redirect()->back();\n\n }", "public function cancel() {\n global $DB;\n parent::cancel();\n $DB->delete_records('gradingform_sfrbric_fillings', array('instanceid' => $this->get_id()));\n $DB->delete_records('gradingform_sfrbric_grades', array('instanceid' => $this->get_id()));\n }", "public function cancelTimer(\\React\\EventLoop\\Timer\\TimerInterface $timer)\n\t{\n\t}", "public function actionCancel($id)\n {\n $model = $this->findModel($id);\n if($model->create_by == Yii::$app->user->id){\n if(!($model->status < WorksystemTask::STATUS_WORKING))\n throw new NotAcceptableHttpException('该任务状态为'.$model->getStatusName ().'!');\n }else{\n throw new NotAcceptableHttpException('无权限操作!');\n }\n $post = Yii::$app->request->post();\n $_wsAction = WorksystemAction::getInstance();\n \n if ($model->load($post)) {\n $_wsAction->CancelTask($model, $post);\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_cancel', [\n 'model' => $model,\n ]);\n }\n }", "public function cancelNow()\n {\n return $this->cancelAt(false);\n }", "public function cancelWarmup($ip)\n {\n return $this->request('cancel-warmup', [\n 'ip' => $ip,\n ]);\n }", "public function cancel()\n {\n $stripeSubscription = $this->updateStripeSubscription([\n 'cancel_at_period_end' => true,\n ]); \n\n $this->setAsStripeSubscription($stripeSubscription);\n\n // If the user was on trial, we will set the grace period to end when the trial\n // would have ended. Otherwise, we'll retrieve the end of the billing period\n // period and make that the end of the grace period for this current user.\n if ($this->onTrial()) {\n $endsAt = $this->trial_ends_at;\n } else {\n $endsAt = Carbon::createFromTimestamp($stripeSubscription->current_period_end);\n }\n\n $this->fill([\n 'current_period_start' => Carbon::createFromTimestamp($stripeSubscription->current_period_start),\n 'current_period_ends_at' => $endsAt,\n 'status' => $stripeSubscription->status,\n ])->save();\n\n return $this;\n }", "function abortBulkUploadAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::BULKUPLOAD);\r\n\t}", "public function abort()\n {\n $this->abort_flag->raise();\n }", "public function cancelOpportunity(Opportunity $opportunity)\n {\n if (OpportunityStatus::PENDING_OPPORTUNITY !== $opportunity->getStatus()) {\n throw new \\BadMethodCallException('This opportunity was already cancelled.');\n }\n\n $em = $this->getEntityManager();\n\n $opportunity->setStatus(OpportunityStatus::CANCELLED_OPPORTUNITY);\n\n $em->flush($opportunity);\n\n return $opportunity;\n }", "function cancel() {\n\t\t$model = $this->getModel( $this->_sTaskModel, '', $this->_parameters );\n\t\t$model->resetFormFields();\n\t\t$link = $model->getReturnLink();\n\t\t$this->setRedirect($link);\n\t}", "public function CancelNasJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelNasJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelNasJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function setAbort($value)\n {\n $this->abort = $value;\n\n return $this;\n }", "public function cancelWithInputRetriesInput()\n {\n $this->cancelWithInputRetriesInput = true;\n return $this;\n }", "public function getAbort()\n {\n return $this->abort;\n }", "public function scopeCanceled($query);", "public function cancelScan() {\n\t\tif ( ! $this->checkPermission() ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'cancelScan' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$activeScan = Scan\\Component\\Scan_Api::getActiveScan();\n\t\tif ( is_object( $activeScan ) ) {\n\t\t\t$activeScan->delete();\n\t\t\t(new Scan\\Component\\Scanning())->flushCache();\n\t\t}\n\t\t$data = Scan\\Component\\Data_Factory::buildData();\n\t\t\n\t\twp_send_json_success( $data );\n\t}", "public function cancelNow()\n {\n $this->cancel();\n\n $this->markAsCancelled();\n\n return $this;\n }", "public function cancelAction()\n {\n \n }", "public function testCancelJobById()\n {\n $id = 42;\n $jobHandler = new JobHandler('[access_token]');\n $jobHandler->restartJobById($id);\n $result = $jobHandler->cancelJobById($id);\n $this->assertTrue($result);\n }", "function cancel_task(int $tid)\n\t{\n\t\treturn Kernel::cancelTask($tid); \n\t}", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancelAndDelete()\n {\n $this->cancel(false);\n $this->delete();\n\n return $this;\n }", "public function cancel( $pspReference );", "public function cancelServiceJobByServiceJobIdRequest($serviceJobId, $cancellationReasonCode)\n {\n // verify the required parameter 'serviceJobId' is set\n if ($serviceJobId === null || (is_array($serviceJobId) && count($serviceJobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serviceJobId when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($serviceJobId) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($serviceJobId) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'cancellationReasonCode' is set\n if ($cancellationReasonCode === null || (is_array($cancellationReasonCode) && count($cancellationReasonCode) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $cancellationReasonCode when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($cancellationReasonCode) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($cancellationReasonCode) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n if (!preg_match(\"/^[A-Z0-9_]*$/\", $cancellationReasonCode)) {\n throw new \\InvalidArgumentException(\"invalid value for \\\"cancellationReasonCode\\\" when calling ServiceApi.cancelServiceJobByServiceJobId, must conform to the pattern /^[A-Z0-9_]*$/.\");\n }\n\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($cancellationReasonCode)) {\n $cancellationReasonCode = ObjectSerializer::serializeCollection($cancellationReasonCode, '', true);\n }\n if ($cancellationReasonCode !== null) {\n $queryParams['cancellationReasonCode'] = $cancellationReasonCode;\n }\n\n\n // path params\n if ($serviceJobId !== null) {\n $resourcePath = str_replace(\n '{' . 'serviceJobId' . '}',\n ObjectSerializer::toPathValue($serviceJobId),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function pg_cancel_query($connection)\n{\n}", "public function withRetryJob($job)\n {\n\n }", "public function cancelTimer(TimerInterface $timer)\n {\n $this->getLoop()->cancelTimer($timer);\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t//$post = FLEXI_J16GE ? $post['jform'] : $post; //JForm currently not used for tags\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "public static function cancelarJogo(ApostaJogoVO $jogo)\n {\n\n $aposta = $jogo->voAposta();\n $partida = $jogo->voJogo();\n\n if (!$aposta) {\n throw new \\Exception(\"Aposta inválida\");\n } else if (!$partida) {\n throw new \\Exception(\"Partida inválida\");\n } else if ($aposta->getJogos() == 1) {\n throw new \\Exception(\"Não é possível cancelar o jogo de uma aposta com um uníco jogo\");\n } else if (!$jogo->getIsEditavel()) {\n throw new \\Exception(\"O jogo `{$partida->getDescricao()}` não pode mais ser cancelado da aposta.\");\n }\n\n $aposta->setCotacao($aposta->getCotacao() / $jogo->getCotacaoValor());\n $aposta->setRetornoMaximo(min($aposta->getRetorno() * 0.9, $aposta->getRetornoMaximo() * 0.9));\n\n $termos = <<<SQL\n\n-- Removendo o jogo\nUPDATE \n `{$jogo->getTable()}` AS a \nSET \n a.status = 99\nWHERE \n a.id = {$jogo->getId()} AND a.status = 1 AND a.verificado = 0 \nLIMIT 1;\n\n-- Atualizando quantidade de jogos da aposta\nUPDATE \n `{$aposta->getTable()}` AS a \nSET \n a.jogos = a.jogos - 1 \nWHERE \n a.id = {$aposta->getId()} \nLIMIT 1;\n\n-- Verificando se a aposta foi verificada e atualizando a cotação\nUPDATE \n `{$aposta->getTable()}` AS a \nSET \n a.cotacao = {$aposta->getCotacao()}, a.verificado = IF(a.jogos = a.jogosverificados, 1, 0),\n a.retorno = {$aposta->getRetorno()}, a.retornovalido = {$aposta->getRetornoValido()}, a.retornomaximo = {$aposta->getRetornoMaximo()}\nWHERE \n a.id = {$aposta->getId()}\nLIMIT 1;\n\n-- Verificando se a aposta está concluída\nUPDATE\n `{$aposta->getTable()}` AS a\nSET\n a.ganhou = IF(a.acertos = a.jogos, 1, 0),\n a.possivelganhador = IF(a.erros = 0 AND a.jogosverificados < a.jogos, 1, 0)\nWHERE\n a.id = {$aposta->getId()}\nLIMIT 1;\nSQL;\n\n Conn::getConn()->exec($termos);\n }", "public function destroy(job $job)\n {\n //\n }", "public function cancelScenario() {\n return $this->getClass()->declineScenario();\n }", "public function cancel($cancellationEffectiveAt = null)\n {\n $this->paddle_status = Paddle::STATUS_CANCELLED;\n\n // If the user was on trial, we will set the grace period to end when the trial\n // would have ended. Otherwise, we'll retrieve the end of the billing period\n // period and make that the end of the grace period for this current user.\n if ($this->onTrial()) {\n $this->ends_at = $this->trial_ends_at;\n } else {\n $this->ends_at = $cancellationEffectiveAt ?? Carbon::now();\n }\n\n $this->save();\n\n return $this;\n }", "function cancel()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tcheck_access($this, 'cancel_promotion_application');\n\t\t$this->load->model('_job');\n\t\t\n\t\t$data['area'] = 'cancel_promotion_application';\n\t\t$data['job'] = $this->_job->populate_session();\n\t\t$this->load->view('job/my_profile', $data); \n\t}", "public function cancel_process()\n {\n }", "public function getAbortFlag()\n {\n return $this->abort_flag;\n }", "function abortConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "public function cancel( string $hook, $args = [], string $group = '' ) {\n\t\treturn as_unschedule_action( $hook, $args, $group );\n\t}", "protected function abort() {\n\t\t$this->abort = true;\n\t}", "public function cancel($jobId)\n {\n $this->ProcessJobs->setStatus($jobId, ProcessJob::STATUS_CANCELED);\n \n /** @var \\App\\Model\\Entity\\ProcessJob $jobEntity */\n $jobEntity = $this->ProcessJobs->get($jobId);\n $event = new Event('Controller.ProcessJobs.statusChange', null, [\n 'userId' => $this->Auth->user('id'),\n 'itemId' => $jobEntity->item_id,\n 'eventType' => ProcessActivityLog::JOB_STATUS_CHANGE_CANCELED\n ]);\n $this->eventManager()->dispatch($event);\n \n $this->respond();\n }", "public function cancel($hook, $args = array(), $group = '');", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t$post = FLEXI_J16GE ? $post['jform'] : $post;\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "public function cancelJobs($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.printername');\n\n $this->runCupsCommand('cancelAllJobs', $params['pname']);\n }", "public function cancelPlanWebHook(Request $request) {\n try {\n $subscription = $request->all();\n\n if (isset($subscription['data']['object']['metadata']['basic_plan'])) {\n $basicPlan = $subscription['data']\n ['object']['metadata']['basic_plan'];\n $metaData = $subscription['data']['object']['metadata'];\n $basicPlan = !empty($basicPlan) ? explode(',', $basicPlan) : [];\n $additionalPlan = array_key_exists('additional_plan', $metaData) ?\n explode(\n ',', $subscription['data']\n ['object']['metadata']['additional_plan']\n ) : [];\n $subscriptionId = $subscription['data']['object']['id'];\n $status = $subscription['data']['object']['status'];\n if ($status == 'canceled') {\n $userId = $this->_moduleSubscriptionTrackerService\n ->updateSubscriptionStatus(\n ['subscription_status' => Config::get(\n \"custom_config.MODULE_SUBCRIPTION_TRACKERS_STATUS.cancel\"\n )],\n $subscriptionId\n );\n\n $this->_userShortTrackerService->deleteUserShortTracker($userId);\n\n $now = Carbon::now('utc')->toDateTimeString();\n $this->_shortpositionActivityLogService\n ->storeShortpositionActivityLog(\n [\n 'user_id' => $userId,\n 'action' => Config::get(\n 'custom_config.SHORT_POSITION_ACTIVITY_LOG_STATUS.Cancel_Basic_Subscription'\n ),\n 'log' => json_encode(\n array(\n 'companies' => $basicPlan,\n 'basic_plan' => $basicPlan,\n 'additional_plan' => $additionalPlan,\n 'subscription_id' => $subscriptionId,\n 'created_at' => date(\n \"m-d-Y h:i:s\", strtotime($now)\n ),\n 'price' => '0.00'\n )\n ),\n 'created_at' => $now,\n 'updated_at' => $now\n ]\n );\n }\n } else {\n \\Log::info(\"==== cancelPlan Webhook Error \", [\"No Basic Plan\"]);\n }\n } catch (\\Exception $e) {\n \\Log::info(\"==== cancelPlan Webhook Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('messages.un_processable_request')]\n );\n }\n\n }", "public function cancelRecord() {\n return $this->getClass()->declineRecord();\n }", "public function cancel_large_file( $large_file_id ) {\n\t\t\t\n\t\t\t// /b2_cancel_large_file\n\n\t\t}", "public function stopThrottling(): Throttler {\n\t\t$this->bucket->makeUnlimited();\n\n\t\treturn $this;\n\t}", "function cancel() {\n $msg = JText::_('Operation cancelled');\n $this->setRedirect('index.php?option=com_shortlink', $msg);\n }", "public function cancelDelayedJob($tokenAndTimstamp, $queue, $class, $args = array())\n {\n return ResqueScheduler::removeDelayedJob ( $tokenAndTimstamp, $queue, $class, $args );\n }", "public function cancelKeyDeletionWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->keyId)) {\n $query['KeyId'] = $request->keyId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CancelKeyDeletion',\n 'version' => '2016-01-20',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CancelKeyDeletionResponse::fromMap($this->callApi($params, $req, $runtime));\n }" ]
[ "0.60312235", "0.5945591", "0.58861023", "0.58425826", "0.5495961", "0.5462282", "0.5461355", "0.5449487", "0.5392084", "0.5380225", "0.5379037", "0.5379037", "0.5379037", "0.5344339", "0.530406", "0.52727306", "0.5267312", "0.5239845", "0.52285486", "0.52092737", "0.5201589", "0.51874834", "0.5103509", "0.504964", "0.5046252", "0.5041276", "0.5039636", "0.49900854", "0.49854684", "0.4968511", "0.49542862", "0.49533293", "0.49284506", "0.49187884", "0.4908861", "0.48612514", "0.48604012", "0.48604012", "0.48438677", "0.48306575", "0.48191848", "0.48151955", "0.48130795", "0.47893187", "0.47873852", "0.47838604", "0.47814545", "0.47745442", "0.47604275", "0.47329712", "0.47280124", "0.47190148", "0.47123912", "0.4705658", "0.47006387", "0.4685415", "0.46610323", "0.46498632", "0.46315998", "0.4621723", "0.4609879", "0.45929524", "0.45847756", "0.45793512", "0.45778352", "0.45659927", "0.4565577", "0.45654178", "0.45525455", "0.45455632", "0.4545343", "0.45388532", "0.4533113", "0.45225617", "0.44980565", "0.44892225", "0.44883016", "0.4483854", "0.4482891", "0.44788814", "0.44779202", "0.44771814", "0.44736886", "0.447207", "0.44646233", "0.44612458", "0.44565558", "0.44514668", "0.44513234", "0.44372922", "0.44224826", "0.4414162", "0.44134173", "0.44111297", "0.44048703", "0.4403997", "0.4400729", "0.44003353", "0.4397305", "0.43958798" ]
0.76935387
0
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.
Отменяет NasJob. Запускает асинхронную отмену для NasJob. Сервер делает все возможное, чтобы отменить задание, но гарантии успешности отмены нет. Клиенты могут использовать [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] или другие методы, чтобы проверить, успешно ли была отмена или завершилось ли задание, несмотря на отмену. При успешной отмене NasJob не удаляется; вместо этого он становится заданием с [NasJob.error][google.cloud.aiplatform.v1.NasJob.error], значение которого содержит [google.rpc.Status.code][google.rpc.Status.code] 1, соответствующее `Code.CANCELLED`, и [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] устанавливается в `CANCELLED`.
public function CancelNasJob(\Google\Cloud\AIPlatform\V1\CancelNasJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelNasJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\t$this->setStatus(self::STATUS_CANCELED)->save();\n\t\t$this->getSubscription()->deletePendingJobs();\n\t\t$this->getLogger()->info('The subscription was canceled.');\n\t}", "public function cancelJob(string $id);", "public function cancel_job($job_id, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobId'] = $job_id;\n\n\t\treturn $this->authenticate('CancelJob', $opt, $this->hostname);\n\t}", "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel() {}", "public function cancelJob(int $jobid): Job;", "public function cancelOperation()\n {\n echo \"Cancelling...\\n\";\n $this->cancelled = true;\n posix_kill($this->pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function cancel();", "public function cancel();", "public function cancel();", "public function cancelar()\n {\n //Obtiene el estado cancelado\n $estatus = $this->m_evaluacion_estado->get_by_estado( 'CANCELADO' );\n \n //Recupera la evaluacion para actualizarla\n $evaluacion = $this->m_evaluacion->get_by_Candidato_id( $_POST['candidato_id'] );\n $evaluacion->EvaluacionEstado_id = $estatus->id;\n\n $this->m_evaluacion->update( $evaluacion, $evaluacion->id );\n \n }", "public function cancel()\n {\n assert($this->hasId());\n $this->api->post(\"{$this}/cancel\");\n return $this->reload();\n }", "public function cancelJob($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.canceljob');\n\n $this->runCupsCommand('cancelJob', $params['jobid']);\n }", "public function cancelTask()\n\t{\n\t\tif ($this->_task == 'cancel')\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t\t$category = Category::one($id);\n\t\t\t$categoryCheckedOut = $category instanceof Category ? $category->get('checked_out') : 0;\n\n\t\t\tif ($category && User::get('id') == $categoryCheckedOut)\n\t\t\t{\n\t\t\t\t$category->set('checked_out', 0);\n\t\t\t\t$category->set('checked_out_time', null);\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t$extension = Request::getCmd('extension');\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . ($this->_controller ? '&controller=' . $this->_controller : '') . '&extension=' . $extension, false)\n\t\t);\n\t}", "public function cancel()\n {\n $this->cancelled = true;\n }", "public function CancelDataLabelingJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelDataLabelingJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel($id)\r\n {\r\n $q = new Upload_queue($id);\r\n\r\n // Todo access rights\r\n \r\n if(!$q->id)\r\n {\r\n $this->alert->error('Record not found.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n if($q->state !== $q::STATE_PENDING)\r\n {\r\n $this->alert->error('Cannot cancel upload process. Process is not pending.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n $q->state = $q::STATE_CANCELED;\r\n $q->save();\r\n\r\n $this->alert->success('Job [ID: ' . $q->id . '] was canceled.');\r\n $this->redirect('upload/dataset');\r\n }", "public function cancel($jobId)\n {\n $this->ProcessJobs->setStatus($jobId, ProcessJob::STATUS_CANCELED);\n \n /** @var \\App\\Model\\Entity\\ProcessJob $jobEntity */\n $jobEntity = $this->ProcessJobs->get($jobId);\n $event = new Event('Controller.ProcessJobs.statusChange', null, [\n 'userId' => $this->Auth->user('id'),\n 'itemId' => $jobEntity->item_id,\n 'eventType' => ProcessActivityLog::JOB_STATUS_CHANGE_CANCELED\n ]);\n $this->eventManager()->dispatch($event);\n \n $this->respond();\n }", "public function CancelCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelJob(Application $app, int $jobid)\n {\n $command = new CancelJobCommand($jobid);\n $command->execute();\n $job = $command->commandResponse();\n \n return $app->json($job, 202);\n }", "public function cancel(string $batchId);", "public function cancel($task) { }", "public function cancel()\n {\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t$post = FLEXI_J16GE ? $post['jform'] : $post;\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "public function cancelAction()\n {\n /** @var Oyst_OneClick_Helper_Data $oystHelper */\n $oystHelper = Mage::helper('oyst_oneclick');\n\n $checkoutSession = Mage::getSingleton('checkout/session');\n if (! $checkoutSession->getLastSuccessQuoteId()) {\n $this->_redirect('checkout/cart');\n\n return;\n }\n\n $lastQuoteId = $checkoutSession->getLastQuoteId();\n $lastOrderId = $checkoutSession->getLastOrderId();\n if ($lastOrderId) {\n Mage::getSingleton('core/session')->addError(\n $oystHelper->__(\"Order %s cancelled\", $lastOrderId)\n );\n $orderModel = Mage::getModel('sales/order')->load($lastOrderId);\n\n if ($lastQuoteId && $orderModel->canCancel()) {\n $quote = Mage::getModel('sales/quote')->load($lastQuoteId);\n $quote->setIsActive(true)->save();\n\n $orderModel->cancel();\n $orderModel->setStatus('canceled');\n $orderModel->save();\n\n $this->_redirect('checkout/cart', array('_secure' => true));\n\n return;\n }\n }\n\n $oystHelper->log('Order Cancel Error');\n $this->_redirect('checkout/cart', array('_secure' => true));\n }", "public function cancel()\n\t\t{\n\n\t\t}", "public function cancelar(Request $request)\n {\n if (!$this->tiene_permiso('CANCELAR_CLASE')) {\n return $this->forbidden();\n }\n $this->claseEspecificaService->cancelar($request->get('idClase'));\n return $this->okNoContent();\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$post = JRequest::get('post');\n\t\t//$post = FLEXI_J16GE ? $post['jform'] : $post; //JForm currently not used for tags\n\t\tJRequest::setVar('cid', $post['id']);\n\t\t$this->checkin();\n\t}", "protected function cancelOrder()\n {\n $order = $this->createOrderFromQuote();\n if(\n $order instanceof \\Magento\\Sales\\Api\\Data\\OrderInterface &&\n $order->getEntityId() !== null\n ) {\n $this->orderManagement->cancel($order->getEntityId());\n $order->addCommentToStatusHistory($this->getErrorMessage())\n ->setIsCustomerNotified(false)\n ->setEntityName('invoice')\n ->save();\n $this->rollbackAllPartialPayments($order);\n }\n }", "public function cancel()\n\t{\n\t\t$this->status = self::CANCELLED;\n\t\t$this->save();\n\t\t$this->delete();\n\t}", "function cancel() {\n\t\t$model = $this->getModel( $this->_sTaskModel, '', $this->_parameters );\n\t\t$model->resetFormFields();\n\t\t$link = $model->getReturnLink();\n\t\t$this->setRedirect($link);\n\t}", "public function cancel(): void\n {\n $this->canceled = true;\n }", "function cancel()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$data = $this->input->get('jform', array(), 'array'); // Unfiltered data (no need for filtering)\n\t\t$this->input->set('cid', (int) $data['id']);\n\n\t\t$this->checkin();\n\t}", "public function requestCancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\tif ($this->hasCancelPeriod()) {\n\t\t\t$this->getSubscription()->setCancelRequest(true);\n\t\t\t$this->save();\n\t\t\t$this->sendCancelRequestEmail();\n\t\t\t$this->getLogger()->info('The cancelation of the subscription was requested.');\n\t\t}\n\t\telse {\n\t\t\t$this->cancel();\n\t\t\t$this->sendCancelEmail();\n\t\t}\n\t}", "final public function Cancel()\n {\n TaskPump::Pump()->Cancel($this);\n }", "public function cancelAction()\n {\n try {\n $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOPSQuoteId());\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n if (false == $this->_getOrder()->getId()) {\n $this->_order = null;\n $this->_getOrder($this->_getCheckout()->getLastQuoteId());\n }\n\n $this->getPaymentHelper()->refillCart($this->_getOrder());\n\n $redirect = 'checkout/cart';\n $this->redirectOpsRequest($redirect);\n\n }", "public function cancelInvoice($reference) {\n\n try {\n $SOAP = $this->SOAP();\n $result = $SOAP->cancelInvoice(array(\n \"context\" => $this->getRequestContext(),\n \"invoiceReference\" => $reference\n ))->return;\n\n if ($result->resultCode != 0) throw new Exception($result->resultCode . ' : ' . $result->resultDescription);\n\n return $result;\n } catch(Exception $e) {\n PrestaShopLogger::addLog($e->getMessage());\n throw new Exception(\"SEQR API - Cancel invoice error\");\n }\n }", "public function cancel(\\Exception $reason = null);", "public function cancel($jobId) {\n\t\t$this->job->delete($jobId);\n\t\tredirect('jobs');\n\t}", "public function cancel( $pspReference );", "public function cancelAction()\n {\n $event = Mage::getModel('pagbrasil/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPagbrasilQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "public function cancel(Request $request)\n {\n $result = $this->service->cancel($request->id);\n\n if ($result) {\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('success', 'Successfully cancelled');\n }\n\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('error', 'Failed to cancel');\n }", "function cancel() {\n if($this->active_invoice->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_invoice->canCancel($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n if($this->request->isSubmitted()) {\n db_begin_work();\n \n $this->active_invoice->setStatus(INVOICE_STATUS_CANCELED, $this->logged_user, new DateTimeValue());\n $save = $this->active_invoice->save();\n if($save && !is_error($save)) {\n db_commit();\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if (instance_of($issued_to_user, 'User')) {\n $notify_users = array($issued_to_user);\n if ($issued_to_user->getId() != $this->logged_user->getId()) {\n $notify_users[] = $this->logged_user;\n } // if\n\n ApplicationMailer::send($notify_users, 'invoicing/cancel', array(\n 'closed_by_name' => $this->logged_user->getDisplayName(),\n 'closed_by_url' => $this->logged_user->getViewUrl(),\n 'invoice_number' => $this->active_invoice->getNumber(), \n 'invoice_url' => $this->active_invoice->getCompanyViewUrl(),\n )); \n } // if\n flash_success('Invoice #:number has been canceled', array('number' => $this->active_invoice->getName($short)));\n } else {\n db_rollback();\n flash_error('Failed to cancel invoice #:number', array('number' => $this->active_invoice->getName($short)));\n } // if\n \n $this->redirectToUrl($this->active_invoice->getViewUrl());\n } else {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n }", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function cancelNow()\n {\n return $this->cancelAt(false);\n }", "public function cancel() {\n\n $transid = required_param('transid', PARAM_RAW);\n\n $afullbill = Bill::get_by_transaction($transid);\n $afullbill->onlinetransactionid = $transid;\n $afullbill->paymode = 'paypal';\n $afullbill->status = SHOP_BILL_CANCELLED;\n $afullbill->save(true);\n shop_trace('Paypal Interactive Cancellation');\n\n // Do not cancel shopping cart. User may need another payment method.\n\n $params = array('view' => 'shop', 'shopid' => $this->theshop->id);\n redirect(new moodle_url('/local/shop/front/view.php', $params));\n }", "function cancel($c = NULL) {\n\t\t\t// Error\n\t\t\t$error = NULL;\n\t\t\t// Common errors\n\t\t\tif($error_common = $this->errors(__FUNCTION__)) {\n\t\t\t\t$error = $error_common;\n\t\t\t}\n\t\t\t// No transaction ID\n\t\t\telse if(!$this->transaction) {\n\t\t\t\t$error = \"No transaction ID was passed that we could cancel.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Error\n\t\t\tif($error) {\n\t\t\t\t$results = array(\n\t\t\t\t\t'result' => 0,\n\t\t\t\t\t'message' => $error\n\t\t\t\t);\t\n\t\t\t}\n\t\t\t// Transaction\n\t\t\telse {\n\t\t\t\t// Process\n\t\t\t\t$results = $this->gateway->cancel($this,$c);\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $results;\n\t\t}", "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getCcavenuepayStandardQuoteId(true));\n\n\t\t \n\t\t$order_history_comment='';\t\n // cancel order\n if ($session->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n if ($order->getId()) {\n\t\t\t\t \n\t\t\t\t$order_history_comments = $this->getCheckout()->getCcavenuepayErrorMessage();\n\t\t\t\tforeach($order_history_comments as $order_history_comment)\n\t\t\t\t{\n\t\t\t\t\tif($order_history_comment !='') $order->addStatusHistoryComment($order_history_comment,true);\n\t\t\t\t}\t\t\t\n $order->cancel()->save();\n }\n }\n\n /*we are calling getCcavenuepayStandardQuoteId with true parameter, the session object will reset the session if parameter is true.\n so we don't need to manually unset the session*/\n\t\tMage::getSingleton('checkout/session')->addError(\"CcavenuePay Payment has been cancelled and the transaction has been declined.\");\n\t\tif($order_history_comment!='')\tMage::getSingleton('checkout/session')->addError($order_history_comment);\n\t\t$this->_redirect('checkout/cart');\n }", "public function cancel()\n {\n if ($this->onGracePeriod()) {\n return $this;\n }\n \n return $this->cancelAt(true);\n }", "public function cancel(): void\n {\n $this->delete();\n }", "public function cancelNow()\n {\n $this->cancel();\n\n $this->markAsCancelled();\n\n return $this;\n }", "public function cancel($id);", "public function cancel($id);", "public function isCancelled();", "public function isCancelled();", "public function isCancelled();", "public function isCancelled();", "public function cancelled(): bool;", "public function cancelComplaint(Request $request)\n {\n $complaint = Complaint::where('id', $request->input('complaintId'))->firstOrFail();\n\n if ($complaint->type == 'claim') {\n $complaint->status = 'cancelled';\n } else {\n $complaint->status = 'stopping';\n }\n $complaint->cancellation_reason = $request->input('cancellation_reason');\n\n\n $complaint->save();\n\n Event::fire(new ComplaintSaveEvent($complaint, $complaint->organization));\n\n return redirect()->back();\n\n }", "public function cancel()\n {\n $isOnline = true;\n if (!$this->canVoid()) {\n $isOnline = false;\n }\n\n if (!$this->hasMessage()) {\n $this->setMessage($isOnline ? __('Canceled order online') : __('Canceled order offline'));\n }\n\n if ($isOnline) {\n $this->_void($isOnline, null, 'cancel');\n }\n\n $this->_eventManager->dispatch('sales_order_payment_cancel', ['payment' => $this]);\n\n return $this;\n }", "public static function cancelarJogo(ApostaJogoVO $jogo)\n {\n\n $aposta = $jogo->voAposta();\n $partida = $jogo->voJogo();\n\n if (!$aposta) {\n throw new \\Exception(\"Aposta inválida\");\n } else if (!$partida) {\n throw new \\Exception(\"Partida inválida\");\n } else if ($aposta->getJogos() == 1) {\n throw new \\Exception(\"Não é possível cancelar o jogo de uma aposta com um uníco jogo\");\n } else if (!$jogo->getIsEditavel()) {\n throw new \\Exception(\"O jogo `{$partida->getDescricao()}` não pode mais ser cancelado da aposta.\");\n }\n\n $aposta->setCotacao($aposta->getCotacao() / $jogo->getCotacaoValor());\n $aposta->setRetornoMaximo(min($aposta->getRetorno() * 0.9, $aposta->getRetornoMaximo() * 0.9));\n\n $termos = <<<SQL\n\n-- Removendo o jogo\nUPDATE \n `{$jogo->getTable()}` AS a \nSET \n a.status = 99\nWHERE \n a.id = {$jogo->getId()} AND a.status = 1 AND a.verificado = 0 \nLIMIT 1;\n\n-- Atualizando quantidade de jogos da aposta\nUPDATE \n `{$aposta->getTable()}` AS a \nSET \n a.jogos = a.jogos - 1 \nWHERE \n a.id = {$aposta->getId()} \nLIMIT 1;\n\n-- Verificando se a aposta foi verificada e atualizando a cotação\nUPDATE \n `{$aposta->getTable()}` AS a \nSET \n a.cotacao = {$aposta->getCotacao()}, a.verificado = IF(a.jogos = a.jogosverificados, 1, 0),\n a.retorno = {$aposta->getRetorno()}, a.retornovalido = {$aposta->getRetornoValido()}, a.retornomaximo = {$aposta->getRetornoMaximo()}\nWHERE \n a.id = {$aposta->getId()}\nLIMIT 1;\n\n-- Verificando se a aposta está concluída\nUPDATE\n `{$aposta->getTable()}` AS a\nSET\n a.ganhou = IF(a.acertos = a.jogos, 1, 0),\n a.possivelganhador = IF(a.erros = 0 AND a.jogosverificados < a.jogos, 1, 0)\nWHERE\n a.id = {$aposta->getId()}\nLIMIT 1;\nSQL;\n\n Conn::getConn()->exec($termos);\n }", "function cancelSession()\n\t{\n\t\tsession()->forget('jobId');\n\t\treturn [\n\t\t\t'message'=>'Job application session cancelled',\n\t\t\t'error'=>false,\n\t\t\t'data'=>null\n\t\t];\n\t}", "public function cancel($reason = '', $cost = 0)\n {\n $this->validatePreviousState([\n null,\n $this::STATE_OPENED,\n $this::STATE_COMMERCE_CHECKOUT,\n $this::STATE_COMMERCE_RESERVED,\n $this::STATE_COMMERCE_BACK_ORDERED,\n $this::STATE_ORDERED_PENDING,\n $this::STATE_INVENTORY_ON_HOLD,\n ], $this::STATE_CANCELLED);\n\n $beforeQuantity = $this->quantity;\n $beforeState = $this->state;\n\n $this->quantity = 0;\n $this->state = $this::STATE_CANCELLED;\n\n $event = 'inventory.transaction.cancelled';\n\n if (!$reason) {\n $reason = $this->getTransactionReason('cancelled');\n }\n\n switch ($beforeState) {\n case $this::STATE_COMMERCE_CHECKOUT:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n case $this::STATE_COMMERCE_RESERVED:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n case $this::STATE_INVENTORY_ON_HOLD:\n return $this->processStockPutAndSave($beforeQuantity, $event, $reason, $cost);\n default:\n return $this->processSave($event);\n }\n }", "function cancel() {\n $msg = JText::_('Operation cancelled');\n $this->setRedirect('index.php?option=com_shortlink', $msg);\n }", "function cancel();", "function cancel()\n\t{\n\t\tilUtil::sendInfo($this->lng->txt(\"msg_cancel\"),true);\n\n\t\t$this->ctrl->redirectByClass(\"ilobjilinccoursegui\");\n\t}", "public function testCancelJobById()\n {\n $id = 42;\n $jobHandler = new JobHandler('[access_token]');\n $jobHandler->restartJobById($id);\n $result = $jobHandler->cancelJobById($id);\n $this->assertTrue($result);\n }", "public function asCanceled()\n {\n return $this->markAs($this->getCanceledValue());\n }", "public function processCancelRequest(){\n\t\tif ($this->checkWorkflow(self::STATUS_CANCELED) && $this->isCancelRequested()) {\n\t\t\t$this->getSubscription()->setCancelCount($this->getSubscription()->getCancelCount() + 1);\n\t\t\tif ($this->getSubscription()->getCancelCount() == $this->getSubscription()->getCancelPeriod()) {\n\t\t\t\t$this->cancel();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->save();\n\t\t\t}\n\t\t}\n\t}", "function cancel_task(int $tid)\n\t{\n\t\treturn Kernel::cancelTask($tid); \n\t}", "public function cancel_process()\n {\n }", "protected function executeCancelAction()\n {\n $this->getCheckoutHelper()->cancelCurrentOrder('');\n $this->getCheckoutHelper()->restoreQuote();\n $this->redirectToCheckoutCart();\n }", "public function cancel()\n {\n $this->processPostAction();\n }", "public function cancelOffer($account, $seq)\n {\n // sign\n $result = $this->wsCall('sign', array('secret' => $this->SECRET, 'tx_json' => array(\n 'TransactionType' => 'OfferCancel',\n 'Account' => $account,\n 'OfferSequence' => $seq,\n )));\n $tx_blob = $result['tx_blob'];\n\n // submit\n $result = $this->submit($tx_blob);\n\n $this->checkEngineResultCode($result);\n return $result;\n }", "public function cancel($reason = '', $alreadyCanceledInGateway = false)\n {\n //first let gateway update the recurring billing status\n $gateway = $this->getGateway();\n if (!$gateway) {\n //Oops! Something wrong\n return false;\n }\n if (!$alreadyCanceledInGateway) {\n $result = $gateway->recurringCancel($this, $reason);\n if (!$result) {\n trigger_error('ERROR RECURRING: Payment gateway returned false, cancelation had a problem so not proceeding.');\n return false;\n }\n }\n $itemType = $this->getItemType();\n //let the order item update things\n if ($itemType) {\n geoOrderItem::callUpdate('recurringBilling_cancel', $this, $itemType);\n }\n $this->setStatus(self::STATUS_CANCELED);\n $this->save();\n return true;\n }", "public function cancelSubmit(array &$form, FormStateInterface $form_state) {\n $queue_id = $this->getRequest()->get('queue');\n $this->returnToReview($queue_id, $form_state);\n }", "public function CancelOperation(\\Google\\Cloud\\Container\\V1beta1\\CancelOperationRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.container.v1beta1.ClusterManager/CancelOperation',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancel()\n\t{\n\t\t$GLOBALS['ilCtrl']->returnToParent($this);\n\t}", "public function isCancelAble() {}", "public function cancelServiceJobByServiceJobIdRequest($serviceJobId, $cancellationReasonCode)\n {\n // verify the required parameter 'serviceJobId' is set\n if ($serviceJobId === null || (is_array($serviceJobId) && count($serviceJobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serviceJobId when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($serviceJobId) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($serviceJobId) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'cancellationReasonCode' is set\n if ($cancellationReasonCode === null || (is_array($cancellationReasonCode) && count($cancellationReasonCode) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $cancellationReasonCode when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($cancellationReasonCode) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($cancellationReasonCode) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n if (!preg_match(\"/^[A-Z0-9_]*$/\", $cancellationReasonCode)) {\n throw new \\InvalidArgumentException(\"invalid value for \\\"cancellationReasonCode\\\" when calling ServiceApi.cancelServiceJobByServiceJobId, must conform to the pattern /^[A-Z0-9_]*$/.\");\n }\n\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($cancellationReasonCode)) {\n $cancellationReasonCode = ObjectSerializer::serializeCollection($cancellationReasonCode, '', true);\n }\n if ($cancellationReasonCode !== null) {\n $queryParams['cancellationReasonCode'] = $cancellationReasonCode;\n }\n\n\n // path params\n if ($serviceJobId !== null) {\n $resourcePath = str_replace(\n '{' . 'serviceJobId' . '}',\n ObjectSerializer::toPathValue($serviceJobId),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function cancelServiceJobByServiceJobIdRequest($service_job_id, $cancellation_reason_code)\n {\n // verify the required parameter 'service_job_id' is set\n if (null === $service_job_id || (is_array($service_job_id) && 0 === count($service_job_id))) {\n throw new \\InvalidArgumentException('Missing the required parameter $service_job_id when calling cancelServiceJobByServiceJobId');\n }\n // verify the required parameter 'cancellation_reason_code' is set\n if (null === $cancellation_reason_code || (is_array($cancellation_reason_code) && 0 === count($cancellation_reason_code))) {\n throw new \\InvalidArgumentException('Missing the required parameter $cancellation_reason_code when calling cancelServiceJobByServiceJobId');\n }\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (null !== $cancellation_reason_code) {\n $queryParams['cancellationReasonCode'] = ObjectSerializer::toQueryValue($cancellation_reason_code);\n }\n\n // path params\n if (null !== $service_job_id) {\n $resourcePath = str_replace(\n '{'.'serviceJobId'.'}',\n ObjectSerializer::toPathValue($service_job_id),\n $resourcePath\n );\n }\n\n return $this->generateRequest($multipart, $formParams, $queryParams, $resourcePath, $headerParams, 'PUT', $httpBody);\n }", "static public function cancel(CashReceipt $obj){\n\t\t// Code here...\n\t}", "private function isJobNotCancelled(): bool\n {\n $jobId = $this->job->getJobId();\n\n return (bool)SynchronizingProduct::query()->where('jobs_id', $jobId)->count();\n }", "public function cancelInvoice($apruveInvoiceId)\n {\n $result = $this->execCurlRequest($this->_getCancelInvoiceUrl($apruveInvoiceId), 'POST');\n return $result;\n }", "public function cancelarCotizacion(){\n try {\n\n //CONEXION A LA BASE DE DATOS\n $conexion = new PDO('mysql:host='.$this->datosConexionBD[0].';\n dbname='.$this->datosConexionBD[3], $this->datosConexionBD[1], $this->datosConexionBD[2]);\n\n $conexion -> exec(\"set names utf8\");\n\n //Sentencia SQL para modificar un registro\n $query = \"UPDATE cotizaciones SET\n\n statusCotizacion = 3,\n idUsuario = '\".$this->id.\"'\n\n WHERE folioCotizacion = '\".$this->folio.\"'\";\n\n $statement = $conexion->prepare($query);\n\n $statement->execute();\n\n return \"Cancelación Exitosa\";\n }\n\n catch(PDOException $e){\n return \"Error: \" . $e->getMessage();\n }\n }", "public function cancelItem(Request $request)\n {\n $result = app(OrderItemService::class)->cancel($request->id);\n\n if ($result) {\n return back()->with('success', 'Successfully cancelled');\n }\n\n return back()->with('error', 'Failed to cancel');\n }", "public function cancelCommit() {\n\n return $this->sendRPC(\"<cancel-commit/>\");\n\n }", "public function cancel($atPeriodEnd = true)\n {\n if ($this->gateway !== 'none') {\n $this->gateway()->subscriptions()->cancel($this, $atPeriodEnd);\n }\n\n // If the user was on trial, we will set the grace period to end when the trial\n // would have ended. Otherwise, we'll retrieve the end of the billing period\n // and make that the end of the grace period for this current user.\n if ($this->onTrial()) {\n $this->ends_at = $this->trial_ends_at;\n } else {\n $this->ends_at = $this->renews_at;\n }\n\n $this->renews_at = null;\n $this->save();\n\n return $this;\n }", "public function cancel($sessionId)\n {\n\n $requestParams = array(\n 'sessionId' => $sessionId,\n );\n /** @noinspection PhpUndefinedMethodInspection */\n $response = $this->client->cancel($requestParams);\n\n if (isset($response->error) && null != $response->error) {\n throw new Exception('Error: ' . $response->error->error . \" - \" . $response->error->info);\n }\n\n }", "public function doCancel(Request $request, $id)\n\t{\n\t\t$request->validate(\n\t\t\t[\n\t\t\t\t'cancellation_note' => 'required|max:255',\n\t\t\t]\n\t\t);\n\n\t\t$order = Order::findOrFail($id);\n\t\t\n\t\t$cancelOrder = \\DB::transaction(\n\t\t\tfunction () use ($order, $request) {\n\t\t\t\t$params = [\n\t\t\t\t\t'status' => Order::CANCELLED,\n\t\t\t\t\t'cancelled_by' => \\Auth::user()->id,\n\t\t\t\t\t'cancelled_at' => now(),\n\t\t\t\t\t'cancellation_note' => $request->input('cancellation_note'),\n\t\t\t\t];\n\n\t\t\t\tif ($cancelOrder = $order->update($params) && $order->orderItems->count() > 0) {\n\t\t\t\t\tforeach ($order->orderItems as $item) {\n\t\t\t\t\t\tProductInventory::increaseStock($item->product_id, $item->qty);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $cancelOrder;\n\t\t\t}\n\t\t);\n\n\t\t\\Session::flash('success', 'The order has been cancelled');\n\n\t\treturn redirect('admin/orders');\n\t}", "public function cancelAction()\n {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if ($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\n }\n }\n }", "protected function cancelQueueing() { }", "public function requestcancel()\n\t{\n\t\t$app\t=\tJFactory::getApplication();\n\n\t\t// Getting target id and user id.\n\t\t$user\t=\t$app->input->get('user_id', 0, 'INT');\n\t\t$target\t=\t$app->input->get('target_id', 0, 'INT');\n\n\t\t// Loading friend model for getting id\n\t\t$friendmodel\t=\tFD::model('Friends');\n\t\t$state\t\t\t=\tSOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t$status\t\t\t=\t$friendmodel->isFriends($user, $target, $state);\n\n\t\t$res = new stdClass;\n\n\t\tif (!$status)\n\t\t{\n\t\t\t/* final call to Cancel friend request.\n\t\t\t* $final = $friend->reject();\n\t\t\t*/\n\n\t\t\t$final\t=\tES::friends($target, $user)->cancel();\n\t\t\t$res->result->status = 1;\n\t\t\t$this->plugin->setResponse($res);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->result->status = 0;\n\t\t}\n\n\t\t$this->plugin->setResponse($res);\n\t}", "public function cancelled(): bool\n {\n return $this->status === self::STATUS_CANCELLED;\n }", "public function actionCancel($id)\n {\n $model = $this->findModel($id);\n if($model->create_by == Yii::$app->user->id){\n if(!($model->status < WorksystemTask::STATUS_WORKING))\n throw new NotAcceptableHttpException('该任务状态为'.$model->getStatusName ().'!');\n }else{\n throw new NotAcceptableHttpException('无权限操作!');\n }\n $post = Yii::$app->request->post();\n $_wsAction = WorksystemAction::getInstance();\n \n if ($model->load($post)) {\n $_wsAction->CancelTask($model, $post);\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_cancel', [\n 'model' => $model,\n ]);\n }\n }", "protected function _mailSendCancel()\n\t{\n\t\t$this->DB->update( 'bulk_mail', array(\t'mail_active'\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'mail_updated'\t=> time(),\n\t\t\t\t\t\t\t\t\t\t \t\t), \"mail_active=1\" );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->DB->update( 'task_manager', array( 'task_enabled' => 0 ), \"task_key='bulkmail'\" );\n\t\t\n\t\t$this->registry->output->global_message = $this->lang->words['b_cancelled'];\n\t\t$this->_mailStart();\n\t}", "private function _cancelKlarnaOrder(string $klarnaOrderId)\n {\n if(!$klarnaOrderId){\n return false;\n }\n \n $response = $this->getOrderManagement()->cancel($klarnaOrderId);\n return $response && (bool)$response->getIsSuccessful();\n }", "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n\t\t\t\t$order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Payment Processing Cancelled')->save();\n\t\t\t\tMage::getModel(\"Swipezoom_InternationalShipping_Model_Carrier_Swipezoom\")->setPaymentAdditionalData(Mage::getSingleton('sales/quote')->load($order->getQuoteId())->getSwipezoomOrderNumber(),Mage::getSingleton('checkout/session')->getLastRealOrderId(),'C');\n\t\t\t}\n }\n\t}", "public function cancelAction()\r\n {\r\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\r\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\r\n if ($order->getId()) {\r\n // Flag the order as 'cancelled' and save it\r\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\r\n }\r\n }\r\n }", "public function cancelSubscription() {\n\t\t// Try to cancel, in case no payment attempts have been made or all\n\t\t// payment attempts can be canceled\n\t\t$response = $this->do_transaction( 'CANCEL_ORDER' );\n\n\t\tif ( !$response->getCommunicationStatus() ) {\n\t\t\t// If we can't cancel, end it to disallow future attempts\n\t\t\t$response = $this->do_transaction( 'END_ORDER' );\n\t\t\tif ( !$response->getCommunicationStatus() ) {\n\t\t\t\treturn PaymentResult::fromResults( $response, FinalStatus::FAILED );\n\t\t\t}\n\t\t}\n\n\t\treturn PaymentResult::fromResults( $response, FinalStatus::COMPLETE );\n\t}" ]
[ "0.6455503", "0.6139648", "0.60112274", "0.59774745", "0.5857124", "0.58436906", "0.57653666", "0.5762934", "0.5762934", "0.5762934", "0.5743769", "0.571832", "0.5715099", "0.5708255", "0.57051796", "0.5641223", "0.56251055", "0.5600443", "0.5597115", "0.559201", "0.55878437", "0.5584305", "0.55809885", "0.5578094", "0.5565649", "0.5553426", "0.55399734", "0.5497125", "0.5470069", "0.545967", "0.54552937", "0.5440402", "0.5433275", "0.5425053", "0.54083186", "0.5407511", "0.5400544", "0.53919375", "0.5385122", "0.5379595", "0.5343584", "0.5303009", "0.52939284", "0.5287118", "0.5267634", "0.52627546", "0.5253347", "0.5238731", "0.51719886", "0.517167", "0.5167622", "0.51645464", "0.51645464", "0.51553506", "0.51553506", "0.51553506", "0.51553506", "0.51465714", "0.51410025", "0.51369154", "0.5126482", "0.5099421", "0.5094029", "0.50929296", "0.5086104", "0.5080724", "0.50720537", "0.5071443", "0.50704724", "0.50704426", "0.50619495", "0.50521106", "0.5051983", "0.5038252", "0.5016184", "0.5008012", "0.4988559", "0.49871874", "0.49869868", "0.4979303", "0.4967334", "0.49638522", "0.4952078", "0.4941306", "0.49200097", "0.4913839", "0.49104196", "0.49042463", "0.49035522", "0.49009445", "0.4893111", "0.48913372", "0.48714742", "0.4868062", "0.48649243", "0.48610932", "0.48599342", "0.4859885", "0.4859811", "0.4856901" ]
0.78453267
0
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
Создает BatchPredictionJob. После создания BatchPredictionJob сразу попытается запустить его.
public function CreateBatchPredictionJob(\Google\Cloud\AIPlatform\V1\CreateBatchPredictionJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CreateBatchPredictionJob', $argument, ['\Google\Cloud\AIPlatform\V1\BatchPredictionJob', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createBatch()\n {\n return new Batch(\n $this->client,\n false,\n $this->rootUrl,\n $this->batchPath\n );\n }", "public function new_batch($batch_id = null)\n\t{\n\t\treturn new UM_MailChimp_Batch($this, $batch_id);\n\t}", "public function BatchCreateJobs(\\Google\\Cloud\\Talent\\V4\\BatchCreateJobsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/BatchCreateJobs',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "public function __construct($batch)\n {\n $this->batch = $batch;\n }", "public function createJob($config, $activity, $batch, $settings)\n\t{\n\t\t\n\t\t$entity = new Job;\n\t\t$entity->_id = $entity->_id;\n\t\t$entity->batch_id = $batch->_id;\n\t\t$entity->project = $settings['project'];\n\t\t$entity->documentType = $settings['documentType'];\n\t\t$entity->templateType = $settings['templateType'];\n\t\t$entity->resultType = $settings['resultType'];\n\t\t$entity->type = \"job\";\n\t\t$entity->completion = 1;\n\t\t$entity->expectedWorkerUnitsCount = 450;\n\t\t$entity->finishedAt = new MongoDate;\n\t\t$entity->jobConf_id = $config;\n\t\t$entity->platformJobId = $settings['platformJobId'];\n\t\t$entity->projectedCost = 12.00;\n\t\t$entity->realCost = 11.97;\n\t\t$entity->runningTimeInSeconds = 190714;\n\t\t$entity->softwareAgent_id = $settings['platform'];\n\t\t$entity->startedAt = new MongoDate;\n\t\t$entity->status = \"imported\";\n\t\t$entity->template = \"imported\";\n\t\t$entity->activity_id = $activity;\n\t\t$entity->save();\n\t\t\n\t\tarray_push($this->status['success'], \"Job created (\" . $entity->_id . \")\");\n\t\t\n\t\treturn $entity;\n\t}", "public function BatchPredict(\\Google\\Cloud\\AutoMl\\V1beta1\\BatchPredictRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.automl.v1beta1.PredictionService/BatchPredict',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "function batch_create() {\r\n\t\t$this->__construct();\r\n\t}", "protected function startBatchJob(){\n $job = new FeederBatchJob();\n $conn = $this->option('conn');\n\n if ($conn === 0 || $conn === '0'){\n $job->conn = 'ph4DBPess';\n } elseif ($conn === 1 || $conn === '1'){\n $job->conn = 'ph4DBOptim';\n } elseif ($conn === 2 || $conn === '2'){\n $job->conn = 'beanstalkd';\n } elseif ($conn === 3 || $conn === '3'){\n $job->conn = 'redis';\n } elseif ($conn === 4 || $conn === '4'){\n $job->conn = 'database_ph4';\n } else {\n $job->conn = $conn;\n }\n\n $job->batchSize = $this->option('batch-size');\n $job->delTsxFetch = $this->option('del-tsx-fetch');\n $job->delTsxRetry = $this->option('del-tsx-retry');\n $job->delMark = $this->option('del-mark');\n $job->workClone = $this->option('work-clone');\n $job->workMean = $this->option('work-mean');\n $job->windowStrategy = $this->option('window-strategy');\n $job->verify = $this->option('verify');\n $job->repeat = $this->option('repeat');\n $job->noJson = $this->option('no-json');\n $job->key = $this->option('key');\n\n $job->onConnection('sync')\n ->onQueue(null);\n dispatch($job);\n }", "public function startBatch()\n {\n $values = [\n 'date' => date(\"Y-m-d\"),\n ];\n $batch = $this->db\n \t\t->table('batches')\n\t\t\t->create($values);\n }", "public function getOrCreateBatch()\n {\n $batch = DB::table('job_batches')->where('name', '=', 'Chunk Csv')->first();\n if (!$batch) {\n try {\n return Bus::batch([])->name('Chunk Csv')->dispatch();\n } catch (\\Throwable $e) {\n }\n }\n return Bus::findBatch($batch->id);\n }", "public function CreateJob(\\Google\\Cloud\\Talent\\V4\\CreateJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/CreateJob',\n $argument,\n ['\\Google\\Cloud\\Talent\\V4\\Job', 'decode'],\n $metadata, $options);\n }", "public function batch($jobs)\n {\n return new PendingBatch($this->container, Collection::wrap($jobs));\n }", "public function DeleteBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\DeleteBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/DeleteBatchPredictionJob',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "public function actionCreate()\n {\n $model = new Batch;\n if (isset($_POST['Batch'])) {\n try {\n $model->attributes = $_POST['Batch'];\n $validate = $model->validate();\n if ($validate) {\n $model->type = 1;\n if ($model->save()) {\n Yii::app()->user->setFlash('success', '<strong>Phát hành cổ phần thành công</strong>');\n //$this->redirect(array('index'));\n }\n }\n } catch (CException $e) {\n throw $e;\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public static function createPayoutBatch(PayoutBatch $payoutBatch): PayoutBatch\n {\n $thisInstance = new self();\n\n try {\n if (empty($payoutBatch->getNotificationURL()) &&\n in_array(WebhookAutoPopulate::For_Payouts, $thisInstance->config['auto_populate_webhook'])) {\n $payoutBatch->setNotificationURL(route('laravel-bitpay.webhook.capture'));\n }\n } catch (\\Throwable $exception) {\n // Misconfiguration or route macro not in use\n }\n\n return $thisInstance->client->submitPayoutBatch($payoutBatch);\n }", "public static function job()\n {\n return new Job();\n }", "public function ListBatchPredictionJobs(\\Google\\Cloud\\AIPlatform\\V1\\ListBatchPredictionJobsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/ListBatchPredictionJobs',\n $argument,\n ['\\Google\\Cloud\\AIPlatform\\V1\\ListBatchPredictionJobsResponse', 'decode'],\n $metadata, $options);\n }", "public function create_batch_id() {\n\t\t\t$http = http_build_query(array('api-key' => $this->accessID));\n\t\t\t\n\t\t\t// Build the URL\n\t\t\t$url = 'http://'. $this->apiURL .'/seo-tools/api/v1/create-batch-id?' . $http;\n\t\t\t$result = $this->curl($url);\n\t\t\t$result = json_decode($result, true);\n\t\t\t\n\t\t\tif (!empty($result['response']['batch-id'])) {\n\t\t\t\treturn $result['response']['batch-id'];\n\t\t\t\t//return $this->batch_id = $result['response']['batch-id'];\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "function addBatchJobAction(KalturaBatchJob $batchJob)\r\n\t{\r\n\t\tkJobsManager::addJob($batchJob->toObject(), $batchJob->data, $batchJob->jobType, $batchJob->jobSubType);\t\r\n\t}", "public static function batchImport(): BatchImport {\n\t\t\treturn app(BatchImport::class, [\n\t\t\t\t'model' => new static,\n\t\t\t]);\n\t\t}", "public function createJob($params)\n {\n $model = new JobCreateModel();\n $model->scenario = $this->scenario;\n $model->partner_system_id = $this->partnerSystem->id;\n $model->attributes = $params;\n if ($model->validate())\n {\n $transaction = Yii::app()->db->beginTransaction();\n if ($transaction instanceof CDbTransaction) {\n try {\n $model->save();\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollback();\n $model->addError('id', 'Save failed: ' . $e->getMessage());\n }\n }\n }\n return $model;\n }", "private static function InitBatchJobMutateResponseObject() {\n $apiError = new FakeCriterionPolicyError();\n $apiError->fieldPath = 'operations[0].operand.criterion.text';\n $apiError->trigger = 'text';\n $apiError->errorString = 'CriterionPolicyError.POLICY_ERROR';\n $apiError->key = new PolicyViolationKey();\n $apiError->key->policyName = 'pharma';\n $apiError->key->violatingText = 'text';\n $apiError->externalPolicyName = 'Online pharmacy certification required';\n $apiError->externalPolicyUrl = '';\n $apiError->externalPolicyDescription = 'Description';\n $apiError->isExemptable = true;\n $policyViolationErrorPart = new PolicyViolationErrorPart();\n $policyViolationErrorPart->index = 0;\n $policyViolationErrorPart->length = 3;\n $apiError->violatingParts = array($policyViolationErrorPart);\n $apiError->ApiErrorType = 'CriterionPolicyError';\n\n $errorList = new ErrorList();\n $errorList->errors = array($apiError);\n\n $mutateResult = new MutateResult();\n $mutateResult->errorList = $errorList;\n $mutateResult->index = 0;\n self::$BATCH_JOB_MUTATE_RESPONSE_OBJECT = new BatchJobOpsMutateResponse();\n self::$BATCH_JOB_MUTATE_RESPONSE_OBJECT->rval[] = $mutateResult;\n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "private function createTableJob()\n\t{\n\t\t$table = \"job\";\n\t\t$columns = array(\n\t\t\tarray('name', 'TEXT')\n\t\t);\n\t\t$this->createTable($table, $columns);\n\t}", "public function batch_create($batch_data)\n {\n $batch_insert_data = [];\n foreach ($batch_data as $row) {\n $batch_insert_data[] = $this->tidy_data($row);\n }\n\n if (empty($batch_insert_data)) {\n return false;\n }\n\n $result = $this->insert_batch($batch_insert_data);\n\n if ($result === false) {\n return false;\n } else {\n return true;\n }\n }", "public function test_scenario1() {\n $data = array(array('filename' => 'data/iris.csv',\n 'params' => array(\"tags\" => array(\"mytag\"), 'missing_splits' => false),\n\t\t\t 'data_input' => array(array(\"petal width\"=> 0.5), array(\"petal length\"=> 6, \"petal width\"=> 2), array(\"petal length\"=> 4, \"petal width\"=> 1.5)),\n\t\t\t 'tag' => 'mytag',\n\t\t\t 'path' => 'tmp/',\n\t\t\t 'predictions' => array(\"Iris-setosa\", \"Iris-virginica\", \"Iris-versicolor\")));\n\n\n foreach($data as $item) {\n print \"\\nSuccessfully creating a batch prediction from a multi model\\n\";\n print \"I create a data source uploading a \". $item[\"filename\"]. \" file\\n\";\n $source = self::$api->create_source($item[\"filename\"], $options=array('name'=>'local_test_source', 'project'=> self::$project->resource));\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $source->code);\n $this->assertEquals(1, $source->object->status->code);\n\n print \"And I wait until the source is ready\\n\";\n $resource = self::$api->_check_resource($source->resource, null, 20000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"And I create dataset with local source\\n\";\n $dataset = self::$api->create_dataset($source->resource);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $dataset->code);\n $this->assertEquals(BigMLRequest::QUEUED, $dataset->object->status->code);\n\n print \"And I wait until the dataset is ready \" . $dataset->resource . \" \\n\";\n $resource = self::$api->_check_resource($dataset->resource, null, 20000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"And I create a model with \" . json_encode($item[\"params\"]) . \"\\n\";\n $model_1 = self::$api->create_model($dataset->resource, $item[\"params\"]);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $model_1->code);\n\n $list_of_models = array();\n print \"And I wait until the model is ready\\n\";\n $resource = self::$api->_check_resource($model_1->resource, null, 3000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n array_push($list_of_models, self::$api->get_model($model_1->resource));\n\n print \"And I create a model with \" . json_encode($item[\"params\"]) . \"\\n\";\n $model_2 = self::$api->create_model($dataset->resource, $item[\"params\"]);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $model_2->code);\n\n print \"And I wait until the model is ready\\n\";\n $resource = self::$api->_check_resource($model_2->resource, null, 3000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n array_push($list_of_models, self::$api->get_model($model_2->resource));\n\n print \"And I create a model with \" . json_encode($item[\"params\"]) . \"\\n\";\n $model_3 = self::$api->create_model($dataset->resource, $item[\"params\"]);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $model_3->code);\n\n print \"And I wait until the model is ready\\n\";\n $resource = self::$api->_check_resource($model_3->resource, null, 3000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n array_push($list_of_models, self::$api->get_model($model_3->resource));\n\n print \"And I create a local multi model\\n\";\n $local_multimodel = new MultiModel($list_of_models);\n\n if (!is_dir($item[\"path\"]) )\n mkdir($item[\"path\"]);\n\n print \"When I create a batch prediction for \". json_encode($item[\"data_input\"]).\n \"and save it in \" . $item[\"path\"] . \"\\n\";\n $batch_predict = $local_multimodel->batch_predict($item[\"data_input\"], $item[\"path\"]);\n\n print \"And I combine the votes in \" . $item[\"path\"] . \"\\n\";\n $votes=$local_multimodel->batch_votes($item[\"path\"]);\n\n print \"Then the plurarity combined predictions are \". json_encode($item[\"predictions\"]) . \"\\n\";\n $i=0;\n foreach($votes as $vote) {\n $this->assertEquals($item[\"predictions\"][$i], $vote->combine());\n $i+=1;\n }\n\n print \"And the confidence weighted predictions are \". json_encode($item[\"predictions\"]) . \"\\n\";\n $i=0;\n foreach($votes as $vote) {\n $this->assertEquals($item[\"predictions\"][$i], $vote->combine(1));\n $i+=1;\n }\n\n }\n }", "private function createTransactions()\n\t{\n\t\t$pid = Set_Process_Status($this->db, $this->company_id, 'landmark_create_batch', 'started');\n\n\t\t$batch_data = $this->fetchBatchData();\n\n\t\t// This is the data we will return\n\t\t$return_data = array();\n\n\t\tif($batch_data === FALSE)\n\t\t{\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM: No accounts were available for batch\");\n\t\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_create_batch', 'completed', null, $pid);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$number_of_batches = ceil(count($batch_data) / self::BATCH_SIZE);\n\n\t\t/* DEBUG */\n\t\t$this->log->Write(\"Found \" . count($batch_data) . \" applications, will run {$number_of_batches} batches of at most \" . self::BATCH_SIZE .\" apps\");\n\n\t\t$batch_count = 0;\n\n\t\twhile (count($batch_data) > 0)\n\t\t{\n\t\t\t$batch_count++;\n\t\t\t$file_data = array_splice($batch_data, 0, self::BATCH_SIZE);\n\n\t\t\tLandmarkItemData::init($this->company_id);\n\n\t\t\t/**\n\t\t\t * Create the Asssessment Events\n\t\t\t */\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Inserting Assessment Events.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertAssessmentEventSchedules($this->db, $file_data, date('Y-m-d'), 'assessment');\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Creating Transaction Register Entries.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertAssessmentTransactionRegisters($this->db, $file_data);\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Updating Event Amounts.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertAssessmentEventAmounts($this->db, $file_data);\n\n\t\t\t/**\n\t\t\t * Create the Payment Events and the ACH Items\n\t\t\t */\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Inserting Payment Events.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertPaymentEventSchedules($this->db, $file_data, date('Y-m-d'), 'payment');\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Creating ACH Entries.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertACHItems($this->db, $file_data, $ecld_file_id);\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Creating Transaction Register Entries.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertPaymentTransactionRegisters($this->db, $file_data);\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Updating Event Amounts.\", LOG_INFO);\n\t\t\tLandmarkItemData::insertPaymentEventAmounts($this->db, $file_data);\n\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM Progress: Moving Accounts to Pre-Fund.\", LOG_INFO);\n\t\t\tLandmarkItemData::UpdateStatuses($file_data);\n\n\t\t\t$return_data = array_merge($return_data, $file_data);\n\t\t}\n\n\t\t$this->log->Write(\"Run $batch_count batches\");\n\n\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_create_batch', 'completed', null, $pid);\n\n\t\treturn $return_data;\n\t}", "private function constructJob(Request $request)\n {\n $job = [\n \"tenant_id\" => $this->requester->getTenantId(),\n \"company_id\" => $request->companyId,\n \"eff_begin\" => $request->effBegin,\n \"eff_end\" => $request->effEnd,\n \"code\" => $request->code,\n \"name\" => $request->name,\n \"description\" => $request->description,\n \"job_family_code\" => $request->jobFamilyCode,\n \"job_category_code\" => $request->jobCategoryCode,\n \"ordinal\" => $request->ordinal\n ];\n return $job;\n }", "function create() {\n\t\t$batch = new batch();\n\t\t$batch->warehouse_id = $this->warehouse_id;\n\t\t\n\t\t$batch->save();\n\t\t\n\t\t$this->db->query(BATCH_CATALOG_SQL_MAKE_INVOICE_BATCH, array($batch->id, $this->warehouse_id));\n\t}", "function create($job) {}", "public function createJobObject($payload = [])\n {\n $job = new Job([\n 'description' => $payload['DescriptionTeaser'],\n 'employmentType' => $payload['EmploymentType'],\n 'title' => $payload['JobTitle'],\n 'name' => $payload['JobTitle'],\n 'url' => $payload['JobDetailsURL'],\n 'educationRequirements' => $payload['EducationRequired'],\n 'experienceRequirements' => $payload['ExperienceRequired'],\n 'sourceId' => $payload['DID'],\n ]);\n\n $pay = $this->parseSalariesFromString($payload['Pay']);\n\n $job->setOccupationalCategoryWithCodeAndTitle(\n $payload['OnetCode'],\n $payload['ONetFriendlyTitle']\n )->setCompany($payload['Company'])\n ->setCompanyUrl($payload['CompanyDetailsURL'])\n ->setLocation(\n $this->parseLocationElement($payload['City'])\n .', '.\n $this->parseLocationElement($payload['State'])\n )\n ->setCity($this->parseLocationElement($payload['City']))\n ->setState($this->parseLocationElement($payload['State']))\n ->setDatePostedAsString($payload['PostedDate'])\n ->setCompanyLogo($payload['CompanyImageURL'])\n ->setMinimumSalary($pay['min'])\n ->setMaximumSalary($pay['max']);\n\n if (isset($payload['Skills']['Skill'])) {\n $job->setSkills($this->parseSkillSet($payload['Skills']['Skill']));\n }\n\n return $job;\n }", "public static function from_data($data): batch_model {\n return parent::do_make_from_data($data);\n }", "private function createJob(Action $action, Server $server)\n {\n $job = new Job();\n\n $job->name = $action->name;\n $job->commands = $this->compileWithBlade($server, $action->script);\n $job->status = Job::PENDING;\n $job->deployment()->associate($this->deployment);\n $job->server()->associate($server);\n $job->save();\n\n return $job;\n }", "public function createJobObject($payload) {\n $job = new Job([\n 'title' => $payload['name'],\n 'name' => $payload['name'],\n 'description' => $payload['snippet'],\n 'url' => $payload['url'],\n 'sourceId' => $payload['id'],\n ]);\n return $job->setCompany($payload['company'])\n ->setDatePostedAsString($payload['date']);\n }", "public function CreateCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CreateCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CreateCustomJob',\n $argument,\n ['\\Google\\Cloud\\AIPlatform\\V1\\CustomJob', 'decode'],\n $metadata, $options);\n }", "public function create(): void\n {\n $this->isTracking = true;\n\n $this->setAttributes(\n [\n self::ATTRIBUTE_STATUS => self::STATUS_WAITING,\n self::ATTRIBUTE_CREATED => time(),\n self::ATTRIBUTE_UPDATED => time(),\n ]\n );\n }", "public function createJobObject($payload)\n {\n $job = new Job([\n 'description' => trim($payload['description']),\n 'name' => $payload['title'],\n 'title' => $payload['title'],\n 'url' => $payload['link'],\n ]);\n\n // Set date posted\n $job->setDatePostedAsString($payload['pubDate']);\n\n return $job;\n }", "public function run()\n {\n Job::create(['name' => 'CUINER']);\n Job::create(['name' => 'CAMBRER']);\n Job::create(['name' => 'METRE']);\n }", "public function createJob(string $jobId)\n {\n }", "public function initBatch()\n\t{\n\t\tif ($this->batchSet === null)\n\t\t{\n\t\t\t$this->batchSet = true;\n\n\t\t\t// Get current user\n\t\t\t$this->user = \\JFactory::getUser();\n\n\t\t\t// Get table\n\t\t\t$this->table = $this->getTable($this->records_dbtbl, 'JTable');\n\n\t\t\t// Get table class name\n\t\t\t$tc = explode('\\\\', get_class($this->table));\n\t\t\t$this->tableClassName = end($tc);\n\n\t\t\t// Get UCM Type data\n\t\t\t$this->contentType = new \\JUcmType;\n\t\t\t$this->type = $this->contentType->getTypeByTable($this->tableClassName)\n\t\t\t\t?: $this->contentType->getTypeByAlias($this->typeAlias);\n\n\t\t\t// Get tabs observer\n\t\t\t$this->tagsObserver = $this->table->getObserverOfClass('Joomla\\CMS\\Table\\Observer\\Tags');\n\t\t}\n\t}", "public function __construct(TransactionBatchService $transactionBatchService)\n {\n $this->transactionBatchService = $transactionBatchService;\n }", "public function run(): void\n {\n $jobSkills = [\n ['skill_name'=>'Communication'],\n ['skill_name'=>'Teamwork'],\n ['skill_name'=>'Problem solving'],\n ['skill_name'=>'Initiative and enterprise'],\n ['skill_name'=>'Planning and organising'],\n ['skill_name'=>'Self-management'],\n ['skill_name'=>'Learning'],\n ['skill_name'=>'Technology']\n ];\n foreach ($jobSkills as $jobSkill)\n {\n JobSkill::create($jobSkill);\n }\n }", "protected function createJob($command, $commandArgs = array())\n {\n return new Job($command, $commandArgs);\n }", "public function __construct()\n {\n $this->job = new Job;\n }", "public function setBatchID($var)\n {\n GPBUtil::checkString($var, True);\n $this->BatchID = $var;\n\n return $this;\n }", "public function runBatch()\n\t{\n\t\t$this->batch_record_count = 0;\n\t\t$this->batch_errors = array();\n\n\t\t/**\n\t\t * Create the batch and transactions, update statuses\n\t\t */\n\t\t$status = Check_Process_State($this->db, $this->company_id, 'landmark_create_batch', $this->business_day);\n\n\t\tif(($status === false) || ($status != 'completed'))\n\t\t{\n\t\t\t$batch_data = $this->createTransactions();\n\t\t\t$size = count($batch_data);\n\n\t\t\t$this->log->Write(\"We have $size items in the returned array\");\n\n\t\t}\n\t\telse if($status === 'completed')\n\t\t{\n\t\t\t// We don't want to continue. As it sits, the process will not gracefully restart.\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM: Processing has already run for today!\");\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Generate the Post Data and send the batch\n\t\t */\n\t\t$status = Check_Process_State($this->db, $this->company_id, 'landmark_send_batch', $this->business_day);\n\t\tif(($status === false) || ($status != 'completed'))\n\t\t{\n\t\t\t$pid = Set_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'started');\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Format the Post data\n\t\t\t\t$batch_data = $this->formatPostData($batch_data);\n\n\t\t\t\t$error_count = count($this->batch_errors);\n\t\t\t\t$this->log->Write(\"There were $error_count errors with field validation.\");\n\n\t\t\t\t// Post the data\n\t\t\t\t$this->sendBatch($batch_data);\n\n\t\t\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'completed', null, $pid);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->log->Write(\"LM: Error sending batch!\");\n\t\t\t\t$this->log->Write(\"Exception: \" . $e->getMessage());\n\t\t\t\t$this->log->Write(\"Trace: \\n\" . $e->getTraceAsString());\n\n\t\t\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'failed', null, $pid);\n\t\t\t}\n\t\t}\n\t\telse if($status === 'completed')\n\t\t{\n\t\t\t// We don't want to continue. As it sits, the process will not gracefully restart.\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM: Batch has already been sent today!\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif(count($this->batch_errors) > 0)\n\t\t{\n\t\t\t$this->log->Write(\"Error Processing the following applications:\");\n\t\t\tforeach($this->batch_errors as $error)\n\t\t\t{\n\t\t\t\t$this->log->Write(\"[App: {$error['application_id']}] - {$error['reason']}\");\n\t\t\t}\n\t\t}\n\t}", "private static function InitSuccessBatchJobMutateResponseObject() {\n $operand = new Budget(12345, 'Test Budget');\n\n $mutateResult = new MutateResult();\n $mutateResult->result = $operand;\n $mutateResult->index = 0;\n self::$SUCCESS_BATCH_JOB_MUTATE_RESPONSE_OBJECT =\n new BatchJobOpsMutateResponse();\n self::$SUCCESS_BATCH_JOB_MUTATE_RESPONSE_OBJECT->rval[] = $mutateResult;\n }", "public function run()\n {\n $categories = [\n 'オフィスワーク',\n '医療・看護・介護',\n 'クリエイティブ・エンジニア',\n '軽作業・物流・製造',\n '施設サービス',\n '家事・保育・習い事',\n '理美容・リラクゼーション',\n '営業',\n 'フード・飲食',\n '調査・ポスティング・イベント',\n '小売・販売',\n 'その他',\n ];\n\n foreach ($categories as $key => $category) {\n factory(JobCategory::class)->create(['category' => $category]);\n }\n }", "function batch()\n {\n return app('Mavinoo\\Batch\\Batch');\n }", "public function testCreateImportJob()\n {\n }", "public function store(PendingBatch $batch);", "public function create(TargetInterface $target, string $type, string $jobId): JobLogInterface;", "public function store(Request $request)\n {\n if (!$this->isAuthorized) {\n return prepareResult(false, [], [], \"Unauthorized access\", $this->unauthorized);\n }\n\n $input = $request->json()->all();\n $validate = $this->validations($input, \"add\");\n if ($validate[\"error\"]) {\n return prepareResult(false, [], $validate['errors']->first(), \"Error while validating Batch\", $this->unprocessableEntity);\n }\n\n $batch = new Batch;\n $batch->item_id = $request->item_id;\n $batch->batch_number = $request->batch_number;\n $batch->manufacturing_date = $request->manufacturing_date;\n $batch->expiry_date = $request->expiry_date;\n $batch->manufactured_by = $request->manufactured_by;\n $batch->qty = $request->qty;\n $batch->current_in_stock = $request->current_in_stock;\n $batch->stock_out_sequence = $request->stock_out_sequence;\n $batch->status = $request->status;\n $batch->save();\n\n if (is_object($batch)) {\n $batch->item;\n return prepareResult(true, $batch, [], \"Batch added successfully\", $this->success);\n }\n\n return prepareResult(false, [], [], \"Oops!!!, something went wrong, please try again.\", $this->internal_server_error);\n }", "public function createJobExecution(JobInstance $job);", "public function makeActionQueueBatchModel(array $props = []) : ActionQueueBatchModelInterface;", "public function createJob($className, $content = null, array $metadata = array())\n {\n /** @var $job \\SxQueue\\Job\\JobInterface */\n $job = $this->jobPluginManager->get($className);\n\n $job->setContent(unserialize($content));\n $job->setMetadata($metadata);\n\n if ($job instanceof QueueAwareInterface) {\n $job->setQueue($this);\n }\n \n return $job;\n }", "public function run()\n {\n // One requested job\n MarketplaceJobFactory::new()\n ->withAttributes(['customer_id' => 1, 'business_id' => 1])\n ->withLocation(MarketplaceLocationFactory::new())();\n\n // One pending job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::PENDING_APPROVAL,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::PENDING\n ]);\n\n $marketplaceJob->customer->notify(new WorkerAcceptedJobNotification($marketplaceJob));\n })();\n\n\n\n // One approved job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::APPROVED,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $proposal = $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED\n ]);\n\n $proposal->user->notify(new CustomerReviewedWorkerNotification($marketplaceJob));\n })();\n\n // One in progress job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::IN_PROGRESS,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString()\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $marketplaceJob->customer->notify(new WorkerArrivedNotification($marketplaceJob));\n })();\n\n\n // One freelancer complete\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 1,\n 'business_id' => 1,\n 'status_id' => Status::COMPLETE,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 2, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString(),\n 'completed_at' => Carbon::today()->subHour()->toDateTimeString(),\n 'rating' => 5,\n 'review' => 'Good job!'\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $worker = app()->make(UserRepository::class)->find(2);\n\n // create transfer\n $transfer = app()->make(Connect::class)->createPayout(\n $worker->payoutMethod->stripe_connect_id,\n $marketplaceJob->price\n );\n\n $marketplaceJob->payout()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => centsToDollars($transfer->amount),\n 'stripe_token' => $transfer->id // stripe transfer id\n ]);\n\n })->create();\n\n // One requested job\n MarketplaceJobFactory::new()\n ->withAttributes(['customer_id' => 5, 'business_id' => 2])\n ->withLocation(MarketplaceLocationFactory::new())();\n\n // One pending job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::PENDING_APPROVAL,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::PENDING\n ]);\n\n $marketplaceJob->customer->notify(new WorkerAcceptedJobNotification($marketplaceJob));\n })();\n\n // One approved job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::APPROVED,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob){\n $proposal = $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::APPROVED\n ]);\n\n $proposal->user->notify(new CustomerReviewedWorkerNotification($marketplaceJob));\n })();\n\n // One in progress job\n MarketplaceJobFactory::new()\n ->withAttributes([\n 'customer_id' => 5,\n 'business_id' => 2,\n 'status_id' => Status::IN_PROGRESS,\n ])->withLocation(MarketplaceLocationFactory::new())\n ->afterCreating(function (MarketplaceJob $marketplaceJob) {\n $marketplaceJob->proposals()->create([\n 'user_id' => 6, // primary worker\n 'status_id' => ProposalStatus::APPROVED,\n 'arrived_at' => Carbon::today()->toDateTimeString()\n ]);\n\n // create payment\n $charge = app()->make(Billing::class)->createCharge(\n $marketplaceJob->customer->primaryPaymentMethod->stripe_customer_id,\n $marketplaceJob->price,\n $marketplaceJob->description\n );\n $marketplaceJob->payment()->create([\n 'user_id' => $marketplaceJob->customer_id,\n 'amount' => $marketplaceJob->price,\n 'stripe_token' => $charge->id // stripe charge id\n ]);\n\n $marketplaceJob->customer->notify(new WorkerArrivedNotification($marketplaceJob));\n })();\n }", "public function run() {\n if (\\Schema::hasTable('jobs')) {\n factory(App\\Models\\Job::class)->times(2)->create();\n }\n }", "public function duplicate(Job $baseJob)\n {\n $job = new Job();\n\n $job->state = JobState::IDLE;\n $job->task = $baseJob->task;\n $job->retries = $baseJob->retries;\n $job->data = $baseJob->data;\n\n return $job;\n }", "public function __construct(Job $tuitionJob)\n {\n $this->tuitionJob = $tuitionJob;\n }", "function createBatch($division_id,$batch_name,$created_by,$updated_by,$deleted=0,$additional_description=\"null\"){\n $rows = array(\"division_id\",\"batch_name\",\"created_by\",\"updated_by\",\"deleted\",\"additional_description\");\n $values = array(convertToSTring($division_id),convertToSTring($batch_name),convertToSTring($created_by),convertToSTring($updated_by),$deleted,$additional_description);\n\n $this->pdo->insertDb(\"batch\",$rows,$values);\n\n }", "public function CreateContactBatch($BroadcastId, Request\\CreateContactBatch $CreateContactBatch)\n {\n $uri = $this->getUri('/broadcast/%s/batch', array($BroadcastId));\n\n return $this->post($uri, $CreateContactBatch);\n }", "public function __construct(JobInstance $jobInstance)\n {\n $this->jobInstance = $jobInstance;\n }", "public function run()\n {\n Batches::create([\n 'title'=>'Batch - 1 2019A',\n 'description'=>'Batch - 1 Section-A Batch-2019',\n 'classroom_id'=>1,\n ]);\n\n Batches::create([\n 'title'=>'Batch - 2 2019A',\n 'description'=>'Batch - 2 Section-A Batch-2019',\n 'classroom_id'=>1,\n ]);\n\n Batches::create([\n 'title'=>'Batch - 3 2019A',\n 'description'=>'Batch - 3 Section-A Batch-2019',\n 'classroom_id'=>1,\n ]);\n }", "public function create_job($job_type, $manifest, $validate_only, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobType'] = $job_type;\n\t\t$opt['Manifest'] = $manifest;\n\t\t$opt['ValidateOnly'] = $validate_only;\n\n\t\treturn $this->authenticate('CreateJob', $opt, $this->hostname);\n\t}", "public function creating(Job $job)\n {\n $job->submitter_id = Auth::guard('api')->id();\n }", "public function markAsSubmitted(TransactionBatch $transactionBatch);", "public function createJob($data = []) {\n\t\t$this->requestApi('jobs', 'post', json_encode($data));\n\n\t\tif(!$this->isError()) {\n\t\t\treturn $this->getResponseData();\n\t\t}\n\n\t\treturn false;\n }", "public function getDotbJobQueue()\n {\n return new DotbJobQueue();\n }", "public function __construct($batch, $pUser, $userAssignment)\n {\n $this->batch = $batch;\n $this->pUser = $pUser;\n $this->userAssignment = $userAssignment;\n\n $this->connection = 'database';\n }", "public function create(Request $request, $batchId)\n {\n $search = (string)$request->input('search', null);\n $currentPage = (int)$request->input('page', 0);\n $prevRecords = $currentPage > 0 ? (($currentPage-1) * 15) : 0;\n\n $batch = Batch::find($batchId);\n\n $pUsers = User::where(function($query) use ($search) {\n $query->where('first_name', 'like', '%'.$search.'%')->orWhere('last_name', 'like', '%'.$search.'%')->orWhere('phone', 'like', '%'.$search.'%')->orWhere('email', 'like', '%'.$search.'%');\n })->paginate(15);\n \n $title = \"Add Participant to \".($batch ? ' Batch: '.$batch->name : '');\n $breadcrumb[] = ['link' => route(config('app.a_slug').'.batches.participants', $batchId), 'text' => \"Batch Participants\"];\n $breadcrumb[] = ['link' => null, 'text' => $title];\n return view(config('app.a_slug').'.batch_users.create', compact('title', 'breadcrumb', 'pUsers', 'batch', 'search', 'prevRecords'));\n }", "public function create(Request $request)\n {\n $this->validate(\n $request,\n [\n 'title' => 'required|min:1',\n 'description' => 'required|min:1',\n 'location' => 'required|min:1'\n ]\n );\n $job = $this->job->create($request->all());\n \n return response()->json($job, 201);\n }", "public function batches(): HasMany\n {\n return $this->hasMany('Appocular\\Assessor\\Models\\Batch');\n }", "function get_batch_job(\n\t\t$source_language = false,\n\t\t$target_languages = false\n\t) {\n\t\t$batch_data = TranslationProxy_Basket::get_batch_data();\n\n\t\tif ( ! $batch_data ) {\n\t\t\tif ( ! $source_language ) {\n\t\t\t\t$source_language = TranslationProxy_Basket::get_source_language();\n\t\t\t}\n\t\t\tif ( ! $target_languages ) {\n\t\t\t\t$target_languages = TranslationProxy_Basket::get_remote_target_languages();\n\t\t\t}\n\n\t\t\tif ( ! $source_language || ! $target_languages ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$batch_data = $this->create_batch_job( $source_language, $target_languages );\n\n\t\t\tif ( $batch_data ) {\n\t\t\t\tTranslationProxy_Basket::set_batch_data( $batch_data );\n\t\t\t}\n\t\t}\n\n\t\treturn $batch_data;\n\t}", "protected function _construct()\n {\n $this->_init('autosuggest_batch', 'batch_id');\n $this->_isPkAutoIncrement = false;\n }", "public function prepeareJob($jobData) {\n if (is_null($this->job))\n $this->job = new PProjectJob();\n\n $this->job->setAttributes($jobData);\n /*\n $this->job->start_hour = PProjectJob::strToMysqlDate($jobData['start_date']);\n $this->job->end_hour = PProjectJob::strToMysqlDate($jobData['end_date']);\n //print_r($jobData);die(); */\n $this->addJobRule($this->job);\n if (isset($jobData['projectJobCustomPayment'])) {\n if ($this->job->getIsNewRecord() || is_null($this->job->jobCustomPayment)) {\n $this->customPaymentDetails = new ProjectJobCustomPayment();\n } else {\n $this->customPaymentDetails = $this->job->jobCustomPayment;\n }\n\n $this->customPaymentDetails->setAttributes($jobData['projectJobCustomPayment']);\n /**\n * In order the paid as type is chosen, it might be provided such\n * values as 2_SPOT, 2_FULL, which means Transcribe QC SPOT or FULL.\n * The value must be worked out and saved in appropriate way\n */\n $this->customPaymentDetails->checkAndFixPayAsAttribute();\n }\n\n // Prepare service metatypes for saving\n if (isset($jobData['service_metatype'])) {\n $this->serviceMetatypes = $jobData['service_metatype'];\n }\n\n // Prepare custom extensions\n if (isset($jobData['custom_extensions'])) {\n $this->customExtensions = $jobData['custom_extensions'];\n }\n\n $project = $this->job->project;\n if ($project instanceof Project && isset($project->video->video_url)) {\n $projectVideoUrl = $project->video->video_url;\n // If this project video has youtube / facebook video url:\n // - check if project video is youtube / facebook video\n // - if youtube / facebook video -- check if we already have a waveform extracted for that video\n // - if no waveform yet -- add task into queue\n if (YoutubeVideoHelper::isYoutubeVideoUrl($projectVideoUrl)) {\n Yii::app()->youtubeProjectCreationAPI->processProjectVideo($project->id);\n } elseif(FacebookVideoHelper::isFacebookVideoUrl($projectVideoUrl)) {\n Yii::app()->facebookProjectCreationAPI->processProjectVideo($project->id);\n // If this job is offloaded to partner:\n // - check if there is video version for that specific vendor\n // - if no such video -- add processing task, which will grab tempNoDRM video,\n // apply watermark and upload to some bucket with download access\n } elseif ($this->job->isPartnerJob()) {\n $partnerVideoHelper = new PartnerVideoHelper($this->job->partner, $project->video->video_url);\n if (!$partnerVideoHelper->isVideoProvided())\n $partnerVideoHelper->processVideo();\n }\n }\n\n return $this;\n }", "public function jobs(): Jobs\n {\n return new Jobs($this->apiKey);\n }", "public function newJob() {\n\t\t$data = array(\n\t\t 'id_dtype' \t\t=> 1,\n\t\t 'url' \t\t\t=> $this->getRemoteUrl()\n\t\t);\n\n\t\t$this->db->insert('dump_job', $data);\n\t}", "public function run()\n {\n StaffJob::create(['name' => 'Entraineur']);\n StaffJob::create(['name' => 'Entraineur assistant']);\n StaffJob::create(['name' => 'Medecin']);\n }", "public function store(BatchPostRequest $request)\n {\n try{\n $batch = new Studentbatch();\n\n $batch->classes_id = $request->student_class;\n $batch->sessions_id = $request->session_id;\n $batch->sections_id = $request->section;\n $batch->user_id = $request->user_id;\n $batch->student_roll = $request->Roll;\n $batch->created_by = Sentinel::getUser()->id;\n\n $batch->save();\n\n if($batch->id){\n\n session::flash('success', 'Added Successfully');\n return Redirect::back();\n }else{\n session::flash('danger', 'failed');\n return Redirect::back();\n }\n\n }catch(QueryException $e){\n\n session::flash('danger', 'Roll out of range');\n return Redirect::back();\n\n }catch (FatalErrorException $exception){\n\n session::flash('danger', 'failed');\n return Redirect::back();\n }\n }", "public function __construct(Batch $batch)\n {\n\n $batch->load(['sample.patient.mother', 'facility', 'lab', 'receiver', 'creator']);\n $samples = $batch->sample;\n\n $this->batch = $batch;\n $sessionVar = md5('nasc0peId1234561987');\n $lab = auth()->user()->lab_id;\n $this->site_url ='http://www.nascop.org/eid/users/facilityresults.php?key='.$sessionVar.'&BatchNo='.$batch->id.'&LabID='.$lab.'&fauto='.$batch->facility->id;\n\n $this->individual_path = storage_path('app/batches/eid/individual-' . $batch->id . '.pdf');\n $this->summary_path = storage_path('app/batches/eid/summary-' . $batch->id . '.pdf');\n\n if(file_exists($this->individual_path)) unlink($this->individual_path);\n if(file_exists($this->summary_path)) unlink($this->summary_path);\n\n $mpdf = new Mpdf;\n $data = Lookup::get_lookups();\n $samples->load(['patient.mother', 'approver', 'batch.lab', 'batch.facility', 'batch.receiver', 'batch.creator']);\n $data['samples'] = $samples;\n $view_data = view('exports.samples', $data)->render();\n $mpdf->WriteHTML($view_data);\n $mpdf->Output($this->individual_path, \\Mpdf\\Output\\Destination::FILE);\n\n\n $mpdf = new Mpdf(['format' => 'A4-L']);\n $data = Lookup::get_lookups();\n $data = array_merge($data, ['batches' => [$batch]]);\n $view_data = view('exports.mpdf_samples_summary', $data)->render();\n $mpdf->WriteHTML($view_data);\n $mpdf->Output($this->summary_path, \\Mpdf\\Output\\Destination::FILE);\n // DOMPDF::loadView('exports.samples_summary', $data)->setPaper('a4', 'landscape')->save($this->summary_path);\n }", "function __construct() {\n\t\t$this->_batchInsertChunks = 100;\n\t}", "public function store(Request $request)\n {\n // get the user\n $user = Auth::user();\n\n $v = Validator::make($request->all(), [\n 'bnum' => 'required|unique:batch_submits,batch_id',\n 'dFilled' => 'required|date',\n 'cooler' => 'required|integer',\n 'submitter' => 'required|string',\n 'totalPillowWeight' => 'required',\n 'totalBagWeight' => 'required',\n 'submitStatus' => 'required',\n 'package_id.*' => 'required|distinct',\n 'bag_weight.*' => 'required',\n 'flow_weight.*' => 'required',\n 'pillow.*' => 'required',\n ])->validate();\n\n\n // prepare insert\n \n\n // format string for datetime\n $dateFilled = $request->input('dFilled');\n $formattedDate = Carbon::parse($dateFilled)->format('Y-m-d');\n\n // new model instance\n $batchSubmit = new BatchSubmit;\n\n // assign vals\n $batchSubmit->user_id = $user->id;\n $batchSubmit->status = $request->input('submitStatus');\n $batchSubmit->submitter = $request->input('submitter');\n $batchSubmit->batch_id = $request->input('bnum');\n $batchSubmit->cooler = $request->input('cooler');\n $batchSubmit->date_filled = $formattedDate;\n $batchSubmit->total_flower_weight = $request->input('totalPillowWeight');\n $batchSubmit->total_batch_weight = $request->input('totalBagWeight');\n\n\n\n \n\n // insert to DB\n $batchSubmit->save();\n\n // prepare bags and pillows to insert\n $batchNumber = $request->input('bnum');\n $bagNumber = $request->input('package_id');\n $bagWeight = $request->input('bag_weight');\n $flowerWeight = $request->input('flow_weight');\n $pillows = $request->input('pillow');\n\n foreach ($bagNumber as $bn)\n {\n $bn = str_replace('timeless', 'Timeless', $bn);\n $bn = str_replace('trim', 'Trim', $bn);\n $bn = str_replace('--', '-', $bn);\n $bn = str_replace('extract', 'Extract', $bn);\n $bn = str_replace(' ', '', $bn);\n }\n\n // for each bag row, insert a row into the DB tied to the batch id\n for ($i = 0; $i < count($bagNumber); $i++) {\n\n $bag = new BatchBag;\n\n\n\n\n $bag->batch_id = $batchNumber;\n $bag->package_id = $bagNumber[$i];\n $bag->bag_weight = $bagWeight[$i];\n $bag->flower_weight = $flowerWeight[$i];\n\n $bag->save();\n }\n\n // for each pillow row, insert a row into the DB tied to the batch id\n for ($n = 0; $n < count($pillows); $n++) {\n\n $newPillow = new PillowWeight;\n\n $newPillow->batch_id = $batchNumber;\n $newPillow->pillow = $pillows[$n];\n\n $newPillow->save();\n }\n \n \n\n \n\n return redirect('/admin')->with(['success' => true]);\n }", "public function create()\n {\n $deployment = new Deployment();\n $deployment->fill([\n 'project_id' => $this->project->id,\n 'repository' => $this->project->repository,\n 'reference' => $this->reference->getReference(),\n 'branch' => $this->reference->getId(),\n 'started_at' => (new \\DateTime())->format('Y-m-d H:i:s'),\n ]);\n $deployment->save();\n\n $action = new Action;\n $actionHooks = $action->getHooksByProject($this->project)->get();\n\n $processes = new Processes($deployment, $this->project, $actionHooks);\n $processes->create();\n\n return $deployment;\n }", "public function getRunningJobs($batchId = null)\n {\n $jobs = array();\n\n if ($batchId) {\n $jobs_of_current_batch = $this->db->query(\"SELECT * FROM batch_job WHERE batch_id='\" . $batchId . \"' AND status_code='ACTIVE'\");\n } else {\n $jobs_of_current_batch = $this->db->query(\"SELECT * FROM batch_job WHERE status_code='ACTIVE'\");\n }\n if ($jobs_of_current_batch) {\n foreach ($jobs_of_current_batch as $job) {\n $jobs[] = new BatchJob($job);\n }\n return $jobs;\n }\n return false;\n }", "public function testAddJob()\n {\n $uuid1 = $this->hypernova->addJob($this->job['name'], $this->job['data']);\n $this->assertEquals($this->job, $this->hypernova->getJob($uuid1));\n\n $uuid2 = $this->hypernova->addJob($this->job);\n $this->assertEquals($this->job, $this->hypernova->getJob($uuid2));\n\n $this->assertEquals([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ], $this->hypernova->getJobs());\n\n $this->hypernova->clearJobs();\n $this->assertEquals([], $this->hypernova->getJobs());\n\n $this->hypernova->setJobs([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ]);\n $this->assertEquals([\n $uuid1 => $this->job,\n $uuid2 => $this->job\n ], $this->hypernova->getJobs());\n }", "public function create(Google_Service_JobService_Company $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('create', array($params), \"Google_Service_JobService_Company\");\n }", "public function addToQueue(ActionQueueBatchModelInterface $model);", "public function setBatchId($batchId)\n {\n $this->batchId = $batchId;\n return $this;\n }", "public function setBatchId($batchId)\n {\n $this->batchId = $batchId;\n return $this;\n }", "public function jobs(): JobsRequestBuilder {\n return new JobsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function batch()\n {\n $this->is_batch = true;\n $this->batch = array();\n return $this;\n }", "public function run()\n {\n $position = new JobPosition([\n 'company_id' => 1,\n 'name' => 'Front end developer',\n 'description' => 'Cool job description',\n 'seniority' => 'Junior',\n 'hash_url' => substr(md5(1), 0, 12)\n ]);\n\n $position->save();\n }", "public function run()\n {\n Job::truncate();\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 20; $i++) {\n Job::create([\n 'employer_id' => $faker->randomDigit,\n 'category_id' => $faker->randomDigit,\n 'position' => $faker->word,\n 'location' => $faker->city,\n 'description' => $faker->text($maxNbChars = 300),\n 'salary_start' => $faker->numberBetween($min = 1000, $max = 2000),\n 'salary_end' => $faker->numberBetween($min = 3000, $max = 10000),\n 'min_experience' => $faker->numberBetween($min = 1, $max = 8),\n 'required_skills' => $faker->text($maxNbChars = 300),\n 'nice_to_have_skills' => $faker->text($maxNbChars = 300),\n 'expires_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "public function setJobs($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Talent\\V4beta1\\Job::class);\n $this->jobs = $arr;\n\n return $this;\n }", "public function run()\n {\n factory(Job::class)->create([\n 'position' => 'Software Engineer',\n 'description' => 'Create, maintain, audit and improve systems to meet particular needs, often as advised by a systems analyst or architect, testing both hard and software systems to diagnose and resolve system faults.',\n 'is_fulltime' => true,\n 'company_id' => 1,\n ]);\n\n factory(Job::class)->create([\n 'position' => 'Database Manager',\n 'description' => 'Maintains database results by setting and enforcing standards and controls. Prepares for database expansion by studying plans and requirements; advising senior technical management; coordinating design and programming.',\n 'is_fulltime' => false,\n 'company_id' => 2,\n ]);\n\n factory(Job::class)->states('deleted')->create([\n 'position' => 'DevOps',\n 'description' => 'DevOps is a series of practices and processes that are intended to speed up and automate aspects of the processes of developing, testing and releasing software, allowing for the continuous delivery of software and software updates.',\n 'is_fulltime' => true,\n 'company_id' => 4,\n ]);\n\n\n $companies = Company::all();\n\n foreach($companies as $company) {\n $job_count = 10 - intval( sqrt(rand(0, 10*10)) );\n\n $company->jobs()->createMany(\n factory(Job::class, $job_count)->states('random')->make()->toArray(),\n );\n }\n }", "public function testBatch()\n {\n $client = new Client();\n $this->assertInstanceOf(\n 'Idio\\Api\\Batch',\n $client->batch(array()),\n \"Expecting a Idio\\Api\\Batch object to be returned\"\n );\n }", "private static function create_cron_jobs()\n {\n }", "public function create(MlModelPrediction $prediction, $file, $mime)\n {\n $state = $prediction->model->getCurrentState();\n\n $params['params'] = $state->params;\n $params['mime_type'] = $mime;\n $params['file_path'] = $file;\n\n return $this->mlModelPredictionRepository->create($params);\n }", "public static function createNewRun($arrParams)\n {\n $objRun = new RunModel();\n $objRun = RunModel::createNewRun($objRun, $arrParams);\n\n if ($objRun->error) {\n $objRun = (object)null;\n $objRun->title = sprintf($GLOBALS['TL_LANG']['tl_convertx_job']['jobTitle'], $arrParams['job'], '');\n $objRun->error = $GLOBALS['TL_LANG']['tl_convertx_job']['noParentData'];\n }\n\n return $objRun;\n }" ]
[ "0.65339065", "0.6052965", "0.55761164", "0.5454842", "0.5451175", "0.5440572", "0.5424403", "0.5260914", "0.52393943", "0.5183495", "0.51737964", "0.5143152", "0.5126253", "0.5042985", "0.50293237", "0.49831697", "0.4966023", "0.49621236", "0.49249142", "0.49176604", "0.49155232", "0.49122533", "0.48634806", "0.48626816", "0.48594475", "0.48497605", "0.48328835", "0.48055932", "0.47824728", "0.47640353", "0.47500795", "0.47128966", "0.47067207", "0.4699848", "0.4693323", "0.4677178", "0.4629735", "0.46290693", "0.46260965", "0.46064618", "0.45905927", "0.45807883", "0.45685172", "0.45663896", "0.45589373", "0.45573282", "0.45458558", "0.4544687", "0.45414904", "0.45079443", "0.45062426", "0.44997934", "0.44874322", "0.44869396", "0.44738933", "0.44713405", "0.44565034", "0.44559953", "0.4455922", "0.44197845", "0.44094557", "0.44048148", "0.43975636", "0.43920168", "0.43894747", "0.43861166", "0.43828478", "0.43777865", "0.43608332", "0.4357972", "0.43106264", "0.42987412", "0.42925826", "0.42901012", "0.4287936", "0.42831004", "0.42726752", "0.42682555", "0.42639044", "0.4260082", "0.42540267", "0.4237891", "0.42363453", "0.42342976", "0.42342952", "0.42294055", "0.42231938", "0.42221695", "0.4219538", "0.4219538", "0.4219506", "0.4215341", "0.42144173", "0.42115322", "0.42083958", "0.4198336", "0.41979975", "0.4197913", "0.41936365", "0.4192922" ]
0.72695357
0
Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
Удаляет BatchPredictionJob. Может быть вызван только для завершенных заданий.
public function DeleteBatchPredictionJob(\Google\Cloud\AIPlatform\V1\DeleteBatchPredictionJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/DeleteBatchPredictionJob', $argument, ['\Google\LongRunning\Operation', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n $this->job->delete();\n }", "public function delete(Job $job): void;", "public function delete(string $batchId);", "public function delete()\n {\n $this->clearAllJobs();\n parent::delete();\n }", "public function destroy($batch_id)\n {\n $farmerBatch = FarmerBatch::findOrFail($batch_id);\n $farmerBatchDelete = $farmerBatch->delete();\n\n if($farmerBatchDelete){\n Toastr::success('Farmer Batch Deleted Successfully', 'Success');\n return redirect()->back();\n }\n abort(404);\n }", "public function destroy(job $job)\n {\n //\n }", "public function BatchDeleteJobs(\\Google\\Cloud\\Talent\\V4\\BatchDeleteJobsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/BatchDeleteJobs',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function destroy(Job $job)\n {\n //\n }", "public function batchFinish($batchId)\n {\n // for increased compatability for models that expect an ajax request.\n Mage::app()->getRequest()->setParam('id',$batchId);\n if ($batchId) {\n $batchModel = Mage::getModel('dataflow/batch')->load($batchId);\n /* @var $batchModel Mage_Dataflow_Model_Batch */\n\n if ($batchModel->getId()) {\n $result = array();\n try {\n $batchModel->beforeFinish();\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n $result['error'] = Mage::helper('adminhtml')->__('An error occurred while finishing process. Please refresh the cache');\n }\n $batchModel->delete();\n echo Mage::helper('core')->jsonEncode($result);\n }\n }\n }", "public function deleted(Job $job)\n {\n //\n }", "public function destroy(Request $request)\n {\n \n $delete_batch = Batch::findOrfail($request->batch_id);\n $delete_batch->delete();\n\n Flash::success('Batch deleted successfully.');\n\n return redirect(route('batches.index'));\n }", "public function destroy ($id)\n {\n Job::find($id)->delete();\n\n }", "protected function finishJob()\n {\n // remove job file\n $file = $this->app['utils']->sanitizePath(\n sprintf('%s/temp/jobs/autosync_job_%s', SYNCDATA_PATH, SYNCDATA_JOBID)\n );\n unlink($file);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_PROGRESS\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_ERROR\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_FINISHED\"]);\n #unset($_SESSION[\"JOB_\".SYNCDATA_JOBID.\"_ERRORCOUNT\"]);\n }", "public function DeleteJob(\\Google\\Cloud\\Talent\\V4\\DeleteJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/DeleteJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function deleteJob()\n { \n\t\tDB::table('inventories')->where('job_id', Input::get('id'))->delete();\n\t\tJob::find(Input::get('id'))->delete();\n\t\treturn Response::json(array('status' => 'deleted'),200);\n \n }", "public function deleted(Job $job)\n {\n Cache::forget('pause_'.$job->queue.'_queue');\n }", "public function deleteAction() {\n $objTranslate = Zend_Registry::get(PS_App_Zend_Translate);\n $objError = new Zend_Session_Namespace(PS_App_Error); \n $objSess = new Zend_Session_Namespace(PS_App_Auth);\n $objRequest = $this->getRequest();\n \n $objModel = new Models_Job(); \t\n $objModel_bid = new Models_Bid();\n\t\t$objModel_contractor = new Models_Contract();\n \n\t\t$objModel_contractor->deleteDatabyColumn ($objRequest->id);\n\t\t$objModel_bid->deleteDatabyColumn($objRequest->id);\n $objModel->deleteData ($objRequest->id);\n\t\t\n $objError->message = $objTranslate->translate('job deleted!');\n $objError->messageType = 'success';\n $this->_redirect(\"/employer/job/index\");\n \n exit;\n }", "public function DeleteJob(\\Google\\Cloud\\Dataproc\\V1\\DeleteJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataproc.v1.JobController/DeleteJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function destroy(JobTraining $jobTraining)\n {\n $jobTraining = JobTraining::findOrFail($jobTraining->id);\n $jobTraining->delete();\n return response()->json(null, 204);\n }", "public function deleting(Job $job)\n {\n if($job->status == 'processing'){\n return false;\n }\n }", "public function DeleteJob_Process($id)\n\t{\t\n\t\t$this->db->where('JobID', $id);\n\t\t$this->db->delete('jobs');\n\t\tredirect('Dashboard/jobList','refresh');\n\t}", "public function destroy(Batch $batch)\n {\n try {\n $batch->delete();\n return resOk();\n } catch (Exception $e) {\n return resError();\n }\n }", "public function batchdelete(Request $request)\n {\n /**\n * M.Mahdavi Kia\n */\n $batch_array = explode(',',$request['batchDelete']);\n foreach($batch_array as $key => $value)\n if(empty($value))\n unset($batch_array[$key]);\n\n JobProfessionalMerites::destroy($batch_array);\n\n return redirect()->route('professionalMerites.index')\n ->with('flash_message',\n 'عملیات با موفقیت انجام شد');\n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function destroy(Batch $batch)\n {\n $batch->delete();\n return response([ 'data' => null ], Response::HTTP_NO_CONTENT);\n }", "public function destroy(Job $job)\n {\n return response(['success' => $job->delete()]);\n }", "public function destroy($id)\n {\n return $this->job_search->destroy($id);\n }", "public function deleted(Job $job)\n {\n Cache::tags('jobs')->forget('jobs.'.$job->id);\n if($job->status == 'available' && Cache::tags('queue')->has('queue.size')){\n Cache::tags('queue')->decrement('queue.size', 1);\n }\n }", "public function execute()\n {\n $collection = $this->filter->getCollection($this->collectionFactory->create());\n $jobsCount = 0;\n\n /** @var \\BinaryAnvil\\JobManager\\Api\\Data\\JobInterface $job */\n foreach ($collection->getItems() as $job) {\n try {\n $job->delete();\n $jobsCount++;\n\n $this->jobHelper->log->success(\n __($this->jobDeleteSuccess, ['type' => $job->getType(), 'id' => $job->getId()])\n );\n } catch (\\Exception $e) {\n $this->messageManager->addErrorMessage(\n __($this->jobDeleteFailed)\n );\n\n $this->jobHelper->log->critical(\n __($this->jobDeleteFailed)\n );\n\n $this->jobHelper->log->critical($e);\n }\n }\n\n if ($jobsCount) {\n $this->messageManager->addSuccessMessage(\n __($this->jobsDeleteCount, ['count' => $jobsCount])\n );\n }\n\n return $this->resultFactory->create(ResultFactory::TYPE_REDIRECT)->setPath('binaryanvil_jobmanager/*/');\n }", "public function destroy(JobPostActivity $jobPostActivity)\n {\n //\n }", "public function delete($id)\n {\n $this->db->where('id',$id);\n return $this->db->delete('prediction');\n }", "public function deleteJob(Request $request) {\n \t\n \t// Logging entering method\n \t$this->logger->info(\"======> Entering JobController.deleteJob()\");\n \t\n \ttry {\n \t\t// Get the variable within $request passed in through the form\n \t\t$jobId = $request->input('jobId');\n \t\t\n \t\t// Call delete method in JobBusinessService\n \t\t$this->jobService->delete($jobId);\n \t\t\n \t\t// Logging leaving method\n \t\t$this->logger->info(\"======> Leaving JobController.deleteJob() successfully\");\n \t\t\n \t\t// Redirect to the /profile route\n \t\treturn redirect()->route('profile');\n \t}\n \t// An error occurred\n \tcatch(Exception $e) {\n \t\t// Logging with an error\n \t\t$this->logger->error(\"*** Error: JobController.deleteJob()\", array(\"message\" => $e->getMessage()));\n \t\treturn view('error');\n \t}\n }", "public function postDeleteBatch(Request $request)\n {\n $student = \\App\\Models\\Student::with('batch')->findOrFail((int)$request->get('id'));\n\n //Verify User Access\n $this->verifyAccess((int)$student->id);\n\n $batch = \\App\\Models\\Batch::findOrFail((int)$request->get('batch_id'));\n\n $batchIds = $student->batch->map(function($row) {\n return $row->id;\n });\n\n //Check if student is not in the batch\n if(!in_array($batch->id, $batchIds->toArray())) {\n return redirect()->back()->withErrors(\"Batch with ID: {$batch->id} is not linked to student.\");\n }\n\n //DB: Remove batch from student\n $student->batch()->detach($batch->id);\n $student->touch();\n\n return redirect()->back()->with([\n 'messages' => \"Batch with ID: {$batch->id} was successfully unlinked from student\"\n ]);\n }", "public function destroy($id)\n {\n Jobdesc::find($id)->delete($id);\n }", "public function destroy($id)\n {\n $job = JobCategory::findOrFail($id);\n return $job->delete();\n }", "function deleteJob(Job $job){\n Log::info(\"Entering JobDataService::deleteJob()\");\n try{\n // Delete job with passing id \n $statement = $this->connection->prepare(\"DELETE FROM JOB WHERE ID = :id\");\n \n // if the statement goes wrong return error message\n if(!$statement){\n echo \"Something wrong in the binding process.sql error?\";\n exit;\n }\n \n $id = $job->getId();\n \n //bindParam properties\n $statement->bindParam(':id', $id, PDO::PARAM_INT) ;\n $statement->execute();\n \n if($statement->rowCount() > 0){\n \n Log::info(\"Exit JobDataService.deleteJob with true\");\n return true;\n \n }else{\n Log::info(\"Exit JobDataService.deleJob with false\");\n return false;\n }\n }catch(PDOException $e)\n {\n // catch exception and throw DatabaseException\n Log::error(\"Exception: \", array(\"message \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \". $e->getMessage(), 0, $e);\n }\n }", "public function destroy(job $job)\n {\n \n $job->delete();\n \n return redirect('/jobs-all')->with('success','Job Deleted');\n }", "public static function customer_delete_job($mysqli, $job_id) \r\n {\r\n // session_start();\r\n $sql = \"DELETE FROM jobs WHERE id = $job_id\";\r\n $result = $mysqli->query($sql) or die($mysqli->error);\r\n \r\n \r\n\r\n }", "public function destroy(Favsjob $favsjob)\n {\n //\n }", "public function delete(Request $request, $id)\n {\n $job = Job::findOrFail($id);\n $job->delete();\n\n return response()->json(null, 204);\n }", "public function deleteHistoricBatch(?string $id): void;", "public function destroy($id)\n\t{\n $job = Job::find($id);\n\t\t$job->delete();\n exec('rm results/' . $id . '.txt');\n exec('rm variables/' . $id . '.txt');\n return redirect('jobs');\n\t}", "public function destroy($id)\n {\n return $this->failedJobRepository->deleteFailedJob($id);\n }", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "public function forceDeleted(Job $job)\n {\n //\n }", "public function forceDeleted(Job $job)\n {\n //\n }", "function delete_job($job_id)\n {\n $data=array(\n 'Status'=>'3'\n );\n $this->db->update(TABLE_JOBS,$data,array('Id'=>$job_id));\n }", "public function deleteJobApplication($jobID){\n $this->db->where('JobID',$jobID);\n $data = array(\n 'JobStatus' => 'deleted',\n 'Checked' => 'true',\n );\n $this->db->set('UpdateDate', $this->db->escape(date('Y-m-d H:i:s')), FALSE);\n $this->db->update('Job',$data);\n }", "public function cancel(string $batchId);", "public function destroy(JobPost $jobPost)\n {\n //\n }", "public function destroy($id)\n {\n $batch = Studentbatch::find($id);\n\n\n $batch->delete();\n\n Session::flash('danger', 'batch is deleted');\n return Redirect::back();\n }", "public function destroy($id)\n {\n $job = BusinessJob::find($id);\n if ($job){\n $job->delete();\n return redirect()->back()->with(\"success\",__('general.successDeleted'));\n }\n }", "public function destroy(Job $job, JobSkill $jobSkill)\n {\n if ($job->skills->count() == 1) {\n return response()->json([\n 'message' => 'Job must have at least one skill.'\n ], 403);\n }\n\n $jobSkill->delete();\n\n return response()->json(null, 204);\n }", "public function deleteJob($jobId)\n {\n $sql = \"DELETE FROM work.jobs WHERE jobs.id = :job_id\";\n $query = $this->db->prepare($sql);\n $query->execute([':job_id' => $jobId]);\n }", "public function destroy($id)\n {\n $jobDetails = JobDetails::findOrFail($id);\n $jobDetails->delete();\n echo 1;exit;\n }", "public function destroy($id)\n {\n $delete = Job::where('id_job',$id)->delete();\n if($delete){\n return response()->json([\n 'success'=>true\n ]);\n }\n return response()->json([\n 'success'=>false\n ]);\n }", "public function destroy($id)\n {\n $job = Job::find($id);\n $job->tags()->detach();\n\n $job -> delete();\n\n Session::flash('succes','A post sikeresen törölve.');\n return redirect()->route('jobs.index');\n }", "public function destroy($id)\n {\n return JobTitle::destroy($id);\n }", "public function destroy(Job $job)\n {\n //\n\t\t$job->delete();\n\t\tSession::flash('flash_message','Data kelas berhasil didelete.');\n\t\tSession::flash('penting',true);\n\t\t$job_list = Auth::user();\n\t\t$jobCount = Job::all()->count();\n\t\treturn redirect ('job/manage');\n }", "public function delete($id)\n {\n $job = $this->job->find($id);\n if (!$job) {\n abort(404);\n }\n $job->delete();\n \n return response('Deleted Successfully', 204);\n }", "public function destroy(Job $job) {\n $job->delete();\n\n return redirect('job')->with('success', 'Selected job has been deleted. ');\n }", "public function destroy($id)\n {\n $job = Job::findOrFail($id);\n $job->delete();\n return redirect()->action('JobsController@index');\n }", "public function destroy($id)\n {\n if(Job::find($id)->delete()){\n return response()->json([\"success\"=>true]);\n }else{\n return response()->json([\"success\"=>false]);\n }\n }", "public function deleteJob($job_id)\n {\n $job = PartnerJob::model($this->scenario)\n ->byPartnerSystem($this->partnerSystem->id)\n ->byJobId($job_id)\n ->find();\n if ($job instanceof PartnerJob)\n {\n $job->markDeleted();\n return true;\n }\n else\n return false;\n }", "public function destroy (Job $job)\n {\n $job->delete();\n return redirect()->action([JobsController::class, 'index']);\n\n }", "public function deleteJob($id)\n {\n // Kollar om ett jobb med detta id finns\n $sql = \"SELECT * FROM Jobs WHERE id='$id';\";\n $result = $this->db->query($sql);\n\n // Om jobb finns, radera. Returnera false om jobbet inte finns\n if (mysqli_num_rows($result)) {\n $sql = \"DELETE FROM Jobs WHERE id=$id;\";\n $result = $this->db->query($sql);\n return $result;\n } else {\n return false;\n }\n }", "public function deleteJob(Request $request)\n {\n try {\n $this->logger->info(\"Entering JobController.deleteJob()\");\n //takes information from the user\n $id = $request->input('ID');\n \n //calls the job business service\n $service = new JobBusinessService();\n \n //sends the job id to the delete method in the business service\n $success = $service->deleteJobs($id);\n \n //if it fails or succeeds return to the manage jobs\n if($success)\n {\n $this->logger->info(\"Exiting JobController.deleteJob() with success\");\n return redirect(\"/managejob\");\n }\n else\n {\n $this->logger->info(\"Exiting JobController.deleteJob() with failure\");\n return redirect(\"/managejob\");\n }\n }\n catch (Exception $e){\n //Best practice: catch all exceptions, log the exception, and display the common error page (or use global exception handling\n //log the exception and display exception view\n $this->logger->error(\"Exception: \", array(\"message\" => $e->getMessage()));\n $data = ['errorMSG' => $e->getMessage()];\n return view('exception')->with($data);\n \n }\n }", "public function delete_job($id)\n {\n\n $this->mysqli = $this->connect_mysql_if_closed();\n if (!$result = $this->mysqli->query(\"DELETE FROM pending_jobs WHERE id = $id\")) {\n die(__METHOD__ . \" failed\");\n }\n return true;\n }", "public function destroy(JobOrder $jobOrder)\n {\n //\n }", "function deleteJob($job = null) {\n $jobsDeleted = 0;\n if (!is_null($job)) {\n $data = array();\n $oldJobs = explode(\"\\n\", $this->listJobs()); // get the old jobs\n if (is_array($oldJobs)) {\n foreach ($oldJobs as $oldJob) {\n if ($oldJob != '') {\n if (!preg_match('/' . $job . '/', $oldJob)) {\n $newJob = new CronEntry($oldJob, $this);\n $newJob->lineComment = '';\n $data[] = $newJob;\n } else {\n $jobsDeleted++;\n }\n }\n }\n }\n $this->jobs = $data;\n }\n return $jobsDeleted;\n }", "public function destroy($id)\n {\n $batch = Batch::findOrFail($id);\n\n if ($batch->delete()) {\n return response(new BatchCollection($batch), 200);\n } else {\n return response(new BatchCollection($batch), 500);\n }\n }", "public function delete(Job $job): bool\n {\n if (! $job->backendId()) {\n return false;\n }\n\n $entity = $this->model()->new([\n 'id' => $job->backendId(),\n ]);\n\n return $this->model()->delete($entity);\n }", "public function destroy($job_id)\n {\n $this->jobs->delete($job_id);\n\n Flash::success('Deleted.');\n\n return redirect()->route('admin.cron.index');\n }", "protected function tearDown()\n {\n // clear DB from separate connection, close to avoid connection limit and memory leak\n $batchJobManager = $this->getBatchJobManager();\n $batchJobManager->createQuery('DELETE AkeneoBatchBundle:JobInstance')->execute();\n $batchJobManager->createQuery('DELETE AkeneoBatchBundle:JobExecution')->execute();\n $batchJobManager->createQuery('DELETE AkeneoBatchBundle:StepExecution')->execute();\n\n parent::tearDown();\n }", "public function destroy($id)\n {\n $job=Job::find($id);\n $job->delete();\n return redirect()->route('cvLapas');\n }", "public function delete($id)\n\t{\n\t\t$job = Job::find($id);\n\t\tif(!$job)\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\t\t$job->delete();\n\n\t\treturn Redirect::route('jobs')->with('success', Lang::get('global.job_job_success'));\n\t}", "public function destroy(Job $job)\n {\n if($job->user_id == Auth::user()->id)\n {\n $job->delete();\n }\n return redirect()->route('jobs.index');\n }", "public function destroy(Request $request)\n {\n if (!isset($request->id) || empty($request->id))\n {\n return response()->json(['success' => false, 'message'=>['Data was not found']], 422);\n }\n\n $id = $request->id;\n $job = Job::find($id);\n\n if ($job == null )\n {\n return response()->json(['success' => false, 'message'=>['Data was not found']], 422);\n }\n\n $job->delete();\n return response()->json(['success' => true, 'message'=>'Job was deleted successfully'], 200);\n }", "public function delete()\n\t{\n\t\tif ( ! $this->_loaded)\n\t\t\tthrow new Kohana_Exception('Cannot delete :model model because it is not loaded.', array(':model' => $this->_object_name));\n\n\t\t// Deleting user jobs\n\t\tDB::delete('jobs')\n\t\t\t->where('user_id', '=', $this->id)\n\t\t\t->execute();\n\n\t\treturn parent::delete();\n\t}", "public function destroy($id)\n {\n $job = Job::findOrFail($id);\n\n unlink(public_path() . $job->photo->file);\n\n $job->delete();\n\n Session::flash('deleted_job', 'The job has been deleted');\n\n return redirect('/admin/jobs');\n }", "public static function batchDelete($batch) {\n foreach ( $batch as $id ) {\n lC_Backup_Admin::delete($id);\n }\n return true;\n }", "public function destroy(Jobtitle $jobtitle)\n {\n //\n }", "public function destroy($id)\n {\n $job = Job::find($id);\n $job ->job_status = 1;\n $job ->save();\n return redirect('employeer/job')->with('success','deleted'); \n }", "public function deleteJob($id)\n {\n $job = $this->getJobById($id);\n $job->subscription = 0;\n $job->save();\n $job->delete();\n return true;\n }", "public function destroy($id)\n {\n $job = Job::find($id);\n $job->delete();\n\n return redirect('/job');\n }", "protected function destroy($id){\n $job = Job::find($id);\n $job->delete();\n return redirect('jobs')->with('success','Job has been deleted');\n }", "public function destroy($id)\n {\n $saved_job = SaveJob::where('id', $id)->first();\n\n if (!$saved_job) {\n return response()->json([\n 'code' => ResponseStatusCode::NOT_FOUND,\n 'message' => 'Job not found',\n ], ResponseStatusCode::OK);\n }\n\n $saved_job->delete();\n\n return $this->responseJson([\n 'code' => ResponseStatusCode::OK,\n 'data' => [\n 'messages' => 'Delete saved job successful',\n 'saved_job_id' => $saved_job->id,\n ],\n ]);\n }", "public function deleteJobPost($id)\n {\n $jobpost = Jobpost::where('id', $id)->first();\n $image = $jobpost->photo;\n @unlink($image);\n $deletejobpost = Jobpost::where('id', $id)->delete();\n return response()->json($deletejobpost);\n }", "#[Route('delete', 'api/job/{job_id}/log')]\n public function delete($job_id)\n {\n JWTController::check(Job::getBuildKeyId((int) $job_id));\n\n $log = 'Log removed at '.date('c');\n\n Job::updateLog((int) $job_id, $log);\n\n $s3_json_file = \"logs/$job_id.json\";\n $s3_raw_file = \"logs/$job_id.txt\";\n \\Storage::put($s3_json_file, json_encode([\n 'message' => $log,\n ]));\n \\Storage::put($s3_raw_file, $log);\n\n return \\Response::make('', 204);\n }", "public function delete(ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(BatchTableMap::DATABASE_NAME);\n }\n\n $criteria = $this;\n\n // Set the correct dbName\n $criteria->setDbName(BatchTableMap::DATABASE_NAME);\n\n // use transaction because $criteria could contain info\n // for more than one table or we could emulating ON DELETE CASCADE, etc.\n return $con->transaction(function () use ($con, $criteria) {\n $affectedRows = 0; // initialize var to track total num of affected rows\n\n BatchTableMap::removeInstanceFromPool($criteria);\n\n $affectedRows += ModelCriteria::delete($con);\n BatchTableMap::clearRelatedInstancePool();\n\n return $affectedRows;\n });\n }", "public function destroy(JobPost $jobPost)\n {\n $jobPost->delete();\n Session::flash('delete','Job Post Deleted');\n return redirect('admin/job-posts');\n }", "public function deleteAction($matrix_id, $training_id, $prediction_id)\n\t{\n\t\t$predictionService = $this->get('ichnaea_web_app_prediction.service');\n\t\t\n\t\t//Get all necessary data: users, owner, prediction\n\t\t$prediction = $predictionService->getPredictionMatrix($matrix_id, $training_id, $prediction_id);\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$owner = $prediction->getOwner();\n\t\n\t\t//requeriments: owner or superadmin can do that\n\t\tif ($user != $owner) {\n\t\t\tif (!in_array(\"ROLE_SUPER_ADMIN\", $user->getRoles()))\n\t\t\t\tthrow new AccessDeniedHttpException();\n\t\t}\n\t\t$predictionService = $predictionService->deletePrediction($matrix_id, $training_id, $prediction_id, $user->getId());\n\t\treturn $this->redirect($this->generateUrl('predictions_user'));\n\t}", "function removeJob($jobid) {\n $sql = 'DELETE FROM *PREFIX*aletsch_spool WHERE jobid=?';\n $args = array(\n $jobid\n );\n\n $query = \\OCP\\DB::prepare($sql);\n $query->execute($args);\n \n // Update local structure\n unset($this->operations[$jobid]);\n \n // Return last insterted ID\n return TRUE;\n }" ]
[ "0.6750561", "0.62216765", "0.61984074", "0.5851483", "0.5815578", "0.5784374", "0.5767931", "0.57359266", "0.57359266", "0.57359266", "0.57359266", "0.57359266", "0.57359266", "0.57359266", "0.57359266", "0.56880265", "0.568243", "0.5659933", "0.5641727", "0.56348455", "0.5599537", "0.55684704", "0.55649483", "0.5546303", "0.55147463", "0.5512955", "0.55009335", "0.5437348", "0.54358447", "0.5433748", "0.54326695", "0.54195726", "0.5379445", "0.5379216", "0.5375898", "0.53666127", "0.53660434", "0.5358561", "0.5345754", "0.5331952", "0.5286614", "0.5283726", "0.5271186", "0.52538556", "0.52492243", "0.52460235", "0.5207666", "0.5204747", "0.51943475", "0.51823884", "0.518161", "0.5176713", "0.5176713", "0.516855", "0.5153323", "0.5145606", "0.51402974", "0.5135957", "0.5126397", "0.5123925", "0.5103835", "0.51001567", "0.5088022", "0.50830203", "0.50720495", "0.50718814", "0.505486", "0.5048351", "0.50425255", "0.50397027", "0.50344193", "0.5029609", "0.50180453", "0.5011814", "0.50084805", "0.5002326", "0.5001681", "0.49949354", "0.49947843", "0.49916708", "0.49825475", "0.49779278", "0.49744445", "0.49736598", "0.497129", "0.49652356", "0.49603796", "0.49598503", "0.49523807", "0.49419278", "0.4938059", "0.49355495", "0.4930546", "0.4930433", "0.4928944", "0.49277785", "0.4925322", "0.49217185", "0.4909403", "0.49061167" ]
0.7341163
0
Cancels a BatchPredictionJob. Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.
Отменяет BatchPredictionJob. Начинает асинхронную отмену BatchPredictionJob. Сервер делает все возможное для отмены задания, но успех не гарантируется. Клиенты могут использовать [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] или другие методы, чтобы проверить, удалось ли отмена или задание завершилось, несмотря на отмену. При успешной отмене BatchPredictionJob не удаляется; вместо этого его [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] устанавливается в `CANCELLED`. Любой файл, уже выведенный заданием, не удаляется.
public function CancelBatchPredictionJob(\Google\Cloud\AIPlatform\V1\CancelBatchPredictionJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel(string $batchId);", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function DeleteBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\DeleteBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/DeleteBatchPredictionJob',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "public function CancelDataLabelingJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelDataLabelingJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelJob(string $id);", "public function CancelCustomJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelCustomJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelCustomJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelJob(int $jobid): Job;", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function cancelOperation()\n {\n echo \"Cancelling...\\n\";\n $this->cancelled = true;\n posix_kill($this->pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function cancelJob(Application $app, int $jobid)\n {\n $command = new CancelJobCommand($jobid);\n $command->execute();\n $job = $command->commandResponse();\n \n return $app->json($job, 202);\n }", "public function cancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\t$this->setStatus(self::STATUS_CANCELED)->save();\n\t\t$this->getSubscription()->deletePendingJobs();\n\t\t$this->getLogger()->info('The subscription was canceled.');\n\t}", "public function cancel_job($job_id, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobId'] = $job_id;\n\n\t\treturn $this->authenticate('CancelJob', $opt, $this->hostname);\n\t}", "public static function cancelPayoutBatch(string $payoutBatchId): bool\n {\n return (new self())->client->cancelPayoutBatch($payoutBatchId);\n }", "public function cancel($jobId)\n {\n $this->ProcessJobs->setStatus($jobId, ProcessJob::STATUS_CANCELED);\n \n /** @var \\App\\Model\\Entity\\ProcessJob $jobEntity */\n $jobEntity = $this->ProcessJobs->get($jobId);\n $event = new Event('Controller.ProcessJobs.statusChange', null, [\n 'userId' => $this->Auth->user('id'),\n 'itemId' => $jobEntity->item_id,\n 'eventType' => ProcessActivityLog::JOB_STATUS_CHANGE_CANCELED\n ]);\n $this->eventManager()->dispatch($event);\n \n $this->respond();\n }", "public function cancel($id)\r\n {\r\n $q = new Upload_queue($id);\r\n\r\n // Todo access rights\r\n \r\n if(!$q->id)\r\n {\r\n $this->alert->error('Record not found.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n if($q->state !== $q::STATE_PENDING)\r\n {\r\n $this->alert->error('Cannot cancel upload process. Process is not pending.');\r\n $this->redirect('upload/dataset');\r\n }\r\n\r\n $q->state = $q::STATE_CANCELED;\r\n $q->save();\r\n\r\n $this->alert->success('Job [ID: ' . $q->id . '] was canceled.');\r\n $this->redirect('upload/dataset');\r\n }", "public function cancel()\n {\n $this->cancelled = true;\n }", "public function cancel() {}", "public function cancel()\n\t{\n\t\t$this->status = self::CANCELLED;\n\t\t$this->save();\n\t\t$this->delete();\n\t}", "public function CancelNasJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelNasJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelNasJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function CancelHyperparameterTuningJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelHyperparameterTuningJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelJob($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.canceljob');\n\n $this->runCupsCommand('cancelJob', $params['jobid']);\n }", "public function cancelBatchOrdersAsync($cancel_order)\n {\n return $this->cancelBatchOrdersAsyncWithHttpInfo($cancel_order)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function cancel();", "public function cancel();", "public function cancel();", "public function cancel($jobId) {\n\t\t$this->job->delete($jobId);\n\t\tredirect('jobs');\n\t}", "public function cancel(): void\n {\n $this->canceled = true;\n }", "final public function Cancel()\n {\n TaskPump::Pump()->Cancel($this);\n }", "public function cancel(): void\n {\n $this->delete();\n }", "public function cancelar()\n {\n //Obtiene el estado cancelado\n $estatus = $this->m_evaluacion_estado->get_by_estado( 'CANCELADO' );\n \n //Recupera la evaluacion para actualizarla\n $evaluacion = $this->m_evaluacion->get_by_Candidato_id( $_POST['candidato_id'] );\n $evaluacion->EvaluacionEstado_id = $estatus->id;\n\n $this->m_evaluacion->update( $evaluacion, $evaluacion->id );\n \n }", "public function cancel($orderId)\n {\n $order = BatchOrder::owned()->findOrFail($orderId);\n $order->status = BatchOrder::CANCELLED_STATUS;\n $order->save();\n\n return new BatchOrderResource(BatchOrder::owned()->findOrFail($orderId));\n }", "public function testCancelJobById()\n {\n $id = 42;\n $jobHandler = new JobHandler('[access_token]');\n $jobHandler->restartJobById($id);\n $result = $jobHandler->cancelJobById($id);\n $this->assertTrue($result);\n }", "public function cancel()\n\t\t{\n\n\t\t}", "public function batchFinish($batchId)\n {\n // for increased compatability for models that expect an ajax request.\n Mage::app()->getRequest()->setParam('id',$batchId);\n if ($batchId) {\n $batchModel = Mage::getModel('dataflow/batch')->load($batchId);\n /* @var $batchModel Mage_Dataflow_Model_Batch */\n\n if ($batchModel->getId()) {\n $result = array();\n try {\n $batchModel->beforeFinish();\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n $result['error'] = Mage::helper('adminhtml')->__('An error occurred while finishing process. Please refresh the cache');\n }\n $batchModel->delete();\n echo Mage::helper('core')->jsonEncode($result);\n }\n }\n }", "public function cancelParcelAsync($command_id, $cancel_parcel_parameters, string $contentType = self::contentTypes['cancelParcel'][0])\n {\n return $this->cancelParcelAsyncWithHttpInfo($command_id, $cancel_parcel_parameters, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function cancel()\n {\n assert($this->hasId());\n $this->api->post(\"{$this}/cancel\");\n return $this->reload();\n }", "public function CreateBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CreateBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CreateBatchPredictionJob',\n $argument,\n ['\\Google\\Cloud\\AIPlatform\\V1\\BatchPredictionJob', 'decode'],\n $metadata, $options);\n }", "public function cancel_process()\n {\n }", "public function StopBatchOperation(\\Temporal\\Api\\Workflowservice\\V1\\StopBatchOperationRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/StopBatchOperation',\n $argument,\n ['\\Temporal\\Api\\Workflowservice\\V1\\StopBatchOperationResponse', 'decode'],\n $metadata, $options);\n }", "public function onCancel(WorkflowActivityRuntimeContext $context) {\n\t\t// override\n\t}", "public function cancel()\n {\n }", "public function BatchDeleteJobs(\\Google\\Cloud\\Talent\\V4\\BatchDeleteJobsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/BatchDeleteJobs',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "public function cancelBatchOrders($cancel_order)\n {\n list($response) = $this->cancelBatchOrdersWithHttpInfo($cancel_order);\n return $response;\n }", "protected function cancelBatchOrdersRequest($cancel_order)\n {\n // verify the required parameter 'cancel_order' is set\n if ($cancel_order === null || (is_array($cancel_order) && count($cancel_order) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $cancel_order when calling cancelBatchOrders'\n );\n }\n\n $resourcePath = '/spot/cancel_batch_orders';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // body params\n $_tempBody = null;\n if (isset($cancel_order)) {\n $_tempBody = $cancel_order;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Gate APIv4 authentication\n $signHeaders = $this->config->buildSignHeaders('POST', $resourcePath, $queryParams, $httpBody);\n $headers = array_merge($headers, $signHeaders);\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function cancelTask()\n\t{\n\t\tif ($this->_task == 'cancel')\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t\t$category = Category::one($id);\n\t\t\t$categoryCheckedOut = $category instanceof Category ? $category->get('checked_out') : 0;\n\n\t\t\tif ($category && User::get('id') == $categoryCheckedOut)\n\t\t\t{\n\t\t\t\t$category->set('checked_out', 0);\n\t\t\t\t$category->set('checked_out_time', null);\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t$extension = Request::getCmd('extension');\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . ($this->_controller ? '&controller=' . $this->_controller : '') . '&extension=' . $extension, false)\n\t\t);\n\t}", "public function cancel() {\n\n $transid = required_param('transid', PARAM_RAW);\n\n $afullbill = Bill::get_by_transaction($transid);\n $afullbill->onlinetransactionid = $transid;\n $afullbill->paymode = 'paypal';\n $afullbill->status = SHOP_BILL_CANCELLED;\n $afullbill->save(true);\n shop_trace('Paypal Interactive Cancellation');\n\n // Do not cancel shopping cart. User may need another payment method.\n\n $params = array('view' => 'shop', 'shopid' => $this->theshop->id);\n redirect(new moodle_url('/local/shop/front/view.php', $params));\n }", "public function cancelServiceJobByServiceJobIdRequest($serviceJobId, $cancellationReasonCode)\n {\n // verify the required parameter 'serviceJobId' is set\n if ($serviceJobId === null || (is_array($serviceJobId) && count($serviceJobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serviceJobId when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($serviceJobId) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($serviceJobId) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'cancellationReasonCode' is set\n if ($cancellationReasonCode === null || (is_array($cancellationReasonCode) && count($cancellationReasonCode) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $cancellationReasonCode when calling cancelServiceJobByServiceJobId'\n );\n }\n if (strlen($cancellationReasonCode) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($cancellationReasonCode) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$cancellationReasonCode\" when calling ServiceApi.cancelServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n if (!preg_match(\"/^[A-Z0-9_]*$/\", $cancellationReasonCode)) {\n throw new \\InvalidArgumentException(\"invalid value for \\\"cancellationReasonCode\\\" when calling ServiceApi.cancelServiceJobByServiceJobId, must conform to the pattern /^[A-Z0-9_]*$/.\");\n }\n\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($cancellationReasonCode)) {\n $cancellationReasonCode = ObjectSerializer::serializeCollection($cancellationReasonCode, '', true);\n }\n if ($cancellationReasonCode !== null) {\n $queryParams['cancellationReasonCode'] = $cancellationReasonCode;\n }\n\n\n // path params\n if ($serviceJobId !== null) {\n $resourcePath = str_replace(\n '{' . 'serviceJobId' . '}',\n ObjectSerializer::toPathValue($serviceJobId),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function cancelBatchOrders($params)\n {\n return $this->httpPostJson('/api/v4/spot/cancel_batch_orders', $params, [], 'SIGN');\n }", "public function cancelComplaint(Request $request)\n {\n $complaint = Complaint::where('id', $request->input('complaintId'))->firstOrFail();\n\n if ($complaint->type == 'claim') {\n $complaint->status = 'cancelled';\n } else {\n $complaint->status = 'stopping';\n }\n $complaint->cancellation_reason = $request->input('cancellation_reason');\n\n\n $complaint->save();\n\n Event::fire(new ComplaintSaveEvent($complaint, $complaint->organization));\n\n return redirect()->back();\n\n }", "public function cancelAction()\n {\n /** @var Oyst_OneClick_Helper_Data $oystHelper */\n $oystHelper = Mage::helper('oyst_oneclick');\n\n $checkoutSession = Mage::getSingleton('checkout/session');\n if (! $checkoutSession->getLastSuccessQuoteId()) {\n $this->_redirect('checkout/cart');\n\n return;\n }\n\n $lastQuoteId = $checkoutSession->getLastQuoteId();\n $lastOrderId = $checkoutSession->getLastOrderId();\n if ($lastOrderId) {\n Mage::getSingleton('core/session')->addError(\n $oystHelper->__(\"Order %s cancelled\", $lastOrderId)\n );\n $orderModel = Mage::getModel('sales/order')->load($lastOrderId);\n\n if ($lastQuoteId && $orderModel->canCancel()) {\n $quote = Mage::getModel('sales/quote')->load($lastQuoteId);\n $quote->setIsActive(true)->save();\n\n $orderModel->cancel();\n $orderModel->setStatus('canceled');\n $orderModel->save();\n\n $this->_redirect('checkout/cart', array('_secure' => true));\n\n return;\n }\n }\n\n $oystHelper->log('Order Cancel Error');\n $this->_redirect('checkout/cart', array('_secure' => true));\n }", "public function stop(JobInterface $job);", "public function delete(string $batchId);", "function cancelSession()\n\t{\n\t\tsession()->forget('jobId');\n\t\treturn [\n\t\t\t'message'=>'Job application session cancelled',\n\t\t\t'error'=>false,\n\t\t\t'data'=>null\n\t\t];\n\t}", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancelAction()\n {\n $event = Mage::getModel('pagbrasil/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPagbrasilQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "function abortJobAction($jobId, $jobType)\r\n\t{\r\n\t\t$dbJobType = kPluginableEnumsManager::apiToCore('BatchJobType', $jobType);\r\n\t\tkJobsManager::abortJob($jobId, $dbJobType);\r\n\t\treturn $this->getStatusAction($jobId, $jobType);\r\n\t}", "protected function cancelServiceJobByServiceJobIdRequest($service_job_id, $cancellation_reason_code)\n {\n // verify the required parameter 'service_job_id' is set\n if (null === $service_job_id || (is_array($service_job_id) && 0 === count($service_job_id))) {\n throw new \\InvalidArgumentException('Missing the required parameter $service_job_id when calling cancelServiceJobByServiceJobId');\n }\n // verify the required parameter 'cancellation_reason_code' is set\n if (null === $cancellation_reason_code || (is_array($cancellation_reason_code) && 0 === count($cancellation_reason_code))) {\n throw new \\InvalidArgumentException('Missing the required parameter $cancellation_reason_code when calling cancelServiceJobByServiceJobId');\n }\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/cancellations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (null !== $cancellation_reason_code) {\n $queryParams['cancellationReasonCode'] = ObjectSerializer::toQueryValue($cancellation_reason_code);\n }\n\n // path params\n if (null !== $service_job_id) {\n $resourcePath = str_replace(\n '{'.'serviceJobId'.'}',\n ObjectSerializer::toPathValue($service_job_id),\n $resourcePath\n );\n }\n\n return $this->generateRequest($multipart, $formParams, $queryParams, $resourcePath, $headerParams, 'PUT', $httpBody);\n }", "public function cancel($hook, $args = array(), $group = '');", "public function requestcancel()\n\t{\n\t\t$app\t=\tJFactory::getApplication();\n\n\t\t// Getting target id and user id.\n\t\t$user\t=\t$app->input->get('user_id', 0, 'INT');\n\t\t$target\t=\t$app->input->get('target_id', 0, 'INT');\n\n\t\t// Loading friend model for getting id\n\t\t$friendmodel\t=\tFD::model('Friends');\n\t\t$state\t\t\t=\tSOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t$status\t\t\t=\t$friendmodel->isFriends($user, $target, $state);\n\n\t\t$res = new stdClass;\n\n\t\tif (!$status)\n\t\t{\n\t\t\t/* final call to Cancel friend request.\n\t\t\t* $final = $friend->reject();\n\t\t\t*/\n\n\t\t\t$final\t=\tES::friends($target, $user)->cancel();\n\t\t\t$res->result->status = 1;\n\t\t\t$this->plugin->setResponse($res);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->result->status = 0;\n\t\t}\n\n\t\t$this->plugin->setResponse($res);\n\t}", "public function cancel($id);", "public function cancel($id);", "protected function cancelOrder()\n {\n $order = $this->createOrderFromQuote();\n if(\n $order instanceof \\Magento\\Sales\\Api\\Data\\OrderInterface &&\n $order->getEntityId() !== null\n ) {\n $this->orderManagement->cancel($order->getEntityId());\n $order->addCommentToStatusHistory($this->getErrorMessage())\n ->setIsCustomerNotified(false)\n ->setEntityName('invoice')\n ->save();\n $this->rollbackAllPartialPayments($order);\n }\n }", "public function cancel($hook, $args = array(), $group = '')\n {\n }", "public function cancel($sessionId)\n {\n\n $requestParams = array(\n 'sessionId' => $sessionId,\n );\n /** @noinspection PhpUndefinedMethodInspection */\n $response = $this->client->cancel($requestParams);\n\n if (isset($response->error) && null != $response->error) {\n throw new Exception('Error: ' . $response->error->error . \" - \" . $response->error->info);\n }\n\n }", "public function cancelCommit() {\n\n return $this->sendRPC(\"<cancel-commit/>\");\n\n }", "public function CancelOperation(\\Google\\Cloud\\Container\\V1beta1\\CancelOperationRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.container.v1beta1.ClusterManager/CancelOperation',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function processCancelRequest(){\n\t\tif ($this->checkWorkflow(self::STATUS_CANCELED) && $this->isCancelRequested()) {\n\t\t\t$this->getSubscription()->setCancelCount($this->getSubscription()->getCancelCount() + 1);\n\t\t\tif ($this->getSubscription()->getCancelCount() == $this->getSubscription()->getCancelPeriod()) {\n\t\t\t\t$this->cancel();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->save();\n\t\t\t}\n\t\t}\n\t}", "public function cancelDownload(ContextInterface $ctx, CancelDownloadRequest $request): void;", "public function cancel()\n {\n $this->processPostAction();\n }", "public function actionCancel($id)\n {\n $model = $this->findModel($id);\n if($model->create_by == Yii::$app->user->id){\n if(!($model->status < WorksystemTask::STATUS_WORKING))\n throw new NotAcceptableHttpException('该任务状态为'.$model->getStatusName ().'!');\n }else{\n throw new NotAcceptableHttpException('无权限操作!');\n }\n $post = Yii::$app->request->post();\n $_wsAction = WorksystemAction::getInstance();\n \n if ($model->load($post)) {\n $_wsAction->CancelTask($model, $post);\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_cancel', [\n 'model' => $model,\n ]);\n }\n }", "public function cancel(\\Exception $reason = null);", "public function cancelParcelAsyncWithHttpInfo($command_id, $cancel_parcel_parameters, string $contentType = self::contentTypes['cancelParcel'][0])\n {\n $returnType = '\\Phobetor\\Allegro\\Model\\CancelParcel201Response';\n $request = $this->cancelParcelRequest($command_id, $cancel_parcel_parameters, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function cancelled(): bool;", "public function cancel( string $hook, $args = [], string $group = '' ) {\n\t\treturn as_unschedule_action( $hook, $args, $group );\n\t}", "public function cancelRecord() {\n return $this->getClass()->declineRecord();\n }", "public function cancel()\n {\n if ($this->onGracePeriod()) {\n return $this;\n }\n \n return $this->cancelAt(true);\n }", "public function cancelCompanyDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingCompanyDeletion');\n }", "public function cancelScenario() {\n return $this->getClass()->declineScenario();\n }", "function abortBulkUploadAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::BULKUPLOAD);\r\n\t}", "public function cancel(Request $request)\n {\n $result = $this->service->cancel($request->id);\n\n if ($result) {\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('success', 'Successfully cancelled');\n }\n\n return redirect(config('cms.backend-route-prefix', 'cms').'/orders')->with('error', 'Failed to cancel');\n }", "public function cancel_large_file( $large_file_id ) {\n\t\t\t\n\t\t\t// /b2_cancel_large_file\n\n\t\t}", "public function cancel(): CancelRequestBuilder {\n return new CancelRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function cancel()\n\t{\n\t\t$GLOBALS['ilCtrl']->returnToParent($this);\n\t}", "public function cancelQuote(Opportunity $opportunity)\n {\n if (OpportunityStatus::PENDING_QUOTE !== $opportunity->getStatus()) {\n throw new \\BadMethodCallException('This quote was already cancelled.');\n }\n\n $em = $this->getEntityManager();\n\n $opportunity->setStatus(OpportunityStatus::CANCELLED_QUOTE);\n\n $em->flush($opportunity);\n\n return $opportunity;\n }", "public function cancelProduct(Request $request) {\n return count ( $this->cart->cancel_product ( $request ) );\n }", "public function cancelJobs($params, $context)\n {\n $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]);\n $this->validateMethodParams($params, 'rpc.cups.printername');\n\n $this->runCupsCommand('cancelAllJobs', $params['pname']);\n }", "function cancel($c = NULL) {\n\t\t\t// Error\n\t\t\t$error = NULL;\n\t\t\t// Common errors\n\t\t\tif($error_common = $this->errors(__FUNCTION__)) {\n\t\t\t\t$error = $error_common;\n\t\t\t}\n\t\t\t// No transaction ID\n\t\t\telse if(!$this->transaction) {\n\t\t\t\t$error = \"No transaction ID was passed that we could cancel.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Error\n\t\t\tif($error) {\n\t\t\t\t$results = array(\n\t\t\t\t\t'result' => 0,\n\t\t\t\t\t'message' => $error\n\t\t\t\t);\t\n\t\t\t}\n\t\t\t// Transaction\n\t\t\telse {\n\t\t\t\t// Process\n\t\t\t\t$results = $this->gateway->cancel($this,$c);\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $results;\n\t\t}", "public function cancelCbAction()\r\n {\r\n }", "public function cancelAction()\n {\n try {\n $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOPSQuoteId());\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n if (false == $this->_getOrder()->getId()) {\n $this->_order = null;\n $this->_getOrder($this->_getCheckout()->getLastQuoteId());\n }\n\n $this->getPaymentHelper()->refillCart($this->_getOrder());\n\n $redirect = 'checkout/cart';\n $this->redirectOpsRequest($redirect);\n\n }", "public function destroy(Batch $batch)\n {\n $batch->delete();\n return response([ 'data' => null ], Response::HTTP_NO_CONTENT);\n }", "function abortConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "public function testCancelParcel()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function abort($objRun, $error = false)\n {\n $arrTemplatevars = array();\n\n if ($objRun && $objRun->steps) {\n $arrTemplatevars['content'] = Tracking::showLog($objRun->id);\n\n $objRun->closed = '1';\n $objRun->end = time();\n $objRun->log = $arrTemplatevars['content'];\n\n $objRun->save();\n }\n\n $arrTemplatevars['abort'] = true;\n $arrTemplatevars['running'] = false;\n $arrTemplatevars['complete'] = false;\n $arrTemplatevars['title'] = $error[0];\n $arrTemplatevars['error'] = $error[1] ? $error[1] : $GLOBALS['TL_LANG']['tl_convertx_job']['aborted'];\n $arrTemplatevars['submit'] = $GLOBALS['TL_LANG']['tl_convertx_job']['end'];\n\n if (!$arrTemplatevars['title']) {\n $objJob = JobModel::findByPk($objRun->pid);\n $arrTemplatevars['title'] = sprintf('Job ID %s: %s', $objJob->id, $objJob->title);\n }\n\n return $arrTemplatevars;\n }", "public function DeleteJob(\\Google\\Cloud\\Talent\\V4\\DeleteJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/DeleteJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cancelService()\n {\n ServiceManager::instance()->cancelService($this);\n }", "function cancel() {\n\t\t$model = $this->getModel( $this->_sTaskModel, '', $this->_parameters );\n\t\t$model->resetFormFields();\n\t\t$link = $model->getReturnLink();\n\t\t$this->setRedirect($link);\n\t}", "public function cancel($cancellationEffectiveAt = null)\n {\n $this->paddle_status = Paddle::STATUS_CANCELLED;\n\n // If the user was on trial, we will set the grace period to end when the trial\n // would have ended. Otherwise, we'll retrieve the end of the billing period\n // period and make that the end of the grace period for this current user.\n if ($this->onTrial()) {\n $this->ends_at = $this->trial_ends_at;\n } else {\n $this->ends_at = $cancellationEffectiveAt ?? Carbon::now();\n }\n\n $this->save();\n\n return $this;\n }", "public function updateCanceledStatus($job_id, $job_canceled_count)\r\n {\r\n $job_id = strtolower($job_id);\r\n $exp = $this->DB->getExpression();\r\n\r\n $date = $exp->setDate(date('Y-m-d H:i:s'));\r\n $query = \" UPDATE \" . $this->jobs_table . \" SET\r\n JOB_STATUS = :JOB_STATUS,\r\n JOB_CANCELED_COUNT = :JOB_CANCELED_COUNT,\r\n JOB_CANCELED_AT = \" . $date->getFragment() .\r\n \" WHERE \r\n \" . $exp->getUuid(\"JOB_ID\") . \" = :JOB_ID \";\r\n $values = [\r\n ':JOB_STATUS' => 'Canceled',\r\n ':JOB_CANCELED_COUNT' => $job_canceled_count,\r\n ':JOB_ID' => $job_id\r\n ];\r\n $values = array_merge($values, $date->getValues());\r\n\r\n $this->DB->update($query, $values);\r\n }", "public function cancel($task) { }" ]
[ "0.72209096", "0.67732173", "0.63318807", "0.6320682", "0.6164839", "0.6150619", "0.6018299", "0.58497477", "0.581684", "0.5689756", "0.5643298", "0.5625561", "0.56121725", "0.5554514", "0.5534514", "0.55243146", "0.54579186", "0.54234934", "0.5421379", "0.54060245", "0.5371304", "0.53004694", "0.5239623", "0.52291185", "0.52291185", "0.52291185", "0.52076256", "0.5196415", "0.5180185", "0.51249266", "0.5102483", "0.5089288", "0.50695926", "0.50652075", "0.5050422", "0.5041066", "0.5040717", "0.50371176", "0.5023296", "0.50000095", "0.4989992", "0.49810064", "0.49791944", "0.4964179", "0.4957754", "0.49549344", "0.49521977", "0.49479133", "0.4942959", "0.49178398", "0.48897815", "0.48883095", "0.48785737", "0.48769423", "0.48736736", "0.48579535", "0.48560053", "0.48550463", "0.48540553", "0.48253876", "0.4818754", "0.4818754", "0.4805504", "0.48045045", "0.4804448", "0.48014006", "0.47816485", "0.47646195", "0.47562063", "0.47550124", "0.47520664", "0.47466984", "0.4744592", "0.47415027", "0.47288615", "0.47076207", "0.46832994", "0.46771213", "0.4672871", "0.46646756", "0.46526808", "0.46507055", "0.46409106", "0.46369132", "0.46348748", "0.463135", "0.46312144", "0.4621714", "0.4613568", "0.46066368", "0.45996553", "0.45987576", "0.45946336", "0.4587064", "0.45802033", "0.45796928", "0.4575083", "0.4566229", "0.45659548", "0.45655894" ]
0.7658616
0
Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.
Приостанавливает ModelDeploymentMonitoringJob. Если задание запущено, сервер делает все возможное, чтобы отменить задание. Установит [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] в 'PAUSED'.
public function PauseModelDeploymentMonitoringJob(\Google\Cloud\AIPlatform\V1\PauseModelDeploymentMonitoringJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/PauseModelDeploymentMonitoringJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ResumeModelDeploymentMonitoringJob(\\Google\\Cloud\\AIPlatform\\V1\\ResumeModelDeploymentMonitoringJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/ResumeModelDeploymentMonitoringJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function suspendJob(Job $job);", "public function setModelDeploymentMonitoringJob($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1beta1\\ModelDeploymentMonitoringJob::class);\n $this->model_deployment_monitoring_job = $var;\n\n return $this;\n }", "public function pause(): void\n {\n $this->acceptNewJobs = false;\n if ($this->grabsInFlight <= 0) {\n $this->getConnection()->pause();\n }\n }", "public function resumeJob(Job $job);", "public static function pause(): void {\n self::$status = AppStatusEnum::PAUSED();\n\n self::$logger->notice(\"Application paused.\");\n }", "protected function pauseWorker()\n {\n $this->sleep(1);\n\n $this->stopIfNecessary();\n }", "public function pause()\n {\n $this->_getResourceManager()->pause($this);\n }", "public function pauseTube($tube, $delay){\n\t\t$resp= $this->doCommand(\"pause-tube $tube $delay\");\n\t\tswitch($resp){\n\t\t\tcase \"PAUSED\":\n\t\t\t\tbreak;\n\t\t\tcase 'NOT_FOUND':\n\t\t\t\tthrow new BeanstalkNotFoundException(\"Tube $tube does not exist.\");\n\t\t\tdefault:\n\t\t\t\tthrow new BeanstalkProtocolException(\"Unexpected response: '\" + $resp + \"'\");\n\t\t}\n\t}", "public function pause( ) {\n\n $comando=$this->comandos1[DaoControl::$PAUSE];\n $this->enviarComando($comando);\n $this->setEstado(self::$PAUSE);\n $this->guardarEstado();\n\n }", "public function scopePaused(Builder $query): void\n {\n $query->where('status', self::STATUS_PAUSED);\n }", "public function pause()\n {\n $this->pause_time = $this->get_time();\n }", "public function getModelDeploymentMonitoringJob()\n {\n return isset($this->model_deployment_monitoring_job) ? $this->model_deployment_monitoring_job : null;\n }", "public function pause() {\n\t\tif (!$this->configured()) { return $this->workflow->toxml(); }\n\t\tif ( $this->client == 'web' ) { return \"Pausing the web player is unsupported.\"; }\n\n\t\t$url = $this->host.\"/system/players/\".$this->client.\"/playback/pause\";\n\t\t$this->workflow->request( $url );\n\t\treturn \"Plex paused.\";\n\t}", "public function pause()\r\n\t{\r\n $this->callApi('/v1/me/player/pause', 'PUT');\r\n }", "public function setPause($pause)\n {\n $this->pause = $pause;\n }", "protected function pauseTaskResultRequest($task_id, $job_id)\n {\n // verify the required parameter 'task_id' is set\n if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_id when calling pauseTaskResult'\n );\n }\n // verify the required parameter 'job_id' is set\n if ($job_id === null || (is_array($job_id) && count($job_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling pauseTaskResult'\n );\n }\n\n $resourcePath = '/tasks/{task_id}/action/pause';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($job_id)) {\n $job_id = ObjectSerializer::serializeCollection($job_id, '', true);\n }\n if ($job_id !== null) {\n $queryParams['job_id'] = $job_id;\n }\n\n\n // path params\n if ($task_id !== null) {\n $resourcePath = str_replace(\n '{' . 'task_id' . '}',\n ObjectSerializer::toPathValue($task_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'queued', 'working', 'failed']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'queued', 'working', 'failed'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function pauseExecution() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('pauseExecution', func_get_args()));\n }", "public function awaitPaused(ContextInterface $ctx): PausedEvent;", "public function scopePaused($query)\n {\n $query->where('razorpay_status', self::STATUS_PAUSED);\n }", "public function obligePauseWhenNotCurrent()\n {\n $last_entry = $this->getLastEntry();\n\n //process only when the task is not current and user has another current task\n if (!$this->is_current()) {\n \n if (!in_array($last_entry->entry_type,['pause','end'])) {\n $this->build_error('Please the last entry type of this task must be: pause or end');\n }\n }\n }", "public function pauseProject($id, Request $req) {\n try {\n return $this->api->pauseProject($id, $req->header('Authorization'));\n } catch (\\Exception $e) {\n // Error Response\n return response()->json([\n \"errors\" => $e->getMessage()\n ], 403);\n }\n }", "public function activePause(Request $request)\n {\n $queue = $request->user()->getActiveQueue();\n\n if (!$queue) {\n return $this->errorResponse('User has no active queue.');\n }\n\n if (!$queue->pause()) {\n return $this->errorResponse('Queue could not be paused.', 500);\n }\n\n return $this->successResponse('Queue has been paused successfully.');\n }", "public function scopePaused($query)\n {\n $query->where('paddle_status', Paddle::STATUS_PAUSED);\n }", "public function paused(): bool\n {\n return $this->status === self::STATUS_PAUSED;\n }", "function pause() {\n $this->paused = true;\n \n if($this->started && !$this->closed) {\n $this->driver->pauseStreamConsumption();\n }\n }", "public final function pause() { // {{{\n\t\tif (!$this->amIParent() || !$this->amIStarted) return false;\n\t\treturn posix_kill($this->childPid, SIGSTOP);\n\t}", "public function pauseBundle($bundleId, $xKillbillCreatedBy, $requestedDate = null, $pluginProperty = null, $xKillbillReason = null, $xKillbillComment = null)\n {\n $this->pauseBundleWithHttpInfo($bundleId, $xKillbillCreatedBy, $requestedDate, $pluginProperty, $xKillbillReason, $xKillbillComment);\n }", "public function pauseCampaign($key)\n {\n # Performing authentication\n $this->_app['auth.service']();\n\n # Getting providers\n $gateway = $this->getTableGateway();\n\n # Getting campaign\n $campaign = $gateway->getCampaignByKey($key,(int) $this->_app['credentials.service']->id);\n\n # Verifying result\n if ($campaign) {\n # Verifying if campaign already running\n if ($campaign->status == Campaign::STATUS_START) {\n # Changing status of campaign\n $this->changeStatusCampaign($key,Campaign::STATUS_PAUSE);\n\n return new Response(null,Response::HTTP_NO_CONTENT);\n } else {\n $response = array('success'=>0,'error'=>'Campaign must be started before pause');\n\n return new Response($response,Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n } else {\n $response = array('success'=>0,'error'=>'Campaign not found');\n\n return $this->_app->json($response,Response::HTTP_NOT_FOUND);\n }\n }", "public function containerPause($id)\n {\n $this->containerPauseWithHttpInfo($id);\n }", "public function setQualityUpdatesPaused($val)\n {\n $this->_propDict[\"qualityUpdatesPaused\"] = boolval($val);\n return $this;\n }", "public function CreateModelDeploymentMonitoringJob(\\Google\\Cloud\\AIPlatform\\V1\\CreateModelDeploymentMonitoringJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CreateModelDeploymentMonitoringJob',\n $argument,\n ['\\Google\\Cloud\\AIPlatform\\V1\\ModelDeploymentMonitoringJob', 'decode'],\n $metadata, $options);\n }", "public function pause(): OMXPlayer;", "public function deleted(Job $job)\n {\n Cache::forget('pause_'.$job->queue.'_queue');\n }", "public function noteUserAboutJobSkipping(PProjectJob $projectJob) {\n // Get user's full name\n $fullName = $this->getFullName();\n $projectId = (isset($projectJob->project) ? $projectJob->project->id : 'N/A');\n $projectName = (isset($projectJob->project) ? $projectJob->project->name : 'N/A');\n $targetLanguage = (isset($projectJob->targetLanguage) ? $projectJob->targetLanguage->name : 'N/A');\n\n $subject = $emailHandler->prepeate_subject(array(\n '[[[ProjectId]]]' => $projectId,\n '[[[ProjectName]]]' => $projectName,\n '[[[TargetLanguage]]]' => $targetLanguage\n ));\n $message = $emailHandler->prepare_body(array(\n '[[[FullName]]]' => $fullName,\n '[[[ProjectId]]]' => $projectId,\n '[[[ProjectName]]]' => $projectName,\n '[[[VideoLength]]]' => (isset($projectJob->project->video) ? $projectJob->project->video->video_lenght : 'N/A'),\n '[[[JobType]]]' => (isset($projectJob->jobType) ? $projectJob->jobType->name : 'N/A'),\n '[[[SourceLanguage]]]' => (isset($projectJob->sourceLanguage) ? $projectJob->sourceLanguage->name : 'N/A'),\n '[[[TargetLanguage]]]' => $targetLanguage,\n '[[[JobDueDate]]]' => DateTimeHelper::formatJobDueDate($projectJob->due_date),\n ));\n\n if($emailHandler->getTemplateState())\n $result = Yii::app()->amazonSes->sendMessage($this->email, $subject, $message);\n\n // Send an internal message that job was skipped\n $message = new Message();\n $message->create(array(\n 'title' => 'Your job was skipped',\n 'content' => '\n Dear ' . $fullName . ',<br/>\n The job you have been working on ' . $projectJob->project->name . ',' . $projectJob->jobType->name . ' has been skipped.<br/>\n Thank you for your co-operation.'\n ), array($this->id));\n $message->save();\n Message::sendNotifications();\n }", "protected function performSuspendOnModel()\n\t{\n\t\t$this->runSuspend();\n\t}", "public function pause(TradeBot $bot)\n {\n $bot->update([\n 'is_paused' => true\n ]);\n\n return redirect()->route('bots.view')->with([\n \"success\" => \"Successfully paused bot {$bot->formattedId()}. This bot will not make any trades until un-paused\"\n ]);\n }", "public function unPauseProcessing()\n\t{\n\t\t$this->log('CONT received; resuming job processing');\n\t\t$this->paused = false;\n\t}", "public function unpause()\n {\n Cashier::razorpay()->subscription\n ->fetch($this->razorpay_id)\n ->resume(['resume_at' => 'now']);\n \n $this->forceFill([\n 'razorpay_status' => self::STATUS_ACTIVE,\n 'ends_at' => null,\n 'paused_from' => null,\n ])->save();\n\n $this->razorpayInfo = null;\n\n return $this;\n }", "public function pause(ContextInterface $ctx): void;", "public function setCurrentJobObject(Job $value) : ScheduledJob\n {\n return $this->setCurrentJobId($value->getId());\n }", "public function cancelJob(int $jobid): Job;", "public function paused()\n {\n return $this->razorpay_status === self::STATUS_PAUSED;\n }", "public function pause() {\r\n\r\n\t\t$args = array();\r\n\t\t$results = $this->sendCommand(\"pause\", $args);\r\n\r\n\t\tif ($results == '0') { $results = null; } \r\n\r\n\t\treturn $results; \r\n\r\n\t}", "public function paused()\n {\n return $this->paddle_status === Paddle::STATUS_PAUSED;\n }", "public function unpause()\n {\n $this->start += ($this->get_time() - $this->pause_time);\n $this->pause_time = 0;\n }", "public function isPaused()\n {\n return $this->status == self::STATUS_PAUSED;\n }", "public function CancelBatchPredictionJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelBatchPredictionJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "function suspendJobsAction() {\r\n\t\tKalturaResponseCacher::disableCache();\r\n\t\tkJobsSuspender::balanceJobsload();\r\n\t}", "public function pause($id)\n {\n $output = $this->querySabnzbd('mode=queue&name=pause&value='.$id.'&output=json');\n $response = json_decode($output, true);\n\n return $response['status'] == true;\n }", "public function setQualityUpdatesPaused(?bool $value): void {\n $this->getBackingStore()->set('qualityUpdatesPaused', $value);\n }", "public function cancelJob(string $id);", "function pause($waitTime) {\r\n\t\t\techo $this->__getRow('pause', $waitTime);\r\n\t\t}", "function campaignPause($cid) {\n $params = array();\n $params[\"cid\"] = $cid;\n return $this->callServer(\"campaignPause\", $params);\n }", "public function pauseTaskResult($task_id, $job_id)\n {\n list($response) = $this->pauseTaskResultWithHttpInfo($task_id, $job_id);\n return $response;\n }", "public function pause();", "public function setJobStatus($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Audit\\BigQueryAuditMetadata\\JobStatus::class);\n $this->job_status = $var;\n\n return $this;\n }", "public function pauseTube($tube, $delay = 0)\n {\n $response = $this->dispatch(\n new Protocol\\PauseTubeProtocol($this->getConnection()), $tube, $delay\n );\n\n switch ($response->getResponse()) {\n case $response::RESPONSE_PAUSED:\n return $response;\n break;\n case $response::RESPONSE_NOT_FOUND:\n throw Exception\\ResponsePauseTubeException::tubeDoesNotExist($tube);\n break;\n default:\n throw Exception\\ResponsePauseTubeException::unknownResponse($response->getResponse());\n }\n }", "public function markInactive()\n {\n $response = $this->request('POST', sprintf('plans/%s/markasinactive', $this->getId()));\n $this->processResponse($response);\n }", "public function pauseSubscription()\n {\n return $this->subscription = $this->subscription->pause();\n }", "protected function reportPause(float $timeout): void\n {\n }", "public function setVideoEncoderJobStatus( $jobId, $jobStatus, $playlistname )\n {\n BeMaverick_Video::setVideoEncoderJobStatus( $this, $jobId, $jobStatus, $playlistname );\n }", "public function getPause()\n {\n return $this->pause;\n }", "public function setJob($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Dataplex\\V1\\DataScanJob::class);\n $this->job = $var;\n\n return $this;\n }", "public function markInProgress($job_id)\n {\n $job = MaintenanceJob::findOrFail($job_id);\n\n $job->update([\n 'status' => 'in_progress'\n ]);\n\n $job->entries()->create([\n 'user_id' => auth()->id(),\n 'status_changed' => 'in_progress'\n ]);\n\n if (auth()->user()->isMaintenance()) {\n return redirect()->route('maintenance.job', $job)->with('success', 'Successfully marked job as in progress');\n } else {\n return redirect()->route('job', $job)->with('success', 'Successfully marked job as in progress');\n }\n }", "public function pause() {\n\t\tif (!function_exists('pcntl_signal')) {\n\t\t\treturn $this->out('<error>' . __d('cake_resque' , \"Pausing worker is not supported on your system. \\nPlease install the PCNTL extension\") . '</error>');\n\t\t}\n\n\t\tApp::uses('CakeTime', 'Utility');\n\t\t$this->out('<info>' . __d('cake_resque', 'Pausing workers') . '</info>');\n\t\t$workers = Resque_Worker::all();\n\n\t\t$pausedWorkers = $this->__getPausedWorker();\n\t\tif (count($pausedWorkers) > 0) {\n\t\t\tfor ($i = count($workers) - 1; $i >= 0; $i--) {\n\t\t\t\tif (in_array((string)$workers[$i], $pausedWorkers)) {\n\t\t\t\t\tunset($workers[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$workers = array_values($workers);\n\t\t}\n\n\t\tif (empty($workers)) {\n\t\t\t$this->out(' ' . __d('cake_resque', 'There is no active workers to pause ...'));\n\t\t} else {\n\n\t\t\t$workerIndex = array();\n\t\t\tif (!$this->params['all'] && count($workers) > 1) {\n\t\t\t\t$this->out(__d('cake_resque', 'Active workers list') . ':');\n\t\t\t\t$i = 1;\n\t\t\t\tforeach ($workers as $worker) {\n\t\t\t\t\t$this->out(sprintf(\" [%2d] - %s, started %s\", $i++, $worker,\n\t\t\t\t\t\tCakeTime::timeAgoInWords(Resque::Redis()->get('worker:' . $worker . ':started'))));\n\t\t\t\t}\n\n\t\t\t\t$options = range(1, $i - 1);\n\n\t\t\t\tif ($i > 2) {\n\t\t\t\t\t$this->out(' [all] - ' . __d('cake_resque', 'Pause all workers'));\n\t\t\t\t\t$options[] = 'all';\n\t\t\t\t}\n\n\t\t\t\t$in = $this->in(__d('cake_resque', 'Worker to pause') . ': ', $options);\n\t\t\t\tif ($in == 'all') {\n\t\t\t\t\t$workerIndex = range(1, count($workers));\n\t\t\t\t} else {\n\t\t\t\t\t$workerIndex[] = $in;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$workerIndex = range(1, count($workers));\n\t\t\t}\n\n\t\t\tforeach ($workerIndex as $index) {\n\n\t\t\t\t$worker = $workers[$index - 1];\n\n\t\t\t\tlist($hostname, $pid, $queue) = explode(':', (string)$worker);\n\t\t\t\t$this->out(__d('cake_resque', 'Pausing %s ... ', $pid), 0);\n\n\t\t\t\t$output = array();\n\t\t\t\t$message = exec('kill -USR2 ' . $pid . ' 2>&1', $output, $code);\n\n\t\t\t\tif ($code == 0) {\n\t\t\t\t\t$this->out('<success>' . __d('cake_resque', 'Done') . '</success>');\n\t\t\t\t\t$this->__setPausedWorker((string)$worker);\n\t\t\t\t} else {\n\t\t\t\t\t$this->out('<error>' . $message . '</error>');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->out(\"\");\n\t}", "public function pauseAction(){\n $container = new Container('game');\n if (!(isset($container->gameId) && null != $container->gameId)) {\n\n return $this->redirect()->toRoute('application/default', ['controller' => 'game']);\n }\n\n $container->gameId = null;\n return $this->redirect()->toRoute('application/default', ['controller' => 'game']);\n }", "public function setJob(\\service\\message\\sync\\Job $value=null)\n {\n return $this->set(self::job, $value);\n }", "public function pause(): self\n {\n\n new Commands\\Pause();\n return $this;\n\n }", "protected function scheduleJob(Job $job) {\n $this->getExecutor()->save($job);\n }", "public function pause($id)\n {\n $_params = array(\"id\" => $id);\n return $this->master->call('subaccounts/pause', $_params);\n }", "public function pauseQueue()\n {\n $output = $this->querySabnzbd('mode=pause&output=json');\n $response = json_decode($output, true);\n\n return $response['status'] == true;\n }", "public function PauseTransferOperation(\\Google\\Cloud\\StorageTransfer\\V1\\PauseTransferOperationRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.storagetransfer.v1.StorageTransferService/PauseTransferOperation',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function CancelDataLabelingJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelDataLabelingJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function pause(){\n\t\t$this->halt = 1;\n\t\t$this->switch_back = false;\n\t\treturn $this;\n\t}", "public function Pause()\n\t{\n\t\t$this->_addLog(__METHOD__,\"send\");\n\t\tif ( ! is_null($rpt = $this->SendCommand(self::MPD_CMD_PAUSE) )) $this->GetStatus();\n\t\t$this->_addLog(__METHOD__,\"response: '\".$rpt.\"'\");\n\t\treturn $rpt;\n\t}", "public function pauseTaskResultWithHttpInfo($task_id, $job_id)\n {\n $request = $this->pauseTaskResultRequest($task_id, $job_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\NodeumSDK\\Client\\Model\\ActiveJobStatus' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\NodeumSDK\\Client\\Model\\ActiveJobStatus', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 202:\n if ('\\NodeumSDK\\Client\\Model\\ActiveJobStatus' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\NodeumSDK\\Client\\Model\\ActiveJobStatus', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\NodeumSDK\\Client\\Model\\ActiveJobStatus';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\NodeumSDK\\Client\\Model\\ActiveJobStatus',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 202:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\NodeumSDK\\Client\\Model\\ActiveJobStatus',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "function pauseUntil($date) {\n\n // Date must be tomorrow or later\n if (strtotime($date) < strtotime('+1 Day'))\n return false;\n\n $this->setPausedUntil($date);\n $this->setStatus('Paused');\n $this->save();\n\n }", "public function killJob($job_id)\n {\n $result = $this->post(sprintf('/job/kill/%d', $job_id));\n $result->setMessageType(TreasureData_API_Result::MESSAGE_TYPE_KILL);\n\n return $result;\n }", "public function pendingJobApplication($job_application_id){\n $sql = \"UPDATE\n\t\t\t\t\t`job_application`\n\t\t\t\tSET \n `status` = 'pending',\n `modified_on`= CURRENT_TIMESTAMP, \n `modified_by`= {$this->user_id}\n WHERE\n `job_application_id` = ?\n\t\t\t\t\";\n $stmt = $this->db->prepare($sql);\n $stmt->bind_param('i',$job_application_id);\n $stmt->execute();\n $out = $stmt->affected_rows;\n $stmt->close();\n return $out;\n }", "public function isPaused() {\n return $this->pauseStartTime !== null;\n }", "public function pauseProcessing()\n\t{\n\t\t$this->log('USR2 received; pausing job processing');\n\t\t$this->paused = true;\n\t}", "public function stop(JobInterface $job);", "private function updateSubtitlePRMJob(){\n if ($this->job->project->isParamountProject()\n && $this->job->paramountProjectJob instanceof ParamountProjectJob\n && $this->job->paramountProjectJob->check_for_file){\n\n //set check_for_file = 0 in order to do not look as file on aspera server anymore\n $this->job->paramountProjectJob->check_for_file = 0;\n $this->job->paramountProjectJob->save(false);\n }\n }", "protected function pauseProcess($pauseDuration = 2000000, $pauseFrequency = 5)\n {\n // Get progress status\n $progress = get_option('wpm2aws_fszipper_counter');\n $total = (isset($progress['total']) ? $progress['total'] : 0);\n $complete = (isset($progress['complete']) ? $progress['complete'] : 0);\n if ($total === 0) {\n $percentageComplete = 0;\n } else {\n $percentageComplete = (int)round(($complete/$total)*100);\n }\n\n // If this itteration is at pause-point\n if ($percentageComplete > 0 && $percentageComplete < 100) {\n if ($percentageComplete % $pauseFrequency === 0) {\n // wait for 2 (default) seconds\n $this->log(\"Pausing Process at: \" . $percentageComplete . \"% complete\");\n usleep($pauseDuration);\n }\n }\n return true;\n }", "public function testTaskStatusTimeCalculationForTaskPaused()\n {\n // Assigned 30 minutes ago\n $minutesWorking = 30;\n $assignedAgo = (int)(new \\DateTime())->sub(new \\DateInterval('PT' . $minutesWorking . 'M'))->format('U');\n $task = $this->getAssignedTask($assignedAgo);\n $task->save();\n $workedTimeBeforeListener = $task->work[$task->owner]['worked'];\n $timeStampBeforeListener = $task->work[$task->owner]['workTrackTimestamp'];\n\n $task->paused = true;\n $event = new TaskStatusTimeCalculation($task);\n $listener = new \\App\\Listeners\\TaskStatusTimeCalculation();\n $listener->handle($event);\n\n $this->assertGreaterThan($workedTimeBeforeListener, $task->work[$task->owner]['worked']);\n $this->assertGreaterThan($timeStampBeforeListener, $task->work[$task->owner]['workTrackTimestamp']);\n $this->assertEquals(\n $task->work[$task->owner]['workTrackTimestamp'] - $timeStampBeforeListener,\n $task->work[$task->owner]['worked']\n );\n }", "public function pauseTimer()\n {\n try {\n return Hermes::pauseTimer($this->vars->t);\n } catch (Horde_Exception_NotFound $e) {\n $GLOBALS['notification']->push(_(\"Invalid timer requested\"), 'horde.error');\n return false;\n }\n }", "public function paused(): bool\n {\n return (bool) $this->paused;\n }", "public function setInspectJob($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Dlp\\V2\\InspectJobConfig::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function CancelHyperparameterTuningJob(\\Google\\Cloud\\AIPlatform\\V1\\CancelHyperparameterTuningJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function CancelJob(\\Google\\Cloud\\Dataplex\\V1\\CancelJobRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dataplex.v1.DataplexService/CancelJob',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function pauseWrite()\n {\n $this->_getResourceManager()->pauseWrite($this);\n }", "public function testUpdateSuspensionStateJobDefinition()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function unPause(TradeBot $bot)\n {\n $bot->update([\n 'is_paused' => false\n ]);\n\n return redirect()->route('bots.view')->with([\n \"success\" => \"Successfully un-paused trade bot {$bot->formattedId()}. This bot will start trading again\"\n ]);\n }", "public function pause($id)\n\t{\n\t\t$result = [];\n\n\t\tif (!TaskAccessController::can($this->userId, ActionDictionary::ACTION_TASK_PAUSE, (int)$id))\n\t\t{\n\t\t\t$this->addForbiddenError();\n\t\t\treturn $result;\n\t\t}\n\n\t\tif ($id = $this->checkTaskId($id))\n\t\t{\n\t\t\t// todo: move to \\Bitrix\\Tasks\\Item\\Task\n\t\t\t$task = \\CTaskItem::getInstance($id, Util\\User::getId());\n\t\t\t$task->pauseExecution();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function updated(Job $job)\n {\n // Save/Update job to cache\n $this->putCache($job);\n\n // Remove from nextAvailable cache if needed\n if(Cache::tags('jobs')->has('jobs.nextAvailable') && $job->status != 'available')\n {\n $nextJob = Cache::tags('jobs')->get('jobs.nextAvailable')[0];\n if($nextJob->id == $job->id)\n {\n Cache::tags('jobs')->forget('jobs.nextAvailable');\n }\n }\n\n // Decrement queue size value\n if($job->status == 'processing'){\n if(Cache::tags('queue')->has('queue.size')){\n Cache::tags('queue')->decrement('queue.size', 1);\n }\n }\n\n // Increment queue processed value\n if($job->status == 'processed'){\n if(Cache::tags('queue')->has('queue.processed')){\n $avg_time = Cache::tags('queue')->get('queue.avg_time');\n $processed = Cache::tags('queue')->get('queue.processed');\n $total_time = $avg_time * $processed;\n $new_avg = ($total_time + $job->processing_time)/($processed+1);\n Cache::tags('queue')->increment('queue.processed', 1);\n Cache::tags('queue')->forever('queue.avg_time', $new_avg);\n }else\n {\n Cache::tags('queue')->forever('queue.processed', 1);\n }\n }\n }", "function pause(){\r\n\t\tif ($this->getLigado()==true && ($this->getTocando()==true)){\r\n\t\t\t$this->setTocando(false);\r\n\t\t}\r\n\t\telse\r\n\t\t\t//$this->setTocando(true); //sem senso\r\n\t\t\techo \"Nao pode pausar pq o controle esta desligado\";\r\n\t}", "public static function killJob($pId){\n\n $j = self::jobs();\n\n global $argv;\n\n foreach($j as $job){\n if($job->pId==$pId){\n exec('kill '.$job->pId);\n if($argv[1]=='kill-job'){\n echo 'Killed Job # '.$job->pId.' Action:'.$job->object.'@'.$job->method.PHP_EOL;\n }//if\n return true;\n }//if\n }//foreach\n\n if($argv[1]=='kill-job'){\n echo 'No Job # '.$pId.PHP_EOL;\n }//if\n\n return false;\n }", "public function ping($Job)\n {\n $Job->sendData('pong');\n }", "public static function pauseLogger()\n {\n self::$_logger->pause = true;\n }" ]
[ "0.5900222", "0.5747765", "0.5676182", "0.55002916", "0.5250379", "0.5157673", "0.51567686", "0.511964", "0.5084085", "0.49897754", "0.48479062", "0.48279864", "0.48000082", "0.46823025", "0.46624193", "0.4656604", "0.4611887", "0.4591218", "0.45653987", "0.45582506", "0.45411566", "0.452412", "0.4510794", "0.44994846", "0.44969904", "0.44888964", "0.44691968", "0.44324645", "0.44316286", "0.44045037", "0.4401135", "0.4400981", "0.43845782", "0.43748522", "0.4370037", "0.4368663", "0.43653965", "0.4352284", "0.43515068", "0.43379313", "0.43317565", "0.43291762", "0.4322926", "0.4313978", "0.43130666", "0.4285063", "0.42839104", "0.4271973", "0.42287716", "0.4220269", "0.42076135", "0.42044178", "0.42030257", "0.41995865", "0.4195851", "0.41950437", "0.41833794", "0.41818225", "0.41787195", "0.4178217", "0.4175909", "0.4174861", "0.41489366", "0.41479096", "0.41429317", "0.41425833", "0.41106588", "0.41074184", "0.4099448", "0.4083538", "0.4080757", "0.4080261", "0.40798697", "0.4072749", "0.40619865", "0.40597945", "0.40441376", "0.40431517", "0.40322757", "0.4023356", "0.4021101", "0.40185627", "0.40177828", "0.40069747", "0.40067193", "0.40059215", "0.4005668", "0.39840525", "0.39824262", "0.39702308", "0.39662096", "0.39598322", "0.39540234", "0.39503458", "0.39379504", "0.39320058", "0.3917904", "0.3916419", "0.3914482", "0.39116338" ]
0.7640479
0
Get locale display name.
Получить отображаемое имя локали.
public function getLocaleDisplayName($locale);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDisplayName(){\n\t\t$name = languageModel::getString($this->displayName);\n\n\t\treturn $name ? $name : $this->displayName;\n\n\t}", "function altLocaleName ()\n{\n return ucfirst(LocalizationHelper::getLocaleProperty( 'native', altLocale() ));\n}", "public function getName($locale = 'hr') {\n switch($locale) {\n case 'en':\n return 'All Saints\\' Day';\n default:\n case 'hr':\n return 'Dan svih svetih';\n }\n }", "public function locale(): string\n {\n $default = $this->code;\n if (Str::contains($default, '_') !== true) {\n $default .= '_' . strtoupper($this->code);\n }\n\n return $this->get('translation.locale', $default);\n }", "public function get_display_name() {\n return $this->get_field( 'display_name' );\n }", "public function getDisplayName()\n {\n return dgettext('luna', 'Luna');\n }", "function pretty_locale_name(?string $locale): string{\n return get_locales()[strtolower($locale)] ?? $locale ?? '';\n}", "public function getNameForCurrentLocale()\n {\n return $this->getNameForLocale($this->getCurrentLocale());\n }", "public function getLocaleName($inLocale = null)\n {\n $inLocale = Locale::sanitizeLocale($inLocale, $this->locale);\n\n return \\Locale::getDisplayName($this->locale, $inLocale);\n }", "public function locale(): string {\n\t\treturn $this->user->ID ? get_user_locale( $this->user->ID ) : '';\n\t}", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function locale(): string\n {\n return $this->locale;\n }", "public function getDisplayname()\n {\n return $this->displayname;\n }", "public function getMyDisplayname() {\n\t\treturn $this->getTrimmedText($this->findUserDisplayNameElement());\n\t}", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function getDisplayName()\n {\n if (array_key_exists(\"displayName\", $this->_propDict)) {\n return $this->_propDict[\"displayName\"];\n } else {\n return null;\n }\n }", "public function locale()\n {\n /**\n * @var string\n */\n $locales = $this->locales();\n\n /**\n * @var string\n */\n $suggest = array_shift(\n $locales\n );\n\n /*\n * @var string\n */\n return strtok($suggest, '-');\n }", "public function Name()\n {\n return (string) Zend_Locale::getTranslation($this->Code(), 'country', i18n::get_locale());\n }", "function getName($locale) {\n\t\treturn $this->getData('name', $locale);\n\t}", "public function getDisplayName()\n {\n return $this->display_name ?? \"$this->first_name $this->last_name\";\n }", "public function getDisplayName()\n {\n return $this->getProperty(\"DisplayName\");\n }", "public function getDisplayName()\n {\n return $this->displayName;\n }", "public function getDisplayName()\n {\n return $this->displayName;\n }", "public function getDisplayName()\n {\n return $this->displayName;\n }", "public function getDisplayName()\n {\n return $this->displayName;\n }", "public function get_name_en()\n {\n return $this->name_en;\n }", "function getDisplayName() {\n\t\treturn __('plugins.generic.addJournalTitle.displayName');\n\t}", "function getDisplayName() {\n return lang('MS Project Manager');\n }", "function getLocalizedGivenName() {\n\t\treturn $this->getLocalizedData(IDENTITY_SETTING_GIVENNAME);\n\t}", "public function getDisplayName()\n {\n return property_exists($this->displayName) ? $this->displayName : '';\n }", "public function getStrDisplayName() {\n return $this->getStrTitle();\n }", "public function getDisplayName() {\n\n return $this->display_name;\n\n }", "public function get_display_name() {\n\t\tif ( 0 === $this->id ) {\n\t\t\tif ( isset( $this->meta['system_user_name'] ) ) {\n\t\t\t\treturn esc_html( $this->meta['system_user_name'] );\n\t\t\t} elseif ( 'wp_cli' === $this->get_current_agent() ) {\n\t\t\t\treturn 'WP-CLI'; // No translation needed\n\t\t\t}\n\t\t\treturn esc_html__( 'N/A', 'stream' );\n\t\t} else {\n\t\t\tif ( $this->is_deleted() ) {\n\t\t\t\tif ( ! empty( $this->meta['display_name'] ) ) {\n\t\t\t\t\treturn $this->meta['display_name'];\n\t\t\t\t} elseif ( ! empty( $this->meta['user_login'] ) ) {\n\t\t\t\t\treturn $this->meta['user_login'];\n\t\t\t\t} else {\n\t\t\t\t\treturn esc_html__( 'N/A', 'stream' );\n\t\t\t\t}\n\t\t\t} elseif ( ! empty( $this->user->display_name ) ) {\n\t\t\t\treturn $this->user->display_name;\n\t\t\t} else {\n\t\t\t\treturn $this->user->user_login;\n\t\t\t}\n\t\t}\n\t}", "public function get_display_name() {\n\t\treturn h( $this->steam_object->get_name() );\n\t}", "public function getDisplayName() {\n return $this->getName();\n }", "public function getProviderDisplayName();", "public function getEnglishName();", "public function getDisplayName() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"displayName\");\n\t}", "public function getDisplayName() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"displayName\");\n\t}", "public function getLocale()\n {\n // Get local property\n $name = $this->get('locale');\n\n // We have a custom locale\n if (is_string($name))\n return $name;\n\n // Revert to system defualt\n return Config::get('SYSTEM_LOCALE');\n }", "public function getDisplayName()\n {\n return $this->__toString();\n }", "public function getDisplayName() {\n\t\t$displayName = \"{$this->first_name} {$this->last_name}\";\n\n\t\tif ($this->company_name !== null && $this->company_name !== '') {\n\t\t\t$displayName .= \" ({$this->company_name})\";\n\t\t}\n\n\t\treturn $displayName;\n\t}", "public function toName() {\n\n $format = $this->config('display',\"first_word_uc\");\n $pieces = explode('_', $this->tab);\n\n switch ($format):\n case \"uc_first_word\":\n default:\n $pieces[0] = ucfirst($pieces[0]);\n break;\n case \"uc_all_words\":\n $pieces = array_map(\"ucfirst\",$pieces);\n break;\n case \"uc_no_words\":\n // do nothing\n break;\n case \"locale\":\n $translator = new Translator($this->key);\n $title = $translator->trans($pieces);\n break;\n endswitch;\n\n if (!isset($title))\n $title = join(\" \", $pieces);\n\n return $title;\n\n }", "public function getLocale(): string\n {\n return $this['config']->get('app.locale');\n }", "public function getDisplayName()\n\t{\n\t\treturn $this->displayName; \n\n\t}", "static public function english_name() : string {\n return \"English (old)\";\n }", "public function getDisplayLanguage()\n {\n return \\Locale::getDisplayLanguage($this->current, $this->current);\n }", "public function getName($locale = null)\n {\n return $this->_translate($this->name, $locale);\n }", "function getPreferredPublicName($locale) {\n\t\treturn $this->getData('preferredPublicName', $locale);\n\t}", "public function getDisplayName() {\n\t\treturn \"{$this->first_name} {$this->last_name}\";\n\t}", "public function getDisplayName(){\n\t\t$display_name = '';\n\t\t$lti_name_vars = array( 'lis_person_name_full', 'lis_person_name_given', 'lis_person_name_family' );\n\t\t$name_found = false;\n\t\tforEach( $lti_name_vars as $check_me ){\n\t\t\t$name = $this->getLtiDataValue( $check_me, $name_found );\n\t\t\tif( $name_found ){\n\t\t\t\t$display_name = $name;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $display_name;\n\t}", "public function getName_en()\n {\n return $this->name_en;\n }", "public function getLocale(): string\n {\n return $this->locale;\n }", "public function getLocale(): string\n {\n return $this->locale;\n }", "function getDisplayName() {\n\t\treturn __('plugins.generic.embedHtmlArticleGalley.displayName');\n\t}", "protected function localeFullName($locale)\n {\n $fullName = [\n 'en' => 'English',\n 'fr' => 'French'\n ];\n\n return $fullName[$locale];\n }", "public function getDisplayFullName()\n {\n return sprintf('%s %s', $this->getFirstname(), $this->getLastname());\n }", "public function getDisplayName();", "public function getDisplayName();", "public function getDisplayName();", "public function getDisplayName();", "public function getDisplayName();", "public function getName ()\n\t{\n\t\treturn _(Language_Str::get($this->code));\n\t}", "public function getDisplayName()\n {\n return $this->operationalUnitName;\n }", "public function locale()\n {\n return $this->get('locale');\n }", "public function presentName()\n {\n return $this->object['display_name'];\n }", "public function getName(): string\n {\n return Translation::get($this->name);\n }", "public function name(): string\n {\n return $this->get('translation.name', $this->code);\n }" ]
[ "0.77360535", "0.7522137", "0.74384886", "0.731795", "0.72486347", "0.72260445", "0.7211966", "0.7177125", "0.7143481", "0.71272916", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.7110705", "0.70350647", "0.69964314", "0.6974866", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.69505066", "0.6934728", "0.692747", "0.6871071", "0.6833037", "0.6832042", "0.6819814", "0.6819814", "0.6819814", "0.6819814", "0.6808528", "0.679612", "0.6769637", "0.67678005", "0.6759198", "0.67464465", "0.6740494", "0.6738396", "0.67306757", "0.6700769", "0.66801", "0.6673281", "0.6669707", "0.6669707", "0.66678774", "0.66631067", "0.6654073", "0.66366315", "0.6635087", "0.6620634", "0.66167605", "0.6615816", "0.65969074", "0.6585817", "0.6570737", "0.65666205", "0.65663993", "0.6564173", "0.6564173", "0.654918", "0.6546656", "0.6535388", "0.6520628", "0.6520628", "0.6520628", "0.6520628", "0.6520628", "0.65083754", "0.649653", "0.6476452", "0.64764506", "0.64744866", "0.64740914" ]
0.8426672
0
Find a user by user_id and current site_id.
Найдите пользователя по user_id и текущему site_id.
function site_user($id = NULL) { if ( ! is_numeric($id)) return FALSE; $this->where('site_id', kohana::config('chapterboard.site_id'))->where('id', $id)->find(); return $this->loaded ? $this : FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_user($id);", "public function findUser($id);", "public function getUserById($id){\n $this->db->query('SELECT * FROM users\n WHERE id = :userId');\n //bind parameters\n $this->db->bind('userId', $id);\n\n //set the found user to a variable\n $foundUser = $this->db->single();\n\n //return found user if found else return false\n if($foundUser){\n return $foundUser;\n } else {\n return false;\n }\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function findActiveUser($user_id);", "public function getSpecificUser($user_id = 0);", "public function findUserById($id)\n {\n return $this->findUser(['id' => $id, 'scope' => [User::SCOPE_BACKEND, User::SCOPE_BOTH]])->one();\n }", "function findById($id)\r\n {\r\n $user = UserFacade::findByField('id', $id)->first();\r\n if ($user) {\r\n return $user;\r\n } else {\r\n throw new GisException(trans('common.authorization_user_not_exists'));\r\n }\r\n }", "function find_user_by_id($id=0) {\n global $db;\n $sql = \"SELECT * FROM users WHERE id='\" . $id . \"' LIMIT 1;\";\n $users_result = db_query($db, $sql);\n return $users_result;\n }", "public function findUserById(int $id);", "public function findUserById($id)\n {\n return $this->findUser(['id' => $id])->one();\n }", "public function lookup_user($id);", "public function find($id)\n\t{\n\t\treturn $this->user->find($id);\n\t}", "public function findUser($id)\n\t{\n\t $user = $this->entityManager->getRepository('Ora\\User\\User')->findOneBy(array(\"id\"=>$id));\n\t \n\t return $user;\n\t}", "public function find_remote_user($id) {\n return $this->users[$id];\n }", "public function getUserById($id) {\n\t\treturn $this->repository->findOneBy(['id' => $id]);\n\t}", "function find_user_by_id($id){\r\n try{\r\n $find_user = $this->db->prepare(\"SELECT *FROM my_users1 WHERE user_id = ?\");\r\n $find_user->execute([$id]);\r\n if($find_user->rowCount() === 1){\r\n return $find_user->fetch(PDO::FETCH_OBJ);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n catch(PDOException $e){\r\n die($e->getMessage());\r\n }\r\n }", "function findUser($id)\n {\n $query = $this->db->get_where('users', array('id' => $id));\n return $query->result();\n }", "protected function findByUserId($id)\n {\n $sql = 'SELECT * FROM `user` WHERE id = :id';\n\n return $this\n ->getEntityManager()\n ->getConnection()\n ->executeQuery(\n $sql, \n ['id' => $id]\n )\n ->fetchObject(\n 'LoginProject\\Bundle\\MainBundle\\Entity\\CurrentUser'\n );\n }", "public function find($id)\n\t{\n\t\t$user = $this->model->find($id);\n\n\t\tif (!$user)\n\t\t{\n\t\t\tthrow new UserNotFound('User #' . $id . ' not found');\n\t\t}\n\t\t\n\t\treturn $user;\n\t}", "public function get_User($user_id)\n {\n foreach ($this->users as $user) {\n if ($user->getId()==$user_id) {\n return $user;\n }\n }\n }", "function get_user($id)\n\t{\n\t\t$this->CI->load->module_model(COURSE_FOLDER, 'blog_users_model');\n\t\t$this->CI->blog_users_model->readonly = TRUE;\n\t\t$where['active'] = 'yes';\n\t\t$where['fuel_user_id'] = $id;\n\t\t$user = $this->CI->blog_users_model->find_one($where);\n\t\treturn $user;\n\t}", "function get_user_by_id($id)\n\t{\n\t\t$this->db->where('id', $id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) return $query->row();\n\t\treturn NULL;\n\t}", "public function findOne(int $id)\n {\n return $this->user->find($id);\n }", "public function getUserByID($id);", "function find_user_by_id($id){\n try{\n $find_user = $this->db->prepare(\"SELECT * FROM `users` WHERE id = ?\");\n $find_user->execute([$id]);\n if($find_user->rowCount() === 1){\n return $find_user->fetch(PDO::FETCH_OBJ);\n }\n else{\n return false;\n }\n }\n catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function findByUser($id) {\n\t\t$sql = \"SELECT * FROM *PREFIX*\".self::$table.\" WHERE lower(uid) = lower(?)\";\n\t\treturn $this->findEntity($sql, [$id]);\n\t}", "public function find($id)\n {\n return $this->userRepository->find($id);\n }", "public function find($id)\n {\n return $this->userRepository->find($id);\n }", "function find_user_by_id($id){\r\n try{\r\n $find_user = $this->db->prepare(\"SELECT * FROM users WHERE id=?\");\r\n $find_user->execute([$id]);\r\n if($find_user->rowCount() === 1){\r\n return $find_user->fetch(PDO::FETCH_OBJ);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n catch(PDOException $errMsg){\r\n die($errMsg->getMessage());\r\n }\r\n }", "protected static function findUser($id) {\n $statement = \"SELECT * FROM USERS WHERE accountId=?\";\n try {\n $db=new databaseController();\n $statement = $db->getConnection()->prepare($statement);\n $statement->execute(array($id));\n $result = $statement->fetch(\\PDO::FETCH_ASSOC);\n return $result;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "public function getUserById($id){\n return User::where('id', $id)->get()->first();\n }", "public function find($id)\n {\n return User::where('id', $id)->first();\n }", "public function findOne($id) {\n\n /* Requete SQL */\n $sql = \"\n SELECT * \n FROM exo_mvc.users \n WHERE id_user = ?\n \";\n\n /* Preparation de la requete */\n $statement = $this->db->prepare($sql);\n\n /* Execution de la requete */\n $statement->execute([$id]);\n\n /* Retourne l utilisateur trouve */\n return $statement->fetch(PDO::FETCH_ASSOC);\n }", "public function find($id) {\n $sql = \"select * from users where id_user = \".$id;\n $result = $this->getDb()->fetchAll($sql);\n \n $user = $this->buildDomainObject($result[0]);\n return $user;\n }", "public function findUser($user = null) {\n if($user) {\n # user can be found using id or email\n $field = (is_numeric($user)) ? 'id' : 'email';\n $data = DB::getInstance()->get('users', array($field, '=', $user));\n # check if there is data returned\n // secho 'DATA' ; var_dump($data);\n // var_dump($data->resultCount() );\n if($data->getResults() ) {\n # pass data to $user private property\n // var_dump($data);\n // var_dump($data->resultCount() );\n // var_dump($data->getResults() );\n // var_dump( $data->first() );\n $this->_user = $data->first() ;\n // echo 'USER DATA' ; var_dump($this->_user);\n return true;\n # Or\n // foreach ($data->getResults() as $userData) {\n // $this->_user = $userData;\n // return $this->_user;\n // }\n }\n return false;\n }\n }", "public function userOfId($id)\n {\n return $this->model->findOrFail($id);\n }", "public function findById($id) {\n $result_set = $this->query(\"SELECT * FROM users WHERE id = $id LIMIT 1\");\n if (mysqli_num_rows($result_set)) {\n $found_user = mysqli_fetch_array($result_set);\n return $this->instantiation(new UserModel(), $found_user);\n } else {\n return false;\n }\n }", "public function find($id)\n\t{\n // return $this->user->where('id', $id)->first();\n\t}", "private function findUserById($id)\n {\n $user = $this->users->userById(UserId::fromString($id));\n\n if ($user) return $user;\n\n throw new ValueNotFoundException(\"$id is not a valid user id\");\n }", "public function getUserById($id);", "public function getUserById($user_id){\n\t\t$user = User::where('id', '=', $user_id)->first();\n\t\treturn $user;\n\t}", "public static function findUserEntityById($id);", "public function getUserById($id)\n {\n return User::where('id', $id)->first();\n }", "public function GetUserId($id){\n \t$user = User::find($id);\n \treturn $user;\n }", "function user_find($id)\n{\n\t$db = option('db_conn');\n\t$sql = <<<SQL\n\tSELECT * \n\tFROM users where id=:id\nSQL;\n\t$stmt = $db->prepare($sql);\n\t$stmt->bindValue(':id', $id, PDO::PARAM_INT);\n\tif ($stmt->execute() && $row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t{\n\t\treturn $row;\n\t}\n\treturn null;\n}", "public function findById($id)\n {\n return $this->userRepository->findById($id);\n }", "public function getUserById($user_id);", "public function getUser()\n {\n $userClass = $this->userClass;\n $identity = $this->session->get(self::TOKEN_NAME);\n if (isset($identity[ 'id' ])) {\n $user = $userClass::findFirst([\n 'conditions' => $userClass::getQualifier() . ' = :val:',\n 'bind' => [\n 'val' => $identity[ 'id' ]\n ]\n ]);\n if ($user == false) {\n public_exception('auth.userNotFound', 404);\n }\n\n return $user;\n }\n\n return false;\n }", "public function findUserById($id)\n {\n return $this->entityManager->getRepository(User::class)\n ->findOneBy(['id' => $id]);\n }", "public function getUser($id)\n {\n if($id != $this->fk_id_user1){\n $user=User::findOrFail($this->fk_id_user1);\n return $user;\n }else{\n $user=User::findOrFail($this->fk_id_user2);\n return $user;\n }\n }", "public function findById(int $id):User\n {\n $command = $this->createQueryBuilder('p')\n ->where('p.id = :id')\n ->setParameter(':id',$id);\n\n $query = $command->getQuery();\n return $query->execute()[0];\n }", "protected function findUser($id) {\n if (($model = User::findOne($id)) !== null && $model->status==User::STATUS_ACTIVE) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findOne($id) {\n $user = new User;\n\n $req = $this->db->prepare(\n\t 'SELECT *\n FROM user\n WHERE id=:id');\n\n $req->execute(\n array(\n 'id' => $id,\n )\n );\n\n $user = $req->fetch(); //get the first user\n\n return $user;\n }", "public function getUser($id);", "public function getUser($id);", "function get_user_by_id($id) {\n\t\t$this->db->where('user_id', $id);\n\t\t$query = $this->db->get('user');\n\t\treturn $query->result();\n }", "public function getUser($id)\n {\n return $this->findOneBy(array('id' => $id));\n }", "function getUserById() {\n\t\t$ids = FSInput::get ( 'id', array (), 'array' );\n\t\t$id = isset ( $ids [0] ) ? $ids [0] : 0;\n\t\t$query = \" SELECT *\n\t\t\t\t\t\t FROM fs_users\n\t\t\t\t\t\t WHERE id = $id \";\n\t\t\n\t\tglobal $db;\n\t\t$sql = $db->query ( $query );\n\t\t$result = $db->getObject ();\n\t\treturn $result;\n\t}", "public function findById($id){\n $user = User::find($id);\n return $user;\n }", "function getUserByID($id)\n {\n return $this->fetchRow($this->select()->where('id = ?', $id));\n }", "public function findById($id) {\n // load the entity manager and the user repository\n $entityManager = $this->getEntityManager();\n $repository = $entityManager->getRepository('EmberChat\\Entities\\User');\n\n // try to load the user\n return $repository->findOneBy(array('id' => $id));\n }", "public function find($id)\n {\n return $this->um->findUserBy(['id'=>$id]);\n }", "public function findUserById( $id )\n {\n return $this->userDao->findById((int) $id);\n }", "function findUserById($id)\r\n {\r\n $user = UserFacade::getById($id);\r\n if ($user) {\r\n $user->email = $this->decode($user->email);\r\n return $user;\r\n } else {\r\n throw new GisException(trans('common.user_not_exists'));\r\n }\r\n }", "function get_user_by_id($id) \n\t{\n\t\treturn parent::get_by_id($this->tbl, $id);\n\t}", "public function findById($id)\n {\n $pdo = $this->getPdo();\n\n $this->pdoStmt = $pdo->prepare('SELECT * FROM users WHERE id = :id');\n \n $this->pdoStmt->bindValue(':id', $id, PDO::PARAM_INT);\n\n $isExecuteOk = $this->pdoStmt->execute();\n\n if ($isExecuteOk) {\n $user = $this->pdoStmt->fetchObject('User'); \n return $user;\n } else {\n return false;\n } \n }", "function getUserById($userId);", "public function findById($id)\n {\n\n // load the entity manager and the user repository\n $entityManager = $this->getEntityManager();\n $repository = $entityManager->getRepository('EmberChat\\Entities\\User');\n\n // try to load the user\n return $repository->findOneBy(array('id' => $id));\n }", "function getById($user_id) {\n\t\t$query = $this->db->get_where('users',\n array('id' => $user_id));\n\n\t return $query->result_object();\n }", "public function find($user_id)\n\t{\n\t\treturn parent::find($user_id, array('prefixValue'=>'user_id'));\n\t}", "function get_user( $user_id ){\n\treturn Model::factory('User')->where_equal('id', $user_id)->find_one();\n}", "public function getUserById($id){\n return $this->dm->getRepository('BBBLoadBalancerUserBundle:User')->find($id);\n }", "public function find($id)\n {\n return User::find($id);\n }", "public function getUser(int $user_id);", "public function getOne($id)\n {\n return $this->user->find($id);\n }", "public function getUserById($id)\r\n\t{\r\n\t\t$this->db->query('SELECT * FROM ' . $this->table . ' WHERE id=:id');\r\n\t\t$this->db->bind('id',$id);\r\n\t\treturn $this->db->single();\r\n\t}", "public static function getUserById($id)\n {\n $user = User::where('id','=',$id)\n ->first();\n return $user;\n }", "function find_users($siteObj, $username_or_email, $use_site_id=true) {\n $username_or_email = trim($username_or_email);\n if(!$username_or_email) return array();\n $search['active'] = 1;\n if(is_email($username_or_email)) {\n $search[DB_LOGICAL_OR] = array('username' => $username_or_email, 'email_address' => $username_or_email);\n } else {\n $search['username'] = $username_or_email;\n }\n $tbl = get_object_table(\"user\");\n if($use_site_id) $search[$tbl.'site_id'] = $siteObj->id; // try this site first\n $userObjs = find_objects('user', $search);\n\n if(!$userObjs && $use_site_id) return find_users($siteObj, $username_or_email, false); // try all sites\n return $userObjs;\n}", "protected function findUserBySocialMedia()\n {\n return SocialMedia::whereProvider($this->provider)\n ->whereSocialId($this->account->getId())\n ->first()\n ->user;\n }", "public static function getByID($id) { return self::table(__CLASS__)->selectFirstObject('*', 'user_id=\\''.self::escape($id).'\\''); }", "public function getUser($id){\n return User::find($id);\n }", "public function find(int $id)\n {\n try {\n $this->user = $this->user->findOrFail($id);\n } catch (ModelNotFoundException $exception) {\n throw new UserNotFoundException;\n }\n\n return $this->user;\n }", "public static function findById($user_id)\n {\n global $db;\n\n // get semua data user dari table users\n $result_set_array = static::find_by_query(\"SELECT * FROM \". static::$table . \" WHERE id='$user_id' \");\n // $found_user = mysqli_fetch_array($result_set);\n // if(!empty($result_set)){\n \n // $first_item = array_shift($result_set);\n // return $first_item;\n \n // } else {\n // return false;\n // }\n \n return !empty($result_set_array) ? array_shift($result_set_array) : false;\n }", "public static function getUserById($id) \n {\n return App::get('database')->getUserById(User::$table, $id);\n }", "public function getUser($id)\n {\n return User::findOrFail($id);\n }", "public function findById($id)\n {\n $user = $this->model->find($id);\n\n if(is_null($user))\n throw new UserNotFoundException(\"The user with id as $id does not exist.\");\n\n return $user;\n }", "public function findUserById($id)\n {\n return DataManager::retrieve_by_id(User::class_name(), $id);\n }", "public function findById($id)\n {\n return User::find($id);\n }", "public function user($id) {\n $data = $this->db->select(\"SELECT * FROM user WHERE id_user = :id_user\", array(\n \":id_user\" => $id\n ));\n return $data[0];\n }", "function findById($id) {\n\t\t$stmt = <<<SQL\nSELECT `id`, `email`, `first_name`, `last_name`, `password` FROM `users`\nWHERE `id` = ?\nSQL;\n\t\tif ($stmt = $this->mysqli->prepare($stmt)) {\n\t\t\t$stmt->bind_param('i', $id);\n\t\t\t\n\t\t\tif ($stmt->execute() === FALSE) {\n\t\t\t\tdie('unable to execute' . htmlspecialchars($this->mysqli->error));\n\t\t\t}\n\t\t\t\n\t\t\t$stmt->bind_result($id, $email, $firstName, $lastName, $password);\n\t\t\tif ($result = $stmt->fetch()) {\n\t\t\t\treturn new User($this->mysqli, $id, $email, $firstName, $lastName, $password);\n\t\t\t}\n\t\t\t$stmt->close();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tdie('unable to prepare the statement. ' . htmlspecialchars($this->mysqli->error));\n\t\t}\n\t}", "public function get_user_by_id($id) {\n $user = $this->db->select_record('accounts', \"id = '$id'\");\n if (!($user))\n return self::ERR_USER_NOT_FOUND;\n return $user;\n }", "function getByID($id) {\n return $this->find('first', array(\n 'conditions' => array(\n 'User.id' => $id\n )\n ));\n }", "public function findUserById($id)\n\t{\n\t\treturn self::find()\n\t\t\t->select([\n\t\t\t\t'id',\n\t\t\t\t'first_name',\n\t\t\t\t'middle_name',\n\t\t\t\t'last_name',\n\t\t\t\t'email',\n\t\t\t\t'phone',\n\t\t\t\t'status'\n\t\t\t])\n\t\t\t->where([\n\t\t\t\t'deleted' => self::STATE_UNDELETED,\n\t\t\t\t'status' => self::STATUS_ACTIVE,\n\t\t\t\t'id' => $id\n\t\t\t])\n\t\t\t->one();\n\t}", "public function find($id)\n {\n $user = User::findOrFail($id);\n\n $account = $this->northstar->getUser('id', $user->northstar_id);\n\n if ($account) {\n $account->role = $user->role;\n\n return $account;\n }\n\n return $user;\n }", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function userInstance($id){\n $user= $this::find($id);\n return $user;\n }" ]
[ "0.7136494", "0.6954151", "0.6942713", "0.6884158", "0.6884158", "0.6884158", "0.6868575", "0.68552756", "0.6782675", "0.6710622", "0.67063653", "0.6702199", "0.6700574", "0.6696213", "0.6689242", "0.6685981", "0.6677521", "0.6632326", "0.66123396", "0.6588248", "0.6574539", "0.6552949", "0.655275", "0.6541324", "0.6531451", "0.6518423", "0.6517748", "0.65089405", "0.6498835", "0.64873105", "0.64873105", "0.6469265", "0.6446424", "0.643485", "0.6427502", "0.6417125", "0.6408172", "0.63955086", "0.6383816", "0.6379359", "0.63714314", "0.63587433", "0.6354741", "0.6352832", "0.63453084", "0.6344846", "0.6343066", "0.6334184", "0.6333219", "0.6332016", "0.6331448", "0.6328711", "0.632865", "0.63250166", "0.6312556", "0.63117945", "0.63073474", "0.63073474", "0.6301014", "0.62930447", "0.62921256", "0.6290073", "0.62837726", "0.6281235", "0.6276761", "0.6269343", "0.62684655", "0.6264604", "0.6262753", "0.62596834", "0.62541765", "0.6250751", "0.624723", "0.6234501", "0.6228685", "0.62267286", "0.62266487", "0.6222628", "0.622237", "0.62194985", "0.6218317", "0.6197936", "0.61975116", "0.6190083", "0.61895156", "0.61844033", "0.6184311", "0.6182158", "0.61805487", "0.6178792", "0.6174893", "0.6171023", "0.6169501", "0.61654663", "0.6161434", "0.61528355", "0.6151121", "0.6146824", "0.6146824", "0.61358875" ]
0.7377346
0
Find user by calendar token.
Найдите пользователя по токену календаря.
function find_by_token($token) { return $this->where('calendar_token', $token)->find(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findUser($token) {\n $this->createConnection();\n\n $query_str = \"\n SELECT * FROM LIGHT_USER\n WHERE LIGHT_USER.token = '$token';\n \";\n $res = $this->connection->query($query_str);\n\n $this->closeConnection();\n\n $user_id = $res->fetch_object()->id;\n if( $user_id ) {\n return $user_id;\n } else {\n return 0;\n }\n }", "public function getUser($token){\n\n \treturn User::findById($this->user_id);\n }", "public function getUserByToken($token) {\n\t \n\t}", "abstract protected function getUserByToken($token);", "public function findUserByToken($token)\n {\n $user = $this->findByToken($token);\n return $user;\n }", "public function user($token)\n\t{\n\t\t$auth = $this->get_decript($token);\n\t\tif($auth) {\n\n\t\t\tif($this->auth->byId($auth['identifire'])) {\n\n\t\t\t $remote_user = $this->auth->user();\n\t\t\t if($this->login_date()) {\n\n\t\t\t\t $remote_user->login_date = $auth['login_date'];\n\t\t\t\t return $remote_user;\n\t\t\t }\n\t\t\t return $remote_user;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function getUserIdByToken($token)\n {\n return $this->db->table(self::TABLE)->eq('token', $token)->eq('is_active', 1)->gte('date_expiration', time())->findOneColumn('user_id');\n }", "private function findUserByValidToken($token)\n {\n try {\n /** @var UserInterface $user */\n $user = $this->userRepository->findUserByToken($token);\n if (new \\DateTime() > $user->getPasswordResetTokenExpiresAt()) {\n throw new InvalidTokenException($token);\n }\n\n return $user;\n } catch (NoResultException $exc) {\n throw new InvalidTokenException($token, $exc);\n }\n }", "public function get_user_by_token($token)\n {\n $token = remove_special_characters($token);\n $this->db->where('token', $token);\n $query = $this->db->get('users');\n return $query->row();\n }", "public function findByResendToken(string $token) {\n $sql = \"\n\t\t\tSELECT\n\t\t\t\t`id`,\n\t\t\t\t`email`,\n\t\t\t\t`password`,\n\t\t\t\t`password_reset_hash`,\n\t\t\t\t`password_reset_expiry`,\n\t\t\t\t`activation_hash`,\n\t\t\t\t`resend_token`,\n\t\t\t\t`role`,\n\t\t\t\t`is_active`,\n\t\t\t\t`is_approved`,\n\t\t\t\t`deactivated`\n\t\t\tFROM\n\t\t\t\t`users`\n\t\t\tWHERE\n\t\t\t\t`resend_token` = :token;\n\t\t\";\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':token', $token, PDO::PARAM_STR);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stmt->execute();\n\n if($user = $stmt->fetch()) {\n return $user;\n }\n\n return false;\n }", "public function findByProviderToken($token)\n {\n $user = $this->model->where('provider_id',$token)->first();\n\n if(is_null($user))\n throw new UserNotFoundException(\"The user with provider_id as $token does not exist.\");\n\n return $user;\n }", "public function get_user_by_token($token)\n\t{\n\t\t$request = $this->db->get_where('users',array('token' => $token), 1);\n\n\t\tif(!$request->result())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $request->row();\n\t}", "public function findUsingApiToken(string $token): ?UserServiceInterface;", "protected function getUserByToken()\n {\n $user = $this->generateQuery()->first();\n\n return $user;\n }", "public static function checkAuthUserByToken($token){\n $db = Db::getConnection();\n\n $result = $db->query(\"SELECT * FROM users WHERE token='\" . $token . \"';\");\n\n return $result->fetch(PDO::FETCH_ASSOC);\n }", "public function getUserBytoken ($token){\n $fetch_sql = \"SELECT * FROM `users` WHERE `token`= ?\";\n $fetch_res = $this->connect->prepare($fetch_sql);\n $fetch_res->bindvalue(1, $token);\n $fetch_res->execute();\n if ($infoUser = $fetch_res->fetch(PDO::FETCH_ASSOC)) {\n return $infoUser;\n }else{\n return false;\n }\n }", "function thrift_findByAuthToken($authToken){\n\t\t$options = array(\n\t\t\t\t'contain' => 'Owner',\n\t\t\t\t'conditions'=>array(\n\t\t\t\t\t'ProviderAccount.auth_token'=>$authToken,\n\t\t\t\t),\n\t\t\t);\n\t\treturn $this->find('first', $options);\n\t}", "public function getUser($token)\n {\n $record = $this->getTable()\n ->where('token', $token)\n ->first(['email']);\n\n if (! $record) {\n return;\n }\n\n return User::where('email', $record->email)->first();\n }", "function get_user($token) {\n\t\treturn wget('GET', 'https://www.googleapis.com/oauth2/v1/userinfo?access_token='.$token);\n\t}", "public static function getUser($token)\n {\n $user = User::where('api_token', '=', $token)->first();\n return ($user ? $user : false);\n }", "public function loadUserByToken(OidcToken $token);", "function checkUserToken($token){\n $this->db->where(\"token\", \"$token\");\n\t\treturn $this->db->getOne(\"users\",'id,firstname,lastname'); \n }", "protected function _load_user_by_token(array $token)\n\t{\n\t\treturn ORM::factory($this->_config['user_model'])\n\t\t\t->where($this->_config['columns']['token'],'=',$token[0])\n\t\t\t->find($token[1]);\n\t}", "public function user($token);", "public function getUserID($token) {\n return $this->findone(['token=?', $token])->user_id;\n }", "public function findByToken($token);", "public function resolveToken(string $token): ?User;", "public function getUserByToken(string $token)\n {\n $decode = Token::get($token);\n $userId = $decode->data->id;\n return User::find($userId);\n }", "public function retrieveByToken($identifier, $token)\n {\n return User::query()->where(\"name\",\"=\",$identifier)->where(\"token\",\"=\",$token)->first();\n }", "public static function getUserIdByToken($token){\n $db = Db::getConnection();\n\n $result = $db->query(\"SELECT id FROM users WHERE token='\" . $token . \"';\");\n\n return $result->fetch(PDO::FETCH_ASSOC);\n }", "public function findUserByConfirmationToken($token);", "public function findUserByConfirmationToken($token);", "public function getUser($token)\n {\n $record = $this->getTable()\n ->where('token', $token)\n ->first(['user_id']);\n\n if (! $record) {\n return null;\n }\n\n return User::find($record->user_id);\n }", "public function checkAccess(string $token)\n {\n return User::getUserByToken($token);\n }", "function getUserByTokenId($id, $token)\n {\n $count = 0;\n $query = $this->db->prepare(\"SELECT * FROM tbl_user WHERE id=:id AND tokenCode=:token AND count=:count\");\n $query->bindParam(\"id\", $id, PDO::PARAM_STR);\n $query->bindParam(\"token\", $token, PDO::PARAM_STR);\n $query->bindParam(\"count\", $count, PDO::PARAM_STR);\n $query->execute();\n\n return $query->fetch(PDO::FETCH_ASSOC);\n }", "public function findByToken($token): OauthUsers\n {\n $query = $this->createQueryBuilder('O');\n $query->select('O');\n $query->leftJoin(OauthAccessToken::class, 'A', 'WITH', 'O.username = A.userId');\n $query->where(\"A.accessToken = :token\");\n $query->setParameter(\"token\", $token);\n $result = $query->getQuery()->getResult();\n\n return $result[0] ?? null;\n }", "public function findByResetToken($token)\n\t{\n\t\treturn $this->user->whereResetToken($token)->first();\n\t}", "public function getUserByToken($token)\n {\n return $this->builder->where('token', removeForbiddenCharacters($token))->get()->getRow();\n }", "public function _findUser($token, $password = null)\n\t{\n\t\t$token = JWT::decode($token, $this->settings['pepper'], array('HS256'));\n\n\t\tif (isset($token->record)) {\n\t\t\t// Trick to convert object of stdClass to array. Typecasting to\n\t\t\t// array doesn't convert property values which are themselves objects.\n\t\t\treturn json_decode(json_encode($token->record), true);\n\t\t}\n\t\t$userModel = $this->settings['userModel'];\n\t\tlist($plugin, $model) = pluginSplit($userModel);\n\n\t\t$fields = $this->settings['fields'];\n\t\t$conditions = array(\n\t\t\t$model . '.' . $fields['username'] => $token->user->name,\n\t\t\t$model . '.' . $fields['token'] => $token->user->token\n\t\t);\n\n\t\tif (!empty($this->settings['scope'])) {\n\t\t\t$conditions = array_merge($conditions, $this->settings['scope']);\n\t\t}\n\t\t$result = ClassRegistry::init($userModel)->find('first', array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'recursive' => (int)$this->settings['recursive'],\n\t\t\t'contain' => $this->settings['contain'],\n\t\t));\n\n\t\tif (empty($result) || empty($result[$model])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $result[$model];\n\t\tunset($result[$model]);\n\n\t\treturn array_merge($user, $result);\n\t}", "public function user($token = null);", "protected function getUserByToken($token)\n\t{\n\t\t$response = $this->getHttpClient()->get($this->apiUrl . '/api/oauth/user', [\n\t\t\t'headers' => [\n\t\t\t\t'Authorization' => 'Bearer ' . $token,\n\t\t\t],\n\t\t]);\n\t\treturn json_decode($response->getBody(), true);\n\t}", "public function findAccessToken();", "public function findByEmailAndToken($email, $token);", "public function findUsingApiToken(string $token): ?UserEntityInterface\n {\n return $this->builder()->where('api_token', $token)->first();\n }", "public static function getByToken($token)\r\n {\r\n DB::mysqlConnection($conn);\r\n\r\n $stmt = $conn->prepare('SELECT count(*) AS count FROM user WHERE token = :token');\r\n $stmt->bindValue(':token', $token, PDO::PARAM_STR);\r\n $stmt->execute();\r\n\r\n # Nieuw user object teruggeven\r\n if ($stmt->fetch()->count == 1)\r\n {\r\n return new user($token);\r\n }\r\n }", "public static function findByPasswordReset($token)\n {\n $token = new Token($token);\n $hashed_token = $token->getHash();\n\n $sql = 'SELECT * FROM users\n WHERE password_reset_hash = :token_hash';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\n $stmt->execute();\n\n $user = $stmt->fetch();\n\n if ($user) {\n \n // Check password reset token hasn't expired\n if (strtotime($user->password_reset_expires_at) > time()) {\n\n return $user;\n }\n }\n }", "public static function byVerifyToken($token)\n {\n $user = static::where('verify_token', $token)->first();\n if(!$user){\n throw new ModelNotFoundException;\n }\n return $user;\n }", "public function getUserByEmail($token) {\n $result = mysql_query(\"SELECT * FROM ras_other_mobile_device_tokens WHERE token= '$token' LIMIT 1\");\n return $result;\n }", "public function getUserByResetPasswordToken($token)\n {\n $query = array(\n \"resetPassword.token\" => $token,\n \"resetPassword.date\" => array(\n '$gt' => Zend_Date::now()->addHour(-24)->get(Zend_Date::ISO_8601),\n '$lte' => Zend_Date::now()->get(Zend_Date::ISO_8601)\n )\n );\n \n if(!($user = $this->_getUserCollection()->findOne($query)) || empty($user)) {\n return array();\n }\n \n $user[self::KEY_ID] = (string) $user[self::KEY_ID];\n return $user;\n }", "public function findByToken($name, $tokenString)\n {\n $fromDateTime = new \\DateTime('-1 day');\n $toDateTime = new \\DateTime('now');\n\n $user = $this->createQueryBuilder('u')\n ->innerJoin('u.token', 't')\n ->where('u.name = :user_name')\n ->andWhere('u.isActive = 1')\n ->andWhere('t.createdAt > :from_datetime')\n ->andWhere('t.createdAt < :to_datetime')\n ->andWhere('t.token = :token')\n ->setParameters([\n 'user_name' => $name,\n 'from_datetime' => $fromDateTime,\n 'to_datetime' => $toDateTime,\n 'token' => $tokenString\n ])\n ->getQuery()\n ->setMaxResults(1)\n ->getOneOrNullResult();\n\n return $user;\n }", "public function findPrincipalByToken($token)\n {\n // validate the input\n if (!is_string($token)) {\n $msg = 'Invalid arguments: see function signature for ' . __FUNCTION__;\n throw new InvalidArgumentException($msg); \n }\n \n // encode our data into the remote call signature.\n $params = array(\n $this->_getToken(),\n $token,\n );\n $params = call_user_func_array(array('self', '_soapEncode'), $params);\n \n try\n {\n $result = $this->soapClient->findPrincipalByToken($params);\n return $result->out;\n }\n catch (SoapFault $e)\n {\n $args = func_get_args();\n return $this->_manageException(__FUNCTION__, $args, $e);\n }\n }", "public function loadUser(TokenInterface $token)\n {\n $user = $token->getUser()->findBy($this->config['username'], $token->getUsername());\n\n if (!$user instanceof UserInterface) {\n throw new UserNotFoundException(\"No existe el Usuario {$token->getUsername()} en la Base de Datos\");\n }\n return $user;\n }", "public function findUsingRememberToken(string $token): ?UserEntityInterface;", "public static function findByToken($token){\n\n \t$token = new Token($token);\n \t$token_hash = $token->getHash();\n\n\n $sql = \"SELECT * from remembered_logins where token_hash=:token_hash\";\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':token_hash',$token_hash,PDO::PARAM_STR); \n\n $stmt->setFetchMode(PDO::FETCH_CLASS,get_called_class());\n \n $stmt->execute();\n return $stmt->fetch(); \n }", "public function user()\n {\n $codigo = $this->tokenInfo('codigo');\n if (!$codigo || $codigo != $this->codigoUnico) {\n return null;\n }\n\n $email = $this->tokenInfo('email');\n return $this->getOrCreateUser($email);\n\n }", "public function retrieve($token)\n {\n // We return an object here either if the passed token is an integer (ID)\n // or if we are passed a model object of the correct type\n if (filter_var($token, FILTER_VALIDATE_INT) !== false)\n {\n return $this->model()->cache(Config::get('auth.cacheUser'))->find($token);\n }\n else if (is_object($token) and get_class($token) == Config::get('auth.model'))\n {\n return $token;\n }\n }", "private function getIDUserToken($token){\n try{\n $query = $this->db->prepare(\"SELECT id,\n password,\n temp_pass\n FROM usuario\n WHERE token = :token\n \");\n\n $query->bindParam(':token', $token);\n $query->execute();\n if($query->rowCount() <= 0) return false;\n\n return $query->fetch(PDO::FETCH_ASSOC);\n }catch(PDOException $e){\n return $e;\n }\n }", "public function find_user($id);", "public function findUser ( )\n {\n return $this->executeRequest('user','GET');\n }", "public function getGuardUser()\n {\n if (!$this->has($this->getTokenName()))\n {\n return null;\n }\n \n if (is_null($this->quartz_guard_user))\n {\n $table = $this->orm->getTable($this->quartz_guard_user_classname);\n $token = $this->get($this->getTokenName(), '?');\n \n $criteria = array(\n sprintf(\"extra_infos->'token' = '%s'\", $table->escape($token, 'string'))\n );\n $res = $table->find($criteria, null, 1);\n $this->quartz_guard_user = $res->current();\n }\n\n return $this->quartz_guard_user;\n }", "function get_user_id_for_user_token($user_token)\n {\n // Example Query: SELECT user_id FROM user_token_link WHERE user_token = <user_token>\n // Return the user_id or null if none found.\n return DB::table('users')\n ->where('user_token', 'like', $user_token)->value('id');\n }", "public function loadUserByToken($token)\n {\n return $this->apiCall('get', 'user/get-by-token/' . $token, null, 'User', [], false);\n }", "public function findUser()\n {\n if ($this->verifyToken()) {\n $this->user = (new User())->find($this->decodedToken->id);\n $this->id = $this->user->id();\n\n return true;\n } else {\n $this->user = null;\n }\n\n return false;\n }", "public function getUser($token)\n {\n $uri = $this->apiUrl . '/user';\n \n return $this->getBody('GET', $uri, ['headers' => ['Authorization' => 'token ' . $token]]);\n }", "public function retrieveByToken($identifier, $token){\n\t\t$user = $this->model->where('id', '=', $identifier)->where('token', '=', $token)->first();\n\t\treturn $user;\n\t}", "public static function getUserFromToken($token)\n {\n try {\n $decode = JWT::decode($token, self::$key, self::$encryption);\n } catch (\\Exception $e) {\n return 0;\n }\n\n if($decode) {\n return $decode->data->id;\n } else {\n return 0;\n }\n }", "public function retrieveByToken($identifier, $token)\n {\n return $this->user_repository->getByToken($token);\n }", "public function getByRestoreToken($token)\n {\n $query = $this->entityManager->createQuery('\n SELECT e\n FROM ' . User::class . ' e\n WHERE e.restoreToken = :token'\n )->setParameter('token', $token);\n if ($query->getResult() != null)\n return $query->getResult()[0];\n return null;\n }", "protected function getUserByToken($token)\n {\n if ($this->request->input('dc_agreement') == 0) {\n return ['uniquekey' => $this->request->input('uniquekey')];\n }\n\n $response = $this->getHttpClient()->get('https://login.doccheck.com/service/oauth/user_data/', [\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$token,\n ],\n ]);\n\n return json_decode($response->getBody(), true);\n }", "public function findUidByToken ($token);", "public function getUser()\n {\n $userClass = $this->userClass;\n $identity = $this->session->get(self::TOKEN_NAME);\n if (isset($identity[ 'id' ])) {\n $user = $userClass::findFirst([\n 'conditions' => $userClass::getQualifier() . ' = :val:',\n 'bind' => [\n 'val' => $identity[ 'id' ]\n ]\n ]);\n if ($user == false) {\n public_exception('auth.userNotFound', 404);\n }\n\n return $user;\n }\n\n return false;\n }", "public static function getUserEidFromToken(string $token) : ?string\r\n {\r\n // api key, return null if the token isn't at least 30 characters\r\n if (strlen($token) < 30)\r\n return null;\r\n\r\n $token = self::base64_url_decode($token);\r\n $user_info = \\Flexio\\Base\\Util::decrypt($token, $GLOBALS['g_store']->connection_enckey);\r\n if (!$user_info)\r\n return null;\r\n\r\n $user_info = json_decode($user_info, true);\r\n if ($user_info === false)\r\n return null;\r\n\r\n $token_timestamp = $user_info['timestamp'] ?? false;\r\n if ($token_timestamp === false)\r\n return null;\r\n\r\n // compare the timestamp to the current time; if the timestamp is more than\r\n // a certain period time after the one in the token, then the token is\r\n // no longer valid, so return null; note: we used to also look for instances\r\n // where the token time was less the current system time and treated these\r\n // like an expired token as well; however, this caused problems because\r\n // a token could be generated on one server using and then used on another\r\n // server with time slightly ahead of the original server it was generated on,\r\n // causing a $date_diff_seconds to be negative and the function to not return\r\n // the user; while we want to check for expired tokens, we don't need to worry\r\n // so much about negative $date_diff_seconds, since the negative diff should\r\n // only be slightly, and the token is encrypted, so the negative value can't\r\n // come from somebody else trying to spoof the timestamp; TODO:however, should\r\n // consider moving over to some type of synced timestamp (using NTP?); see note\r\n // in \\Flexio\\Base\\Util::getCurrentTimestamp()\r\n // TODO: current time token period is set to 365 days; should we use a smaller\r\n // time period with refresh tokens?\r\n $current_timestamp = \\Flexio\\Base\\Util::getCurrentTimestamp();\r\n $date_diff_seconds = \\Flexio\\Base\\Util::formatDateDiff($token_timestamp, $current_timestamp);\r\n if ($date_diff_seconds > 60*60*24*365)\r\n return null;\r\n\r\n // return the user info\r\n return $user_info['eid'];\r\n }", "public static function findIdentityByAccessToken($token, $type = null)\n {\n return User::findOne(['AccessToken' => $token]);\n }", "public function retrieveByToken($identifier, $token)\n {\n $user = $this->getGenericUser(\n $this->conn->table($this->table)->find($identifier)\n );\n return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)\n ? $user : null;\n }", "public function getAuthedUser(string $token = null): Result\n {\n if ($token !== null) {\n $this->withToken($token);\n }\n\n return $this->get('users', [], null);\n }", "protected function getUserByToken($token)\n {\n $response = $this->getHttpClient()->get(config('sso.url') . '/api/user', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $token\n ]\n ]);\n\n return json_decode($response->getBody(), true);\n }", "public function findByPasswordResetToken($token): User\r\n {\r\n $user = User::findOne([\r\n 'password_reset_token' => $token,\r\n 'status' => User::STATUS_ACTIVE,\r\n ]);\r\n\r\n if (!$user) {\r\n throw new \\InvalidArgumentException('Wrong password reset token.');\r\n }\r\n return $user;\r\n }", "public function findParticipantFromToken($token)\n {\n\t\tforeach($this->getParticipants() as $participant) {\n\t\t\tif($participant->getToken() == $token) {\n\t\t\t\treturn $participant;\n\t\t\t}\n\t\t}\n return null;\n }", "public function findByApiToken(string $apiToken): ?UserInterface;", "protected function getUserByToken($token)\n {\n $response = $this->getHttpClient()->get('/plus/v1/people/me?', [\n 'query' => [\n 'prettyPrint' => 'false',\n 'fields' => config('youtube.fields.google'),\n ],\n 'headers' => [\n 'Authorization' => 'Bearer ' . $token,\n ],\n ]);\n \n return json_decode($response->getBody(), true);\n }", "public function findUserByConfirmationToken($token)\n {\n return $this->findUserBy(['confirmationToken' => $token]);\n }", "public function retrieveByToken($identifier, $token)\n {\n $user = LocalUser::where('username', $identifier)->where(User::REMEMBER_TOKEN, $token)->first();\n if ($user) {\n return User::find($user->username);\n }\n }", "public static function findByToken($token)\n {\n foreach (self::$users as $user) {\n if (strcasecmp($user['plan_token'], $token) === 0) {\n return new static($user);\n }\n }\n\n return null;\n }", "public function retrieveByToken($identifier, $token): ?DevUser\n {\n foreach ($this->user_data as $value) {\n if ($value['id'] === $identifier && $value['remember_token'] === $token) {\n return $this->getGenericUser($value);\n }\n }\n\n return null;\n }", "public function getTokenUser( $token )\n {\n\n $result = $this->database->getToken( $token );\n\n if( $result == null )\n {\n\n return null;\n }\n\n return $result->userid;\n }", "public function fetchUser()\n {\n /** @var AccessToken $token */\n $token = $this->getAccessToken();\n\n return $this->fetchUserFromToken($token);\n }", "protected function findUserBySocialMedia()\n {\n return SocialMedia::whereProvider($this->provider)\n ->whereSocialId($this->account->getId())\n ->first()\n ->user;\n }", "public function findByToken(string $token)\n {\n return $this->model->where('api_token', '=', $token)->firstOrFail();\n }", "public function retrieveByToken($identifier, $token)\n {\n $class = $this->userClass;\n\n return $class::query(true)->where([\n 'objectId' => $identifier,\n 'rememberToken' => $token\n ])->first();\n }", "private function _getUserInfo($token)\n {\n\n $url = 'https://medusa.trmn.org/oauth/user';\n $headers = [];\n\n if (strlen($token) < 100) {\n $url .= '?access_token=' . $token;\n } else {\n $headers[] = 'Authorization: Bearer ' . $token;\n }\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n if (count($headers) > 0) {\n curl_setopt($ch, CURLOPT_HEADER, $headers);\n }\n\n $results = json_decode(curl_exec($ch));\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n \n if ($httpcode == 200) {\n return $results;\n }\n \n return null;\n }", "public function findByToken(string $token)\n {\n return $this->modelInstance->where(\"token\", $token)->get()->first();\n }", "public function fetch($token){\n\t\treturn $this->find(\n 'first',\n array(\n 'conditions'=>array(\n 'or'=>array(\n \"{$this->alias}.id\"=>$token,\n \"{$this->alias}.slug\"=>$token\n )\n ),\n 'contain'=>array(\n 'CreatedUser'=>array(\n 'UserProfile'=>array()\n ),\n 'Tag'=>array(\n 'Tagged'=>array()\n )\n )\n )\n );\t\t\t\t\t\t\n\t}", "protected function getUserByToken($token)\n {\n $response = $this->getHttpClient()->get('https://accounts.haravan.com/connect/userinfo', [\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer ' . $token,\n ],\n ]);\n\n return json_decode($response->getBody(), true);\n }", "public function findUsingForgotToken(string $token): ?UserEntityInterface;", "protected function getGithubUser($token)\n {\n $http = new HttpClient('https://api.github.com');\n $user = $http->get('/user', array('access_token' => $token));\n\n return $user['body'];\n }", "protected function findUserByEmail()\n {\n return User::whereEmail($this->account->getEmail())->first();\n }", "public function checkToken($token, $userid)\n {\n return $this->db->get_where('users',array('mobile_number'=>$token,' entity_id'=>$userid))->first_row();\n }", "public static function findByPasswordReset(string $token) {\n $token = new Token($token);\n\n $sql = \"\n\t\t\tSELECT\n\t\t\t\t`id`,\n\t\t\t\t`email`,\n\t\t\t\t`password`,\n\t\t\t\t`password_reset_hash`,\n\t\t\t\t`password_reset_expiry`,\n\t\t\t\t`activation_hash`,\n\t\t\t\t`role`,\n\t\t\t\t`resend_token`,\n\t\t\t\t`is_active`,\n\t\t\t\t`is_approved`,\n\t\t\t\t`deactivated`\n\t\t\tFROM\n\t\t\t\t`users`\n\t\t\tWHERE\n\t\t\t\t`password_reset_hash` = :hash;\n\t\t\";\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':hash', $token->getHash(), PDO::PARAM_STR);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stmt->execute();\n\n if($user = $stmt->fetch()) {\n if(strtotime($user->password_reset_expiry) > time()) {\n return $user;\n }\n }\n\n return false;\n }", "function FindUserIDFromToken($token)\n{\n //Assume that a userID with this token does not exist\n $result = array();\n $result[\"id\"] = \"\";\n $result[\"found\"] = false;\n\n //global mysql object\n global $mysql_connection;\n \n //clean the input\n $token = $mysql_connection->real_escape_string($token);\n\n //Find the ID using this query\n $query = \"select t.userID from tokens t where t.token = '$token';\";\n\n $IDExists = mysqlQuery($query);\n //If only 1 match is found then we can return this result.\n if($IDExists->num_rows == 1)\n {\n $row = $IDExists->fetch_assoc();\n $result[\"id\"] = $row[\"userID\"];\n $result[\"found\"] = true;\n }\n\n return $result;\n}", "public function checkTokenAndGetUserId(string $token): int\n {\n $entry = $this->getEntryByToken($token);\n\n if (is_null($entry)) {\n throw new UserTokenNotFoundException('Token \"' . $token . '\" not found');\n }\n\n if ($this->entryExpired($entry)) {\n throw new UserTokenExpiredException(\"Token of id {$entry->id} has expired.\", $entry->user_id);\n }\n\n return $entry->user_id;\n }" ]
[ "0.69936484", "0.6978337", "0.69096893", "0.6874104", "0.67598754", "0.6699388", "0.66697246", "0.6654324", "0.6651768", "0.6646052", "0.66432095", "0.6572863", "0.6572575", "0.65724444", "0.65699327", "0.65171707", "0.6443959", "0.64019346", "0.63994455", "0.639573", "0.63944787", "0.63804907", "0.6361985", "0.6350148", "0.63488215", "0.63282114", "0.63183326", "0.6315328", "0.62997836", "0.62923807", "0.6285888", "0.6285888", "0.62687373", "0.6225744", "0.621916", "0.62091845", "0.6159838", "0.61547637", "0.614914", "0.61245865", "0.61150956", "0.60904557", "0.60887146", "0.60866034", "0.60842025", "0.6081662", "0.6059137", "0.6055242", "0.6042582", "0.60160667", "0.6014873", "0.60101414", "0.6003055", "0.59763235", "0.5974511", "0.59710616", "0.59698564", "0.59674245", "0.5965654", "0.59637296", "0.5953898", "0.5931625", "0.5924834", "0.5914351", "0.59090006", "0.59009707", "0.5899437", "0.5895163", "0.58864844", "0.58846116", "0.5882814", "0.58795154", "0.586665", "0.58519804", "0.5850742", "0.58466715", "0.5837821", "0.5832849", "0.58221495", "0.58194166", "0.5818426", "0.58125526", "0.5803639", "0.5794087", "0.57771575", "0.57759225", "0.5775619", "0.5756107", "0.573974", "0.5737632", "0.5733641", "0.5732838", "0.57309335", "0.5728606", "0.57217413", "0.5721363", "0.57184184", "0.5707213", "0.5706017", "0.5677162" ]
0.7324513
0
Find by phone number.
Найти по телефону.
public function find_by_phone($number) { $user = $this->with('profile')->where('profile.phone', $number)->find(); if ($user->loaded) { return $user; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findByPhoneNumber($phoneNumber);", "public static function findByPhone($phone) {\n return static::findOne(['real_phone' => $phone]);\n }", "public function findByPhone ($phone) {\n return $this->findOneBy(array('phone' => $phone, 'state' => TRUE));\n \t}", "public static function findByPhone($phone) {\n return static::findOne(['mobile' => $phone]);\n }", "public function findStudentByPhone($phone){\n $this->db->query('SELECT * FROM students WHERE phone = :phone');\n // Bind value\n $this->db->bind(':phone', $phone);\n \n $row = $this->db->single();\n \n // Check row\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n }", "public static function findByPhone($phone)\n {\n \treturn static::findOne(['mobile' => $phone, 'status' => self::STATUS_ACTIVE]);\n }", "public function getByPhone($phone)\n {\n return $this::where(['uPhone'=>$phone])->first();\n }", "public function get_phone();", "public function get_by_number($number)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Attempt to retrieve the contact ID\n\t\t\t$contact = DB::select()\n\t\t\t\t->from('contacts')\n\t\t\t\t->where('number', '=', $number)\n\t\t\t\t->execute();\n\t\t\t\t\n\t\t\t// Return the ID belonging to that number, or FALSE\n\t\t\tif ($contact->count() > 0)\n\t\t\t\treturn $contact->get('id');\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// echo $e->getMessage();\n\t\t\treturn false;\n\t\t}\n\t}", "function get_number($m_number){\r\n $sql=\"select * from restaurant_waiter where waiter_mobile like ?\";\r\n $data= $this->db->query($sql,\"$m_number\");\r\n return $data->result();\r\n }", "public function getPhoneNumber();", "public function searchByPhone($phone)\n {\n $path = $this->phoneSearchPath . \"?\" . $this->prepareQueryParams(['phone' => $phone]);\n\n return $this->request($path);\n }", "public function fetchByPhone($phone)\n {\n // Verificar si el telefono es valido\n if($phone == ''){\n return null;\n }\n // Devolver usuario\n return $this->tableGateway->select(function (\\Zend\\Db\\Sql\\Select $select) use($phone) {\n $select->where->addPredicate(new \\Zend\\Db\\Sql\\Predicate\\Expression('phone LIKE ?', '%' . substr($phone, -8)));\n $select->where->addPredicate(new \\Zend\\Db\\Sql\\Predicate\\Expression('deleted = 0'));\n })->current();\n }", "public function getPersonPhone();", "public static function findbyNumber($numero): Contact\n\t\t{\n\t\t// \tglobal $conn;\n\t\t// \tglobal $result_out;\n\t\t// \t$name = mb_ereg_replace(\"/[^a-zа-яё0-9/-]/\", \"\", $name);\n\t\t// try {\n\t\t// \t$select = $conn->query(\"SELECT numero FROM contacto where numero = $numero)\");\n\t\t// \t$select->setFetchMode(PDO::FETCH_OBJ);\n\t\t// \t$items = $select->fetchAll();\n\t\t// \tunset($select);\n\t\t// \t$row_num = count($items);\n\t\t// \t$obj = (object) array('result' => true, 'count' => \"Registros encontrados\" . $row_num, 'items' => $items);\n\t\t// \techo json_encode($obj);\n\t\t// \t$result_out = true;\n\t\t// \treturn $conn;\n\n\t\t// }catch(PDOException $e) {\n\n\t\t// }\n\t\t$contacto = new Contact();\n\t\tif($numero != $contacto->getNumero()){\n\t\t\texit;\n\t\t}else{\n\t\t\treturn $contacto;\n\t\t\t// $call = new Call();\n\t\t\t// $call->setMessage($message);\n\t\t\t// return $call;\n\t\t}\n\t\t\n\t}", "function get_phone_number($user_id)\r\n\t{\r\n\r\n\t\t$this->db->where('LOWER(id)=', strtolower($user_id));\r\n\t\t//$this->db->or_where('LOWER(new_email)=', strtolower($email));\r\n\r\n\t\t$query = $this->db->get($this->table_name);\r\n\t\tif ($query->num_rows() == 1)\r\n {\r\n return $query->row()->phone;\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n\t}", "public function getUserByPhone($phone) {\n \t$result = mysql_query(\"SELECT * FROM users WHERE phone_number = '$phone'\") or die(mysql_error());\n\n \t$no_of_rows = mysql_num_rows($result);\n \tif ($no_of_rows > 0) {\n return mysql_fetch_assoc($result);\n } else {\n // user not found\n return false;\n }\n }", "function get_dataByPhoneNumber($number)\n\t{\n\t\t$this->db->from('dt_usuarios u');\n\t\t$this->db->join('dt_colaboradores c', 'u.usr_id = c.clb_id');\n $this->db->where('c.clb_telefono', $number);\n $query = $this->db->get();\n return ($query->num_rows() != 0) ? $query->row() : FALSE;\n\t}", "public function getPhoneByPhone($phone)\n {\n return $this->call('getPhoneFromAddressBook', [\n 'phone' => $phone\n ]);\n }", "function getContactByPhone(int $Phone):iContact;", "public function getVerifiedPhoneNumber() {\n\t\t// Get code from DB\n\t\t$stmt = $this->db->prepare(\"SELECT phone, verifyCode FROM users WHERE id = :userID\");\n $stmt->bindValue(\":id\", $this->getUserID(), SQLITE3_INTEGER);\n $results = $stmt->execute();\n // Only get first row\n $row = $results->fetchArray();\n $stored_code = $row[\"verifyCode\"];\n // Check if the number has been verified and return it if it has\n if ($stored_code === \"verified\") \n \treturn $row[\"phone\"];\n else\n \treturn false;\n\t}", "public static function findByPhone($phone)\n {\n foreach (\\Yii::$app->params[\"users\"] as $user) {\n if (strcasecmp($user['phone'], $phone) === 0) {\n return new static($user);\n }\n }\n\n return null;\n }", "public function getMobilePhoneNumber();", "public function findByCellphone($phoneNumber)\n {\n return static::findOne(['userCellphone' => $phoneNumber]);\n }", "function _getUserByPhoneNumber($phone_number) {\n\treturn _getUser(\"phone_number\", $phone_number); \n}", "public function getByNumber(string $number);", "public function getWorkPhoneNumber();", "function detect_number ($number) {\n $number = str_replace(array('-', '.', ' '), '', $number);\n\n // $number is not a phone number\n if (!preg_match('/^0[0-9]{9,10}$/', $number)) return false;\n\n // Store all start number in an array to search\n $start_numbers = array_keys($GLOBALS[\"carriers_number\"]);\n\n foreach ($start_numbers as $start_number) {\n // if $start number found in $number then return value of $carriers_number array as carrier name\n if (start_with($start_number, $number)) {\n return $GLOBALS[\"carriers_number\"][$start_number];\n }\n }\n\n // if not found, return false\n return false;\n}", "public function actionCheckphonenumberexist()\n {\n $phone_number = $_POST['phone_number'];\n \n $response = User::select_phone_number_exist($phone_number);\n return $response;\n }", "public static function getByPhone($phone)\n {\n $sql = \"SELECT user_id\n FROM user\n WHERE phone = '$phone'\n LIMIT 1\";\n\n $result = DB::select($sql);\n\n if($result->num_rows > 0) {\n return DB::returnValue($result)['user_id'];\n }\n\n return -1;\n }", "public function getPhoneByOrderNo($order_no) {\n \t $order_no = explode(\",\", $order_no);\n \t \n $data = $this->find(\"first\", array(\n 'fields' => array('Order.phone'),\n 'conditions' => array('Order.order_no' => $order_no)\n ));\n \n if(empty($data)) \n return '';\n else \n return $data['Order']['phone'];\n }", "function checkPhone($phone){\r\n\tmysqlConnect();\r\n\t$res = mysql_query(\"SELECT id FROM users WHERE phone_number='+1$phone'\");\r\n\tif (mysql_num_rows($res)){\r\n\t\treturn 0;\r\n\t}\r\n\telse return 1;\r\n}", "public function getCellPhone();", "public static function findByPhone($phone)\n {\n return static::findOne(['phone' => $phone, 'status' => self::STATUS_ACTIVE]);\n }", "public function getPhoneNumberForVerification();", "public function getPhoneNumberForVerification();", "public function findForPassport( string $phone_no ) : User\n {\n return $this->where('username', $phone_no)->first();\n }", "public function getUserPhones() {\n $result = $this->db->select(\n \"SELECT * FROM `phone_numbers` WHERE `user_id_fk` = :id ORDER BY `best_order` ASC\",\n array (\"id\" => $this->user_id)\n );\n\n if (count($result) > 0) {\n return $result;\n } else {\n return false;\n }\n }", "public function getRetailerByPhone($phonenumber)\n {\n return $this->retailerRepository->findOneBy(\n array(\n 'deleted' => false,\n 'disabled' => false,\n 'phoneNumber' => $phonenumber,\n )\n );\n }", "function gnj_get_user_by_phone($phone_no, $phone_code = '')\n{\n\n $meta_query_args = array(\n 'relation' => 'AND',\n array(\n 'key' => 'gnj_phone_no',\n 'value' => $phone_no,\n 'compare' => '='\n )\n );\n\n if ($phone_code) {\n $meta_query_args[] = array(\n 'key' => 'gnj_phone_code',\n 'value' => $phone_code,\n 'compare' => '='\n );\n }\n\n $args = array(\n 'meta_query' => $meta_query_args\n );\n\n $user_query = new WP_User_Query($args);\n\n $phone_users = $user_query->get_results();\n\n if (count($phone_users) === 1) {\n return $phone_users[0];\n } else {\n return false;\n }\n}", "public function getDetailsbyNumber($pn)\n\t{\n\t\t$user = db_fetch(\"\",\"\",\"\",\"\",\"right(replace(replace(replace(u.phone,'+',''),' ',''),'-',''),9) = '\".$pn.\"'\", \"u.*, r.name_ID\", \"user u left join registration r ON r.user_HD = u.id\", false, false, null);\n\n\t\t//TODO: Look it up in the members\n\t\t//TODO: Look it up in the search (>registration) db\n\n\t\tif (sizeof($user) > 0)\n\t\t{\n\t\t\t$company = \"NA\";\n\n\t\t\tif (isset($user[0]['name_ID']) and $user[0]['name_ID'] != \"\")\n\t\t\t{\n\t\t\t\t$company = $user[0]['name_ID'];\n\t\t\t}\n\n\t\t\t$resp = json_encode(array(\"contact\" =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\"=> $user[0]['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"firstname\" => $user[0]['first_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"lastname\" => $user[0]['last_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"company\" => $company,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"email\" => $user[0]['emailAddress'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"businessphone\" => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"businessphone2\" => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mobilephone\" => cleanupPhone($user[0]['phone']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mobilephone2\" => cleanupPhone($user[0]['phone']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"url\" => \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t)));\n\n\t\t }\n\t\t else\n\t\t {\n\t\t \t$resp = \"{}\";\n\t\t }\n\n\t\t return $resp;\n\t}", "public function phoneLogin( $data )\n {\n return Db::name('user')->where('mobile', $data )->find();\n }", "public function contactPhoneAction()\n {\n $searchText = $this->get('request')->query->get('query');\n $organizationId = $this->get('request')->query->get('organizationId');\n //$phoneType = $this->get('request')->query->get('phoneType');\n\n /** @var \\SD\\UserBundle\\Entity\\UserRepository $repository */\n $repository = $this->getDoctrine()->getRepository('ListsContactBundle:ModelContact');\n\n $objects = $repository->getSearchPhoneQuery(trim($searchText), $organizationId)\n ->getQuery()\n ->getResult();\n\n $result = array();\n\n $result[] = array(\n 'id' => $searchText,\n 'value' => $searchText,\n 'name' => $searchText,\n 'text' => $searchText\n );\n\n foreach ($objects as $object) {\n $this->processModelContactForJson($object);\n\n $result[] = $this->serializeArray($object);\n }\n\n return new Response(json_encode($result));\n }", "public function get_phone_verification () {\n\n\t\t$addressID = $this->get_param('post.addressID');\n\t\t$isPhoneVerified = M('user_address')->field('`phone_verified`')\n\t\t->where(\"`id`=$addressID\")\n ->find();\n\t\t\n\t\t$this->return_data(isset($isPhoneVerified['phone_verified'])?$isPhoneVerified['phone_verified']:-1);\n\t}", "public static function extract(string $phoneNumber): ?string;", "public function getDisplayPhoneNumber();", "function checkPhoneNumber($phone,$role,$ccd = null)\n\t{\n\t\tif($ccd)\n\t\t{\n\t\t\t$this->db->where(\"country_code\",$ccd);\n\t\t}\n\t\t$this->db->where(\"contact_no\",$phone);\n\t\t$this->db->where(\"is_active\",\"1\");\n\t\t$this->db->where(\"role_id\",$role);\n\t\t$query = $this->db->get(\"tbl_users\");\n\t\treturn $query->result();\n\t}", "public function findPh($id){\n $q2 = \"SELECT phone FROM \".$this->table_name.\" WHERE client_id ='\".$id.\"';\";\n $getPh =sqlsrv_prepare($this->conn,$q2);\n sqlsrv_execute($getPh);\n $phone = sqlsrv_fetch($getPh);\n $phone=sqlsrv_get_field($getPh,0);\n if($phone== NULL){\n http_response_code(404);\n echo json_encode(\n array(\"message\" => \"Phone number does not exist\")\n );\n return;\n }\n $otp = mt_rand(10000,99999);\n //adding otp in db\n $u = \"UPDATE \".$this->table_name.\" SET otp =\".$otp.\" WHERE phone='\".$phone.\"';\";\n $updateOTP = sqlsrv_prepare($this->conn,$u);\n sqlsrv_execute($updateOTP);\n $this->sendOTP($phone,$otp);\n }", "function rechercheTelephone($rechercher)\n{\n\n\t$modif = false;\n\t\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t\n\n\t\t\n\t\t$req = \"\tSELECT id, NomSociete, Adresse, Telephone, TelMobileI, NomI, PrenomI,IdInterlocuteur\n\t\t\t\t\tFROM interlocuteur\n\t\t\t\t\tINNER JOIN fichesociete ON interlocuteur.IdFicheSociete = fichesociete.id\n\t\t\t\t\t\n\t\t\t\t\tWHERE Telephone LIKE '%$rechercher%'\n\t\t\t\t\tOR TelMobileI LIKE '%$rechercher%'\n\t\t\t\t\torder by NomSociete\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\";\n\t\n\t\t$res = $pdo -> query($req)->fetchall();\n\t\t\n\t}\n\n\treturn $res;\n}", "function getccdphone($phone, $ccdnum)\n\t{\n\t\t\n\t\t$sql = \"SELECT * FROM tbl_memberinfo WHERE substr(AES_DECRYPT(cardnumber, '12345'), -4) = '$ccdnum' AND member_phonenumber like '%$phone%'\";\n\t\t$query = $this->db->query($sql);\n\t\n\t\t//return $query->row();\n\t\treturn $query->result_array();\n\t\t\n\t}", "public function find($zipcode);", "public function numberSeach($number) {\n /*$number = $number . '%';*/\n $query = $this->link->prepare(\"SELECT *\n FROM anime\n WHERE number = ?\");\n $query->bindValue(1, $number);\n\n try {\n $query->execute();\n return $this->returnAnime($query->fetchAll(), SORT_ASC, 'name');\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "abstract public function GetPhone(int $userid);", "private function __verifyPhone($smsPhone) {\n\n\t\t$phones = hash::combine(\n\t\t\t$this->Patient->find('all', array('fields' => array('code', 'cellular'))),\n\t\t\t'{n}.Patient.id',\n\t\t\tarray('%s%s', '{n}.Patient.code', '{n}.Patient.cellular')\n\t\t);\n\t\tforeach ($phones as $id => $phone) {\n\t\t\tif ($phone === $smsPhone) {\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function getPhoneByEmail($email){\n $sql = \"SELECT * FROM users WHERE Email = :email\";\n \n $this->db->makeCamelCase();\n $this->db->query($sql);\n $this->db->bind(':email',$email);\n $stmt = $this->db->getStmt();\n $this->db->execute();\n \n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n return $row['Phone'];\n }\n }", "public function getTelephone();", "public function getTelephone();", "public function userPhoneAction()\n {\n $searchText = $this->get('request')->query->get('query');\n\n $repository = $this->container->get('sd_user.repository');\n\n $objects = $repository->getOnlyStuff()\n ->andWhere('lower(stuff.mobilephone) LIKE :q')\n ->setParameter(':q', mb_strtolower($searchText, 'UTF-8') . '%')\n ->getQuery()\n ->getResult();\n\n $result = array();\n\n foreach ($objects as $object) {\n $result[] = array(\n 'id' => $object->getId(),\n 'value' => $object->getId(),\n 'name' => $object->getStuff()->getMobilephone(),\n 'text' => $object->getStuff()->getMobilephone()\n );\n }\n\n return new Response(json_encode($result));\n }", "public function userphoneno_exists() \n\t{\n\t\t$users_phone = trim($this->input->post ( 'phone_no' ));\n\n\t\t$where = array ('users_phone' => trim ( $users_phone ));\n\t\t\n\t\t$result = $this->Mydb->get_record ( 'users_id', $this->table, $where );\n\t\tif (! empty ( $result )) {\n\t\t\t$this->form_validation->set_message ( 'userphoneno_exists', get_label('userphone_exists') );\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function checkInputPhoneNumber($phoneNumber,$month)\n\n{\n\n return $this->db->select('id')\n\n ->from('sada_form_contact')\n\n ->where('month(tgl_contact)',$month)\n\n ->where('telp',$phoneNumber)\n\n ->get()\n\n ->first_row();\n\n}", "public function map_guest_mobile($mobile_number){\n $users = ClassRegistry::init('User');\n $map_mobile_query = $users->find('first', array(\n 'conditions' => array('mobile_number' => $mobile_number),\n 'fields' => array('id'),\n ));\n $mobile_number=$map_mobile_query['User']['id'];\n return $mobile_number; \n }", "public function getHomePhoneNumber();", "public function getPhoneNumber()\n {\n if (array_key_exists(\"phoneNumber\", $this->_propDict)) {\n return $this->_propDict[\"phoneNumber\"];\n } else {\n return null;\n }\n }", "public function getPhoneNumber(): ?string;", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber() {\n // Write log when start request\n $message = '[LINKED VIP][GET - Get Phone Number] {accountname: ' . $this->params['accountname'] . '}';\n Core_Log::sendLog($message);\n\n $Core_User = Core_User::getInstance();\n $data = $Core_User->checkAccountFromPassportNew($this->params['accountname']);\n\n if (isset($data) && isset($data->Telephone)) {\n $message = '[LINKED VIP][RESPONE SUCCESFULLY] - DATA: ' . $data->Telephone . \"\\n\";\n Core_Log::sendLog($message);\n return $data->Telephone;\n }\n\n $message = '[LINKED VIP][RESPONE SUCCESFULLY]' . \"\\n\";\n Core_Log::sendLog($message);\n return null;\n }", "public function getPhoneNumber()\n {\n return $this->phone;\n }", "function getByMobile( $mobile )\n { \n \t$sql = \"SELECT * FROM customers\"\n \t. \" WHERE customers.phone = '$mobile'\";\n \t\n \t$this->query( $sql );\n }", "public static function getPhoneNumberField(): string;", "public function getPhoneNumber(){\n return $this->phone_number;\n }", "protected function pf_phone()\r\n {\r\n #verefication phone string\r\n\r\n $phone = $this->empty_data('phone');\r\n if ($phone === false):\r\n foreach ($this->phone As $key => $value){\r\n if (is_array($value)):\r\n if(preg_match($value[1], $value[0])):\r\n $this->data['phone'][$key] = $value[0];\r\n else:\r\n $this->error[$key] = false;\r\n endif;\r\n else:\r\n if(preg_match('/^((8|\\+7)[\\- ]?)?(\\(?\\d{3}\\)?[\\- ]?)?[\\d\\- ]{7,10}$/', $value)):\r\n $this->data['phone'][$key] = $value;\r\n else:\r\n $this->error[$key] = false;\r\n endif;\r\n endif;\r\n }\r\n endif;\r\n\r\n }", "public function getTelephone() {}", "public static function number($number)\n {\n return self::where('number', $number)->first();\n }", "function find($id){\n\t\t $query = \"SELECT * FROM \".$this->table.\" WHERE customerNumber = \".$id;\n\n\t\t // Thuc thi cau lenh truy van co so du lieu\n\n\t\t return $data = $this->connection->query($query)->fetch_assoc();\n\t\t}", "public function getPhoneNumber() {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n\t{\n\t\treturn $this->phoneNumber;\n\t}", "public function searchContactGroup($phonenumber){\n $contact = Contact::where('phone', $phonenumber)->first();\n if(!$contact){\n return null;\n }else{\n $id_cont = $contact->id;\n $groups = GroupContact::where('id_contact' ,$id_cont)->get();\n return $groups->toArray();\n }\n }", "public function matchContact(){\n \n $user_table = get_table_name('user');\n $contacts = $this->input->post('contacts');\n $contact = str_replace(\",\",\"|\",$contacts);\n $sql = \"SELECT mobile\n FROM \".$user_table.\"\n WHERE mobile REGEXP(?)\";\n $data = $this->db->query($sql,$contact)->result_array();\n return $data;\n }", "function verifyPhone($phone){\r\n\t\t\treturn preg_replace(\"/[^0-9]/\",\"\",$phone);\r\n\t\t}", "function filter_phone($value) {\n\t$regex = '/^(?:\\d*(?:[. -])?)?(?:\\((?=\\d{3}\\)))?([2-9]\\d{2})(?:(?<=\\(\\d{3})\\))? ?(?:(?<=\\d{3})[.-])?([2-9]\\d{2})[. -]?(\\d{4})(?: (?i:ext)\\.? ?(\\d{1,5}))?$/';\n\tif(preg_match($regex, $value))\n\t\treturn $value;\n\telse\n\t\treturn false;\n}", "public function retrieve_record($serial_number, $where = '', $bindings = array())\n {\n if (! authorized_for_serial($serial_number)) {\n return false;\n }\n\n // Prepend where with serial_number\n $where = $where ? 'serial_number=? AND '.$where : 'serial_number=?';\n\n // Push serial number in front of the array\n array_unshift($bindings, $serial_number);\n \n return $this->retrieveOne($where, $bindings);\n }", "public function get_phone() {\n\t\tif( !isset( $this->phone ) ) {\t\t\t\n\t\t\t$sql = \"SELECT c.pf_phone\";\n\t\t\t$sql = $sql . \" FROM \" . PHPBB_PREFIX . \"_profile_fields_data c\";\n\t\t\t$sql = $sql . \" WHERE c.user_id = \" . $this->user_id . \";\";\n\t\t\t\n\t\t\tif( $result = $this->db->query($sql) ) {\n\t\t\t\tif( $result->num_rows == 1 ) {\n\t\t\t\t\t$row = $result->fetch_object();\n\t\t\t\t\t$this->phone = $row->pf_phone;\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->phone = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->db->error;\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn $this->phone;\n\t}", "public function get_phone($sql){\r\n\r\n\t\treturn $this->db->query($sql)->result();\r\n\r\n\t}", "public function getPhone()\n {\n return $this->getData('phone');\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getContactWithPhone(string $phone) :array\n {\n return $this->findContactByCriteria(['PHONE' => $this->phoneNormalize($phone)]);\n }", "public function checkExistUserPhone ($phone){\n $fetch_sql = \"SELECT * FROM `users` WHERE `phone`= ?\";\n $fetch_res = $this->connect->prepare($fetch_sql);\n $fetch_res->bindvalue(1, $phone);\n $fetch_res->execute();\n if ($fetch_res->fetch(PDO::FETCH_ASSOC)) {\n return true;\n }else{\n return false;\n }\n }", "public function getStreetNumber();", "function getStreetNumber();", "public static function is_phone($phone)\n {\n }", "public static function getSmsAccessCodeFromPhoneNumber($participant_phone, $twilio_phone)\r\n\t{\r\n\t\t// Remove all non-numeral characters\r\n\t\t$participant_phone = preg_replace('/[^0-9]+/', '', $participant_phone);\r\n\t\tif ($participant_phone == '') return null;\r\n\t\t$twilio_phone = preg_replace('/[^0-9]+/', '', $twilio_phone);\r\n\t\tif ($twilio_phone == '') return null;\r\n\t\t// Remove \"1\" as U.S. prefix\r\n\t\tif (strlen($participant_phone) == 11 && substr($participant_phone, 0, 1) == '1') {\r\n\t\t\t$participant_phone = substr($participant_phone, 1);\r\n\t\t}\r\n\t\tif (strlen($twilio_phone) == 11 && substr($twilio_phone, 0, 1) == '1') {\r\n\t\t\t$twilio_phone = substr($twilio_phone, 1);\r\n\t\t}\r\n\t\t// Check if in table\r\n\t\t$sql = \"select access_code from redcap_surveys_phone_codes \r\n\t\t\t\twhere phone_number = '\".prep($participant_phone).\"' and twilio_number = '\".prep($twilio_phone).\"'\";\r\n\t\t$q = db_query($sql);\r\n\t\t// Return access code\r\n\t\tif (db_num_rows($q)) {\r\n\t\t\t// Now delete the code from the table since we no longer need it\r\n\t\t\t$sql = \"delete from redcap_surveys_phone_codes \r\n\t\t\t\t\twhere phone_number = '\".prep($participant_phone).\"' and twilio_number = '\".prep($twilio_phone).\"'\";\r\n\t\t\tdb_query($sql);\r\n\t\t\t// Return code\r\n\t\t\treturn db_result($q, 0);\r\n\t\t} else {\r\n\t\t\t// Return null since the number has no stored code\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public function searchByNumber($number)\n {\n return QueryBuilder::for(SlInvoicePos::where('invoice_number', $number))\n ->allowedIncludes(\n // 'sl_service_order_as_affected',\n // 'sl_service_order_as_new',\n 'sl_customer_pos',\n 'sl_detail_sale_invoices.wh_product',\n 'g_company_pos'\n )->first();\n }", "public function getPhonecode()\n {\n return $this->phonecode;\n }", "public function show(Phone $phone)\n {\n //\n }", "protected function phone($value)\n {\n $valid = FALSE;\n $working = preg_replace('/\\D/', '', $value);\n if (strlen($working) == 10 || strlen($working == 11)) {\n $valid = TRUE;\n }\n return $valid ? NULL : $this->errorForPhone;\n }", "function check_phone_number(){\n\t\t$phone_number = urldecode(file_get_contents('php://input'));\n\t\t\n\t\t\t$this->load->model('signup_model');\n\t\t\t$result = $this->signup_model->check_phone($phone_number);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t$resp = $result;\n\t\t\t\t$this->output\n \t\t->set_status_header(200)\n \t \t->set_content_type('application/json', 'utf-8')\n \t\t->set_output(json_encode($resp, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))\n \t\t->_display();\n \t\texit;\n\t}", "public function searchByNumber($number)\n {\n return QueryBuilder::for(SlTicketPos::where('number', $number))\n ->allowedIncludes(\n // 'sl_service_order_as_affected',\n // 'sl_service_order_as_new',\n 'sl_customer_pos',\n 'sl_detail_sale_tickets.wh_product_pos',\n 'g_company_pos'\n )->first();\n }", "public function findByNumber($number)\n\t{\n\t\t$this->getAll();\n\t\tif ($this->isEmpty()) return self::NOT_FOUND_MESSAGE;\n\n\t\t$this->size = 0;\n\n\t\t$temp = new SplObjectStorage();\n\n\t\t$this->members->rewind();\n\t\twhile ($this->members->valid())\n\t\t{\n\t\t\t$provider = $this->members->current();\n\n\t\t\tif ($provider->getNumber() == $number)\n\t\t\t{\n\t\t\t\t$temp->attach($provider);\n\t\t\t\t$this->size++;\n\t\t\t}\n\n\t\t\t$this->members->next();\n\t\t}\n\n\t\t$this->members = $temp;\n\n\t\treturn ($this->isEmpty()) ? self::NOT_FOUND_MESSAGE : $this->members;\n\t}", "public function get_phone_number()\n {\n if (!$this->loadBed()) {\n return null;\n }\n\n return $this->_bed->phone_number;\n }" ]
[ "0.75672585", "0.6828187", "0.6632549", "0.6563812", "0.65606153", "0.65035754", "0.6486199", "0.64487725", "0.6436445", "0.6419675", "0.63939095", "0.6372756", "0.6221273", "0.6213917", "0.6210041", "0.6208453", "0.61951107", "0.61939144", "0.6185977", "0.6167627", "0.6132577", "0.6078665", "0.6078147", "0.60673004", "0.603545", "0.59870887", "0.5977653", "0.59771293", "0.5968429", "0.5955544", "0.5888489", "0.58765817", "0.58734363", "0.586353", "0.5862284", "0.5862284", "0.5855613", "0.5829544", "0.58205825", "0.5800932", "0.57825965", "0.57817554", "0.57729137", "0.5765436", "0.57616407", "0.5726069", "0.57229173", "0.5719655", "0.5702552", "0.56868297", "0.5671956", "0.566017", "0.565218", "0.56429976", "0.563824", "0.5633104", "0.5633104", "0.5630189", "0.5619707", "0.561453", "0.56067455", "0.55910236", "0.5565024", "0.55575913", "0.55478114", "0.5537498", "0.5536383", "0.5526552", "0.5520984", "0.5510891", "0.55076396", "0.5506147", "0.5501389", "0.54780674", "0.54699904", "0.5465648", "0.5463249", "0.54540735", "0.5453696", "0.5446038", "0.5438603", "0.5437269", "0.5431574", "0.5426913", "0.5425737", "0.5425737", "0.54235977", "0.54183495", "0.54093325", "0.54055035", "0.5390476", "0.53864384", "0.5384819", "0.53708184", "0.537067", "0.5370633", "0.53675437", "0.5364187", "0.53483695", "0.53401273" ]
0.7469414
1
Generate a list of upcoming birthdays
Создать список следующих дней рождения
public function upcoming_birthdays() { return $this->with('profile')->select('users.*, DAYOFYEAR(`profile`.`birthday`) as days') ->custom_where('DAYOFYEAR(CURDATE()) <= DAYOFYEAR(`profile`.birthday) AND DAYOFYEAR(CURDATE() + 8) >= DAYOFYEAR(`profile`.`birthday`)') ->where('site_id', kohana::config('chapterboard.site_id')) ->where('status', TRUE) ->orderby('days', 'ASC') ->find_all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function who_has_birthday_today()\n\t{\n\t\t$return = array('list' => array());\n\n\t\t$current_day = strval(date('d', CURRENT_TIME));\n\t\tif (strlen($current_day) == 1)\n\t\t{\n\t\t\t$current_day = '0' . $current_day;\n\t\t}\n\n\t\t$current_month = strval(date('m', CURRENT_TIME));\n\t\tif (strlen($current_month) == 1)\n\t\t{\n\t\t\t$current_month = '0' . $current_month;\n\t\t}\n\n\t\t// Mise en cache des anniversaires des membres une fois par jour\n\t\tif (Fsb::$cfg->get('cache_birthday') != $current_day)\n\t\t{\n\t\t\tFsb::$cfg->update('cache_birthday', $current_day);\n\t\t\tFsb::$db->destroy_cache('users_birthday_');\n\t\t}\n\n\t\t// Liste des anniversaires des membres\n\t\t$sql = 'SELECT u_id, u_nickname, u_birthday, u_color\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_birthday ' . Fsb::$db->like() . ' \\'' . $current_day . '/' . $current_month . '/%\\'\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID;\n\t\t$result = Fsb::$db->query($sql, 'users_birthday_');\n\t\t$total_birthday = 0;\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t$total_birthday++;\n\t\t\t$return['list'][] = array(\n\t\t\t\t'id' =>\t\t\t$row['u_id'],\n\t\t\t\t'nickname' =>\t$row['u_nickname'],\n\t\t\t\t'color' =>\t\t$row['u_color'],\n\t\t\t\t'html' =>\t\tHtml::nickname($row['u_nickname'], $row['u_id'], $row['u_color']),\n\t\t\t\t'age' =>\t\tintval(date('Y', CURRENT_TIME) - substr($row['u_birthday'], 6)),\n\t\t\t);\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t$return['total'] =\t\t$total_birthday;\n\t\t$return['total_lang'] =\tsprintf(String::plural('users_birthday', $total_birthday, true), $total_birthday);\n\n\t\treturn ($return);\n\t}", "function friends_birthdays()\n{\n global $setting, $database, $user;\n \n $birthdays = NULL;\n \n // CACHING\n $cache_object = SECache::getInstance('serial');\n if( is_object($cache_object) )\n {\n $birthdays = $cache_object->get('friends_birthdays_user_'.$user->user_info['user_id']);\n }\n \n \n // RETRIEVAL\n //if( !is_array($birthdays) || empty($birthdays) )\n if( !is_array($birthdays) )\n {\n $birthdays = array();\n \n $sql = \"SELECT profilefield_id, t2.profilecat_id FROM se_profilefields LEFT JOIN se_profilecats AS t1 ON se_profilefields.profilefield_profilecat_id=t1.profilecat_id LEFT JOIN se_profilecats AS t2 ON t1.profilecat_dependency=t2.profilecat_id WHERE profilefield_special='1'\";\n $resource = $database->database_query($sql);\n \n if( $database->database_num_rows($resource) > 0 )\n {\n // CONSTRUCT QUERY\n $birthdays_upcoming_query = \"\n SELECT\n se_users.user_id, \n se_users.user_username, \n se_users.user_fname, \n se_users.user_lname,\n CASE\n \";\n \n while( $birthday_field = $database->database_fetch_assoc($resource) )\n {\n $birthdays_upcoming_query .= \" WHEN se_users.user_profilecat_id='{$birthday_field['profilecat_id']}' THEN DATE_FORMAT(CONCAT(YEAR(CURDATE()), \\\"-\\\", MONTH(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`), \\\"-\\\", DAY(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`)), '%Y-%m-%d')\";\n $birthdays_upcoming_where[] = \"(se_users.user_profilecat_id='{$birthday_field['profilecat_id']}' AND DAY(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`)<>'0' AND MONTH(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`)<>'0' AND CURDATE() <= DATE_FORMAT(CONCAT(YEAR(CURDATE()), \\\"-\\\", MONTH(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`), \\\"-\\\", DAY(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`)), '%Y-%m-%d') AND DATE_ADD(CURDATE(), INTERVAL 7 DAY) >= DATE_FORMAT(CONCAT(YEAR(CURDATE()), \\\"-\\\", MONTH(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`), \\\"-\\\", DAY(se_profilevalues.`profilevalue_{$birthday_field['profilefield_id']}`)), '%Y-%m-%d'))\";\n }\n \n $birthdays_upcoming_query .= \" ELSE '0000-00-00' END AS birthday FROM se_friends LEFT JOIN se_users ON se_friends.friend_user_id2=se_users.user_id LEFT JOIN se_profilevalues ON se_users.user_id=se_profilevalues.profilevalue_user_id WHERE se_friends.friend_user_id1='{$user->user_info['user_id']}' AND (\".implode(\" OR \", $birthdays_upcoming_where).\") ORDER BY birthday\";\n \n $resource = $database->database_query($birthdays_upcoming_query);\n \n while( $birthday_info = $database->database_fetch_assoc($resource) )\n {\n $birthday_user = new se_user();\n $birthday_user->user_info['user_id'] = $birthday_info['user_id'];\n $birthday_user->user_info['user_username'] = $birthday_info['user_username'];\n $birthday_user->user_info['user_fname'] = $birthday_info['user_fname'];\n $birthday_user->user_info['user_lname'] = $birthday_info['user_lname'];\n $birthday_user->user_displayname();\n \n // SET BIRTHDAY\n $birthday_date = mktime(0, 0, 0, substr($birthday_info['birthday'], 5, 2), substr($birthday_info['birthday'], 8, 2), 1990);\n \n $birthdays[] = array(\n 'birthday_user_id' => $birthday_user->user_info['user_id'],\n 'birthday_user_username' => $birthday_user->user_info['user_username'],\n 'birthday_user_displayname' => $birthday_user->user_displayname,\n 'birthday_date' => $birthday_date,\n 'birthday_user' => &$birthday_user\n );\n \n unset($birthday_user);\n }\n }\n \n // CACHE\n if( is_object($cache_object) )\n {\n $cache_object->store($birthdays, 'friends_birthdays_user_'.$user->user_info['user_id']);\n }\n }\n \n return $birthdays;\n}", "function returnTodayBirthdays()\r\n\t {\r\n\t\t //open database connection\r\n\t\t $fullAddressBook = $this->retAllRecords();\r\n\t\t \r\n\t\t //get today's date\r\n\t\t $today = date(\"Y/m/d\");\r\n\t\t \r\n\t\t //data structure to store all birthday objects \r\n\t\t $birthdays = array();\r\n\t\t \r\n\t\t foreach ( $fullAddressBook as $cTact ) {\r\n\t\t\t \r\n\t\t\t //acquire birthday month + day for this record\r\n\t\t\t\t$dateArr = explode('-', $cTact['birthday']);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t //acquire date for today\r\n\t\t\t $todaysDate = explode('/', date('Y/m/d', strtotime($today)));\r\n\t\t\t\t\r\n\t\t\t\t//compare if month's match\r\n\t\t\t\tif($dateArr[1] == $todaysDate[1])\r\n\t\t\t\t{\r\n\t\t\t\t\t//compare if day's match\r\n\t\t\t\t\tif($dateArr[2] == $todaysDate[2])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//it's this persons birthday, add to list\r\n\t\t\t\t\t\t$birthdays[] = $cTact;\r\n\t\t\t\t\t\t//echo 'Happy Birthday: '. $cTact['name'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t //return birthdays for today\r\n\t\t\treturn $birthdays;\r\n\t\t }", "private function addBirthdays(): void\n {\n $users = (new User)->whereNotNull('birthday')\n ->whereMonth('birthday', '=', Carbon::now()->format('m'))\n ->whereDay('birthday', '=', Carbon::now()->format('d'))\n ->get();\n\n $news = [];\n\n /** @var User $user */\n foreach ($users as $user) {\n if ($user->trainer_id === null) {\n continue;\n }\n $news = [\n 'content' => \"Today is $user->full_name's birthday\",\n 'user_id' => $user->trainer_id,\n 'created_at' => Carbon::now(),\n ];\n }\n\n (new NewsEvent())->insert($news);\n $this->comment('Birthdays added.');\n }", "function returnThisMonthsBirthdays()\r\n\t {\r\n\t\t //open database connection\r\n\t\t $fullAddressBook = $this->retAllRecords();\r\n\t\t \r\n\t\t //get today's date\r\n\t\t $today = date(\"Y/m/d\");\r\n\t\t \r\n\t\t //data structure to store all birthday objects \r\n\t\t $birthdays = array();\r\n\t\t \r\n\t\t foreach ( $fullAddressBook as $cTact ) {\r\n\t\t\t \r\n\t\t\t //acquire birthday month + day for this record\r\n\t\t\t\t$dateArr = explode('-', $cTact['birthday']);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t //acquire date for today\r\n\t\t\t $todaysDate = explode('/', date('Y/m/d', strtotime($today)));\r\n\t\t\t\t\r\n\t\t\t\t//compare if month's match\r\n\t\t\t\tif($dateArr[1] == $todaysDate[1])\r\n\t\t\t\t{\r\n\t\t\t\t\t//if birthday month, add to list\r\n\t\t\t\t\t$birthdays[] = $cTact;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t //return birthdays for today\r\n\t\t\treturn $birthdays;\r\n\t }", "public function generateBirthday($data_bith)\n {\n\n $fecha = strtotime($data_bith['year'] . '-' . $data_bith['month'] . '-' . $data_bith['day']);\n $formatDay = date('Y-m-d', $fecha);\n $current_day = date('Y-m-d');\n $diff = abs(strtotime($current_day) - strtotime($formatDay));\n $years = floor($diff / (365 * 60 * 60 * 24));\n $months = floor(($diff - $years * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24));\n $days = floor(($diff - $years * 365 * 60 * 60 * 24 - $months * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n\n return [$formatDay, $years];\n }", "public function getDates()\n {\n $dates = parent::getDates();\n array_push($dates, 'date_of_birth');\n return $dates;\n }", "function churchcal_getBirthdays($params) {\n global $user;\n\n $all = (isset($params[\"all\"])) && ($params[\"all\"] == true);\n// $all = (bool) getVar(\"all\", false, $params); //TODO: use this, not tested\n\n include_once (CHURCHDB . \"/churchdb_db.php\");\n\n if (!$all) {\n $gpids = churchdb_getMyGroups($user->id, true, false);\n if (!$gpids) return null;\n\n $res = db_query(\"SELECT p.id, gp.geburtsdatum AS birthday, CONCAT(p.vorname, ' ', p.name) AS name\n FROM {cdb_person} p, {cdb_gemeindeperson_gruppe} gpg, {cdb_gemeindeperson} gp\n WHERE gpg.gruppe_id IN (\" . db_implode($gpids) . \") AND gpg.gemeindeperson_id=gp.id AND\n gp.person_id=p.id AND p.archiv_yn=0 AND gp.geburtsdatum IS NOT NULL\");\n $arrs = array ();\n foreach ($res as $a) $arrs[$a->id] = $a;\n\n return $arrs;\n }\n else { //why 2x p.id?\n $persons = churchdb_getAllowedPersonData(\n \"archiv_yn=0 and geburtsdatum IS NOT NULL\", \"p.id AS p_id, p.id, gp.id gp_id, CONCAT(p.vorname, ' ',p.name) AS name, geburtsdatum birthday\"\n );\n return $persons;\n }\n}", "public function getDateUpComing($days = 10) {\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t$query->select('#__pbevents_events.*, #__pbevents_events_dates.*')->from('#__pbevents_events_dates');\n\t\t$query->join(\"left\", \"#__pbevents_events on #__pbevents_events_dates.event_id = #__pbevents_events.id\");\n\t\t\n\t\t$dateTimeZone = new DateTimeZone(JFactory::getConfig()->get('offset'));\n\t\t\n\t\t$now = date_create(\"now\", $dateTimeZone);\n\t\t$_now = $now->format(DATE_ATOM);\n\t\t\n\t\t$nextdate = mktime(\n\t\t\t\t$now->format(\"H\"), $now->format(\"i\"), $now->format(\"s\"), // hours.\n\t\t\t\t$now->format(\"m\"), (int) $now->format(\"d\")+$days, // 10 days.\n\t\t\t\t$now->format(\"Y\"));\n\t\t\n\t\t$to = strftime(\"%Y-%m-%d %H:%M:%S\", $nextdate);\n\t\t\n\t\t$query->where(sprintf('date >= \"%s\" and date <= \"%s\" and publish = 1', $_now, $to));\n\t\t// $query->limite(10);\n\t\ttry\n\t\t{\t\n\t\t\t$items = $db->setQuery($query)->loadObjectList();\n\t\t} catch (RuntimeException $e) {\n\t\t\t$items = array(); // log required\n\t\t}\n\t\treturn $items;\n\t}", "private static function generateWeekdaysDates()\n\t{\n\t return array(\n\t 'Jan 4, 1970', // Sunday\n\t 'Jan 5, 1970', // Monday\n\t 'Jan 6, 1970', // Tuesday\n\t 'Jan 7, 1970', // Wednesday\n\t 'Jan 8, 1970', // Thursday\n\t 'Jan 9, 1970', // Friday\n\t 'Jan 10, 1970', // Saturday\n\t );\n\t}", "public function getUpcomingTalks(): array\n {\n $now = new DateTimeImmutable('00:00:00');\n\n return array_filter($this->getTalks(true), static function (Talk $talk) use ($now) {\n return $talk->date() >= $now;\n });\n }", "public function calculateBuddhasBirthday(): void\n {\n if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) {\n $this->addHoliday(new Holiday(\n 'buddhasBirthday',\n ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'],\n new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }", "public function this_week_bday()\n\t\t{\n\t\t\t$bday_list = array();\n\t\t\t$this->load->module('date_time');\n\t\t\t$secondtimers = $this->all();\n\t\t\tforeach ($secondtimers->result() as $secondtimer) {\n\t\t\t\t$bday \t\t= $secondtimer->dob;\n\t\t $bday_day = $this->date_time->this_day($bday);\n\t\t $bday_month = $this->date_time->this_month($bday);\n\t\t $this_yr \t= $this->date_time->full_year();\n\t\t $full \t\t= $bday_day .\"-\". $bday_month. \"-\". $this_yr;\n\t\t if($this->date_time->this_week($full) == $this->date_time->this_week()){\n $bday_list[] = $firstimer->uid;\n }\n\t\t\t}\n\t\t\treturn $bday_list; \n\t\t\t\n\t\t\t\n\t\t}", "function getBirthdays($month)\n{\n\t$data = array();\n\t$mnth = $month;\n\t$day = date('j');\n\t\n\tif(empty($month))\n\t\t$mnth = date('m');\n\t\t\n\t$birthdayquery = 'SELECT user_id, username, dob, archived FROM users WHERE MONTH(dob) ='.$mnth;\n\t$birthdayresults = mysql_query($birthdayquery)\n\t\tor die(mysql_error());\n\t\t\n\twhile ($birthdayrow = mysql_fetch_array($birthdayresults))\n\t{\n\t\t$bday = substr($birthdayrow['dob'], 8, 2);\n\t\tif(empty($month))\n\t\t{\n\t\t\tif ($bday == $day)\n\t\t\t{\n\t\t\t\t$data[] = array('link'=>'./viewprofile.php?action=view&amp;uid='.$birthdayrow['user_id'],\n\t\t\t\t\t\t\t\t'name'=>$birthdayrow['username']);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data[] = array('link'=>'./viewprofile.php?action=view&amp;uid='.$birthdayrow['user_id'],\n\t\t\t\t\t\t\t\t'name'=>$birthdayrow['username'],\n\t\t\t\t\t\t\t\t'dob'=>$birthdayrow['dob'],\n\t\t\t\t\t\t\t\t'arc'=>$birthdayrow['archived']);\n\t\t}\n\t}\n\treturn $data;\n}", "function getdayslist()\r\n\t{\t\t\r\n\t\tfor($i=0;$i<=6;$i++) {\r\n\t\t\t$this->day_list[] = date('D', strtotime(Configure::read('item.weekstartson') . ' +' . $i . ' days'));\t\t\r\n\t\t}\r\n\t\treturn $this->day_list;\r\n\t}", "public static function getUpcoming()\n {\n return static::where('start_date', '>', now())->with('location')->get();\n }", "public function getUpcomingTalks() : array\n {\n $now = new DateTime('00:00:00');\n return array_filter($this->getTalks(true), function ($talk) use ($now) {\n return $talk['date'] >= $now;\n });\n }", "public abstract function get_days();", "private function getFreeDays(){\n $calendarUrl = $this->url . $this->startLinks[0] .\"/\";\n //scrape the new page to get links to the friends calendars.\n $calendarLinks = $this->scraper->getLinks($calendarUrl, '//a/@href');\n //create multidimensional array to store data from all calendars\n $calendars = array();\n //get all calendars and push result from scraping into $calendars\n foreach($calendarLinks as $link){\n //scrape each individual calendar\n $calendar = $this->scraper->scrapeCalendar($this->scraper->fetchCurlPage($calendarUrl . \"/\" . $link));\n //push arrays of calendar information from all individual calendars into $calendars\n array_push($calendars, $calendar);\n }\n //create array to store values for each day of the weekend\n $weekend = array(0,0,0);\n //foreach individual calendar...\n foreach($calendars as $indCalendar){\n //as long as the indivual calendar holds a value...\n for($i = 0; $i < count($indCalendar); $i = $i + 1){\n //add the value from the individual calendar into the $weekend array on choresponding index\n $weekend[$i] += $indCalendar[$i];\n }\n }\n //create array to hold the days that all friends are free on\n $freeWeekendDays = array();\n //if the weekday in the weekend array holds the same amount of values as there are individual calendars...\n if($weekend[0] == count($calendars)){\n //add the weekday all friends are free on to the freeWeekendDay array\n array_push($freeWeekendDays, \"Fredag\");\n }\n if($weekend[1] == count($calendars)){\n array_push($freeWeekendDays, \"Lördag\");\n }\n if($weekend[2] == count($calendars)){\n array_push($freeWeekendDays, \"Söndag\");\n }\n //return array containing the weekdays all three friends are free.\n return $freeWeekendDays;\n }", "function getUpcoming($count = 5, $field = \"date\") {\n\t\t\treturn $this->fetch(\"$field ASC\",$count,\"`$field` >= '\".date(\"Y-m-d\").\"'\");\n\t\t}", "public function getUpcomingEventsList() {\n\t\t$events = $this->getAdapter();\n\t\t$select = $events->select()\n ->from($this->_name)\n\t\t\t\t\t ->joinLeft('users','events.createdBy = users.id',array('fullname','i' => 'id','email'))\n\t\t\t\t\t ->joinLeft('staffregions','events.eventRegion = staffregions.ID',array('location'=>'description'))\n\t\t\t\t\t ->joinLeft('eventtypes',$this->_name.'.eventType = eventtypes.id',array('type'))\n\t\t\t\t\t ->where('events.eventStartDate >= ?',Zend_Date::now()->toString('yyyy-MM-dd'))\n\t\t\t\t\t ->order('events.eventStartDate ASC');\n return $events->fetchAll($select);\n \t}", "function getCurrentDates()\n{\n\n $first = new DateTime();\n $last = new DateTime();\n $last->modify('+7 day');\n $period = new DatePeriod($first,new DateInterval('P1D'),$last);\n\n return iterator_to_array($period);\n}", "private function generate_query_dates()\n {\n $dates = array();\n $daysToRetrieve = $this->daysToRetrieve;\n\t\t\n for( $i=0; $i<$daysToRetrieve; $i++){\n $dates[] = date('m/d/Y', strtotime('+'.$i.'days')); \n }\n return $dates; \n }", "private function populateDates(){\n\t\t\t$currentDate = $this->getDate();\n\t\t\t$day = date('N', strtotime($currentDate)); //Mon = 1 Sun = 7\n\n\t\t\t$this->dateArray[$day-1]=$currentDate;\n\n\n\n\t\t\tfor($i=0;$i<$day-1;$i++){\n\t\t\t\t$daysDiff = $day - $i-1;\n\t\t\t\t// Subtract Current Date and days Diff\n\t\t\t\t$newDate = date('Y-m-d',strtotime('-'.$daysDiff.'day', strtotime($currentDate)));\n\t\t\t\t$this->dateArray[$i] = $newDate;\n\t\t\t}\n\n\t\t\tfor($i = $day; $i<=6; $i++){\n\t\t\t\t$daysDiff = $i - $day + 1;\n\t\t\t\t// Add Current Date and days Diff\n\t\t\t\t$newDate = date('Y-m-d',strtotime('+'.$daysDiff.'day', strtotime($currentDate)));\n\t\t\t\t$this->dateArray[$i] = $newDate;\n\n\t\t\t}\n\n\t\t}", "public function getPersonByBirthday()\n\t{\n\t\t$sql = \"SELECT *, year(curdate())-year(birthday) age FROM `pcrm_person_old` WHERE \n\t\t\t\t\tdayofyear(curdate())<dayofyear(birthday) and \n\t\t\t\t\tdayofyear(curdate())+130>dayofyear(birthday)\";\n\n\t\t$ret = $this->_db->fetch_all_assoc($sql);\n\n\t\treturn $ret;\n\t}", "protected function getDates()\n {\n $date = new \\DateTime ( \"20 minutes ago\" );\n $date->setTimezone ( new \\DateTimeZone ( \"America/Sao_Paulo\" ) );\n $final = $date->format ( \"Y-m-d\\TH:i:s\" );\n\n $date->sub ( new \\DateInterval ( \"P\" . ( string ) $this->_days . \"D\" ) );\n $date->setTime ( 00, 00, 00 );\n $initial = $date->format ( \"Y-m-d\\TH:i:s\" );\n\n return [\n 'initial' => $initial,\n 'final' => $final\n ];\n }", "function leapYears($year) {\n $leapYearBirthdays = [];\n for ($i = 0; $i < 25; $i++) {\n if (date('L', strtotime(\"$year-01-01\"))) {\n array_push($leapYearBirthdays,$year);\n }\n $year++;\n }\n return $leapYearBirthdays;\n}", "function getAllDays($start, $end, $aslist = true) {\n $start = strtotime($start);\n $end = strtotime($end);\n \n // this will make sure there isn't an infinite loop by deciding\n // which way (back or forwards one day) the loop should go\n // based on whether the start date is before the end date or not\n $whichway = ($start < $end) ? \"tomorrow\" : \"yesterday\";\n \n // we'll increment $curday so set it to the start date\n $curday = $start;\n \n // initialise the $days array and add our first date to it (could be done in one line but looks nicer like this)\n $days = array();\n $days[] = date(\"Y-m-d\", $curday);\n \n /*------ IZMENA! Ne prikazivati sve dane u kalendaru vec samo prvi! \n // iterate through the days until we reach the end date\n while ($curday != $end) {\n // get the 'next' day in the sequence (might be forwards OR backwards one day)\n $curday = strtotime($whichway, $curday);\n $days[] = date(\"Y-m-d\", $curday);\n } \n---------*/\n \n // if we only wanted an array back, return the array now\n if ($aslist === false) return $days;\n \n // if we wanted a formatted list...\n // inititalise empty string for the list\n $daylist = \"\";\n \n // go through each date in the array\n foreach ($days as $day) {\n // add it to the string and stick a comma on the end\n $daylist .= $day.\", \";\n }\n \n // take the trailing comma-space off\n $daylist = substr($daylist, 0, -2);\n \n return $daylist;\n }", "public function leadsDates(){\n $leads = $this->leadsSummary();\n $dates = [];\n foreach($leads as $key => $value){\n $dates[] = now()->format('F') . \" \" . $key;\n }\n return $dates;\n }", "public function getUpcoming() : array\n {\n $author = getAcfVar('author', '', $this->contextID);\n $acfDateTime = (string) getAcfVar('upcoming_webinar', '', $this->contextID);\n\n $upcoming = [\n 'showCountdown' => (bool) getAcfVar('show_countdown', '', $this->contextID),\n 'timer' => $this->getTimer($acfDateTime),\n 'timezone' => getAcfVar('upcoming_webinar_timezone', '', $this->contextID),\n 'logo' => getAcfVar('upcoming_webinar_logo', '', $this->contextID),\n 'title' => getAcfVar('upcoming_webinar_title', '', $this->contextID),\n 'excerpt' => getAcfVar('upcoming_webinar_content', '', $this->contextID),\n 'link' => getAcfVar('upcoming_webinar_url', '', $this->contextID),\n 'moreText' => getAcfVar('upcoming_webinar_button_text', '', $this->contextID),\n 'authorID' => (int) $author->data->ID ?? null,\n 'authorName' => $author->data->display_name ?? '',\n 'disableLink' => (int) count_user_posts($author->data->ID ?? '') === 0\n ];\n\n return $upcoming;\n }", "protected function syncBirthdays($table = null)\n {\n $result = [\n 'error' => [],\n 'added' => [],\n 'updated' => [],\n ];\n\n $eventsTable = TableRegistry::get('Qobo/Calendar.CalendarEvents');\n $usersTable = TableRegistry::get('Users');\n $users = $usersTable->find()->all();\n\n $progress = $this->helper('Progress');\n $progress->init();\n $this->info('Syncing birthday calendar...');\n\n $calendar = $table->find()\n ->where([\n 'source' => 'Plugin__',\n 'name' => 'Birthdays',\n ])->first();\n\n if (empty($calendar)) {\n $entity = $table->newEntity();\n $entity->name = 'Birthdays';\n $entity->source = 'Plugin__';\n $entity->icon = 'birthday-cake';\n\n $calendar = $table->save($entity);\n }\n\n $count = 1;\n foreach ($users as $k => $user) {\n if (empty($user->birthdate)) {\n $result['error'][] = \"User ID: {$user->id} doesn't have birth date in the system\";\n continue;\n }\n\n $birthdayEvent = $eventsTable->find()\n ->where([\n 'calendar_id' => $calendar->id,\n 'content LIKE' => \"%{$user->first_name} {$user->last_name}%\",\n 'is_recurring' => 1,\n ])->first();\n\n if (!$birthdayEvent) {\n $entity = $eventsTable->newEntity();\n $entity->calendar_id = $calendar->id;\n $entity->title = sprintf(\"%s %s\", $user->first_name, $user->last_name);\n $entity->content = sprintf(\"%s %s\", $user->first_name, $user->last_name);\n $entity->is_recurring = true;\n $entity->is_allday = true;\n\n $entity->start_date = date('Y-m-d 09:00:00', strtotime($user->birthdate));\n $entity->end_date = date('Y-m-d 18:00:00', strtotime($user->birthdate));\n $entity->recurrence = json_encode(['RRULE:FREQ=YEARLY']);\n $birthdayEvent = $eventsTable->save($entity);\n\n $result['added'][] = $birthdayEvent;\n } else {\n $entity = $eventsTable->patchEntity($birthdayEvent, [\n 'title' => sprintf(\"%s %s\", $user->first_name, $user->last_name),\n 'is_allday' => true,\n ]);\n\n $birthdayEvent = $eventsTable->save($entity);\n $result['updated'][] = $birthdayEvent;\n }\n\n $progress->increment(100 / ++$count);\n $progress->draw();\n }\n\n $this->out(null);\n $this->out('<success> Added [' . count($result['added']) . '], Updated [' . count($result['updated']) . '] events!</success>');\n $this->out(null);\n\n return $result;\n }", "protected function fetchUpcomingEvents() {\n $startDateMin = strtotime('tomorrow 0:00:00');\n $startdateMax = strtotime('tomorrow 23:59:59');\n $result = $this->db->fetchAll('SELECT * FROM ' . $this->eventTable . ' WHERE publish_social = 1 AND startDate > ? AND startDate <= ?', array($startDateMin, $startdateMax));\n\n return $result;\n }", "public function holidayDates() {\n\t\t$holidays = array();\n $year = date('Y');\n\n $holidays[] = $year . '-1-1'; // New Years Day\n //$holidays[] = $year . '-2-6'; // today, just for testing\n $holidays[] = $year . '-2-10'; // returns 2013-02-17 date('Y-n-j', strtotime($year . '-02-00, second monday')); // Family Day\n $holidays[] = date('Y-n-j', strtotime('-2 days', easter_date($year))); // Good Friday\n $holidays[] = date('Y-n-j', strtotime('+1 days', easter_date($year))); // Easter Monday\n $holidays[] = date('Y-n-j', strtotime($year . '-05-25, last monday')); // Victoria Day\n $holidays[] = $year . '-7-1'; // Canada Day\n $holidays[] = date('Y-n-j', strtotime($year . '-08-00, first monday')); // Civic Holiday\n $holidays[] = date('Y-n-j', strtotime($year . '-09-00, first monday')); // Labour Day\n $holidays[] = date('Y-n-j', strtotime($year . '-10-00, second monday')); // Thanksgiving\n $holidays[] = $year . '-11-11'; // Remembrance Day\n $holidays[] = $year . '-12-25'; // Christmas\n $holidays[] = $year . '-12-26'; // Boxing Day\n $holidays[] = $year . '-7-12'; // Fun Day\n $holidays[] = $year . '-12-27'; // Fun Day\n $holidays[] = $year . '-12-24'; // Fun Day\n $holidays[] = $year . '-11-12'; // Fun Day\n if( date( 'N' ) == 6 || ( date( 'G' ) > 13 && date( 'N' ) == 5 ) ) \n {\n \t$holidays[] = date( 'Y-n-j' , strtotime( '+2 days' ) );\n }\n if( date( 'N' ) == 7 || date( 'G' ) > 13 ) \n {\n \t$holidays[] = date( 'Y-n-j' , strtotime( '+1 days' ) );\n }\n\n\t\t\t//this code doesn't do anything. Sigh. \n foreach ($this->Bemail->exceptionDays as &$holiday) {\n $holiday = date('Y-n-j', strtotime($holiday));\n }\n\t\treturn $holidays;\n\t\t\n\t}", "function bad_daysLeftForBirthday($day_of_birthdate){\n list($y, $m, $d) = explode('-',$day_of_birthdate);\n $nowdate = mktime(0, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\"));\n $nextbirthday = mktime(0,0,0,$m, $d, date(\"Y\"));\n\n if ($nextbirthday<$nowdate)\n $nextbirthday=$nextbirthday+(60*60*24*365);\n $daycount=intval(($nextbirthday-$nowdate)/(60*60*24));\n return $daycount;\n }", "function getListeDates ( ) {\n\t\t$dateDeb = new clDate ( DATELANCEMENT ) ;\n\t\t$dateFin = new clDate ( ) ;\n\t\t$tDeb = $dateDeb -> getTimestamp ( ) ;\n\t\t$tab = array ( ) ;\n\t\tfor ( ; $dateFin -> getTimestamp ( ) >= $tDeb ; $dateFin -> addDays ( -1 ) )\n\t\t\t$tab[$dateFin->getDate ( \"Y-m-d\")] = $dateFin -> getDate ( \"d/m/Y\" ) ;\n\t\treturn $tab ;\n\t}", "public function getPublicHolidaysOnTheseTwoYears()\n {\n $publicHolidayOfCurrentYear = $this->getPublicHolidaysOfThisYear ();\n $publicHolidayOfNextYear =$this->getPublicHolidaysOfThisYear (intval (date ('Y')+1));\n\n $result = array_merge ($publicHolidayOfCurrentYear,$publicHolidayOfNextYear);\n\n return $result;\n }", "protected function get_upcoming_meetup_events()\n\t\t{\n\t\t\t$upcoming_events = array();\n\t\t\t\n\t\t\tif( $this->meetup_api_connection && $this->settings[ 'meetup_group_url_name' ] && class_exists( 'MeetupEvents' ) )\n\t\t\t{\n\t\t\t\t$events_request\t\t= new MeetupEvents( $this->meetup_api_connection );\n\t\t\t\t$upcoming_events\t= $events_request->getEvents( array(\n\t\t\t\t\t'group_urlname'\t=> $this->settings[ 'meetup_group_url_name' ],\n\t\t\t\t\t'status'\t\t=> 'upcoming',\n\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $upcoming_events;\n\t\t}", "public function weekendDates() {\n\t\t\t\t\n\t\t// prevent multiple calls by retrieving time once //\n\t\t$now = time();\n\t\t$aYearLater = strtotime('+1 Year', $now);\n\n\t\t// fill this with dates //\n\t\t$allDates = Array();\n\n\t\t// init with next friday and saturday //\n\t\t$sunday = strtotime('Next Sunday', strtotime('-1 Day', $now));\n\t\t$saturday = strtotime('Next Saturday', strtotime('-1 Day', $now));\n\n\t\t// keep adding days untill a year has passed //\n\t\twhile(1){\n\t\t\tif($sunday > $aYearLater)\n\t\t\t\tbreak 1;\n\t\t\t$allDates[] = date('Y-n-j', $sunday);\n\t\t\tif($saturday > $aYearLater)\n\t\t\t\tbreak 1;\n\t\t\t$allDates[] = date('Y-n-j', $saturday);\n\n\t\t\t$sunday = strtotime('+1 Week', $sunday);\n\t\t\t$saturday = strtotime('+1 Week', $saturday);\n\t\t}\n\t\t\n\t\treturn $allDates;\n\n\t}", "public function retrieveAllDates()\n\t{\n\t\t$allDates = array();\n\t\t$stmt=\"SELECT * FROM receives;\";\n\t\t$result=pg_query($stmt);\n\t\twhile($row=pg_fetch_assoc($result))\n\t\t\t$allDates[] = new AwardingDate($row['actor_name'], $row['award_name'], $row['date_received']);\n\t\treturn $allDates;\n\t}", "public function getFeaturedDates()\n {\n $daysApart = $this->getDaysApart();\n $currentDate = DateTime::createFromFormat('U', time())->modify('-' . $daysApart * 3 . ' days');\n\n $oldestDate = clone $currentDate;\n $olderDate = clone $currentDate->modify('+' . $daysApart * 2 . ' days');\n $newerDate = clone $currentDate->modify('+' . $daysApart * 1 . ' days');\n $newestDate = clone $currentDate->modify('+' . $daysApart * 2 . ' days')->modify('+1 day');\n\n return [$oldestDate, $olderDate, $newerDate, $newestDate];\n }", "public\r\n \t \tfunction listUpcoming()\r\n \t\t\t{\r\n \t \t\t\t$baseUrl = self::BASE_URL . '/api/v2/list_upcoming.json';\r\n \t \t\t\t$data = $this->getFromApi($baseUrl);\r\n \t \t\t\tif ($data->upcoming_movies_count == 0)\t{ \treturn false; \t}\r\n \t \t\t\treturn isset($data->upcoming_movies) ? $data->upcoming_movies : [];\r\n \t\t\t}", "public static function get_past_list() {\n\t\t$offices = self::get_list();\n\n\t\t$past = array();\n\t\tforeach ( $offices as $office )\n\t\t\tif ( isset( $office->fine ) && strtotime( $office->fine ) < time() )\n\t\t\t\t$past[] = $office;\n\n\t\treturn $past;\n\t}", "function getAllBagCheckDates() {\r\n\t// Connect to database\r\n\t$dbInfo = initialize_db_info();\r\n\t$dbLink = db_connect($dbInfo);\r\n\tdb_select($dbLink, $dbInfo);\r\n\t\r\n\t$dateList = array();\r\n\r\n\t$getAllBCDatesSql = \"SELECT * FROM bc_day ORDER BY bc_date\";\r\n\r\n\t$result = mysql_query($getAllBCDatesSql, $dbLink);\r\n\tif (!$result) {\r\n\t\tthrow new Exception('no results: ' . $getAllBCDatesSql);\r\n\t}\r\n\r\n\t$row = mysql_fetch_assoc($result);\r\n\twhile($row) {\r\n\t\t$oneDate = $row['bc_date'];\r\n\t\t$dateList[] = $oneDate;\r\n\t\t$row = mysql_fetch_assoc($result);\r\n\t}\r\n\treturn $dateList;\r\n}", "public function upcomingEventList()\n {\n\n \t$sql = \"SELECT t1.*,t2.userName AS empName FROM `tbl_event_data` AS t1 LEFT JOIN tbl_user AS t2 ON t1.createdBy = t2.userId WHERE t1.deleted = 'N' AND (startDate >= DATE(NOW()) OR endDate >= DATE(NOW()) OR endDate IS NULL)\";\n\n \tif($this->session->userdata('userType') == 'employee')\n \t{\n \t\t$userId = $this->session->userdata('userId');\n \t\t$sql .= \" AND t1.createdBy = '\".$userId.\"' \";\n \t}\t\n\n \t$query = $this->db->query($sql);\n \n $res = $query->result_array();\t\n\n\t\treturn $res;\n }", "public function getUpcoming()\n {\n return $this->database\n ->table('events')\n ->whereRaw('Date(start) > CURDATE() AND status < 4')\n ->orderBy('start', 'asc')\n ->get();\n }", "public function provideDatePeriod(): Generator\n {\n $startDate = new DateTime('2001-01-01');\n $endDate = new DateTime('2002-02-02');\n\n yield [\n null,\n null,\n ];\n\n yield [\n $startDate,\n $startDate,\n null,\n ];\n\n yield [\n null,\n null,\n $endDate,\n ];\n\n yield [\n $startDate,\n $endDate,\n ];\n }", "protected static function get_aw_birthdays_extension_data()\n {\n }", "public function drop_down_days()\n {\n $days = '';\n foreach (range(1, 31) as $day) {\n $selected = ($day == date('j', $this->now)) ? ' selected=\"selected\"' : '';\n $days .= '<option value=\"' . $day . '\"' . $selected . '>' . $day . \"</option>\\n\";\n }\n return $days;\n }", "private function daily_date_array($flashback_days=null) {\n $flashback_days = $flashback_days ? $flashback_days : 365;//one year\n \n\t//create date -flashback days\n\t$mk_now = time();\n\t$i=1;\n\t\n\tfor ($i=1;$i<=$flashback_days;$i++) { \n\t\t$mk_dayback = $mk_now - ($i * 24 * 60 * 60); //one day -\n\t\t$dback[] = date('Ymd',$mk_dayback); \n\t}\n \n\tif (!empty($dback))\n return (array) $dback;\t\n\t \n\treturn false; \n }", "function get_holidays() {\n\t$holidays = [\n\t\t1 => [1],\n\t\t7 => [4],\n\t\t10 => [31],\n\t\t12 => [24,25, 31],\n\t];\n\n\t$holidays = add_easter($holidays);\n\n\t// add memorial day\n\t$mem_day = date('j', strtotime('last monday of May, ' . SEASON_YEAR));\n\t// sunday, day before\n\t$holidays[5][] = ($mem_day - 1);\n\t// monday, memorial day\n\t$holidays[5][] = $mem_day;\n\n\t// sunday before labor day\n\t// if last day of aug is sunday, then next day is labor day... skip\n\t$last_aug = date('D', strtotime('last day of August, ' . SEASON_YEAR));\n\tif ($last_aug == 'Sun') {\n\t\t$holidays[8][] = 31;\n\t}\n\n\t// labor day\n\t$labor_day = date('j', strtotime('first monday of September, ' . SEASON_YEAR));\n\t// if the Sunday before is in Sept, then skip it\n\tif ($labor_day > 1) {\n\t\t$holidays[9][] = ($labor_day - 1);\n\t}\n\t$holidays[9][] = $labor_day;\n\n\t// thanksgiving\n\t$thx_day = date('j', strtotime('fourth thursday of November, ' . SEASON_YEAR));\n\t$holidays[11][] = $thx_day;\n\t$last_sunday = date('j', strtotime('last sunday of November, ' . SEASON_YEAR));\n\tif ($last_sunday > $thx_day) {\n\t\t$holidays[11][] = $last_sunday;\n\t}\n\n\tksort($holidays);\n\treturn $holidays;\n}", "function getCurrentBirthdays(){\n //connect to the server\n $currentMonth = date(\"n\");\n $currentDay = date(\"j\");\n $conn = connectToDB();\n //select first five birthdays\n //date name surname department\n $selectQuery = \"SELECT id_user, birthdate, name, surname FROM [User]\n WHERE (DATEPART(dd, birthdate) = ? AND DATEPART(mm, birthdate) = ?)\";\n $selectStatement = sqlsrv_query($conn, $selectQuery, array($currentDay, $currentMonth));\n if ($selectStatement === false)\n {\n echo \"error UserScript.php : retrieving first five upcoming birthdays failed -> \";\n die(print_r(sqlsrv_errors(), true));\n }\n $outputarray = array();\n while ($results = sqlsrv_fetch_array($selectStatement, SQLSRV_FETCH_ASSOC))\n {\n $userDepartmentListNames = array();\n $userDepartmentListIDs = getUserDepartmentList($conn, $results['id_user']);\n for ($i = 0; $i < count($userDepartmentListIDs); $i++)\n {\n array_push($userDepartmentListNames,getDepartmentName($conn,$userDepartmentListIDs[$i]));\n }\n $results['departments'] = $userDepartmentListNames;\n //array_push($results,array('departments'=>$userDepartmentListNames));\n array_push($outputarray, json_encode($results));\n }\n sqlsrv_free_stmt($selectStatement);\n sqlsrv_close($conn);\n return json_encode($outputarray);\n}", "public static function ageNextBirthday($birthday){\n $years = static::yearsFrom($birthday);\n if(static::dayAndMonthPassed($birthday)) $years += 1;\n return $years;\n }", "function cal_age($birthdate) {\r\n $bday=date_create($birthdate);\r\n $today=date_create();\r\n $diff=date_diff($bday,$today);\r\n return $diff->y;\r\n}", "public function dateProvider()\n {\n return array(\n # Test holidays in past year\n array('2010-03-21', null, null),\n array('2010-01-01', null, array('name' => 'Nyårsdagen')),\n array('2010-01-05', null, array('name' => 'Trettondagsafton')),\n array('2010-01-06', null, array('name' => 'Trettondedag jul')),\n\n array('2010-04-01', null, array('name' => 'Skärtorsdagen')),\n array('2010-04-02', null, array('name' => 'Långfredagen')),\n array('2010-04-03', null, array('name' => 'Påskafton')),\n array('2010-04-04', null, array('name' => 'Påskdagen')),\n array('2010-04-05', null, array('name' => 'Annandag påsk')),\n\n array('2010-04-30', null, array('name' => 'Valborgsmässoafton')),\n array('2010-05-01', null, array('name' => 'Första maj')),\n array('2010-05-13', null, array('name' => 'Kristi himmelsfärdsdag')),\n array('2010-05-22', null, array('name' => 'Pingstafton')),\n array('2010-05-23', null, array('name' => 'Pingstdagen')),\n array('2010-06-06', null, array('name' => 'Sveriges nationaldag')),\n array('2010-06-25', null, array('name' => 'Midsommarafton')),\n array('2010-06-26', null, array('name' => 'Midsommardagen')),\n array('2010-11-05', null, array('name' => 'Allhelgonaafton')),\n array('2010-11-06', null, array('name' => 'Alla helgons dag')),\n array('2010-12-24', null, array('name' => 'Julafton')),\n array('2010-12-25', null, array('name' => 'Juldagen')),\n array('2010-12-26', null, array('name' => 'Annandag jul')),\n array('2010-12-31', null, array('name' => 'Nyårsafton')),\n\n #Test current year, (when writing these tests)\n array('2015-03-21', null, null),\n array('2015-01-01', null, array('name' => 'Nyårsdagen')),\n array('2015-01-05', null, array('name' => 'Trettondagsafton')),\n array('2015-01-06', null, array('name' => 'Trettondedag jul')),\n\n array('2015-04-02', null, array('name' => 'Skärtorsdagen')),\n array('2015-04-03', null, array('name' => 'Långfredagen')),\n array('2015-04-04', null, array('name' => 'Påskafton')),\n array('2015-04-05', null, array('name' => 'Påskdagen')),\n array('2015-04-06', null, array('name' => 'Annandag påsk')),\n\n array('2015-04-30', null, array('name' => 'Valborgsmässoafton')),\n array('2015-05-01', null, array('name' => 'Första maj')),\n array('2015-05-14', null, array('name' => 'Kristi himmelsfärdsdag')),\n array('2015-05-23', null, array('name' => 'Pingstafton')),\n array('2015-05-24', null, array('name' => 'Pingstdagen')),\n array('2015-06-06', null, array('name' => 'Sveriges nationaldag')),\n array('2015-06-19', null, array('name' => 'Midsommarafton')),\n array('2015-06-20', null, array('name' => 'Midsommardagen')),\n array('2015-10-30', null, array('name' => 'Allhelgonaafton')),\n array('2015-10-31', null, array('name' => 'Alla helgons dag')),\n array('2015-12-24', null, array('name' => 'Julafton')),\n array('2015-12-25', null, array('name' => 'Juldagen')),\n array('2015-12-26', null, array('name' => 'Annandag jul')),\n array('2015-12-31', null, array('name' => 'Nyårsafton')),\n );\n }", "public static function listKiboDates()\n {\n return [\n '01' => 'すぐに',\n '02' => '1~3ヶ月',\n '03' => '4~6ヶ月',\n '04' => '7~9ヶ月'\n ];\n }", "public function HolidayDataProvider()\n {\n $data = [];\n\n for ($y = 0; $y < 100; $y ++) {\n $year = $this->generateRandomYear(1900, 2100);\n $expected = new DateTime(\n (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october') . \" $year\",\n new DateTimeZone(self::TIMEZONE)\n );\n\n $data[] = [$year, $expected->format('Y-m-d')];\n }\n\n return $data;\n }", "public function getAllNamedays()\n {\n return $this->namedays;\n }", "public function getDateRanges()\n {\n if (empty($this->dateRanges)) {\n\n $this->dateRanges = [\n new DateRange\\DateOfBirthFromAndTo()\n ];\n }\n\n return $this->dateRanges;\n }", "public function practice_code()\n {\n // $end = new DateTime( '2018-08-10' );\n // $end = $end->modify( '+1 day' ); \n // $interval = new DateInterval('P1D');\n // $daterange = new DatePeriod($begin, $interval ,$end);\n\n // $present = Carbon::now();\n // $past = Carbon::now()->subMonth()->toDateString();\n // $begin = new DateTime( $present ); \n // $end = new DateTime( $past );\n // $interval = new DateInterval('P1D');\n // $daterange = new DatePeriod($begin, $interval ,$end);\n\n // foreach($daterange as $date){\n // array_push($dates,$date->format('Y-m-d'));\n // }\n }", "public function getUpcomingEvents(){\n \t\t$events = $this->getAdapter();\n\t\t$select = $events->select()\n ->from($this->_name,array('eventStartDate','eventTitle','organisation'))\n\t\t\t\t\t ->where('events.eventStartDate >= ?',Zend_Date::now()->toString('yyyy-MM-dd'))\n \t\t\t\t\t ->joinLeft('staffregions','events.eventRegion = staffregions.ID',array('location' => 'description'))\n\t\t\t\t\t ->joinLeft('eventtypes',$this->_name.'.eventType = eventtypes.id',array('type'))\n\t\t\t\t\t ->order('eventStartDate DESC');\n $events = $this->getAdapter()->fetchAll($select);\n return $events;\n \t}", "public function upcoming()\n {\n\n $events = Event::where('start_at', '>=', now())\n ->orderBy('start_at', 'asc')\n ->get()\n ->groupBy(function ($val) {\n return date(\"m\", strtotime($val->start_at));\n });\n \n $current_month = date(\"m\", strtotime(\"first day of this month\"));\n\n $week = $events[$current_month]\n ->where('start_at', '<', date(\"Y-m-d H:i:s\", strtotime('next monday')))\n ->groupBy(function ($val) {\n return date(\"Y-m-d\", strtotime($val->start_at));\n })\n ->all();\n\n $timestamp = strtotime('now');\n $days = array();\n for ($i = 0; $i < 7; $i++) {\n $days[date(\"Y-m-d\", $timestamp)] = [];\n $timestamp = strtotime('+1 day', $timestamp);\n }\n\n //$week = $week + $days;\n\n //ksort($week);\n\n $month = $events[$current_month]\n ->whereBetween('start_at', [date(\"Y-m-d H:i:s\", strtotime('next monday')), date(\"Y-m-d H:i:s\", strtotime('next month'))])\n ->all();\n\n unset($events[$current_month]);\n\n $after = $events;\n\n return view('events.upcoming', ['week' => $week, 'month' => $month, 'after' => $after]);\n }", "function calculate_age($birthday) {\n return date_diff(date_create($birthday), date_create('today'))->y;\n }", "public function findCompletedYesterday(): array;", "public static function getUsersWithBirthdayInXDays($days)\n {\n $date = new Zend_Date();\n $date->add($days * 24 . ':00:00', Zend_Date::TIMES);\n $filter = array('MONTH(birthdate)' => $date->toString('MM'),\n 'DAY(birthdate)' => $date->toString('dd'));\n return self::fetch($filter);\n }", "function sed_build_age($birth)\n\t{\n\tglobal $sys;\n\n\tif ($birth==1)\n\t\t{ return ('?'); }\n\n\t$day1 = @date('d', $birth);\n\t$month1 = @date('m', $birth);\n\t$year1 = @date('Y', $birth);\n\n\t$day2 = @date('d', $sys['now_offset']);\n\t$month2 = @date('m', $sys['now_offset']);\n\t$year2 = @date('Y', $sys['now_offset']);\n\n \t$age = ($year2-$year1)-1;\n\n\tif ($month1<$month2 || ($month1==$month2 && $day1<=$day2))\n\t\t{ $age++; }\n\n\tif($age < 0)\n\t\t{ $age += 136; }\n\n\treturn ($age);\n\t}", "function sed_build_age($birth)\r\n{\r\n\tglobal $sys;\r\n\r\n\tif ($birth==1)\r\n\t{ return ('?'); }\r\n\r\n\t$day1 = @date('d', $birth);\r\n\t$month1 = @date('m', $birth);\r\n\t$year1 = @date('Y', $birth);\r\n\r\n\t$day2 = @date('d', $sys['now_offset']);\r\n\t$month2 = @date('m', $sys['now_offset']);\r\n\t$year2 = @date('Y', $sys['now_offset']);\r\n\r\n\t$age = ($year2-$year1)-1;\r\n\r\n\tif ($month1<$month2 || ($month1==$month2 && $day1<=$day2))\r\n\t{ $age++; }\r\n\r\n\tif($age < 0)\r\n\t{ $age += 136; }\r\n\r\n\treturn ($age);\r\n}", "function getWeekAnniversaries(){\n\t\t$week_start = strtotime(\"last sunday\", time());\n\t\t$week_end = strtotime(\"next saturday\", time());\n\n\t\t$this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));\n\t\tif ($this->cache->apc->is_supported()){\n\t\t\t$anniversaries = $this->cache->apc->get('anniversaries-'.FISHNET_VERSION);\n\t\t}else{\n\t\t\t$anniversaries = $this->cache->file->get('anniversaries-'.FISHNET_VERSION);\n\t\t}\n\n\t\tif(!$anniversaries){\n\t\t\t/**\n\t\t\t * @var CI_DB_result $query\n\t\t\t */\n\t\t\t$query = $this->db->query(\"\n\t\t\t\tSELECT * FROM(\n\t\t\t\t\tSELECT user_id,\tusername, display_name, start_date, hidden,\n\t\t\t\t\t\tYEAR(NOW()) - YEAR(start_date) AS years_served,\n\t\t\t\t\t\tSTR_TO_DATE(CONCAT_WS('-', YEAR(NOW()), MONTH(start_date), DAY(start_date)), '%Y-%m-%d') AS anniv\n\t\t\t\t\tFROM `fn_users`\n\t\t\t\t\tORDER BY start_date ASC\n\t\t\t\t) as u WHERE anniv >= '\".date(\"Y-m-d\", $week_start).\"' AND anniv <= '\".date(\"Y-m-d\", $week_end).\"'\n\t\t\t\tAND years_served > 0 AND hidden = 0\n\t\t\t\");\n\n\t\t\t//echo $this->db->last_query();\n\n\t\t\t$anniversaries = $query->result_array();\n\n\t\t\t$this->cache->save('anniversaries-'.FISHNET_VERSION, $anniversaries, 10080);\n\t\t}\n\n\t\treturn array('anniversaries' => $anniversaries);\n\t}", "public function getBirthData();", "protected function getEventDays() {\n\n for ($i = 0; $i <= $this->days; $i++) {\n $this->dates[$i] = date(ICAL_DATE_FORMAT, mktime(7, 30, 0, date(\"m\"), date(\"d\") + $i, date(\"Y\")));\n }\n }", "private function generate_dates($fr_date,$to_date){\n $r_date = new DateTime($to_date);\n $t_date= new DateTime($fr_date);\n $days = round(abs($r_date->format('U') - $t_date->format('U')) / (60*60*24));\n if($r_date < $t_date){\n return 'error';\n }else{ \n if($days==0){\n return array($t_date->format('Y-m-d'));\n }else{\n $trav_days[]=$t_date->format('Y-m-d');\n for($i=0;$i<($days);$i++){\n $add='+1 day';\n $t_date->modify($add);\n $trav_days[]=$t_date->format('Y-m-d');\n }\n return $trav_days;\n }\n } \n }", "public function dateProvider()\n {\n return array(\n\t\t\t#Test holidays in past years\n array('21.03.2010', null, null),\n\t\t\tarray('01.01.2010', null, array('name' => '1. nyttårsdag')),\n\t\t\t\n\t\t\tarray('01.04.2010', null, array('name' => 'Skjærtorsdag')),\n\t\t\tarray('02.04.2010', null, array('name' => 'Langfredag')),\n\t\t\tarray('04.04.2010', null, array('name' => '1. påskedag')),\n\t\t\tarray('05.04.2010', null, array('name' => '2. påskedag')),\n\t\t\t\n\t\t\tarray('01.05.2010', null, array('name' => '1. mai')),\n\t\t\tarray('13.05.2010', null, array('name' => 'Kristi Himmelfartsdag')),\n\t\t\tarray('17.05.2010', null, array('name' => 'Grunnlovsdagen')),\n\t\t\t\n\t\t\tarray('24.05.2010', null, array('name' => '2. pinsedag')),\n\n\t\t\tarray('25.12.2010', null, array('name' => '1. juledag')), \n\t\t\tarray('26.12.2010', null, array('name' => '2. juledag')),\n\n\t\t\t#Test current year, (when writing these tests)\n\t\t\tarray('21.03.2014', null, null),\n\t\t\tarray('01.01.2014', null, array('name' => '1. nyttårsdag')),\n\t\t\t\n\t\t\tarray('17.04.2014', null, array('name' => 'Skjærtorsdag')),\n\t\t\tarray('18.04.2014', null, array('name' => 'Langfredag')),\n\t\t\tarray('20.04.2014', null, array('name' => '1. påskedag')),\n\t\t\tarray('21.04.2014', null, array('name' => '2. påskedag')),\n\t\t\t\n\t\t\tarray('01.05.2014', null, array('name' => '1. mai')),\n\t\t\tarray('29.05.2014', null, array('name' => 'Kristi Himmelfartsdag')),\n\t\t\tarray('17.05.2014', null, array('name' => 'Grunnlovsdagen')),\n\t\t\t\n\t\t\tarray('09.06.2014', null, array('name' => '2. pinsedag')),\n\n\t\t\tarray('25.12.2014', null, array('name' => '1. juledag')), \n\t\t\tarray('26.12.2014', null, array('name' => '2. juledag')),\n\n\n\t\t\t#Test in the future\n\t\t\tarray('21.03.2016', null, null),\n\t\t\tarray('01.01.2016', null, array('name' => '1. nyttårsdag')),\n\t\t\t\n\t\t\tarray('24.03.2016', null, array('name' => 'Skjærtorsdag')),\n\t\t\tarray('25.03.2016', null, array('name' => 'Langfredag')),\n\t\t\tarray('27.03.2016', null, array('name' => '1. påskedag')),\n\t\t\tarray('28.03.2016', null, array('name' => '2. påskedag')),\n\t\t\t\n\t\t\tarray('01.05.2016', null, array('name' => '1. mai')),\n\t\t\tarray('05.05.2016', null, array('name' => 'Kristi Himmelfartsdag')),\n\t\t\tarray('17.05.2016', null, array('name' => 'Grunnlovsdagen')),\n\t\t\t\n\t\t\tarray('16.05.2016', null, array('name' => '2. pinsedag')),\n\n\t\t\tarray('25.12.2016', null, array('name' => '1. juledag')), \n\t\t\tarray('26.12.2016', null, array('name' => '2. juledag')),\n );\n }", "function list_years_future($quantity = 10)\n{\n\t$years[''] = 'Y';\n\t\n\tfor ($y = date('Y'); $y <= date('Y')+$quantity; $y++) \n\t{\n\t\t$years[$y] = $y;\n\t}\n\t\n\treturn $years;\n}", "public function getDateBirth();", "public function get_upcoming_events($num = 6)\n\t{\n\t\t$this->db->select('event.*');\n\t\t$this->db->where('event_status = 1 AND event_start_time >= NOW()');\n\t\t$this->db->order_by('created', 'DESC');\n\t\t$query = $this->db->get('event', $num);\n\t\t\n\t\treturn $query;\n\t}", "static function getBornYearRange ()\r\n\t{\r\n\t\t$year = date(\"Y\");\r\n\r\n\t\treturn range($year-10,$year-80);\r\n\t}", "function fromDays( $days ) {\r\n\t\t$days -= 1721119;\r\n\t\t$century = floor( ( 4 * $days - 1) / 146097 );\r\n\t\t$days = floor( 4 * $days - 1 - 146097 * $century );\r\n\t\t$day = floor( $days / 4 );\r\n\t \r\n\t\t$year = floor( ( 4 * $day + 3) / 1461 );\r\n\t\t$day = floor( 4 * $day + 3 - 1461 * $year );\r\n\t\t$day = floor( ($day + 4) / 4 );\r\n\t \r\n\t\t$month = floor( ( 5 * $day - 3) / 153 );\r\n\t\t$day = floor( 5 * $day - 3 - 153 * $month );\r\n\t\t$day = floor( ($day + 5) / 5 );\r\n\t \r\n\t\tif ($month < 10) {\r\n\t\t $month +=3;\r\n\t\t} else {\r\n\t\t $month -=9;\r\n\t\t if ($year++ == 99) {\r\n\t\t\t$year = 0;\r\n\t\t\t$century++;\r\n\t\t }\r\n\t\t}\r\n\t\treturn array( $day, $month, ($century*100 + $year) );\r\n\t}", "public function testOfficialHolidays(): void\n {\n $officialHolidays = [];\n\n if ($this->year >= 1949) {\n $officialHolidays[] = 'independenceMovementDay';\n $officialHolidays[] = 'liberationDay';\n $officialHolidays[] = 'nationalFoundationDay';\n $officialHolidays[] = 'newYearsDay';\n $officialHolidays[] = 'chuseok';\n $officialHolidays[] = 'christmasDay';\n\n if ($this->year >= 1950 && $this->year < 1976) {\n $officialHolidays[] = 'unitedNationsDay';\n }\n\n if ($this->year >= 1956) {\n $officialHolidays[] = 'memorialDay';\n }\n\n if ($this->year >= 1975) {\n $officialHolidays[] = 'childrensDay';\n $officialHolidays[] = 'buddhasBirthday';\n }\n\n if ($this->year >= 1976 && $this->year <= 1990) {\n $officialHolidays[] = 'armedForcesDay';\n }\n\n if ($this->year >= 1985) {\n $officialHolidays[] = 'seollal';\n }\n\n if ($this->year >= 1986) {\n $officialHolidays[] = 'dayAfterChuseok';\n }\n\n if ($this->year >= 1989) {\n $officialHolidays[] = 'dayBeforeChuseok';\n $officialHolidays[] = 'dayBeforeSeollal';\n $officialHolidays[] = 'dayAfterSeollal';\n }\n\n if ($this->year <= 1989) {\n $officialHolidays[] = 'twoDaysLaterNewYearsDay';\n }\n\n if ($this->year <= 1990 || $this->year > 2012) {\n $officialHolidays[] = 'hangulDay';\n }\n\n if ($this->year <= 1998) {\n $officialHolidays[] = 'dayAfterNewYearsDay';\n }\n\n if ($this->year <= 2005) {\n $officialHolidays[] = 'arborDay';\n }\n\n if ($this->year < 2008) {\n $officialHolidays[] = 'constitutionDay';\n }\n }\n\n $this->assertDefinedHolidays($officialHolidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL);\n }", "public function listDays()\n {\n $results = $this->holidayDayRepository->listDays();\n\n return $this->transform($results, $this->holidayHourTransformer);\n }", "public function announcements() {\n global $db, $date;\n $announcements = array();\n $get_announcement = $db->query(sprintf('SELECT * FROM announcements WHERE start_date <= %1$s AND end_date >= %1$s', secure($date))) or _error(SQL_ERROR_THROWEN);\n if($get_announcement->num_rows > 0) {\n while($announcement = $get_announcement->fetch_assoc()) {\n $check = $db->query(sprintf(\"SELECT * FROM announcements_users WHERE announcement_id = %s AND user_id = %s\", secure($announcement['announcement_id'], 'int'), secure($this->_data['user_id'], 'int') )) or _error(SQL_ERROR_THROWEN);\n if($check->num_rows == 0) {\n $announcement['code'] = html_entity_decode($announcement['code'], ENT_QUOTES);\n $announcements[] = $announcement;\n }\n }\n }\n return $announcements;\n }", "public function upcoming()\n\t{\n\t\treturn Response::json($this->events->upcoming(['limit' => 5]));\n\t}", "public static function genGetDates()\n {\n $dataA = Larafuse::whereType('DateTime')->lists('Field');\n\n $dataB = Larafuse::whereType('Date')->lists('Field');\n\n $datas =array_merge($dataA,$dataB);\n\n $str = \"\";\n\n echo \"[\";\n\n foreach ($datas as $data) {\n $str = \",'\".$data.\"'\".$str;\n }\n\n echo ltrim($str,',').']';\n }", "function showtDayList()\n{\n return array(\n 0 => \"MON\",\n 1 => \"TUE\",\n 2 => \"WED\",\n 3 => \"THU\",\n 4 => \"FRI\",\n 5 => \"SAT\",\n 6 => \"SUN\");\n}", "function chronos(string $DoB) : void {\n $bDay = date_create($DoB); //make date object for birthday\n $jetzt = date_create(); //make date object for current date\n\n $time = date_diff($jetzt, $bDay); //determine difference in date\n\n for ($i = 0; $i <= 3; $i++) {\n ananke($i, $time); //call helper function with loop var and interval\n }\n}", "function getUpcoming(){\n\n\t\t\t$shows = $this->find('all', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'Show.showtime >=' => strftime('%Y-%m-%d 00:00:00', strtotime('+0day'))\n\t\t\t\t),\n\t\t\t\t'fields' => array('Show.showtime', 'Show.comment', 'Show.id', 'Show.slug'),\n\t\t\t\t'contain' => array(\n\t\t\t\t\t'Location' => array(\n\t\t\t\t\t\t'fields' => array('Location.name', 'Location.city', 'Location.zip', 'Location.country')\n\t\t\t\t\t),\n\t\t\t\t\t'Bill',\n\t\t\t\t\t'Setlist'\n\t\t\t\t),\n\t\t\t\t'order' => array('Show.showtime' => 'ASC')\n\t\t\t));\n\t\t\treturn ($shows);\n\t\t}", "function getShortenListDay()\n{\n $list = array(\"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\", \"SUN\");\n return $list;\n}", "function providerDays()\n\t{\n\t\treturn array(\n\t\t\t// According to \"the rhyme\" these should be the same every year\n\t\t\tarray(9, FALSE, 30),\n\t\t\tarray(4, FALSE, 30),\n\t\t\tarray(6, FALSE, 30),\n\t\t\tarray(11, FALSE, 30),\n\t\t\tarray(1, FALSE, 31),\n\t\t\tarray(3, FALSE, 31),\n\t\t\tarray(5, FALSE, 31),\n\t\t\tarray(7, FALSE, 31),\n\t\t\tarray(8, FALSE, 31),\n\t\t\tarray(10, FALSE, 31),\n\t\t\t// February is such a pain\n\t\t\tarray(2, 2001, 28),\n\t\t\tarray(2, 2000, 29),\n\t\t\tarray(2, 2012, 29),\n\t\t);\n\t}", "function age($birthdate) {\n\t return (strtotime('now') -strtotime($birthdate))/(60*60*24*365);\n }", "public function displayBirthday()\n {\n $timestamp = strtotime($this->birthdate); // YYYY-MM-dd ==>TIMESTAMP\n //2 onconvertit la date en francais\n $dateFR = date(\"d-m-Y\", $timestamp);\n echo $dateFR;\n\n //echo $this->birthdate;\n }", "public function get7Days($judul)\n {\n $day7[0] = \"2020-02-28-Friday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('tomorrow');\n $day7[1] = \"2020-02-29-Saturday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('+2 day');\n $day7[2] = \"2020-03-01-Sunday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('+3 day');\n $day7[3] = \"2020-03-02-Monday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('+4 day');\n $day7[4] = \"2020-03-03-Tuesday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('+5 day');\n $day7[5] = \"2020-03-04-Wednesday\";//$dateobj->format('Y-m-d-l');\n //$dateobj = new DateTime('+6 day');\n $day7[6] = \"2020-03-05-Thursday\";//$dateobj->format('Y-m-d-l');\n\n for ($i=0; $i < 7; $i++) {\n $day7exploded[$i] = explode(\"-\",$day7[$i]);\n $dayseven[$i]['Y'] = $day7exploded[$i][0];\n $dayseven[$i]['value'] = $day7exploded[$i][0] . \"-\" . $day7exploded[$i][1] . \"-\" . $day7exploded[$i][2];\n switch ($day7exploded[$i][1]) {\n case '01': $day7exploded[$i][1] = \"JAN\";\n break;\n case '02': $day7exploded[$i][1] = \"FEB\";\n break;\n case '03': $day7exploded[$i][1] = \"MAR\";\n break;\n case '04': $day7exploded[$i][1] = \"APR\";\n break;\n case '05': $day7exploded[$i][1] = \"MAY\";\n break;\n case '06': $day7exploded[$i][1] = \"JUN\";\n break;\n case '07': $day7exploded[$i][1] = \"JUL\";\n break;\n case '08': $day7exploded[$i][1] = \"AUG\";\n break;\n case '09': $day7exploded[$i][1] = \"SEP\";\n break;\n case '10': $day7exploded[$i][1] = \"OCT\";\n break;\n case '11': $day7exploded[$i][1] = \"NOV\";\n break;\n case '12': $day7exploded[$i][1] = \"DES\";\n break;\n }\n\n $dayseven[$i]['m'] = $day7exploded[$i][1];\n $dayseven[$i]['d'] = $day7exploded[$i][2];\n $dayseven[$i]['l'] = $day7exploded[$i][3];\n\n $dayseven[$i]['judul'] = $judul;\n }\n\n\n return $dayseven;\n }", "function _getFullDayNames() {\n\t\t$day_names = array();\n \tfor($n=1,$t=3*86400; $n<=7; $n++,$t+=86400) {\n \t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t));\n \t}\n\t\treturn $day_names;\n\t}", "public function getEventsByDayFuture(){\n \t\t$select = $this->select()\n ->from($this->_name,array('eventStartDate'))\n\t\t\t\t\t ->where('events.eventStartDate >= ?',Zend_Date::now()->toString('yyyy-MM-dd'))\n\t\t\t\t\t ->group('eventStartDate');\n $events = $this->getAdapter()->fetchAll($select);\n return $events;\n \t}", "function enumerate_years() {\n\t$years = [];\n\t$y = gmdate( 'Y' );\n\tfor ( $i = $y; $i >= ( $y - 100 ); $i-- ) {\n\t\t$years[ $i ] = $i;\n\t}\n\treturn $years;\n}", "function GetBirthDayOptionsFromArray()\n{\n global $formData;\n $selected = '';\n $array = GetDayOptions();\n\t$options = \"<option value=''>--Select--</option>\";\n\t\n\tforeach($array as $data)\n {\n $options .= \"<option value='$data' \" . (($selected == $data || $formData['studentBirthDay']) ? 'selected' : '') . \">$data</option>\";\t\n }\n\t\t\n\treturn $options;\n}", "function getEveryDays($day)\n{\n $firstday = date('Y-m-d', strtotime(\"$day +1 day\"));\n $lastday = date('Y-m-d', strtotime(\"$firstday\"));\n return array($firstday, $lastday);\n}", "public static function by_days($number_of_days){\n $connection = Database::get_connection();\n $endDate = Date::today_date();\n $startDate = '';\n if($number_of_days==0){\n $startDate = Date::get_previous_date(0);\n }else if($number_of_days==7){\n $startDate = Date::get_previous_date(7);\n }else if($number_of_days==14){\n $startDate = Date::get_previous_date(14);\n }else if($number_of_days==28){\n $startDate = Date::get_previous_date(28);\n \n }\n\n \n\n $sql = \"SELECT * FROM eois WHERE datetime BETWEEN '$startDate' AND '$endDate' ORDER BY id DESC\";\n\n $result = Database::select($sql);\n\n if($result){\n if(mysqli_num_rows($result)<1){\n return false;\n }else{\n $eois = array();\n while($eoi_row = mysqli_fetch_array($result)){\n $eoi = new self;\n $eoi->id = $eoi_row['id'];\n $eoi->name = $eoi_row['name'];\n $eoi->email = $eoi_row['email'];\n $eoi->number = $eoi_row['number'];\n $eoi->college_id = $eoi_row['college_id'];\n $eoi->user_id = $eoi_row['user_id'];\n $eoi->course = $eoi_row['course_type_id'];\n $eoi->datetime = $eoi_row['datetime'];\n \n\n array_push($eois,$eoi);\n }\n return $eois;\n }\n }else{\n die(\"Query failed!!\");\n }\n }", "public function getDates()\n {\n $dates = parent::getDates();\n array_push($dates, 'attendance_date');\n return $dates;\n }", "function working_date_range( $start, $end, $format = 'Y-m-d', $working_days = array( 1, 2, 3, 4, 5 ) ){\n $date_range = create_date_range( $start, $end, $format );\n \n // Create the working date range\n $working_date_range = array();\n \n // Go through each day\n foreach( $date_range as $day ){\n \n // If it's a working day then add to the array\n if( in_array( date( 'N', strtotime( $day ) ), $working_days ) ){\n \n $working_date_range[] = $day;\n \n }\n \n \n }\n \n // Return the dates\n return $working_date_range;\n \n}", "function get_seven_days($days = 0)\n {\n $Today = Carbon::now()->subDays($days);\n $Days = [];\n for ($i = 0; $i < 7; $i++) {\n $Days[] = $Today->addDays($i)->clone();\n }\n\n return $Days;\n }", "protected static function _getAll($year = 2000)\n {\n\n $bank_holiday_list = [];\n\n /*\n * New Year's Day\n */\n switch (date('w', strtotime($year . '-01-01 12:00:00')))\n {\n\n case 6:\n $bank_holiday_list['New Year\\'s Day'][] = $year . '-01-03';\n break;\n\n case 0:\n $bank_holiday_list['New Year\\'s Day'][] = $year . '-01-02';\n break;\n\n default:\n $bank_holiday_list['New Year\\'s Day'][] = $year . '-01-01';\n\n }\n\n /*\n * Good Friday\n */\n $bank_holiday_list['Good Friday'][] = date('Y-m-d', strtotime('+' . (easter_days($year) - 2) . ' days', strtotime($year . '-03-21 12:00:00')));\n\n /*\n * Easter Monday\n */\n $bank_holiday_list['Easter Monday'][] = date('Y-m-d', strtotime('+' . (easter_days($year) + 1) . ' days', strtotime($year . '-03-21 12:00:00')));\n\n /*\n * VE Day\n */\n if ($year == 1995)\n {\n $bank_holiday_list['VE Day'][] = '1995-05-08';\n }\n\n /*\n * May Day\n */\n else\n {\n\n switch (date('w', strtotime($year . '-05-01 12:00:00')))\n {\n\n case 0:\n $bank_holiday_list['May Day'][] = $year . '-05-02';\n break;\n\n case 1:\n $bank_holiday_list['May Day'][] = $year . '-05-01';\n break;\n\n case 2:\n $bank_holiday_list['May Day'][] = $year . '-05-07';\n break;\n\n case 3:\n $bank_holiday_list['May Day'][] = $year . '-05-06';\n break;\n\n case 4:\n $bank_holiday_list['May Day'][] = $year . '-05-05';\n break;\n\n case 5:\n $bank_holiday_list['May Day'][] = $year . '-05-04';\n break;\n\n case 6:\n $bank_holiday_list['May Day'][] = $year . '-05-03';\n break;\n\n }\n\n }\n\n /*\n * Whitsun\n */\n if ($year == 2002)\n {\n\n /*\n * Exception year\n */\n $bank_holiday_list['Whitsun'][] = '2002-06-03';\n $bank_holiday_list['Whitsun'][] = '2002-06-04';\n\n }\n\n else if ($year == 2012)\n {\n\n /*\n * Queen's Diamond Jubilee exception\n */\n $bank_holiday_list['Whitsun'][] = '2012-06-04';\n\n }\n\n else\n {\n\n switch (date('w', strtotime($year . '-05-31 12:00:00')))\n {\n\n case 0:\n $bank_holiday_list['Whitsun'][] = $year . '-05-25';\n break;\n\n case 1:\n $bank_holiday_list['Whitsun'][] = $year . '-05-31';\n break;\n\n case 2:\n $bank_holiday_list['Whitsun'][] = $year . '-05-30';\n break;\n\n case 3:\n $bank_holiday_list['Whitsun'][] = $year . '-05-29';\n break;\n\n case 4:\n $bank_holiday_list['Whitsun'][] = $year . '-05-28';\n break;\n\n case 5:\n $bank_holiday_list['Whitsun'][] = $year . '-05-27';\n break;\n\n case 6:\n $bank_holiday_list['Whitsun'][] = $year . '-05-26';\n break;\n\n }\n\n }\n\n /*\n * Summer Bank Holiday\n */\n switch (date('w', strtotime($year . '-08-31 12:00:00')))\n {\n\n case 0:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-25';\n break;\n\n case 1:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-31';\n break;\n\n case 2:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-30';\n break;\n\n case 3:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-29';\n break;\n\n case 4:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-28';\n break;\n\n case 5:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-27';\n break;\n\n case 6:\n $bank_holiday_list['Summer Bank Holiday'][] = $year . '-08-26';\n break;\n\n }\n\n /*\n * Christmas\n */\n switch (date('w', strtotime($year . '-12-25 12:00:00')))\n {\n\n case 5:\n $bank_holiday_list['Christmas Day'][] = $year . '-12-25';\n $bank_holiday_list['Boxing Day'][] = $year . '-12-28';\n break;\n\n case 6:\n $bank_holiday_list['Christmas Day'][] = $year . '-12-27';\n $bank_holiday_list['Boxing Day'][] = $year . '-12-28';\n break;\n\n case 0:\n $bank_holiday_list['Christmas Day'][] = $year . '-12-26';\n $bank_holiday_list['Boxing Day'][] = $year . '-12-27';\n break;\n\n default:\n $bank_holiday_list['Christmas Day'][] = $year . '-12-25';\n $bank_holiday_list['Boxing Day'][] = $year . '-12-26';\n\n }\n\n /*\n * Millenium Eve\n */\n if ($year == 1999)\n {\n $bank_holiday_list['Millenium Eve'][] = '1999-12-31';\n }\n\n /*\n * Prince William's Wedding\n */\n if ($year == 2011)\n {\n $bank_holiday_list['Prince William\\'s Wedding'][] = '2011-04-29';\n }\n\n /*\n * Queen's Diamond Jubilee\n */\n if ($year == 2012)\n {\n $bank_holiday_list['Queen\\'s Diamond Jubilee'][] = '2012-06-05';\n }\n\n return $bank_holiday_list;\n\n }", "public function lists()\n {\n return $this->days;\n }" ]
[ "0.686507", "0.66045964", "0.6556877", "0.6368723", "0.6256299", "0.61074483", "0.59971267", "0.5914416", "0.5792398", "0.57707816", "0.5760661", "0.5758047", "0.57350594", "0.5732079", "0.5725393", "0.5706679", "0.5705457", "0.5694938", "0.56858337", "0.5668591", "0.5613193", "0.5611797", "0.5609771", "0.5584793", "0.5566685", "0.5559212", "0.5520191", "0.55157995", "0.5505099", "0.55014986", "0.54956293", "0.5494082", "0.5463599", "0.5463582", "0.5460606", "0.54584527", "0.5439546", "0.54385984", "0.5429243", "0.5420171", "0.54114777", "0.5343563", "0.5338112", "0.5317582", "0.5313886", "0.5305253", "0.52974194", "0.5296567", "0.5294686", "0.5292861", "0.52927214", "0.52834356", "0.52409244", "0.5239191", "0.52340215", "0.5226834", "0.52220994", "0.52141905", "0.52118015", "0.52057993", "0.5193296", "0.5189856", "0.5182123", "0.51659185", "0.51658595", "0.51607466", "0.51594746", "0.51537406", "0.5149965", "0.5146549", "0.5139941", "0.5109194", "0.5100075", "0.5099052", "0.5092514", "0.50858885", "0.5079925", "0.50772643", "0.5072168", "0.50709933", "0.5070526", "0.50704503", "0.5069207", "0.50669277", "0.5065419", "0.50611395", "0.50553304", "0.5054203", "0.5053036", "0.50530237", "0.5050198", "0.50457114", "0.5045081", "0.5043154", "0.5028907", "0.5028304", "0.50269216", "0.5026302", "0.50076306", "0.50063187" ]
0.76072335
0
Provide list of current active users.
Предоставьте список текущих активных пользователей.
public function active_users_list() { $users = $this->where('site_id', kohana::config('chapterboard.site_id'))->orderby('searchname', 'ASC') ->where('status', 1) ->find_all(); foreach ($users as $user) { $results[$user->id] = $user->name(); } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getActiveUsersList() {\n $sql = \"SELECT u.id, u.username, concat(p.firstname,' ',p.middlename,' ',p.lastname) \"\n . \"as emp_name FROM infinity._user u INNER JOIN infinity.person p \"\n . \"ON u.person_id=p.id where u.isactive=1;\";\n $result = self::findBySql($sql)->asArray()->all();\n return $result;\n }", "public function activeUsers()\n {\n try {\n $active_users = $this->user->activeUsers();\n return response()->json(\n [\n 'data' => $active_users,\n 'message' => 'List of all active users',\n 'status' => true,\n 'hasError' => 0\n ],\n Response::HTTP_OK\n );\n } catch (Exception $e) {\n return response()->json(\n [\n 'data' => [],\n 'message' => $e->getMessage(),\n 'status' => false,\n 'hasError' => 1\n ],\n Response::HTTP_BAD_REQUEST\n );\n }\n }", "public function getAllActiveUsers()\n {\n // generate a cache name\n $cacheName = CacheUtility::getCacheName(self::CACHE_ACTIVE_USERS);\n\n // check data in cache\n if (null === ($users = $this->staticCacheInstance->getItem($cacheName))) {\n $select = $this->select();\n $select->from('user_list')\n ->columns([\n 'user_id',\n 'nick_name',\n 'slug',\n 'date_edited'\n ])\n ->where([\n 'status' => self::STATUS_APPROVED\n ]);\n\n $statement = $this->prepareStatementForSqlObject($select);\n $resultSet = new ResultSet;\n $resultSet->initialize($statement->execute());\n $users = $resultSet->toArray();\n\n // save data in cache\n $this->staticCacheInstance->setItem($cacheName, $users);\n $this->staticCacheInstance->setTags($cacheName, [self::CACHE_USER_DATA_TAG]); \n }\n\n return $users;\n }", "public function activeAction() {\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n $this->theme->setTitle(\"Users that are active\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are active\",\n ]);\n }", "public function activeAction()\n {\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n \n $this->theme->setTitle(\"Users that are active\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are active\",\n ]);\n }", "public static function getAllActiveUser()\n {\n return DB::table('users')\n ->where('user_type', '=', '0')\n ->where('state', '=', '1')\n ->get();\n }", "public function getUsersList()\n {\n return $this->usersList;\n }", "public function activeAction()\n {\n $this->initialize();\n\n if (!$this->auth->isAdmin()) {\n $this->FlashMessages->add('warning', 'You do not have permission to this page!');\n $url = $this->url->create('');\n $this->response->redirect($url);\n exit();\n }\n\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n\n $this->theme->setTitle(\"Users that are active\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are active\",\n ]);\n }", "public function activeAction()\r\n\t{\r\n\t\t$all = $this->users->query()\r\n\t\t\t->where('inactivated IS NULL')\r\n\t\t\t->andWhere('deleted is NULL')\r\n\t\t\t->execute();\r\n\t \r\n\t\t$this->theme->setTitle(\"Users\");\r\n\t\t$this->views->add('users/list', [\r\n\t\t\t'users' => $all,\r\n\t\t\t'title' => \"Users\",\r\n\t\t]);\r\n\t}", "public function getUserList()\n\t{\n\t\tif ($this->user) {\n\t\t\treturn $this->user;\n\t\t}\n\n\t\t$this->user = (new \\App\\Db\\Query())->select(['id', 'user_name', 'first_name', 'last_name'])->from('vtiger_users')->where(['status' => 'Active'])->createCommand()->queryAll();\n\n\t\treturn $this->user;\n\t}", "public function activeAction()\n\t\t{\n\t\t $all = $this->users->query()\n\t\t ->where('active IS NOT NULL')\n\t\t ->andWhere('deleted is NULL')\n\t\t ->execute();\n \n\t\t $this->theme->setTitle(\"Users that are active\");\n\t\t $this->views->add('users/list-all', [\n\t\t 'users' => $all,\n\t\t 'title' => \"Aktiva användare\",\n\t\t ]);\n\t\t}", "public function activeAction() \n {\n $active = $this->userModel->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n\n $userInfo = $this->userInfoBuilder(['update', 'inactivate', 'soft-delete'], $active);\n\n $this->views->add('user/list-all', [\n 'title' => 'Aktiva användare',\n 'users' => $userInfo\n ]);\n }", "public function listInActiveAction()\n {\n $this->di->session();\n $this->theme->addStylesheet('css/user.css');\n $all = $this->users->query()\n ->where('active is NULL')\n ->execute();\n \n $this->theme->setTitle(\"Användare som är inaktiva\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Användare som är inaktiva\",\n ]);\n }", "public function listActiveAction()\n {\n $this->di->session();\n $this->theme->addStylesheet('css/user.css');\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->execute();\n \n $this->theme->setTitle(\"Användare som är aktiva\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Användare som är aktiva\",\n ]);\n }", "public function getAllActiveUsers()\n {\n return $this->getEntityManager()->createQueryBuilder()\n ->select('u')\n ->from('ApplicationSonataUserBundle:User', 'u')\n ->andWhere('u.departureDate IS NULL')\n ->andWhere('u.enabled = 1')\n ->getQuery()\n ->getResult()\n ;\n }", "function list_users() {\n return $this->DB->get('users', null);\n }", "public function index()\n {\n return $this->user->getAllUsers();\n }", "public function getUserList();", "public function index()\n {\n $users = $this->wechat->user->lists();\n return $users;\n }", "static public function getActiveUsers(){\n $conn = DbHandler::getConnection();\n $query = \"SELECT id, username FROM users \".\n \"WHERE id != \".$conn->escapeString(static::getCurrentUserId()).\n \" AND last_activity >= \" . $conn->escapeString(getMicrotime() - 3000);\n\n $result = $conn->query($query);\n\n $data = array();\n if($result instanceof Sqlite3Result) {\n while ($row = $result->fetchArray()) {\n $data[] = array('id' => $row['id'], 'username' => $row['username']);\n }\n }\n\n return $data;\n }", "static function user_list(){\n return self::$db->where(array('role_id' => 2,'activated' => 1))->get('users')->result();\n }", "public function getActiveUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 1));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function getAuthenticatedUsers(){\n return $this->findAll()\n ->where('user_id IS NOT NULL')\n ->order('nickname ASC');\n }", "public function getListOfUsers() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'identity/users', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates the requested users were returned.',\n ));\n return $ret;\n }", "function getCurrentUsers() {\n\t\t\t$query = new ParseQuery( \"Bikes\" );\n\t\t\t$query->includeKey( \"currentUser\" );\n\t\t\t$query->ascending( \"currentUser\" );\n\t\t\t$query->exists( \"currentUser\" );\n\t\t\t$query->limit( 1000 );\n\t\t\t$results = $query->find();\n\t\t\t$count = count( $results );\n\n\t\t\t$listOfCurrentUsers = array();\n\t\t\tfor( $i = 0; $i < $count; $i++ ) {\n\t\t\t\t$name = $results[$i]->get( \"currentUser\" )->getUserName();\n\t\t\t\tif( !in_array( $name , $listOfCurrentUsers ) ) {\n\t\t\t\t\tarray_push( $listOfCurrentUsers , $results[$i]->get( \"currentUser\" )->getUserName() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $listOfCurrentUsers;\n\t\t}", "public function get_users() {\n\t\t\treturn $this->run( 'users' );\n\t\t}", "public function displayUsers()\n {\n $users = User::getAll();\n\n return $users;\n }", "public function getUsers() {\r\n $users = $this->user->getUsers();\r\n echo Adcp::jsonEncode(array('users' => $users));\r\n }", "public function getAvailableUsers()\r\n {\r\n\t \r\n return self::create()\r\n\t\t\t\t\t\t->useLnkUsersOrganisationsQuery()->filterByLnkUsersOrganisationsOrganisationId(zend_Auth::getInstance()->getStorage()->read()->getCurrentOrganisation()->getOrganisationId())->endUse()\r\n\t\t\t\t\t\t->withColumn('CASE WHEN user_nom IS NOT NULL THEN CONCAT(users.user_nom, \\' \\', user_prenom) ELSE CONCAT(users.user_id, \\' \\', user_prenom) END', 'label')\r\n ->withColumn('users.user_id', 'value')\r\n ->select('label')\r\n ->orderBy('label', Criteria::ASC)\r\n ->find()\r\n ->toArray('value', false, Basepeer::TYPE_FIELDNAME);\r\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function get_active_users()\n\t{\n\t\t$this->db->from('personnel');\n\t\t$this->db->select('*');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function getUsers()\n {\n \treturn $this->users;\n }", "function getUsers( )\n\t{\n\t\treturn $this->os->getUsers( );\n\t}", "public function index()\n {\n return $this->users->listUsers();\n }", "public function users()\n\t{\n\t\t$response = $this->client->get( 'account/users' );\n\t\treturn $response->getBody();\n\n\t}", "public function getUsersList() {\n return view(\"SuperAdmin/UsersList\");\n }", "public function all_users(){\n return $this->user::all();\n }", "public function list_users() {\n\n\t\tforeach( $this->users as $user ) {\n\n\t\t\techo 'Name: ' . $user['name'];\n\t\t\techo 'Email: ' . $user['email'];\n\n\t\t}\n\t}", "public function listUsers() {\n\t\t$sql = \"SELECT userName FROM users ORDER BY userName\";\n\t\t$result = $this->executeQuery($sql);\n\t\treturn $result;\n\t}", "public function getUserList( ){\n\t\treturn $this->db->select(\n\t\t\t$this->table, \n\t\t\t\t'*'\n\t\t\t);\n\t}", "public function UserList()\n {\n return User::lists('email', 'id');\n\n }", "public function listActive(){\n return response()->json(\n $this->listProfile->getActiveListProfiles()\n );\n }", "public function list()\n {\n if ($this->isConnected()) {\n if (Auth::isAdmin()) {\n $table = $this->table('users');\n $trad = new App();\n $pageTitle = $trad->translate('users');\n $users = $table->findAll();\n\n foreach ($users as $user) {\n $user->status = $trad->translate($user->status);\n $user->created_at = $user->date_fr('exact', 'created_at');\n }\n $this->render('users', ['pageTitle' => $pageTitle, 'users' => $users], 'backend');\n }\n }\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function users()\n {\n $users = $this->members()->with('profile.jobTitle')\n ->where('company_id', $this->id)\n ->where('active', true)\n ->get();\n \n return $users->filter(function ($user) {\n if($user->role != 'admin') {\n return $user;\n }\n });\n }", "public function listUsers() {\n\t\t$query = \"SELECT * FROM users\";\n\t\t$resultatlist = $this->db->getAll($query);\n\t\treturn $resultatlist;\n\t}", "public function users()\n {\n $users=Admin::latest()->get();\n return view('admin.ACL.user.user-list',compact('users'));\n }", "public function getUserList()\n {\n $result = array();\n foreach (get_users() as $user) {\n $result[$user->ID] = '#' . $user->ID . ' ' . $user->user_email;\n }\n return $result;\n }", "public function getUsers()\n {\n return $this->users_detail;\n }", "public function getUsers(){\n\t\t\n\t}", "public function getUsers(): array\n {\n return $this->users;\n }", "function current_logged_in_users($db)\r\n\t{\t\r\n\t\t$userList = \"\";\r\n\t\t$query = \"SELECT DISTINCT user_id FROM \".$this->db->geoTables->session_table.\" WHERE user_id > 1\";\r\n\t\t$currentUsers = $this->db->Execute($query);\r\n\t\tif(!$currentUsers || $currentUsers->RecordCount() == 0) return false;\r\n\t\twhile($line = $currentUsers->FetchRow())\r\n\t\t{\r\n\t\t\t$sql = \"SELECT * FROM \".$this->db->geoTables->userdata_table.\" WHERE id = \".$line['user_id'];\r\n\t\t\t$result = $this->db->Execute($sql);\r\n\t\t\t$userdata = $result->FetchRow();\r\n\r\n\t\t\t$userList .= '<span style=\"white-space:nowrap\"><strong>'.$userdata['username'].'</strong> ('.$userdata['firstname'].' '.$userdata['lastname'].')</span> ';\r\n\t\t}\r\n\t\treturn $userList;\r\n\t}", "public function get_users() {\n $data['users'] = $this->Users_model->get_users();\n return $data['users'];\n }", "public function getUsers() {\n\t\treturn $this->users;\n\t}", "public function getUsers() {\n\t\treturn $this->users;\n\t}", "function getActiveUsers($date=null)\n {\n $users = [];\n\n if (!$date)\n {\n $cache = \\Cache::getCache(\"file\")->get(\"authgroup/\".$this->id.\"/active-users\");\n if ($cache) {\n $cache = json_decode($cache);\n if ($cache->timestamp > strtotime(\"now\")-21600) { // 6 uur\n if (count($cache->users) > 0) {\n if ($results = \\MySQL::getDB()->getRows(\"select * from users where id in (\".implode(\", \", $cache->users).\")\")) {\n foreach ($results as $result) {\n $user = new \\users\\model\\User();\n $user->load($result);\n $users[] = $user;\n }\n }\n }\n return $users;\n }\n }\n\n // Huidige actieve users\n $ids = [];\n foreach ($this->getAllowedUsers() as $user) {\n $ids[] = $user->id;\n }\n // Wie daarvan zijn ingelogd geweest?\n $users = [];\n $userIDs = [];\n if (count($ids) > 0) {\n if ($results = \\MySQL::getDB()->getRows(\"select u.*\n from users u\n inner join user_log l on l.userid = u.id\n where l.what = 'login'\n and l.logdate between ? and ?\n and u.id in (\".implode(\",\", $ids).\")\n group by u.id\"\n , [date(\"Y-m-d\", mktime(0,0,0,date(\"m\"), date(\"d\")-30, date(\"Y\"))),\n date(\"Y-m-d\", mktime(0,0,0,date(\"m\"), date(\"d\"), date(\"Y\")))]))\n {\n foreach ($results as $result) {\n $user = new \\users\\model\\User();\n $user->load($result);\n $users[] = $user;\n $userIDs[] = $user->id;\n }\n }\n }\n \\Cache::getCache(\"file\")->set(\"authgroup/\".$this->id.\"/active-users\", [\"timestamp\" => strtotime(\"now\"), \"users\" => $userIDs]);\n }\n else\n {\n // Actieve users in periode\n $users = [];\n if ($results = \\MySQL::getDB()->getRows(\"select u.*\n from users u\n inner join stats_users s on u.id = s.userid\n where s.authgroupid = ?\n and s.year = ? and s.month = ?\n group by u.id\"\n , [$this->id, date(\"Y\", strtotime($date)), date(\"m\", strtotime($date))]))\n {\n foreach ($results as $result) {\n $user = new \\users\\model\\User();\n $user->load($result);\n $users[] = $user;\n }\n }\n }\n\n return $users;\n }", "public function index()\n {\n return $this->user->all();\n }", "public function users()\n {\n return $this->user->all();\n }", "public function getAllUsers();", "public function getAllUsers();", "private function getUsers() {\n\n\t\treturn $this->_userService->getUsers();\n\t}", "public function getUsers(){\r\n\t\treturn $this->_users;\r\n\t}", "public function userList()\n\t{\n\t\treturn $stmt = $this->db->select(\"SELECT * FROM users\");\n\t}", "public function findActiveUsers(): array\n {\n return $this->findBy(\n ['role' => 'ROLE_USER', 'state' => 1],\n ['name' => 'ASC']\n );\n }", "public function index()\n {\n $users = User::where('active', 1)->paginate(25);\n\n return $this->getView()\n ->shares('title', __('Users'))\n ->with('users', $users);\n }", "public function getUsers()\n {\n return $this->Users;\n }", "public function getUsers() {\n }", "protected function retrieveUserList() {\n $model = new aam_View_User;\n\n return $model->retrieveList();\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "public function getAllUsers()\n {\n $users = $this->controlling_service->getAllUser();\n $eventCount = $this->controlling_service->countEventParticipate($users);\n $changeDateFormat = $this->controlling_service->changeDateFormatCreatedAt($users);\n return view('admin.user.listUser', compact('users', 'eventCount', 'changeDateFormat'));\n }", "public function returnUsers() {\n\t\t\t$db = new database();\n\t\t\t$users = $db->getAll(\"SELECT id, fname, sname FROM admin_login WHERE active = 1;\");\n\t\t\t\n\t\t\tprint json_encode($users);\n\t\t}", "public function getUsers(): array {\n return $this->users;\n }", "public static function getCurrentMembers()\n {\n return json_encode(DB::select('select * from users'));\n }", "public function listCommand() {\n\t\t$users = $this->userService->getUsers();\n\n\t\t$tableRows = array();\n\t\t$headerRow = array('Name', 'Email', 'Account(s)', 'Role(s)', 'Active');\n\n\t\tforeach ($users as $user) {\n\t\t\t$tableRows[] = $this->getTableRowForUser($user);\n\t\t}\n\n\t\t$this->output->outputTable($tableRows, $headerRow);\n\t}", "protected function userList() {\n\n\t\t$oUser = new APP_Model_User();\n\t\t$sFilteredBy = null;\n\t\t$aClauses = array();\n\n\t\tif( ($iRoleFilter = $this->get('rolefilter', '')) !== '') {\n\t\t\t$sFilteredBy = PPI_Helper_User::getRoleNameNice(PPI_Helper_User::getRoleNameFromID($iRoleFilter));\n\t\t\t$aClauses[] = 'role_id = ' . $oUser->quote($iRoleFilter);\n\t\t}\n\n\t\t// Get the users\n\t\t$users = $oUser->getList(!empty($aClauses) ? implode(' AND ', $aClauses) : '')->fetchAll();\n\n\t\t// If there was a filter applied but returned no results, we default the userlist back to normal\n\t\tforeach($users as $key => $user) {\n\t\t\t$users[$key]['role_name'] = PPI_Helper_User::getRoleNameFromID($user['role_id']);\n\t\t}\n\n\t\t$sUsernameField = $this->getConfig()->system->usernameField;\n\t\t$this->adminLoad('admin/user_list', compact('users', 'sFilteredBy', 'sUsernameField'));\n\t}", "public function returnUsers() {\n return $this->users;\n }", "public function index()\n {\n return $this->user::all();\n }", "function get_all_users()\n {\n include('connect.php');\n $users_query = \"SELECT * FROM tbl_user WHERE `user_active` = true\";\n\n $get_users = $pdo->prepare($users_query);\n $get_users->execute();\n\n $users = [];\n while ($row = $get_users->fetch(PDO::FETCH_ASSOC)) {\n $users[] = $row;\n }\n return $users;\n }", "public function get_all_users()\n {\n return $this->request_handler('GET', $url_addon='users/');\n\n }", "public function list_user()\n {\n return $this->db->get_where(\"customer\");\n }", "public function index()\n {\n $allUsers = $this->user->get_all_users();\n\n include_once(\"../Views/Users/index.php\");\n return $allUsers;\n }", "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "function get_all_users(){ // Get all users\n\t\t\n\t}", "public function getAllUsers()\n {\n // sql statement\n $sql = \"SELECT * FROM users AS t1 LEFT JOIN users_info as t2 ON t2.id=t1.id;\";\n return $this->execQuery($sql);\n\n }", "public function index()\n {\n $this->authorize('list-users');\n return User::paginate();\n }", "public function getAllUser()\n {\n $data = ['status' => 0];\n $users = User::where(['is_active'=>1])->get();\n if ($users) {\n $data['status'] = 1;\n $data['users'] = $users;\n }\n\n return $data;\n }", "public function Users() {\r\n\t\tif (!isset(self::$__queryHandler)) {\r\n\t\t\tself::$__queryHandler = QueryHandler::getInstance(QueryHandlerType::MYSQL);\r\n\t\t}\r\n\t\t\r\n\t\t$query = \"select p.user_name, p.first_real_name, p.last_real_name, p.is_disabled_by_phyer, p.is_locked, e.name as content_type, p.merits, aty.name as account_type, dr.name as disabled_reason, p.merits, p.date_of_birth, p.date_created, p.signature, p.bio from `pbox`.`people` p inner join `pbox`.`account_types` aty on aty.account_type_id = p.account_type_id left outer join `pbox`.`explicity` e on e.explicity_id = p.explicity_id left outer join `pbox`.`disabled_reasons` dr on dr.disabled_reason_id = p.disabled_reason\";\r\n\t\t\r\n\t\t$this->_users = self::$__queryHandler->executeQuery($query);\r\n\t}", "public function getAllEnabledUsers() {\r\n\t\t$user = \\creamy\\CreamyUser::currentUser();\r\n\t\t$userGroup = $this->getUserGroup($user->getUserId());\r\n\t\t\r\n\t\t// $this->dbConnector->where(\"status\", \"1\");\r\n\t\t$this->dbConnectorAsterisk->where(\"active\", \"Y\");\r\n\t\t$this->dbConnectorAsterisk->where(\"user\", array('VDAD', 'VDCL', 'goAPI'), 'not in');\r\n\t\tif ($user->getUserRole() == CRM_DEFAULTS_USER_ROLE_AGENT) {\r\n\t\t\t$this->dbConnectorAsterisk->where('user_level', '7', '>=');\r\n\t\t\tif ($userGroup != false) {\r\n\t\t\t\t$userGroup = ($userGroup == 'AGENTS') ? 'ADMIN' : $userGroup;\r\n\t\t\t\t$this->dbConnectorAsterisk->where('user_group', $userGroup);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// $cols = array(\"id\", \"name\", \"email\", \"phone\", \"role\", \"avatar\", \"creation_date\", \"status\");\r\n\t\t$cols = array(\"user_id\", \"user\", \"email\", \"phone_login\", \"user_level\", \"active\", \"full_name\");\r\n\t\treturn $this->dbConnectorAsterisk->get(CRM_USERS_TABLE_NAME_ASTERISK, null, $cols);\r\n\t}", "public function showAllUsers() {\n $results = $this->getAllUsers();\n return $results;\n }", "function getUserList()\n\t{\n\t\t$db = &atkGetDb(atkconfig(\"auth_database\"));\n\t\t$query = \"SELECT * FROM \".atkconfig(\"auth_usertable\");\n\n\t\t$accountdisablefield = atkconfig(\"auth_accountdisablefield\");\n\t\t$accountenableexpression = atkconfig(\"auth_accountenableexpression\");\n\t\tif ($accountenableexpression!=\"\")\n\t\t{\n\t\t\t$query.= \" WHERE $accountenableexpression\";\n\t\t\tif ($accountdisablefield!=\"\") $query.= \" AND $accountdisablefield = 0\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($accountdisablefield!=\"\") $query.= \" WHERE $accountdisablefield = 0\";\n\t\t}\n\n\t\t$recs = $db->getrows($query);\n\n\t\t$userlist = array();\n\t\tatkimport(\"atk.utils.atkstringparser\");\n\t\t$stringparser = new atkStringParser(atkconfig(\"auth_userdescriptor\"));\n\t\tfor ($i=0, $_i=count($recs); $i<$_i; $i++)\n\t\t{\n\t\t\t$userlist[] = array(\"userid\"=>$recs[$i][atkconfig(\"auth_userfield\")], \"username\"=>$stringparser->parse($recs[$i]));\n\t\t}\n\t\tusort($userlist, array(\"auth_db\", \"userListCompare\"));\n\t\treturn $userlist;\n\t}", "public function users()\n {\n return User::all()->filter(function ($user) {\n /**\n * @var User $user\n */\n return $user->plan()->name() == self::name();\n });\n }", "public function index()\n {\n $users = User::all()->where('actif', true);\n return $users;\n }" ]
[ "0.7880743", "0.7852048", "0.7772754", "0.7657688", "0.76355875", "0.76153857", "0.7600951", "0.7596497", "0.7579816", "0.7573507", "0.74572235", "0.74246025", "0.7368947", "0.7351534", "0.73169047", "0.72758526", "0.7236981", "0.7235644", "0.7233961", "0.72087014", "0.7179592", "0.717382", "0.7120909", "0.7120011", "0.70972097", "0.70830965", "0.70821583", "0.7043328", "0.70274556", "0.7025493", "0.7025493", "0.7025493", "0.7023933", "0.700407", "0.6996109", "0.6991051", "0.6988078", "0.69755685", "0.69674665", "0.69670486", "0.6963858", "0.69628406", "0.69530386", "0.69527996", "0.6938253", "0.6936098", "0.6936098", "0.6936098", "0.6936098", "0.6936098", "0.6936098", "0.69253254", "0.6922249", "0.6921975", "0.6915135", "0.6902006", "0.6901217", "0.6899601", "0.6899446", "0.6893435", "0.68873477", "0.68873477", "0.6882411", "0.6880701", "0.6878797", "0.6876699", "0.6876699", "0.68685335", "0.6868494", "0.6866483", "0.6859366", "0.6834629", "0.68285197", "0.68262345", "0.68225235", "0.6822277", "0.6806169", "0.68042564", "0.67984986", "0.6795425", "0.6795377", "0.6790505", "0.67844886", "0.678412", "0.67806387", "0.6779842", "0.6776165", "0.67724216", "0.6764356", "0.6752856", "0.67501956", "0.6746276", "0.67407596", "0.6737083", "0.6733938", "0.6733399", "0.6726948", "0.67256975", "0.67241514", "0.67191565" ]
0.8077087
0
Build a set of member statistics. Return an array of histogram data about the members in the result.
Создайте набор статистики членов. Верните массив данных гистограммы о членах в результате.
function get_statistics($members) { $data = array(); foreach ($members as $member) { $data['types'][$member->type]++; $data['shirt_size'][$member->profile->shirt_size]++; $data['year'][$member->profile->school_year]++; $data['initiation_year'][text::searchable($member->profile->initiation_year)]['name'] = $member->profile->initiation_year; $data['initiation_year'][text::searchable($member->profile->initiation_year)]['count']++; if ($member->profile->department) { $data['departments'][$member->profile->department]++; } if ($member->profile->major) { $data['majors'][$member->profile->major]++; } } ksort($data['shirt_size']); krsort($data['initiation_year']); ksort($data['departments']); ksort($data['majors']); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatistics() : array;", "function getStatistic()\n {\n $ret = array();\n foreach ($this->data as $entry) {\n if (array_key_exists($entry['entryType'], $ret)) {\n $ret[$entry['entryType']]++;\n } else {\n $ret[$entry['entryType']] = 1;\n }\n }\n return $ret;\n }", "private function init_stats() {\n\t\t$this->campaign_stats = array();\n\n\t\t$this->campaign_stats[ 'name' ] = $this->campaign->get_name();\n\t\t$this->campaign_stats[ 'url' ] = '/' .$this->campaign->get_url(). '/';\n\t\t$this->campaign_stats[ 'goal' ] = $this->campaign->minimum_goal();\n\t\t$this->campaign_stats[ 'average_median_for_campaign' ] = $this->campaign_stats[ 'goal' ];\n\n\t\t// ***************\n\t\t// Stats des votes\n\t\t$vote_results = WDGCampaignVotes::get_results( $this->campaign_id );\n\t\t$this->campaign_stats[ 'vote' ] = array();\n\t\t$date_begin = new DateTime( $this->campaign->get_begin_vote_str() );\n\t\t$date_end = new DateTime( $this->campaign->get_end_vote_str() );\n\t\t// la date de début d'évaluation n'étant pas toujours recalculée (levée de fond privée), on s'assure qu'elle ne soit pas postérieure à la date de fin\n\t\tif ( $date_begin > $date_end ) {\n\t\t\t$date_begin = $date_end;\n\t\t}\n\t\t$this->campaign_stats[ 'vote' ][ 'start' ] = $date_begin->format( 'Y-m-d' );\n\t\t$this->campaign_stats[ 'vote' ][ 'end' ] = $date_end->format( 'Y-m-d' );\n\n\t\t// Stocks des références pour calculer les bonnes données, avec le bon ratio\n\t\t// Pour moyennes\n\t\t$reference_for_average_ratio_goal = 38750;\n\t\t$campaign_ratio_to_average = $this->campaign_stats[ 'goal' ] / $reference_for_average_ratio_goal;\n\t\t$reference_for_average_ratio_nb = 118;\n\t\t$reference_for_average_ratio_nb_intent = 107;\n\t\t$reference_for_average_ratio_amount_intent_percent = 95;\n\t\t$reference_for_average_ratio_nb_preinvestment = 29;\n\t\t$reference_for_average_ratio_amount_preinvestment_percent = 43;\n\t\t$reference_for_average_ratio_nb_investment = 122;\n\t\t$reference_for_average_ratio_amount_investment = 55398;\n\t\t// Pour médianes\n\t\t$reference_for_median_ratio_goal = 30000;\n\t\t$campaign_ratio_to_median = $this->campaign_stats[ 'goal' ] / $reference_for_median_ratio_goal;\n\t\t$reference_for_median_ratio_nb = 107;\n\t\t$reference_for_median_ratio_nb_intent = 85;\n\t\t$reference_for_median_ratio_amount_intent_percent = 120;\n\t\t$reference_for_median_ratio_nb_preinvestment = 28;\n\t\t$reference_for_median_ratio_amount_preinvestment_percent = 26;\n\t\t$reference_for_median_ratio_nb_investment = 123;\n\t\t$reference_for_median_ratio_amount_investment = 41594;\n\n\t\t// Objectifs\n\t\t$this->campaign_stats[ 'vote' ][ 'nb' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'nb' ][ 'current' ] = max( 0, $vote_results[ 'count_voters' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb' ][ 'min' ] = 100;\n\t\t$this->campaign_stats[ 'vote' ][ 'nb' ][ 'average' ] = round( $reference_for_average_ratio_nb * $campaign_ratio_to_average );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb' ][ 'median' ] = round( $reference_for_median_ratio_nb * $campaign_ratio_to_median );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_intent' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_intent' ][ 'current' ] = max( 0, $vote_results[ 'count_invest_ready' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_intent' ][ 'min' ] = 80;\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_intent' ][ 'average' ] = round( $reference_for_average_ratio_nb_intent * $campaign_ratio_to_average );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_intent' ][ 'median' ] = round( $reference_for_median_ratio_nb_intent * $campaign_ratio_to_median );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_intent' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_intent' ][ 'current' ] = max( 0, $vote_results[ 'sum_invest_ready' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_intent' ][ 'min' ] = $this->campaign_stats[ 'goal' ];\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_intent' ][ 'average' ] = round( $reference_for_average_ratio_amount_intent_percent * $this->campaign_stats[ 'goal' ] / 100 );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_intent' ][ 'median' ] = round( $reference_for_median_ratio_amount_intent_percent * $this->campaign_stats[ 'goal' ] / 100 );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_preinvestment' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_preinvestment' ][ 'current' ] = max( 0, $vote_results[ 'count_preinvestments' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_preinvestment' ][ 'min' ] = 25;\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_preinvestment' ][ 'average' ] = round( $reference_for_average_ratio_nb_preinvestment * $campaign_ratio_to_average );\n\t\t$this->campaign_stats[ 'vote' ][ 'nb_preinvestment' ][ 'median' ] = round( $reference_for_median_ratio_nb_preinvestment * $campaign_ratio_to_median );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_preinvestment' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_preinvestment' ][ 'current' ] = max( 0, $vote_results[ 'amount_preinvestments' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_preinvestment' ][ 'min' ] = round( $this->campaign_stats[ 'goal' ] / 4 );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_preinvestment' ][ 'average' ] = round( $reference_for_average_ratio_amount_preinvestment_percent * $this->campaign_stats[ 'goal' ] / 100 );\n\t\t$this->campaign_stats[ 'vote' ][ 'amount_preinvestment' ][ 'median' ] = round( $reference_for_median_ratio_amount_preinvestment_percent * $this->campaign_stats[ 'goal' ] / 100 );\n\t\t$this->campaign_stats[ 'vote' ][ 'average_intent' ] = max( 0, $vote_results[ 'average_invest_ready' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'percent_intent' ] = 0;\n\t\tif ( $this->campaign_stats[ 'goal' ] > 0 ) {\n\t\t\t$this->campaign_stats[ 'vote' ][ 'percent_intent' ] = max( 0, round( $vote_results[ 'sum_invest_ready' ] / $this->campaign_stats[ 'goal' ] * 100, 2 ) );\n\t\t}\n\n\t\t// Liste\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'current' ] = array();\n\t\tforeach ( $vote_results[ 'list_votes' ] as $vote_result ) {\n\t\t\t$vote_date = $vote_result->date;\n\t\t\tif ( $vote_date == 'NULL' || $vote_date == null || $vote_date == '0000-00-00' ) {\n\t\t\t\t$vote_date = $this->campaign->end_vote();\n\t\t\t}\n\n\t\t\t$vote_item = array(\n\t\t\t\t'date' => $vote_date,\n\t\t\t\t'sum' => $vote_result->invest_sum\n\t\t\t);\n\t\t\tarray_push( $this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'current' ], $vote_item );\n\t\t}\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'target' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'target' ][ $this->campaign_stats[ 'vote' ][ 'start' ] ] = round( $this->campaign_stats[ 'goal' ] * 8 / 100 ); // J0\n\t\t$date_target_vote = new DateTime( $this->campaign_stats[ 'vote' ][ 'start' ] );\n\t\t$date_target_vote->add( new DateInterval( 'P2D' ) );\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'target' ][ $date_target_vote->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 16 / 100 ); // J2\n\t\t$date_target_vote->add( new DateInterval( 'P5D' ) );\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'target' ][ $date_target_vote->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 49 / 100 ); // J7\n\t\t$this->campaign_stats[ 'vote' ][ 'list_vote' ][ 'target' ][ $this->campaign_stats[ 'vote' ][ 'end' ] ] = $this->campaign_stats[ 'goal' ];\n\n\t\t// Préinvestissements\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'current' ] = array();\n\t\tforeach ( $vote_results[ 'list_preinvestments' ] as $preinvestment ) {\n\t\t\t$date_preinvestment = new DateTime( $preinvestment[ 'date' ] );\n\t\t\t$preinvestment_item = array(\n\t\t\t\t'date' => $date_preinvestment->format( 'Y-m-d\\Th:i' ),\n\t\t\t\t'sum' => $preinvestment[ 'sum' ]\n\t\t\t);\n\t\t\tif ( $date_preinvestment > $date_end ) {\n\t\t\t\t$preinvestment_item[ 'date' ] = $date_end->format( 'Y-m-d\\Th:i' );\n\t\t\t}\n\t\t\tarray_push( $this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'current' ], $preinvestment_item );\n\t\t}\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'target' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'target' ][ $this->campaign_stats[ 'vote' ][ 'start' ] ] = 0; // J0\n\t\t$date_target_preinv = new DateTime( $this->campaign_stats[ 'vote' ][ 'start' ] );\n\t\t$date_target_preinv->add( new DateInterval( 'P2D' ) );\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'target' ][ $date_target_preinv->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 1 / 100 ); // J2\n\t\t$date_target_preinv->add( new DateInterval( 'P5D' ) );\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'target' ][ $date_target_preinv->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 5 / 100 ); // J7\n\t\t$this->campaign_stats[ 'vote' ][ 'list_preinvestment' ][ 'target' ][ $this->campaign_stats[ 'vote' ][ 'end' ] ] = round( $this->campaign_stats[ 'goal' ] / 3 );\n\n\t\t// Notes\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'economy' ] = round( $vote_results[ 'average_impact_economy' ], 2 );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'environment' ] = round( $vote_results[ 'average_impact_environment' ], 2 );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'social' ] = round( $vote_results[ 'average_impact_social' ], 2 );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ '1' ] = max( 0, $vote_results[ 'rate_project_list' ][ 1 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ '2' ] = max( 0, $vote_results[ 'rate_project_list' ][ 2 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ '3' ] = max( 0, $vote_results[ 'rate_project_list' ][ 3 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ '4' ] = max( 0, $vote_results[ 'rate_project_list' ][ 4 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ '5' ] = max( 0, $vote_results[ 'rate_project_list' ][ 5 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ 'average' ] = max( 0, $vote_results[ 'rate_project_average' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'rates' ][ 'project' ][ 'positive_percent' ] = max( 0, $vote_results[ 'percent_project_validated' ] );\n\n\t\t// Risque\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ] = array();\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ '1' ] = max( 0, $vote_results[ 'risk_list' ][ 1 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ '2' ] = max( 0, $vote_results[ 'risk_list' ][ 2 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ '3' ] = max( 0, $vote_results[ 'risk_list' ][ 3 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ '4' ] = max( 0, $vote_results[ 'risk_list' ][ 4 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ '5' ] = max( 0, $vote_results[ 'risk_list' ][ 5 ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'risk' ][ 'average' ] = max( 0, round( $vote_results[ 'average_risk' ], 2 ) );\n\n\t\t// Plus d'infos\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ] = array();\n\t\t// Valeur à 1 car pose problème si 0 pour construire le graph => provoque une division par 0 quelque part difficile à comprendre. Le passage à 1 évite les soucis...\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'impact' ] = max( 1, $vote_results[ 'count_more_info_impact' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'product' ] = max( 0, $vote_results[ 'count_more_info_service' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'team' ] = max( 0, $vote_results[ 'count_more_info_team' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'finance' ] = max( 0, $vote_results[ 'count_more_info_finance' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'other' ] = max( 0, $vote_results[ 'count_more_info_other' ] );\n\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'others' ] = array();\n\t\tforeach ( $vote_results[ 'list_more_info_other' ] as $more_info_other_item ) {\n\t\t\t$userdata = get_userdata( $more_info_other_item[ 'user_id' ] );\n\t\t\t$this->campaign_stats[ 'vote' ][ 'more_info' ][ 'others' ][ $userdata->user_email ] = $more_info_other_item[ 'text' ];\n\t\t}\n\n\t\t// ***************\n\t\t// Stats des investissements\n\t\t$investment_results = WDGCampaignInvestments::get_list( $this->campaign_id );\n\t\t$this->campaign_stats[ 'funding' ] = array();\n\t\t$date_begin = $this->campaign->begin_collecte_date( 'Y-m-d' );\n\t\t$date_end = $this->campaign->end_date( 'Y-m-d' );\n\t\t$this->campaign_stats[ 'funding' ][ 'start' ] = $date_begin;\n\t\t$this->campaign_stats[ 'funding' ][ 'end' ] = $date_end;\n\t\tif ( $this->campaign->campaign_status() == ATCF_Campaign::$campaign_status_preparing || $this->campaign->campaign_status() == ATCF_Campaign::$campaign_status_validated || $this->campaign->campaign_status() == ATCF_Campaign::$campaign_status_vote ) {\n\t\t\t$this->campaign_stats[ 'funding' ][ 'start' ] = $this->campaign_stats[ 'vote' ][ 'end' ];\n\t\t\t$this->campaign_stats[ 'funding' ][ 'end' ] = $this->campaign_stats[ 'vote' ][ 'end' ];\n\t\t}\n\t\tif ( $this->campaign->campaign_status() == ATCF_Campaign::$campaign_status_collecte && $this->campaign->can_invest_until_contract_start_date() ) {\n\t\t\t$end_date_when_can_invest_until_contract_start_date = $this->campaign->get_end_date_when_can_invest_until_contract_start_date();\n\t\t\t$this->campaign_stats[ 'funding' ][ 'end' ] = $end_date_when_can_invest_until_contract_start_date->format( 'Y-m-d' );\n\t\t}\n\n\t\t// la date de début d'investissement n'étant pas toujours recalculée, on s'assure qu'elle ne soit pas postérieure à la date de fin\n\t\t$datetime_begin = new DateTime( $this->campaign_stats[ 'funding' ][ 'start' ] );\n\t\t$datetime_end = new DateTime( $this->campaign_stats[ 'funding' ][ 'end' ] );\n\t\tif ( $datetime_begin > $datetime_end ) {\n\t\t\t$this->campaign_stats[ 'funding' ][ 'start' ] = $this->campaign_stats[ 'funding' ][ 'end' ];\n\t\t}\n\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ] = array();\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ][ 'current' ] = max( 0, $investment_results[ 'count_validate_investments' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ][ 'current_different' ] = max( 0, $investment_results[ 'count_validate_investors' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ][ 'not_validated' ] = max( 0, $investment_results[ 'count_not_validate_investments' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ][ 'average' ] = round( $reference_for_average_ratio_nb_investment * $campaign_ratio_to_average );\n\t\t$this->campaign_stats[ 'funding' ][ 'nb_investment' ][ 'median' ] = round( $reference_for_median_ratio_nb_investment * $campaign_ratio_to_median );\n\t\t$this->campaign_stats[ 'funding' ][ 'amount_investment' ] = array();\n\t\t$this->campaign_stats[ 'funding' ][ 'amount_investment' ][ 'current' ] = $this->campaign->current_amount( FALSE );\n\t\t$this->campaign_stats[ 'funding' ][ 'amount_investment' ][ 'not_validated' ] = max( 0, $investment_results[ 'amount_not_validate_investments' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'amount_investment' ][ 'average' ] = round( $reference_for_average_ratio_amount_investment * $campaign_ratio_to_average );\n\t\t$this->campaign_stats[ 'funding' ][ 'amount_investment' ][ 'median' ] = round( $reference_for_median_ratio_amount_investment * $campaign_ratio_to_median );\n\n\t\t// Liste\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ] = array();\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'current' ] = array();\n\t\tforeach ( $investment_results[ 'payments_data' ] as $investment_result ) {\n\t\t\tif ( $investment_result[ 'status' ] == 'publish' ) {\n\t\t\t\t$investment_date = new DateTime( $investment_result[ 'date' ] );\n\t\t\t\t$investment_item = array(\n\t\t\t\t\t'date' => $investment_date->format( 'Y-m-d\\Th:i' ),\n\t\t\t\t\t'sum' => max( 0, $investment_result[ 'amount' ] )\n\t\t\t\t);\n\t\t\t\tarray_push( $this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'current' ], $investment_item );\n\t\t\t}\n\t\t}\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'target' ] = array();\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'target' ][ $this->campaign_stats[ 'funding' ][ 'start' ] ] = round( $this->campaign_stats[ 'goal' ] * 35 / 100 ); // J0\n\t\t$date_target = new DateTime( $this->campaign_stats[ 'funding' ][ 'start' ] );\n\t\t$date_target->add( new DateInterval( 'P2D' ) );\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'target' ][ $date_target->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 45 / 100 ); // J2\n\t\t$date_target->add( new DateInterval( 'P5D' ) );\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'target' ][ $date_target->format( 'Y-m-d' ) ] = round( $this->campaign_stats[ 'goal' ] * 60 / 100 ); // J7\n\t\t$this->campaign_stats[ 'funding' ][ 'list_investment' ][ 'target' ][ $this->campaign_stats[ 'funding' ][ 'end' ] ] = min( $this->campaign_stats[ 'funding' ][ 'amount_investment' ][ 'average' ], $this->campaign->goal( FALSE ) );\n\n\t\t// Stats\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'age' ] = max( 0, $investment_results[ 'average_age' ] );\n\t\tif ( is_nan( $this->campaign_stats[ 'funding' ][ 'stats' ][ 'age' ] ) ) {\n\t\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'age' ] = 0;\n\t\t}\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'percent_men' ] = max( 0, $investment_results[ 'percent_male' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'percent_women' ] = max( 0, $investment_results[ 'percent_female' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'invest_average' ] = max( 0, $investment_results[ 'average_invest' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'invest_min' ] = max( 0, $investment_results[ 'min_invest' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'invest_median' ] = max( 0, $investment_results[ 'median_invest' ] );\n\t\t$this->campaign_stats[ 'funding' ][ 'stats' ][ 'invest_max' ] = max( 0, $investment_results[ 'max_invest' ] );\n\n\t\tsetcookie( 'campaign_url', json_encode( $this->campaign_stats[ 'url' ] ) );\n\t}", "public static function summaryList() {\n\tglobal $db;\n\treturn $db->fetchArrays(\"\n\t\tSELECT `member`,`type`,`firstname`,`lastname`,`city`,`state`,\n\t\t\t `homephone`,`mobilephone`,`anniversary`\n\t\tFROM sds.members\n\t\tORDER BY `member` ASC\n\t\t\");\n\t}", "public function stats();", "public function getStats();", "protected function createStats()\n {\n $key = date('d/m/Y à h:i');\n foreach ($this->data as $k => $data) {\n $this->stats[$k][$key] = array(\n 'date' => $key,\n 'count' => sizeof($data),\n );\n }\n }", "public function getStatsFields(): array {}", "public function getStatsFields(): array {}", "public function getStatistics()\n {\n $statistics = array(\n 'statistics' => array(\n $this->statistics->commits(),\n $this->statistics->contributors(),\n $this->statistics->contributorsAverageCommits(),\n $this->statistics->firstCommit(),\n $this->statistics->latestCommit(),\n $this->statistics->activeFor(),\n $this->statistics->averageCommitsPerDay(),\n ),\n 'charts' => array(\n 'date' => $this->getCommitsByDate(),\n 'hour' => $this->getCommitsByHour(),\n 'day' => $this->getCommitsByDay(),\n 'contributor' => $this->getCommitsByContributor(),\n )\n );\n\n return $statistics;\n }", "public function getStats() \n {\n $slider = $this->getSliderCount();\n $news = $this->getNewsCount();\n $ratings = $this->getRatingsCount();\n $deliveries = $this->getDeliveriesCount();\n $visitors = $this->getVisitors(\"counterVisitors\");\n $uniqueVisitors = $this->getVisitors(\"counterUniqueVisitors\");\n $averageRating = $this->getAverageRatings();\n $bestRatings = $this->getBestRatings();\n $worstRatings = $this->getWorstRatings();\n return compact('slider','news','ratings','deliveries','visitors','uniqueVisitors','averageRating','bestRatings','worstRatings');\n }", "function getStatistics(){\n\t\t$strSQL = \"SELECT number, COUNT(id) FROM clock GROUP BY number\"; \n\t\t$result = $this->DB->getObj(\"\".$this->className.\" :: function getStatistics()\",$strSQL); \n\t\t$arr = array();\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$arr[] .= $row['COUNT(id)']; \n\t\t//echo \"_____\".$row['COUNT(id)'];\n\t\t}\n \t\treturn $arr;\n\t}", "public function getStatsFacets(): array {}", "public function getStatsFacets(): array {}", "public function stats() {}", "public function stats() {}", "public static function getAgentStats()\n {\n \n // Get the last 10 entries in the DB for agent stats\n $stats = self::latest()->take(10)->pluck('stats')->toArray();\n $stats = array_reverse($stats);\n\n // If we don't have 10 stat items, fill in the rest with\n // zero's so that the chart has 10 minutes worth of data\n for ($i = count($stats); $i < 10; $i++) {\n $label = \\Carbon\\Carbon::now()->subMinutes($i)->format('h:i');\n array_unshift($stats, [\n 'ready' => 0,\n 'labels' => $label,\n 'talking' => 0,\n 'loggedIn' => 0,\n 'notReady' => 0,\n ]);\n }\n\n // Create array for return data\n $uccxData = [];\n\n // Format the data for the front-end chart\n // Each key (ready, notReady, etc) should have\n // and array of 10 values\n foreach (array_keys($stats[0]) as $key) {\n $uccxData[$key] = array_map(\n function ($stat) use ($key) {\n return $stat[$key];\n },\n $stats\n );\n }\n\n return $uccxData;\n }", "public function stats(): array\n {\n }", "public function loadStats()\n\t{\n\t\t$dbresult = DB::getAll(\"SELECT is_focus, count(user_name) AS members FROM wg_member WHERE project_name = :name GROUP BY is_focus\", \n\t\t\tarray(':name' => $this->name));\n\t\t$this -> focusingMembers = 0;\n\t\t$this -> unfocusingMembers = 0; \n\t\tforeach ($dbresult as $row) {\n\t\t\tif ($row['is_focus'] == 1) $this -> focusingMembers = $row['members'];\n\t\t\telse $this -> unfocusingMembers = $row['members'];\n\t\t}\n\t\t$this -> members = $this -> focusingMembers + $this -> unfocusingMembers;\n\n\t\t\n\t}", "public function get_member_data( $extra = array(), $members = false ) {\n if ( ! $members ) {\n $members = $this->get_members();\n }\n if( $members ) {\n $r = array(); # it would be cool if we just passed the whole object with meta data attached\n foreach ( $members as $member ) {\n $terms = $this->get_member_terms( $member, 'alc-type' );\n $meta = $this->get_member_meta( $member, $this->member_post_meta_prefix );\n $meta['type'] = array_merge( (array) $terms[0], array( 'icon' => $this->get_member_map_icon( $terms[0] ) ) );\n $meta['post'] = (array) $member;\n $meta['infoWindow'] = $this->construct_map_info_window($meta);\n\n $r[$member->post_name] = $meta;\n }\n return array_merge( array( 'alcs' => $r ), $extra );\n }\n }", "public function getStats ()\n\t{\n\t\t$this->getResult();\n\n\t\t\t//////\n\n\t\t$explicit = array() ;\n\n\t\tforeach ($this->_Comparison as $candidate_key => $value)\n\t\t{\n\t\t\t$explicit[namespace\\Condorcet::getStatic_CandidateId($candidate_key, $this->_Candidates)] = $value ;\n\t\t}\n\n\t\treturn $explicit ;\n\t}", "function rebuild_stats()\n{\n\tglobal $db;\n\n\t$query = $db->simple_select(\"forums\", \"SUM(threads) AS numthreads, SUM(posts) AS numposts, SUM(unapprovedthreads) AS numunapprovedthreads, SUM(unapprovedposts) AS numunapprovedposts, SUM(deletedthreads) AS numdeletedthreads, SUM(deletedposts) AS numdeletedposts\");\n\t$stats = $db->fetch_array($query);\n\n\t$query = $db->simple_select(\"users\", \"COUNT(uid) AS users\");\n\t$stats['numusers'] = $db->fetch_field($query, 'users');\n\n\tupdate_stats($stats, true);\n}", "public function getStats() : array\n\t{\n\t\treturn $this->stats;\n\t}", "function calculateStatistics($eval_data)\n\t{\n\t\t$median_array = array();\n\n\t\tforeach ($eval_data->getParticipantIds() as $active_id)\n\t\t{\n\t\t\t$participant =& $eval_data->getParticipant($active_id);\n\t\t\tarray_push($median_array, $participant->getReached());\n\t\t}\n\n\t\t$this->statistics = new ilStatistics();\n\t\t$this->statistics->setData($median_array);\n\t}", "function getStatistics()\n {\n global $debug;\n global $warn;\n global $msg;\n global $connection;\n\n // execute the query\n $query = 'SELECT RegCounty AS County, ' .\n \"SUM(Surname != '') AS `Count`, \" .\n 'SUM(Idir != 0) AS LinkCount, ' .\n 'MIN(RegNum) as low, ' .\n 'MAX(RegNum) as high ' .\n 'FROM Births ' .\n $this->where .\n ' GROUP BY RegCounty ' .\n 'ORDER BY RegCounty';\n $stmt = $connection->prepare($query);\n if ($stmt->execute($this->sqlParms))\n {\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }\n else\n {\n $msg .= \"query '\" . $query . \"' failed: \" .\n print_r($this->sqlParms, true) . ': ' .\n print_r($stmt->errorInfo(), true);\n return null;\n } // query failed\n }", "public function getStatistics ()\n\t{\n\t\treturn $this->statistics;\n\t}", "public function get_member_graph(){\n\t\t$memberDsc = $this->db->query('SELECT nama_status, count(*) as total FROM member_dsc, status WHERE `member_dsc`.`id_status`=`status`.`id_status` and `member_dsc`.`id_status` != 7 and `member_dsc`.`id_status` != 2 GROUP BY nama_status')->result();\n\t\t$dataMember = $this->db->query('SELECT count(*) as total from member_internship where status_inactive !=1')->row_array();\n\t\t$data = new stdClass;\n\t\t$data->nama_status = 'Apprentice';\n\t\t$data->total = $dataMember['total'];\n\t\t$db_data[] = $data;\n\t\t$final = array_merge($memberDsc, $db_data);\n\t\treturn $final;\n\t}", "public function getStats() {\n var_dump($this->results);\n }", "function getStatistics()\n\t{\n\t\treturn $this->statistics;\n\t}", "public static function getStats() {\n $today = date( 'Ymd', time() );\n $i = 0;\n $stats = array();\n $files = scandir( self::DIR_STATISTICS, SCANDIR_SORT_DESCENDING );\n foreach( $files as $file ) {\n $parts = explode( '.', $file );\n if ( isset( $parts[3] ) && $parts[0] == 'raw' && $parts[3] == 'php' ) {\n $timestamp = strtotime( $parts[2] );\n $date = date( \"d-m-Y\", $timestamp );\n $cacheFile = self::STATS_FILE_VISITORS . $parts[2] . '.php';\n $dayTotals = FileManager::readFromCache( 'dayTotals', $cacheFile );\n if ( $dayTotals != false && ! empty( $dayTotals[\"visits\"] ) ) {\n $stats[ $date ] = $dayTotals;\n } else {\n $rawVisits = self::readCsvStats( $file );\n $visits = self::removeBots( $rawVisits );\n $uniqueVisitors = self::getUniqueVisitors( $visits );\n sort( $uniqueVisitors );\n\n $stats[ $date ][\"raw\"] = count( $rawVisits );\n $stats[ $date ][\"visits\"] = count( $visits );\n $stats[ $date ][\"unique\"] = count( $uniqueVisitors );\n if ( $today != $parts[2] ) {\n FileManager::saveToCache( 'dayTotals', $stats[ $date ], $cacheFile, $type = 'php' );\n }\n }\n $i++;\n if( $i > 14 ) break;\n }\n }\n return $stats;\n }", "public function get_stats() {\n\t\treturn $this->statistics;\n\t}", "function stats()\n\t{\n\t\t$data['submitted'] = $this->submitted;\n\t\t$data['delivered'] = $this->delivered;\n\t\t$data['delivering'] = $this->delivering;\n\t\t$data['dropped'] = $this->dropped;\n\t\t$data['bounced'] = $this->bounced;\n\t\t$data['clicked'] = $this->clicked;\n\t\t$data['opened'] = $this->opened;\n\t\t$data['complained'] = $this->complained;\n\t\t$data['unsubscribed'] = $this->unsubscribed;\n\n\t\treturn $data;\n\t}", "protected function stats() {\n if(isset($_GET['throughput'])) {\n return mysqli_query($this->mysqli, \"SELECT * FROM Game WHERE TIMESTAMPDIFF(DAY, timestamp, NOW()) < 1\")->num_rows;\n }\n\n // Get the number of active users\n else if(isset($_GET['numSubmissions'])) {\n return $this->select(\"SELECT SUM(numSubmissions) FROM User\")[\"SUM(numSubmissions)\"];\n }\n\n // Get the number of active users\n else if(isset($_GET['numActive'])) {\n return mysqli_query($this->mysqli, \"SELECT userID FROM User WHERE isRunning=1\")->num_rows;\n } \n\n // Get the median mu and sigma of active users\n else if(isset($_GET['scoreMedians'])) {\n $medians = array();\n $medians[\"mu\"] = $this->select(\"SELECT AVG(tbl.mu) as medianMu FROM (\n SELECT @rownum:=@rownum+1 as row, mu FROM User, (SELECT @rownum:=0) rn\n WHERE isRunning=1 ORDER BY mu\n ) as tbl\n WHERE tbl.row in (floor((@rownum+1)/2), floor((@rownum+2)/2))\")[\"medianMu\"];\n\n $medians[\"sigma\"] = $this->select(\"SELECT AVG(tbl.sigma) as medianSigma FROM (\n SELECT @rownum:=@rownum+1 as row, sigma FROM User, (SELECT @rownum:=0) rn\n WHERE isRunning=1 ORDER BY sigma\n ) as tbl\n WHERE tbl.row in (floor((@rownum+1)/2), floor((@rownum+2)/2))\")[\"medianSigma\"];\n return $medians;\n }\n }", "public function member_statistics()\r\n\t\t{\r\n\t\t\t// Check if someone is currently logged in \r\n\t\t \t$this->check_login();\r\n\r\n\t\t\t$data['data'] = $this->admin_model->getmemberUserIds();\r\n\t\t\t\r\n\t\t\t$this->load->view($this->admin_views . 'sidebar');\r\n\t\t\t$this->load->view( $this->admin_views . 'admin_member_statistics_body', $data);\r\n\r\n\r\n\t\t}", "public function getSummaries() : array;", "abstract protected function doGetStats();", "public function statistics()\n\t{\n\t\t$statistics_data = [];\n\n\t\t// Totals\n\t\t$statistics_data['total']['name'] = 'All';\n\t\t$statistics_data['total']['total_all'] = '';\n\t\t$statistics_data['total']['total_adjectives'] = '';\n\t\t$statistics_data['total']['total_nouns'] = '';\n\t\t$statistics_data['total']['total_verbs'] = '';\n\t\t$statistics_data['total']['total_other'] = '';\n\t\t$statistics_data['total']['total_percent'] = '';\n\n\t\t// English\n\t\t$statistics_data['EN']['name'] = 'English';\n\t\t$statistics_data['EN']['total_all'] = Word::where('EN', '!=', '')->count();\n\t\t$statistics_data['EN']['total_adjectives'] = Word::where('EN', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['EN']['total_nouns'] = Word::where('EN', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['EN']['total_verbs'] = Word::where('EN', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['EN']['total_other'] = Word::where('EN', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\n\t\t// French\n\t\t$statistics_data['FR']['name'] = 'French';\n\t\t$statistics_data['FR']['total_all'] = Word::where('FR', '!=', '')->count();\n\t\t$statistics_data['FR']['total_adjectives'] = Word::where('FR', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['FR']['total_nouns'] = Word::where('FR', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['FR']['total_verbs'] = Word::where('FR', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['FR']['total_other'] = Word::where('FR', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\n\t\t// Danish\n\t\t$statistics_data['DK']['name'] = 'Danish';\n\t\t$statistics_data['DK']['total_all'] = Word::where('DK', '!=', '')->count();\n\t\t$statistics_data['DK']['total_adjectives'] = Word::where('DK', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['DK']['total_nouns'] = Word::where('DK', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['DK']['total_verbs'] = Word::where('DK', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['DK']['total_other'] = Word::where('DK', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\n\t\t// Polish\n\t\t$statistics_data['PL']['name'] = 'Polish';\n\t\t$statistics_data['PL']['total_all'] = Word::where('PL', '!=', '')->count();\n\t\t$statistics_data['PL']['total_adjectives'] = Word::where('PL', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['PL']['total_nouns'] = Word::where('PL', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['PL']['total_verbs'] = Word::where('PL', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['PL']['total_other'] = Word::where('PL', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\n\t\t// Spanish\n\t\t$statistics_data['ES']['name'] = 'Spanish';\n\t\t$statistics_data['ES']['total_all'] = Word::where('ES', '!=', '')->count();\n\t\t$statistics_data['ES']['total_adjectives'] = Word::where('ES', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['ES']['total_nouns'] = Word::where('ES', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['ES']['total_verbs'] = Word::where('ES', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['ES']['total_other'] = Word::where('ES', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\n\t\t// The total sum of words\n\t\t$statistics_data['total']['total_all'] = $statistics_data['EN']['total_all'] + $statistics_data['FR']['total_all'] + $statistics_data['DK']['total_all'] + $statistics_data['PL']['total_all'] + $statistics_data['ES']['total_all'];\n\t\t$statistics_data['total']['total_adjectives'] = $statistics_data['EN']['total_adjectives'] + $statistics_data['FR']['total_adjectives'] + $statistics_data['DK']['total_adjectives'] + $statistics_data['PL']['total_adjectives'] + $statistics_data['ES']['total_adjectives'];\n\t\t$statistics_data['total']['total_nouns'] = $statistics_data['EN']['total_nouns'] + $statistics_data['FR']['total_nouns'] + $statistics_data['DK']['total_nouns'] + $statistics_data['PL']['total_nouns'] + $statistics_data['ES']['total_nouns'];\n\t\t$statistics_data['total']['total_verbs'] = $statistics_data['EN']['total_verbs'] + $statistics_data['FR']['total_verbs'] + $statistics_data['DK']['total_verbs'] + $statistics_data['PL']['total_verbs'] + $statistics_data['ES']['total_verbs'];\n\t\t$statistics_data['total']['total_other'] = $statistics_data['EN']['total_other'] + $statistics_data['FR']['total_other'] + $statistics_data['DK']['total_other'] + $statistics_data['PL']['total_other'] + $statistics_data['ES']['total_other'];\n\n\t\t$statistics_data['EN']['total_percent'] = round( $statistics_data['EN']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\t\t$statistics_data['FR']['total_percent'] = round( $statistics_data['FR']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\t\t$statistics_data['DK']['total_percent'] = round( $statistics_data['DK']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\t\t$statistics_data['PL']['total_percent'] = round( $statistics_data['PL']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\t\t$statistics_data['ES']['total_percent'] = round( $statistics_data['ES']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\n\t\t// Combinations of languages\n\t\t// Danish and Polish and Spanish\n\t\t$statistics_data['DK_PL_ES']['name'] = 'DK + PL + ES';\n\t\t$statistics_data['DK_PL_ES']['total_all'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('ES', '!=', '')->count();\n\t\t$statistics_data['DK_PL_ES']['total_adjectives'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('ES', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['DK_PL_ES']['total_nouns'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('ES', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['DK_PL_ES']['total_verbs'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('ES', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['DK_PL_ES']['total_other'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('ES', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['DK_PL_ES']['total_percent'] = round( $statistics_data['DK_PL_ES']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\t\t// Danish and Polish\n\t\t$statistics_data['DK_PL']['name'] = 'DK + PL';\n\t\t$statistics_data['DK_PL']['total_all'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->count();\n\t\t$statistics_data['DK_PL']['total_adjectives'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['DK_PL']['total_nouns'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['DK_PL']['total_verbs'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['DK_PL']['total_other'] = Word::where('DK', '!=', '')->where('PL', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['DK_PL']['total_percent'] = round( $statistics_data['DK_PL']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\t\t// Spanish and Polish\n\t\t$statistics_data['ES_PL']['name'] = 'ES + PL';\n\t\t$statistics_data['ES_PL']['total_all'] = Word::where('ES', '!=', '')->where('PL', '!=', '')->count();\n\t\t$statistics_data['ES_PL']['total_adjectives'] = Word::where('ES', '!=', '')->where('PL', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['ES_PL']['total_nouns'] = Word::where('ES', '!=', '')->where('PL', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['ES_PL']['total_verbs'] = Word::where('ES', '!=', '')->where('PL', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['ES_PL']['total_other'] = Word::where('ES', '!=', '')->where('PL', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['ES_PL']['total_percent'] = round( $statistics_data['ES_PL']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\t\t// Danish and Spanish\n\t\t$statistics_data['DK_ES']['name'] = 'DK + ES';\n\t\t$statistics_data['DK_ES']['total_all'] = Word::where('DK', '!=', '')->where('ES', '!=', '')->count();\n\t\t$statistics_data['DK_ES']['total_adjectives'] = Word::where('DK', '!=', '')->where('ES', '!=', '')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['DK_ES']['total_nouns'] = Word::where('DK', '!=', '')->where('ES', '!=', '')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['DK_ES']['total_verbs'] = Word::where('DK', '!=', '')->where('ES', '!=', '')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['DK_ES']['total_other'] = Word::where('DK', '!=', '')->where('ES', '!=', '')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['DK_ES']['total_percent'] = round( $statistics_data['DK_ES']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\n\t\t// Only a specific language\n\n\t\t// Only Danish\n\t\t$statistics_data['ONLY_DK']['name'] = 'Only DK';\n\t\t$statistics_data['ONLY_DK']['total_all'] = Word::whereNull('ES')->whereNull('PL')->count();\n\t\t$statistics_data['ONLY_DK']['total_adjectives'] = Word::whereNull('ES')->whereNull('PL')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['ONLY_DK']['total_nouns'] = Word::whereNull('ES')->whereNull('PL')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['ONLY_DK']['total_verbs'] = Word::whereNull('ES')->whereNull('PL')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['ONLY_DK']['total_other'] = Word::whereNull('ES')->whereNull('PL')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['ONLY_DK']['total_percent'] = round( $statistics_data['ONLY_DK']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\t\t// Only Spanish\n\t\t$statistics_data['ONLY_ES']['name'] = 'Only ES';\n\t\t$statistics_data['ONLY_ES']['total_all'] = Word::whereNull('DK')->whereNull('PL')->count();\n\t\t$statistics_data['ONLY_ES']['total_adjectives'] = Word::whereNull('DK')->whereNull('PL')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['ONLY_ES']['total_nouns'] = Word::whereNull('DK')->whereNull('PL')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['ONLY_ES']['total_verbs'] = Word::whereNull('DK')->whereNull('PL')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['ONLY_ES']['total_other'] = Word::whereNull('DK')->whereNull('PL')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['ONLY_ES']['total_percent'] = round( $statistics_data['ONLY_ES']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\t\t// Only Polish\n\t\t$statistics_data['ONLY_PL']['name'] = 'Only PL';\n\t\t$statistics_data['ONLY_PL']['total_all'] = Word::whereNull('DK')->whereNull('ES')->count();\n\t\t$statistics_data['ONLY_PL']['total_adjectives'] = Word::whereNull('DK')->whereNull('ES')->where('type', '>', 99)->where('type', '<', 200)->count();\n\t\t$statistics_data['ONLY_PL']['total_nouns'] = Word::whereNull('DK')->whereNull('ES')->where('type', '>', 199)->where('type', '<', 300)->count();\n\t\t$statistics_data['ONLY_PL']['total_verbs'] = Word::whereNull('DK')->whereNull('ES')->where('type', '>', 299)->where('type', '<', 400)->count();\n\t\t$statistics_data['ONLY_PL']['total_other'] = Word::whereNull('DK')->whereNull('ES')->where('type', '>', 399)->where('type', '<', 999)->count();\n\t\t$statistics_data['ONLY_PL']['total_percent'] = round( $statistics_data['ONLY_PL']['total_all'] / $statistics_data['total']['total_all'] * 100, 2 );\n\n\n\t\t// Recently added words count\n\t\t$days = 6;\n\t\t$recent_words_data = [];\n\t\tforeach ($this->languages as $language) \n\t\t{\n\t\t\tfor ($day = $days; $day >= 0; $day--) \n\t\t\t{\n\t\t\t\t$date = date('Y-m-d', strtotime('-'.$day.' day', time()));\n\t\t\t\t$wordcount = Word::where($language, '!=', '')->where('TS'.$language, '=', $date)->count();\n\t\t\t\t$recent_words_data[$language][$date] = $wordcount;\n\t\t\t}\n\t\t}\n\n\t\treturn view('words.statistics', compact('statistics_data', 'recent_words_data'));\n\t}", "public function getStatistics()\n {\n return $this->_statistics;\n }", "public static function get_stats_list()\n {\n return self::$stat_list;\n }", "private function summaries() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'membership',\n\t\t\t\t'subject' => __( 'Daily Group Membership Updates', 'ht_dms' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'decisions',\n\t\t\t\t'subject' => __( 'Active Decision Updates', 'ht_dms' ),\n\t\t\t)\n\n\t\t);\n\n\t}", "public function getStats ()\n\t{\n\t\t$this->getResult();\n\n\t\t\t//////\n\n\t\t$explicit = array() ;\n\n\t\tforeach ($this->_StrongestPaths as $candidate_key => $candidate_value)\n\t\t{\n\t\t\t$candidate_key = namespace\\Condorcet::getStatic_CandidateId($candidate_key,$this->_Candidates) ;\n\n\t\t\tforeach ($candidate_value as $challenger_key => $challenger_value)\n\t\t\t{\n\t\t\t\t$explicit[$candidate_key][namespace\\Condorcet::getStatic_CandidateId($challenger_key, $this->_Candidates)] = $challenger_value ;\n\t\t\t}\n\t\t}\n\n\t\treturn $explicit ;\n\t}", "function getMetrics(): array;", "public function getStats(): array\n {\n $stats = [];\n\n $prevCheckTime = 0;\n if (!empty($this->marker)) {\n $startTime = array_values($this->marker)[0];\n $prevTime = $startTime;\n foreach ($this->marker as $markerLabel => $markerTime) {\n $stats[$markerLabel] = [\n 'microtime' => $markerTime,\n 'timeDiffSinceStart' => $markerTime - $startTime,\n 'timeDiffSincePrev' => $markerTime - $prevTime,\n ];\n\n $prevTime = $markerTime;\n }\n }\n\n return $stats;\n }", "public function getActorStatistics()\n {\n $result = array();\n //To do:\n // Implement functionality as specified\n $actors = $this->xpath->query(\"//Disney/Actors/Actor/Name\");\n foreach ($actors as $actor) {\n array_push($result, $actor);\n }\n return $result;\n }", "public function getStatistics(){\n\t\t$events = $this->getAdapter();\n\t\t$select = $events->select()\n ->from($this->_name, array('number' => 'COUNT(events.id)',\n \t\t\t\t\t\t\t 'children' => 'SUM(childrenAttend)',\n \t\t\t\t\t\t\t 'adults' => 'SUM(adultsAttend)',\n \t\t\t\t\t\t\t 'year' => 'EXTRACT(YEAR FROM eventStartDate)'))\n\t\t\t\t\t ->joinLeft('eventtypes',$this->_name.'.eventType = eventtypes.id',array('type'))\n\t\t\t\t\t\t->where('eventStartDate >= ?','2010-01-01')\n\t\t\t\t\t\t->where('eventStartDate <= ?',Zend_Date::now()->toString('yyyy-MM-dd'))\n\t\t\t\t\t ->group('type')\n\t\t\t\t\t ->group('year')\n\t\t\t\t\t ->order('year');\n return $events->fetchAll($select);\n\t}", "public function get_stats() {\r\r\n\t\t# variables\r\r\n\t\t$total=0; $enlisted=0; $enrolled=0; $enlisted1=0; $enrolled1=0; $enlisted2=0; $enrolled2=0; $enlisted3=0; $enrolled3=0; $enlisted4=0; $enrolled4=0;\r\r\n\t\t$cahs=0; $cba = 0; $ccs = 0; $ceas = 0; $chtm = 0;\r\r\n\t\t$cahsEnlisted=0; $cbaEnlisted = 0; $ccsEnlisted = 0; $ceasEnlisted = 0; $chtmEnlisted = 0;\r\r\n\t\t$cahsEnrolled=0; $cbaEnrolled = 0; $ccsEnrolled = 0; $ceasEnrolled = 0; $chtmEnrolled = 0;\r\r\n\r\r\n\t\t$cahsL1=0; $cbaL1 = 0; $ccsL1 = 0; $ceasL1 = 0; $chtmL1 = 0;\r\r\n\t\t$cahsR1=0; $cbaR1 = 0; $ccsR1 = 0; $ceasR1 = 0; $chtmR1 = 0;\r\r\n\r\r\n\t\t$cahsL2=0; $cbaL2 = 0; $ccsL2 = 0; $ceasL2 = 0; $chtmL2 = 0;\r\r\n\t\t$cahsR2=0; $cbaR2 = 0; $ccsR2 = 0; $ceasR2 = 0; $chtmR2 = 0;\r\r\n\r\r\n\t\t$cahsL3=0; $cbaL3 = 0; $ccsL3 = 0; $ceasL3 = 0; $chtmL3 = 0;\r\r\n\t\t$cahsR3=0; $cbaR3 = 0; $ccsR3 = 0; $ceasR3 = 0; $chtmR3 = 0;\r\r\n\r\r\n\t\t$cahsL4=0; $cbaL4 = 0; $ccsL4 = 0; $ceasL4 = 0; $chtmL4 = 0;\r\r\n\t\t$cahsR4=0; $cbaR4 = 0; $ccsR4 = 0; $ceasR4 = 0; $chtmR4 = 0;\r\r\n\r\r\n\t\t$bsn=0; $bsm=0;\r\r\n\t\t$bsa=0; $bsca=0; $bsbafm=0; $bsbamkt=0; $bsbahrm=0; $bsbahrdm=0;\r\r\n\t\t$bscs=0; $bsit=0; $bsemc=0; $act=0; \r\r\n\t\t$bacom=0; $bcaed=0; $beced=0; $beed=0; $bped=0; $beedgen=0; $bsedbio=0; $bsedmapeh=0; $bsede=0; $bsedfil=0; $bsedm=0; $bsedsci=0; $bsedsoc=0; $profed=0; \r\r\n\t\t$bshm=0; $bshrm=0; $bstm=0;\r\r\n\r\r\n\t\t$bsnEnlisted=0; $bsmEnlisted=0;\r\r\n\t\t$bsaEnlisted=0; $bscaEnlisted=0; $bsbafmEnlisted=0; $bsbamktEnlisted=0; $bsbahrmEnlisted=0; $bsbahrdmEnlisted=0;\r\r\n\t\t$bscsEnlisted=0; $bsitEnlisted=0; $bsemcEnlisted=0; $actEnlisted=0; \r\r\n\t\t$bacomEnlisted=0; $bcaedEnlisted=0; $becedEnlisted=0; $beedEnlisted=0; $bpedEnlisted=0; $beedgenEnlisted=0; $bsedbioEnlisted=0; $bsedmapehEnlisted=0; $bsedeEnlisted=0; $bsedfilEnlisted=0; $bsedmEnlisted=0; $bsedsciEnlisted=0; $bsedsocEnlisted=0; $profedEnlisted=0; \r\r\n\t\t$bshmEnlisted=0; $bshrmEnlisted=0; $bstmEnlisted=0;\r\r\n\r\r\n\t\t$bsnL1=0; $bsmL1=0;\r\r\n\t\t$bsaL1=0; $bscaL1=0; $bsbafmL1=0; $bsbamktL1=0; $bsbahrmL1=0; $bsbahrdmL1=0;\r\r\n\t\t$bscsL1=0; $bsitL1=0; $bsemcL1=0; $actL1=0; \r\r\n\t\t$bacomL1=0; $bcaedL1=0; $becedL1=0; $beedL1=0; $bpedL1=0; $beedgenL1=0; $bsedbioL1=0; $bsedmapehL1=0; $bsedeL1=0; $bsedfilL1=0; $bsedmL1=0; $bsedsciL1=0; $bsedsocL1=0; $profedL1=0; \r\r\n\t\t$bshmL1=0; $bshrmL1=0; $bstmL1=0;\r\r\n\r\r\n\t\t$bsnL2=0; $bsmL2=0;\r\r\n\t\t$bsaL2=0; $bscaL2=0; $bsbafmL2=0; $bsbamktL2=0; $bsbahrmL2=0; $bsbahrdmL2=0;\r\r\n\t\t$bscsL2=0; $bsitL2=0; $bsemcL2=0; $actL2=0; \r\r\n\t\t$bacomL2=0; $bcaedL2=0; $becedL2=0; $beedL2=0; $bpedL2=0; $beedgenL2=0; $bsedbioL2=0; $bsedmapehL2=0; $bsedeL2=0; $bsedfilL2=0; $bsedmL2=0; $bsedsciL2=0; $bsedsocL2=0; $profedL2=0; \r\r\n\t\t$bshmL2=0; $bshrmL2=0; $bstmL2=0;\r\r\n\r\r\n\t\t$bsnL3=0; $bsmL3=0;\r\r\n\t\t$bsaL3=0; $bscaL3=0; $bsbafmL3=0; $bsbamktL3=0; $bsbahrmL3=0; $bsbahrdmL3=0;\r\r\n\t\t$bscsL3=0; $bsitL3=0; $bsemcL3=0; $actL3=0; \r\r\n\t\t$bacomL3=0; $bcaedL3=0; $becedL3=0; $beedL3=0; $bpedL3=0; $beedgenL3=0; $bsedbioL3=0; $bsedmapehL3=0; $bsedeL3=0; $bsedfilL3=0; $bsedmL3=0; $bsedsciL3=0; $bsedsocL3=0; $profedL3=0; \r\r\n\t\t$bshmL3=0; $bshrmL3=0; $bstmL3=0;\r\r\n\r\r\n\t\t$bsnL4=0; $bsmL4=0;\r\r\n\t\t$bsaL4=0; $bscaL4=0; $bsbafmL4=0; $bsbamktL4=0; $bsbahrmL4=0; $bsbahrdmL4=0;\r\r\n\t\t$bscsL4=0; $bsitL4=0; $bsemcL4=0; $actL4=0; \r\r\n\t\t$bacomL4=0; $bcaedL4=0; $becedL4=0; $beedL4=0; $bpedL4=0; $beedgenL4=0; $bsedbioL4=0; $bsedmapehL4=0; $bsedeL4=0; $bsedfilL4=0; $bsedmL4=0; $bsedsciL4=0; $bsedsocL4=0; $profedL4=0; \r\r\n\t\t$bshmL4=0; $bshrmL4=0; $bstmL4=0;\r\r\n\r\r\n\t\t$bsnEnrolled=0; $bsmEnrolled=0;\r\r\n\t\t$bsaEnrolled=0; $bscaEnrolled=0; $bsbafmEnrolled=0; $bsbamktEnrolled=0; $bsbahrmEnrolled=0; $bsbahrdmEnrolled=0;\r\r\n\t\t$bscsEnrolled=0; $bsitEnrolled=0; $bsemcEnrolled=0; $actEnrolled=0; \r\r\n\t\t$bacomEnrolled=0; $bcaedEnrolled=0; $becedEnrolled=0; $beedEnrolled=0; $bpedEnrolled=0; $beedgenEnrolled=0; $bsedbioEnrolled=0; $bsedmapehEnrolled=0; $bsedeEnrolled=0; $bsedfilEnrolled=0; $bsedmEnrolled=0; $bsedsciEnrolled=0; $bsedsocEnrolled=0; $profedEnrolled=0; \r\r\n\t\t$bshmEnrolled=0; $bshrmEnrolled=0; $bstmEnrolled=0;\r\r\n\r\r\n\t\t$bsnR1=0; $bsmR1=0;\r\r\n\t\t$bsaR1=0; $bscaR1=0; $bsbafmR1=0; $bsbamktR1=0; $bsbahrmR1=0; $bsbahrdmR1=0;\r\r\n\t\t$bscsR1=0; $bsitR1=0; $bsemcR1=0; $actR1=0; \r\r\n\t\t$bacomR1=0; $bcaedR1=0; $becedR1=0; $beedR1=0; $bpedR1=0; $beedgenR1=0; $bsedbioR1=0; $bsedmapehR1=0; $bsedeR1=0; $bsedfilR1=0; $bsedmR1=0; $bsedsciR1=0; $bsedsocR1=0; $profedR1=0; \r\r\n\t\t$bshmR1=0; $bshrmR1=0; $bstmR1=0;\r\r\n\r\r\n\t\t$bsnR2=0; $bsmR2=0;\r\r\n\t\t$bsaR2=0; $bscaR2=0; $bsbafmR2=0; $bsbamktR2=0; $bsbahrmR2=0; $bsbahrdmR2=0;\r\r\n\t\t$bscsR2=0; $bsitR2=0; $bsemcR2=0; $actR2=0; \r\r\n\t\t$bacomR2=0; $bcaedR2=0; $becedR2=0; $beedR2=0; $bpedR2=0; $beedgenR2=0; $bsedbioR2=0; $bsedmapehR2=0; $bsedeR2=0; $bsedfilR2=0; $bsedmR2=0; $bsedsciR2=0; $bsedsocR2=0; $profedR2=0; \r\r\n\t\t$bshmR2=0; $bshrmR2=0; $bstmR2=0;\r\r\n\r\r\n\t\t$bsnR3=0; $bsmR3=0;\r\r\n\t\t$bsaR3=0; $bscaR3=0; $bsbafmR3=0; $bsbamktR3=0; $bsbahrmR3=0; $bsbahrdmR3=0;\r\r\n\t\t$bscsR3=0; $bsitR3=0; $bsemcR3=0; $actR3=0; \r\r\n\t\t$bacomR3=0; $bcaedR3=0; $becedR3=0; $beedR3=0; $bpedR3=0; $beedgenR3=0; $bsedbioR3=0; $bsedmapehR3=0; $bsedeR3=0; $bsedfilR3=0; $bsedmR3=0; $bsedsciR3=0; $bsedsocR3=0; $profedR3=0; \r\r\n\t\t$bshmR3=0; $bshrmR3=0; $bstmR3=0;\r\r\n\r\r\n\t\t$bsnR4=0; $bsmR4=0;\r\r\n\t\t$bsaR4=0; $bscaR4=0; $bsbafmR4=0; $bsbamktR4=0; $bsbahrmR4=0; $bsbahrdmR4=0;\r\r\n\t\t$bscsR4=0; $bsitR4=0; $bsemcR4=0; $actR4=0; \r\r\n\t\t$bacomR4=0; $bcaedR4=0; $becedR4=0; $beedR4=0; $bpedR4=0; $beedgenR4=0; $bsedbioR4=0; $bsedmapehR4=0; $bsedeR4=0; $bsedfilR4=0; $bsedmR4=0; $bsedsciR4=0; $bsedsocR4=0; $profedR4=0; \r\r\n\t\t$bshmR4=0; $bshrmR4=0; $bstmR4=0;\r\r\n\r\r\n\r\r\n\t\t# ./variables\r\r\n\r\r\n\r\r\n\t\t$sql = \"SELECT students_tbl.dept_fld, students_tbl.program_fld, accounts_tbl.studyrlevel_fld, accounts_tbl.isenlisted_fld, accounts_tbl.isenrolled_fld FROM students_tbl INNER JOIN accounts_tbl USING (studnum_fld) WHERE accounts_tbl.isdeleted_fld=0\";\r\r\n\t\t$res = $this->gm->execute_query($sql, \"No records found\");\r\r\n\t\tif ($res['code']==200) {\r\r\n\t\t\tforeach ($res['data'] as $key=>$value) {\r\r\n\t\t\t\t$total+=1;\r\r\n\t\t\t\tif($value['isenlisted_fld']==2) { $enlisted+=1; }\r\r\n\t\t\t\tif($value['isenrolled_fld']==2) { $enrolled+=1; }\r\r\n\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $enlisted1+=1; }\r\r\n\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $enrolled1+=1; }\r\r\n\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $enlisted2+=1; }\r\r\n\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $enrolled2+=1; }\r\r\n\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $enlisted3+=1; }\r\r\n\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $enrolled3+=1; }\r\r\n\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $enlisted4+=1; }\r\r\n\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $enrolled4+=1; }\r\r\n\r\r\n\t\t\t\tswitch ($value['dept_fld']) {\r\r\n\t\t\t\t\tcase \"CAHS\": \r\r\n\t\t\t\t\t\t$cahs+=1; \r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $cahsEnlisted+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $cahsEnrolled+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $cahsL1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $cahsR1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $cahsL2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $cahsR2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $cahsL3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $cahsR3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $cahsL4+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $cahsR4+=1; }\r\r\n\r\r\n\t\t\t\t\t\tswitch ($value['program_fld']) {\r\r\n\t\t\t\t\t\t\tcase \"BSM\": \r\r\n\t\t\t\t\t\t\t\t$bsm+=1;\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSN\": \r\r\n\t\t\t\t\t\t\t\t$bsn+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsnEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsnEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsnL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsnR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsnL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsnR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsnL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsnR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsnL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsnR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\r\r\n\t\t\t\t\tcase \"CBA\": \r\r\n\t\t\t\t\t\t$cba+=1;\r\r\n\t\t\t\t\t \tif($value['isenlisted_fld']==2) { $cbaEnlisted+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $cbaEnrolled+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $cbaL1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $cbaR1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $cbaL2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $cbaR2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $cbaL3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $cbaR3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $cbaL4+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $cbaR4+=1; }\r\r\n\r\r\n\t\t\t\t\t\tswitch ($value['program_fld']) {\r\r\n\t\t\t\t\t\t\tcase \"BSA\": \r\r\n\t\t\t\t\t\t\t\t$bsa+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsaEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsaEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsaL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsaR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsaL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsaR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsaL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsaR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsaL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsaR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSCA\": \r\r\n\t\t\t\t\t\t\t\t$bsca+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bscaEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bscaEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bscaL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bscaR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bscaL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bscaR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bscaL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bscaR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bscaL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bscaR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSBA-FM\": \r\r\n\t\t\t\t\t\t\t\t$bsbafm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsbafmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsbafmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsbafmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsbafmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsbafmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsbafmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsbafmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsbafmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsbafmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsbafmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSBA-MKT\": \r\r\n\t\t\t\t\t\t\t\t$bsbamkt+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsbamktEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsbamktEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsbamktL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsbamktR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsbamktL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsbamktR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsbamktL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsbamktR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsbamktL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsbamktR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSBA-HRM\": \r\r\n\t\t\t\t\t\t\t\t$bsbahrm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsbahrmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsbahrmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsbahrmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsbahrmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsbahrmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsbahrmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsbahrmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsbahrmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsbahrmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsbahrmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSBA-HRDM\": \r\r\n\t\t\t\t\t\t\t\t$bsbahrdm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsbahrdmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsbahrdmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsbahrdmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsbahrdmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsbahrdmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsbahrdmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsbahrdmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsbahrdmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsbahrdmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsbahrdmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\r\r\n\t\t\t\t\tcase \"CCS\": \r\r\n\t\t\t\t\t\t$ccs+=1; \r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $ccsEnlisted+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $ccsEnrolled+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $ccsL1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $ccsR1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $ccsL2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $ccsR2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $ccsL3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $ccsR3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $ccsL4+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $ccsR4+=1; }\r\r\n\r\r\n\t\t\t\t\t\tswitch ($value['program_fld']) {\r\r\n\t\t\t\t\t\t\tcase \"BSCS\": \r\r\n\t\t\t\t\t\t\t\t$bscs+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bscsEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bscsEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bscsL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bscsR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bscsL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bscsR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bscsL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bscsR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bscsL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bscsR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSIT\": \r\r\n\t\t\t\t\t\t\t\t$bsit+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsitEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsitEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsitL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsitR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsitL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsitR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsitL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsitR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsitL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsitR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEMC\": \r\r\n\t\t\t\t\t\t\t\t$bsemc+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsemcEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsemcEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsemcL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsemcR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsemcL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsemcR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsemcL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsemcR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsemcL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsemcR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"ACT\": \r\r\n\t\t\t\t\t\t\t\t$act+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $actEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $actEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $actL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $actR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $actL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $actR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $actL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $actR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $actL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $actR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\r\r\n\t\t\t\t\tcase \"CEAS\": \r\r\n\t\t\t\t\t\t$ceas+=1; \r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $ceasEnlisted+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $ceasEnrolled+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $ceasL1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $ceasR1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $ceasL2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $ceasR2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $ceasL3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $ceasR3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $ceasL4+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $ceasR4+=1; }\r\r\n\r\r\n\t\t\t\t\t\tswitch ($value['program_fld']) {\r\r\n\t\t\t\t\t\t\tcase \"BACOM\": \r\r\n\t\t\t\t\t\t\t\t$bacom+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bacomEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bacomEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bacomL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bacomR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bacomL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bacomR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bacomL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bacomR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bacomL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bacomR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BCAEd\": \r\r\n\t\t\t\t\t\t\t\t$bcaed+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bcaedEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bcaedEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bcaedL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bcaedR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bcaedL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bcaedR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bcaedL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bcaedR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bcaedL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bcaedR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BECEd\": \r\r\n\t\t\t\t\t\t\t\t$beced+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $becedEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $becedEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $becedL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $becedR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $becedL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $becedR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $becedL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $becedR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $becedL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $becedR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BEEd\": \r\r\n\t\t\t\t\t\t\t\t$beed+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $beedEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $beedEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $beedL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $beedR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $beedL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $beedR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $beedL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $beedR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $beedL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $beedR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BPEd\": \r\r\n\t\t\t\t\t\t\t\t$bped+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bpedEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bpedEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bpedL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bpedR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bpedL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bpedR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bpedL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bpedR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bpedL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bpedR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BEEd-GEN\": \r\r\n\t\t\t\t\t\t\t\t$beedgen+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $beedgenEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $beedgenEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $beedgenL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $beedgenR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $beedgenL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $beedgenR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $beedgenL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $beedgenR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $beedgenL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $beedgenR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-BIO\": \r\r\n\t\t\t\t\t\t\t\t$bsedbio+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedbioEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedbioEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedbioL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedbioR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedbioL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedbioR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedbioL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedbioR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedbioL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedbioR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-MAPEH\": \r\r\n\t\t\t\t\t\t\t\t$bsedmapeh+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedmapehEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedmapehEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedmapehL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedmapehR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedmapehL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedmapehR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedmapehL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedmapehR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedmapehL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedmapehR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-E\": \r\r\n\t\t\t\t\t\t\t\t$bsede+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedeEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedeEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedeL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedeR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedeL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedeR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedeL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedeR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedeL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedeR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-FIL\": \r\r\n\t\t\t\t\t\t\t\t$bsedfil+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedfilEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedfilEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedfilL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedfilR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedfilL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedfilR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedfilL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedfilR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedfilL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedfilR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-M\": \r\r\n\t\t\t\t\t\t\t\t$bsedm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-SCI\": \r\r\n\t\t\t\t\t\t\t\t$bsedsci+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedsciEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedsciEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedsciL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedsciR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedsciL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedsciR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedsciL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedsciR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedsciL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedsciR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSEd-SOC\": \r\r\n\t\t\t\t\t\t\t\t$bsedsoc+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bsedsocEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bsedsocEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bsedsocL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bsedsocR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bsedsocL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bsedsocR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bsedsocL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bsedsocR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bsedsocL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bsedsocR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"PROFED\": \r\r\n\t\t\t\t\t\t\t\t$profed+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $profedEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $profedEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $profedL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $profedR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $profedL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $profedR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $profedL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $profedR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $profedL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $profedR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\r\r\n\t\t\t\t\tcase \"CHTM\": \r\r\n\t\t\t\t\t\t$chtm+=1; \r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $chtmEnlisted+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $chtmEnrolled+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $chtmL1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $chtmR1+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $chtmL2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $chtmR2+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $chtmL3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $chtmR3+=1; }\r\r\n\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $chtmL4+=1; }\r\r\n\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $chtmR4+=1; }\r\r\n\r\r\n\t\t\t\t\t\tswitch ($value['program_fld']) {\r\r\n\t\t\t\t\t\t\tcase \"BSHM\": \r\r\n\t\t\t\t\t\t\t\t$bshm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bshmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bshmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bshmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bshmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bshmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bshmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bshmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bshmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bshmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bshmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSHRM\": \r\r\n\t\t\t\t\t\t\t\t$bshrm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bshrmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bshrmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bshrmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bshrmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bshrmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bshrmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bshrmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bshrmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bshrmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bshrmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"BSTM\": \r\r\n\t\t\t\t\t\t\t\t$bstm+=1; \r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2) { $bstmEnlisted+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2) { $bstmEnrolled+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==1) { $bstmL1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==1) { $bstmR1+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==2) { $bstmL2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==2) { $bstmR2+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==3) { $bstmL3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==3) { $bstmR3+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenlisted_fld']==2 && $value['studyrlevel_fld']==4) { $bstmL4+=1; }\r\r\n\t\t\t\t\t\t\t\tif($value['isenrolled_fld']==2 && $value['studyrlevel_fld']==4) { $bstmR4+=1; }\r\r\n\t\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\r\r\n\t\t\t\t\tdefault: break;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\t$remarks = \"success\";\r\r\n\t\t\t$message = \"Successfully retrieved requested data\";\r\r\n\t\t}\r\r\n\r\r\n\t\t\r\r\n\r\r\n\t\t#arrays\r\r\n\t\t//CAHS\r\r\n\t\t$cahsProgramsEnlisted = array(\r\r\n\t\t\t'all'=>$cahsEnlisted,'bsm'=>$bsmEnlisted, 'bsn'=>$bsnEnlisted, \r\r\n\t\t\t'bsn1'=>$bsnL1, 'bsn2'=>$bsnL2, 'bsn3'=>$bsnL3, 'bsn4'=>$bsnL4, 'bsnAll'=>$bsn,\r\r\n\t\t\t'bsm1'=>$bsmL1, 'bsm2'=>$bsmL2, 'bsm3'=>$bsmL3, 'bsm4'=>$bsmL4, 'bsmAll'=>$bsm\r\r\n\t\t);\r\r\n\t\t$cahsProgramsEnrolled = array('all'=>$cahsEnrolled,'bsm'=>$bsmEnrolled, 'bsn'=>$bsnEnrolled, \r\r\n\t\t\t'bsn1'=>$bsnR1, 'bsn2'=>$bsnR2, 'bsn3'=>$bsnR3, 'bsn4'=>$bsnR4, \r\r\n\t\t\t'bsm1'=>$bsmR1, 'bsm2'=>$bsmR2, 'bsm3'=>$bsmR3, 'bsm4'=>$bsmR4\r\r\n\t\t);\r\r\n\t\t$cahs_arr = array('total'=>$cahs, 'enlisted'=>$cahsProgramsEnlisted, 'enrolled'=>$cahsProgramsEnrolled, 'R1'=>$cahsR1, 'R2'=>$cahsR2, 'R3'=>$cahsR3, 'R4'=>$cahsR4, 'L1'=>$cahsL1, 'L2'=>$cahsL2, 'L3'=>$cahsL3, 'L4'=>$cahsL4);\r\r\n\r\r\n\t\t//CBA\r\r\n\t\t$cbaProgramsEnlisted = array('all'=>$cbaEnlisted,'bsa'=>$bsaEnlisted, 'bsca'=>$bscaEnlisted, 'bsbafm'=>$bsbafmEnlisted, 'bsbamkt'=>$bsbamktEnlisted, 'bsbahrm'=>$bsbahrmEnlisted,'bsbahrdm'=>$bsbahrdmEnlisted, \r\r\n\t\t\t'bsa1'=>$bsaL1, 'bsa2'=>$bsaL2, 'bsa3'=>$bsaL3, 'bsa4'=>$bsaL4, 'bsaAll'=>$bsa,\r\r\n\t\t\t'bsca1'=>$bscaL1, 'bsca2'=>$bscaL2, 'bsca3'=>$bscaL3, 'bsca4'=>$bscaL4, 'bscaAll'=>$bsca,\r\r\n\t\t\t'bsbafm1'=>$bsbafmL1, 'bsbafm2'=>$bsbafmL2, 'bsbafm3'=>$bsbafmL3, 'bsbafm4'=>$bsbafmL4, 'bsbafmAll'=>$bsbafm,\r\r\n\t\t\t'bsbamkt1'=>$bsbamktL1, 'bsbamkt2'=>$bsbamktL2, 'bsbamkt3'=>$bsbamktL3, 'bsbamkt4'=>$bsbamktL4, 'bsbamktAll'=>$bsbamkt,\r\r\n\t\t\t'bsbahrm1'=>$bsbahrmL1, 'bsbahrm2'=>$bsbahrmL2, 'bsbahrm3'=>$bsbahrmL3, 'bsbahrm4'=>$bsbahrmL4, 'bsbahrmAll'=>$bsbahrm,\r\r\n\t\t\t'bsbahrdm1'=>$bsbahrdmL1, 'bsbahrdm2'=>$bsbahrdmL2, 'bsbahrdm3'=>$bsbahrdmL3, 'bsbahrdm4'=>$bsbahrdmL4, 'bsbahrdmAll'=>$bsbahrdm\r\r\n\t\t);\r\r\n\t\t$cbaProgramsEnrolled = array('all'=>$cbaEnrolled,'bsa'=>$bsaEnrolled, 'bsca'=>$bscaEnrolled, 'bsbafm'=>$bsbafmEnrolled, 'bsbamkt'=>$bsbamktEnrolled, 'bsbahrm'=>$bsbahrmEnrolled,'bsbahrdm'=>$bsbahrdmEnrolled, \r\r\n\t\t\t'bsa1'=>$bsaR1, 'bsa2'=>$bsaR2, 'bsa3'=>$bsaR3, 'bsa4'=>$bsaR4, \r\r\n\t\t\t'bsca1'=>$bscaR1, 'bsca2'=>$bscaR2, 'bsca3'=>$bscaR3, 'bsca4'=>$bscaR4, \r\r\n\t\t\t'bsbafm1'=>$bsbafmR1, 'bsbafm2'=>$bsbafmR2, 'bsbafm3'=>$bsbafmR3, 'bsbafm4'=>$bsbafmR4, \r\r\n\t\t\t'bsbamkt1'=>$bsbamktR1, 'bsbamkt2'=>$bsbamktR2, 'bsbamkt3'=>$bsbamktR3, 'bsbamkt4'=>$bsbamktR4, \r\r\n\t\t\t'bsbahrm1'=>$bsbahrmR1, 'bsbahrm2'=>$bsbahrmR2, 'bsbahrm3'=>$bsbahrmR3, 'bsbahrm4'=>$bsbahrmR4, \r\r\n\t\t\t'bsbahrdm1'=>$bsbahrdmR1, 'bsbahrdm2'=>$bsbahrdmR2, 'bsbahrdm3'=>$bsbahrdmR3, 'bsbahrdm4'=>$bsbahrdmR4\r\r\n\t\t);\r\r\n\t\t$cba_arr = array('total'=>$cba, 'enlisted'=>$cbaProgramsEnlisted, 'enrolled'=>$cbaProgramsEnrolled, 'R1'=>$cbaR1, 'R2'=>$cbaR2, 'R3'=>$cbaR3, 'R4'=>$cbaR4, 'L1'=>$cbaL1, 'L2'=>$cbaL2, 'L3'=>$cbaL3, 'L4'=>$cbaL4);\r\r\n\r\r\n\t\t//CCS\r\r\n\t\t$ccsProgramsEnlisted = array(\r\r\n\t\t\t'all'=>$ccsEnlisted,'bscs'=>$bscsEnlisted, 'bsit'=>$bsitEnlisted,'bsemc'=>$bsemcEnlisted, 'act'=>$actEnlisted,\r\r\n\t\t\t'bscs1'=>$bscsL1, 'bscs2'=>$bscsL2, 'bscs3'=>$bscsL3, 'bscs4'=>$bscsL4, 'bscsAll'=>$bscs,\r\r\n\t\t\t'bsit1'=>$bsitL1, 'bsit2'=>$bsitL2, 'bsit3'=>$bsitL3, 'bsit4'=>$bsitL4, 'bsitAll'=>$bsit,\r\r\n\t\t\t'bsemc1'=>$bsemcL1, 'bsemc2'=>$bsemcL2, 'bsemc3'=>$bsemcL3, 'bsemc4'=>$bsemcL4, 'bsemcAll'=>$bsemc,\r\r\n\t\t\t'act1'=>$actL1, 'act2'=>$actL2, 'act3'=>$actL3, 'act4'=>$actL4, 'actAll'=>$act\r\r\n\t\t);\r\r\n\t\t$ccsProgramsEnrolled = array(\r\r\n\t\t\t'all'=>$ccsEnrolled,'bscs'=>$bscsEnrolled, 'bsit'=>$bsitEnrolled,'bsemc'=>$bsemcEnrolled, 'act'=>$actEnrolled,\r\r\n\t\t\t'bscs1'=>$bscsR1, 'bscs2'=>$bscsR2, 'bscs3'=>$bscsR3, 'bscs4'=>$bscsR4,\r\r\n\t\t\t'bsit1'=>$bsitR1, 'bsit2'=>$bsitR2, 'bsit3'=>$bsitR3, 'bsit4'=>$bsitR4,\r\r\n\t\t\t'bsemc1'=>$bsemcR1, 'bsemc2'=>$bsemcR2, 'bsemc3'=>$bsemcR3, 'bsemc4'=>$bsemcR4,\r\r\n\t\t\t'act1'=>$actR1, 'act2'=>$actR2, 'act3'=>$actR3, 'act4'=>$actR4\r\r\n\t\t);\r\r\n\t\t$ccs_arr = array('total'=>$ccs, 'enlisted'=>$ccsProgramsEnlisted, 'enrolled'=>$ccsProgramsEnrolled, 'R1'=>$ccsR1, 'R2'=>$ccsR2, 'R3'=>$ccsR3, 'R4'=>$ccsR4, 'L1'=>$ccsL1, 'L2'=>$ccsL2, 'L3'=>$ccsL3, 'L4'=>$ccsL4);\r\r\n\r\r\n\r\r\n\r\r\n\t\t//CEAS\r\r\n\t\t$ceasProgramsEnlisted = array(\r\r\n\t\t\t'all'=>$ceasEnlisted,'bacom'=>$bacomEnlisted, 'bcaed'=>$bcaedEnlisted, 'beced'=>$becedEnlisted, 'beed'=>$beedEnlisted, 'bped'=>$bpedEnlisted, 'beedgen'=>$beedgenEnlisted, 'bsedbio'=>$bsedbioEnlisted, 'bsedmapeh'=>$bsedmapehEnlisted, 'bsede'=>$bsedeEnlisted, 'bsedfil'=>$bsedfilEnlisted, 'bsedm'=>$bsedmEnlisted, 'bsedsci'=>$bsedsciEnlisted, 'bsedsoc'=>$bsedsocEnlisted, 'profed'=>$profedEnlisted,\r\r\n\t\t\t'bacom1'=>$bacomL1, 'bacom2'=>$bacomL2, 'bacom3'=>$bacomL3, 'bacom4'=>$bacomL4, 'bacomAll'=>$bacom,\r\r\n\t\t\t'bcaed1'=>$bcaedL1, 'bcaed2'=>$bcaedL2, 'bcaed3'=>$bcaedL3, 'bcaed4'=>$bcaedL4, 'bcaedAll'=>$bcaed,\r\r\n\t\t\t'beced1'=>$becedL1, 'beced2'=>$becedL2, 'beced3'=>$becedL3, 'beced4'=>$becedL4, 'becedAll'=>$beced,\r\r\n\t\t\t'beed1'=>$beedL1, 'beed2'=>$beedL2, 'beed3'=>$beedL3, 'beed4'=>$beedL4, 'beedAll'=>$beed,\r\r\n\t\t\t'bped1'=>$bpedL1, 'bped2'=>$bpedL2, 'bped3'=>$bpedL3, 'bped4'=>$bpedL4, 'bpedAll'=>$bped,\r\r\n\t\t\t'beedgen1'=>$beedgenL1, 'beedgen2'=>$beedgenL2, 'beedgen3'=>$beedgenL3, 'beedgen4'=>$beedgenL4, 'beedgenAll'=>$beedgen,\r\r\n\t\t\t'bsedmapeh1'=>$bsedmapehL1, 'bsedmapeh2'=>$bsedmapehL2, 'bsedmapeh3'=>$bsedmapehL3, 'bsedmapeh4'=>$bsedmapehL4, 'bsedmapehAll'=>$bsedmapeh,\r\r\n\t\t\t'bsede1'=>$bsedeL1, 'bsede2'=>$bsedeL2, 'bsede3'=>$bsedeL3, 'bsede4'=>$bsedeL4, 'bsedeAll'=>$bsede,\r\r\n\t\t\t'bsedbio1'=>$bsedbioL1, 'bsedbio2'=>$bsedbioL2, 'bsedbio3'=>$bsedbioL3, 'bsedbio4'=>$bsedbioL4, 'bsedbioAll'=>$bsedbio,\r\r\n\t\t\t'bsedfil1'=>$bsedfilL1, 'bsedfil2'=>$bsedfilL2, 'bsedfil3'=>$bsedfilL3, 'bsedfil4'=>$bsedfilL4, 'bsedfilAll'=>$bsedfil,\r\r\n\t\t\t'bsedm1'=>$bsedmL1, 'bsedm2'=>$bsedmL2, 'bsedm3'=>$bsedmL3, 'bsedm4'=>$bsedmL4, 'bsedmAll'=>$bsedm,\r\r\n\t\t\t'bsedsci1'=>$bsedsciL1, 'bsedsci2'=>$bsedsciL2, 'bsedsci3'=>$bsedsciL3, 'bsedsci4'=>$bsedsciL4, 'bsedsciAll'=>$bsedsci,\r\r\n\t\t\t'bsedsoc1'=>$bsedsocL1, 'bsedsoc2'=>$bsedsocL2, 'bsedsoc3'=>$bsedsocL3, 'bsedsoc4'=>$bsedsocL4, 'bsedsocAll'=>$bsedsoc,\r\r\n\t\t\t'profed1'=>$profedL1, 'profed2'=>$profedL2, 'profed3'=>$profedL3, 'profed4'=>$profedL4, 'profedAll'=>$profed\r\r\n\t\t);\r\r\n\t\t$ceasProgramsEnrolled = array(\r\r\n\t\t\t'all'=>$ceasEnrolled,'bacom'=>$bacomEnrolled, 'bcaed'=>$bcaedEnrolled, 'beced'=>$becedEnrolled, 'beed'=>$beedEnrolled, 'bped'=>$bpedEnrolled, 'beedgen'=>$beedgenEnrolled, 'bsedbio'=>$bsedbioEnrolled, 'bsedmapeh'=>$bsedmapehEnrolled, 'bsede'=>$bsedeEnrolled, 'bsedfil'=>$bsedfilEnrolled, 'bsedm'=>$bsedmEnrolled, 'bsedsci'=>$bsedsciEnrolled, 'bsedsoc'=>$bsedsocEnrolled, 'profed'=>$profedEnrolled,\r\r\n\t\t\t'bacom1'=>$bacomR1, 'bacom2'=>$bacomR2, 'bacom3'=>$bacomR3, 'bacom4'=>$bacomR4,\r\r\n\t\t\t'bcaed1'=>$bcaedR1, 'bcaed2'=>$bcaedR2, 'bcaed3'=>$bcaedR3, 'bcaed4'=>$bcaedR4,\r\r\n\t\t\t'beced1'=>$becedR1, 'beced2'=>$becedR2, 'beced3'=>$becedR3, 'beced4'=>$becedR4,\r\r\n\t\t\t'beed1'=>$beedR1, 'beed2'=>$beedR2, 'beed3'=>$beedR3, 'beed4'=>$beedR4,\r\r\n\t\t\t'bped1'=>$bpedR1, 'bped2'=>$bpedR2, 'bped3'=>$bpedR3, 'bped4'=>$bpedR4,\r\r\n\t\t\t'beedgen1'=>$beedgenR1, 'beedgen2'=>$beedgenR2, 'beedgen3'=>$beedgenR3, 'beedgen4'=>$beedgenR4,\r\r\n\t\t\t'bsedmapeh1'=>$bsedmapehR1, 'bsedmapeh2'=>$bsedmapehR2, 'bsedmapeh3'=>$bsedmapehR3, 'bsedmapeh4'=>$bsedmapehR4,\r\r\n\t\t\t'bsede1'=>$bsedeR1, 'bsede2'=>$bsedeR2, 'bsede3'=>$bsedeR3, 'bsede4'=>$bsedeR4,\r\r\n\t\t\t'bsedbio1'=>$bsedbioR1, 'bsedbio2'=>$bsedbioR2, 'bsedbio3'=>$bsedbioR3, 'bsedbio4'=>$bsedbioR4,\r\r\n\t\t\t'bsedfil1'=>$bsedfilR1, 'bsedfil2'=>$bsedfilR2, 'bsedfil3'=>$bsedfilR3, 'bsedfil4'=>$bsedfilR4,\r\r\n\t\t\t'bsedm1'=>$bsedmR1, 'bsedm2'=>$bsedmR2, 'bsedm3'=>$bsedmR3, 'bsedm4'=>$bsedmR4,\r\r\n\t\t\t'bsedsci1'=>$bsedsciR1, 'bsedsci2'=>$bsedsciR2, 'bsedsci3'=>$bsedsciR3, 'bsedsci4'=>$bsedsciR4,\r\r\n\t\t\t'bsedsoc1'=>$bsedsocR1, 'bsedsoc2'=>$bsedsocR2, 'bsedsoc3'=>$bsedsocR3, 'bsedsoc4'=>$bsedsocR4,\r\r\n\t\t\t'profed1'=>$profedR1, 'profed2'=>$profedR2, 'profed3'=>$profedR3, 'profed4'=>$profedR4\r\r\n\t\t);\r\r\n\t\t$ceas_arr = array('total'=>$ceas, 'enlisted'=>$ceasProgramsEnlisted, 'enrolled'=>$ceasProgramsEnrolled, 'R1'=>$ceasR1, 'R2'=>$ceasR2, 'R3'=>$ceasR3, 'R4'=>$ceasR4, 'L1'=>$ceasL1, 'L2'=>$ceasL2, 'L3'=>$ceasL3, 'L4'=>$ceasL4);\r\r\n\r\r\n\t\t\t\t// $bshm=0; $bshrm=0; $bstm=0;\r\r\n\t\t//CHTM\r\r\n\t\t$chtmProgramsEnlisted = array(\r\r\n\t\t\t'all'=>$chtmEnlisted,'bshm'=>$bshmEnlisted, 'bshrm'=>$bshrmEnlisted, 'bstm'=>$bstmEnlisted,\r\r\n\t\t\t'bshm1'=>$bshmL1, 'bshm2'=>$bshmL2, 'bshm3'=>$bshmL3, 'bshm4'=>$bshmL4, 'bshmAll'=>$bshm,\r\r\n\t\t\t'bshrm1'=>$bshrmL1, 'bshrm2'=>$bshrmL2, 'bshrm3'=>$bshrmL3, 'bshrm4'=>$bshrmL4, 'bshrmAll'=>$bshrm,\r\r\n\t\t\t'bstm1'=>$bstmL1, 'bstm2'=>$bstmL2, 'bstm3'=>$bstmL3, 'bstm4'=>$bstmL4, 'bstmAll'=>$bstm,\r\r\n\t\t);\r\r\n\t\t$chtmProgramsEnrolled = array(\r\r\n\t\t\t'all'=>$chtmEnrolled,'bshm'=>$bshmEnrolled, 'bshrm'=>$bshrmEnrolled, 'bstm'=>$bstmEnrolled,\r\r\n\t\t\t'bshm1'=>$bshmR1, 'bshm2'=>$bshmR2, 'bshm3'=>$bshmR3, 'bshm4'=>$bshmR4,\r\r\n\t\t\t'bshrm1'=>$bshrmR1, 'bshrm2'=>$bshrmR2, 'bshrm3'=>$bshrmR3, 'bshrm4'=>$bshrmR4,\r\r\n\t\t\t'bstm1'=>$bstmR1, 'bstm2'=>$bstmR2, 'bstm3'=>$bstmR3, 'bstm4'=>$bstmR4\r\r\n\t\t);\r\r\n\t\t$chtm_arr = array('total'=>$chtm, 'enlisted'=>$chtmProgramsEnlisted, 'enrolled'=>$chtmProgramsEnrolled, 'R1'=>$chtmR1, 'R2'=>$chtmR2, 'R3'=>$chtmR3, 'R4'=>$chtmR4, 'L1'=>$chtmL1, 'L2'=>$chtmL2, 'L3'=>$chtmL3, 'L4'=>$chtmL4);\r\r\n\r\r\n\r\r\n\t\t// test here;\r\r\n\t\t$stats_arr = array('total'=>$total, 'enlisted'=>$enlisted, 'enrolled'=>$enrolled, 'L1'=>$enlisted1, 'R1'=>$enrolled1, 'L2'=>$enlisted2, 'R2'=>$enrolled2, 'L3'=>$enlisted3, 'R3'=>$enrolled3, 'L4'=>$enlisted4, 'R4'=>$enrolled4,'cahs'=>$cahs_arr,'cba'=>$cba_arr,'ccs'=>$ccs_arr,'ceas'=>$ceas_arr,'chtm'=>$chtm_arr);\r\r\n\t\t// $enlisted_arr = array('cahs'=>$cahsEnlisted,'cba'=>$cbaEnlisted,'ccs'=>$ccsEnlisted,'ceas'=>$ceasEnlisted,'chtm'=>$chtmEnlisted);\r\r\n\t\t// $enrolled_arr = array('cahs'=>$cahsEnrolled,'cba'=>$cbaEnrolled,'ccs'=>$ccsEnrolled,'ceas'=>$ceasEnrolled,'chtm'=>$chtmEnrolled);\r\r\n\r\r\n\t\t// $payload = array('stats'=>$stats_arr);\r\r\n\t\t$remarks = \"success\";\r\r\n\t\t$message = \"Successfully retrieved requested data\";\r\r\n\t\t$code = 200;\r\r\n\t\treturn $this->gm->api_result($stats_arr, $remarks, $message, $code);\r\r\n\t}", "public function findMemberStats(Organization $org, $memberId, $filters);", "protected function _generateStats(array $dataByPeriod) : array\n {\n $dataByIdentifier = [];\n foreach ($dataByPeriod as $periodIndex => $data) {\n $dataByIdentifier[$periodIndex][$this->_periodSelected] = $periodIndex;\n if ($this->_statSelected == Config::STAT_OPTION_AVERAGE) {\n if ($this->_identifierSelected == Config::IDENTIFIER_POST) {\n $dataByIdentifier[$periodIndex][\"average\"] = $this->_getAverageNumberOfPosts($data);\n } else {\n $dataByIdentifier[$periodIndex][\"average\"] = $this->_getAverageCharacterLength($data);\n }\n } elseif ($this->_statSelected == Config::STAT_OPTION_TOTAL) {\n $dataByIdentifier[$periodIndex][\"total\"] = $this->_getTotalByIdentifier($data);\n } elseif ($this->_statSelected == Config::STAT_OPTION_LONGEST) {\n $dataByIdentifier[$periodIndex][\"longest_post\"] = $this->_getLongestPost($data);\n }\n }\n return array_values($dataByIdentifier);\n }", "public function statistics()\n {\n $year = date('Y');\n $prev_year = $year - 1;\n $month = date('n');\n $day = date('j');\n\n if ($day < 15) {\n $month--;\n }\n\n $startFromDate = \"$prev_year-$month-$day 00:00:00\";\n\n $data['registration_counts'] = $this->registrationStats($year, $prev_year, $month, $day);\n $data['f_stats'] = $this->functionStats($startFromDate);\n $data['s_stats'] = $this->jobSizeStats($startFromDate);\n\n return $this->loadView('admin.statistics', 'R vLab Usage Statistics', $data);\n }", "public function storingPieChart()\n {\n \n $memberNonMemberStats = \"\";\n\n $members = 0;\n $nonMembers = 0;\n $contact = 0;\n $visitors = 0;\n $archivedMembers = 0;\n\n $sql = \"SELECT * FROM churchmembers WHERE memberStatus='active'\";\n $members = db::getnumrows($sql);\n\n $sql = \"SELECT * FROM churchmembers WHERE memberStatus='nonmember'\";\n $nonMembers = db::getnumrows($sql);\n\n $sql = \"SELECT * FROM churchmembers WHERE memberStatus='contact'\";\n $contact = db::getnumrows($sql);\n\n $sql = \"SELECT * FROM churchmembers WHERE memberStatus='visitor'\";\n $visitors = db::getnumrows($sql);\n\n $sql = \"SELECT * FROM churchmembers WHERE memberStatus='archived'\";\n $archivedMembers = db::getnumrows($sql);\n\n $totalMembers = 0;\n $totalMembers = $members + $nonMembers + $contact + $visitors + $archivedMembers;\n\n if($totalMembers != 0){\n $membersPercentage = ceil(($members/$totalMembers)*100);\n $nonMembersPercentage = ceil(($nonMembers/$totalMembers)*100);\n $contactPercentage = ceil(($contact/$totalMembers)*100);\n $visitorsPercentage = ceil(($visitors/$totalMembers)*100);\n $archivedMembersPercentage = ceil(($archivedMembers/$totalMembers)*100);\n\n $memberNonMemberStats .= \"<img src=\\\"http://chart.apis.google.com/chart?cht=p&amp;chd=t:$membersPercentage,$nonMembersPercentage,$contactPercentage,$visitorsPercentage,$archivedMembersPercentage&amp;chs=350x100&amp;chl=Members($members)|Non-Members($nonMembers)|Contacts($contact)|Visitors($visitors)|Archived($archivedMembers)&amp;chf=bg,s,efefef00&amp;chco=990099\\\" title=\\\"Storage View\\\" alt=\\\"Storage View\\\" /> \";\n }\n return $memberNonMemberStats;\n \n \n }", "public static function getStats() {\r\n\r\n\t\t\t$dbConn = DatabaseConnection::getConnection();\r\n\t\t\t$sql = 'SELECT status, COUNT(*) AS numJobs\r\n\t\t\t\t\t\tFROM ndoorse_job\r\n\t\t\t\t\t\tWHERE status > :status\r\n\t\t\t\t\t\tGROUP BY status';\r\n\t\t\t$stmt = $dbConn->prepareStatement($sql);\r\n\t\t\t$stmt->bindParameter('status', self::STATUS_INACTIVE);\r\n\t\t\t$result = $stmt->execute();\r\n\r\n\t\t\t$output = array('active'=>0, 'pending'=>0, 'total'=>0);\r\n\t\t\tif($result instanceof Resultset && $result->hasRows()) {\r\n\t\t\t\twhile($row = $result->nextRow()) {\r\n\t\t\t\t\tif($row['status'] == self::STATUS_ACTIVE) {\r\n\t\t\t\t\t\t$output['active'] = $row['numJobs'];\r\n\t\t\t\t\t\t$output['total'] += $row['numJobs'];\r\n\t\t\t\t\t} else if($row['status'] == self::STATUS_AWAITINGAPPROVAL) {\r\n\t\t\t\t\t\t$output['pending'] = $row['numJobs'];\r\n\t\t\t\t\t\t$output['total'] += $row['numJobs'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$sql = 'SELECT COUNT(DISTINCT jobID) AS recent\r\n\t\t\t\t\tFROM ndoorse_job\r\n\t\t\t\t\t WHERE `status` > :status AND datePosted >= date_sub(curdate(), interval WEEKDAY(curdate()) day)';\r\n\t\t\t$stmt = $dbConn->prepareStatement($sql);\r\n\t\t\t$stmt->bindParameter('status', self::STATUS_INACTIVE);\r\n\t\t\t$result = $stmt->execute();\r\n\t\t\tif($result instanceof Resultset && $result->hasRows()) {\r\n\t\t\t\t$output = array_merge($output, $result->nextRow());\r\n\t\t\t} else {\r\n\t\t\t\t$output['recent'] = 0;\r\n\t\t\t}\r\n\r\n\t\t\treturn $output;\r\n\r\n\t\t}", "public function getStatistics()\n {\n return $this->data['stats'];\n }", "public function getStatistics()\n {\n return $this->data['stats'];\n }", "public function stats() {\n\t\t$res = [];\n\n\t\t$list = $this->find('all', ['fields' => ['COUNT(*) as count', 'country_id'], 'group' => 'country_id']);\n\n\t\tforeach ($list as $x) {\n\t\t\t$res[$x['country_id']] = $x[0]['count'];\n\t\t}\n\n\t\treturn $res;\n\t}", "function _stats()\n\t{\n\t\t$title=get_page_title('CUSTOM_PROFILE_FIELD_STATS');\n\n\t\tbreadcrumb_set_parents(array());\n\n\t\t$f_name='field_'.strval(get_param_integer('id'));\n\t\t$_a=get_input_date('start');\n\t\t$a=is_null($_a)?'1=1':('m_join_time>'.strval((integer)$_a));\n\t\t$_b=get_input_date('end');\n\t\t$b=is_null($_b)?'1=1':('m_join_time<'.strval((integer)$_b));\n\t\t$members_in_range=$GLOBALS['FORUM_DB']->query('SELECT '.$f_name.',COUNT('.$f_name.') AS cnt FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_members m LEFT JOIN '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_member_custom_fields f ON m.id=f.mf_member_id WHERE '.$a.' AND '.$b.' GROUP BY '.$f_name.' ORDER BY cnt',300/*reasonable limit*/);\n\t\tif (count($members_in_range)==300) attach_message(do_lang_tempcode('TOO_MUCH_CHOOSE__TOP_ONLY',escape_html(integer_format(300))),'warn');\n\t\t$lines=new ocp_tempcode();\n\t\tforeach ($members_in_range as $row)\n\t\t{\n\t\t\tif (!is_null($row[$f_name]))\n\t\t\t{\n\t\t\t\t$val=$row[$f_name];\n\n\t\t\t\tif ($val==STRING_MAGIC_NULL) continue;\n\n\t\t\t\t$lines->attach(do_template('OCF_CPF_STATS_LINE',array('CNT'=>integer_format($row['cnt']),'VAL'=>is_integer($val)?integer_format($val):$val)));\n\t\t\t}\n\t\t}\n\t\tif ($lines->is_empty()) warn_exit(do_lang_tempcode('NO_DATA'));\n\n\t\treturn do_template('OCF_CPF_STATS_SCREEN',array('_GUID'=>'bb7be7acf936cd008e16bd515f7f39ac','TITLE'=>$title,'STATS'=>$lines));\n\t}", "public function stats() {\n $result = [];\n $query = new \\Peyote\\Select('images');\n $query->columns('COUNT(*)');\n $result['images'] = $this->db->fetch($query)[0]['COUNT(*)'];\n $query = new \\Peyote\\Select('resources');\n $query->columns('COUNT(*)')\n ->where('type', '=', 'report');\n $result['reports'] = $this->db->fetch($query)[0]['COUNT(*)'];\n $query = new \\Peyote\\Select('images');\n $query->columns('COUNT(*)')\n ->where('approved', '=', 1);\n $result['approved'] = $this->db->fetch($query)[0]['COUNT(*)'];\n return $result;\n }", "function get_histogram($table, $assembly, $left, $right, $bases, $pixels)\n{\n\n\t// if ($table[0] == '+')\n\t// {\n\t// \t$table = substr($table,1);\n\t// };\n\t$query = \"select start, end, counts from $table where (assembly='chr$assembly' or assembly='$assembly') and (start <= $right) and (end >= $left)\";\n\t\n\t// bases=100, pixels=1\n\tif (cache_exists($query)) cache_stream($query);\n\n\t$result = array();\n\t$unit = round($bases / $pixels);\n\t$d = query($query);\n\t$strand = '+';\n\t\n\twhile ($r = mysql_fetch_row($d))\n\t{\n\t\t$start = $r[0]+0;\n\t\t$end = $r[1]+0;\n\t\t$count = $r[2]+0;\n\t\t$class = 'count';\n\n\t\t$lenA = $end-$start+1;\n\t\t$lenB = 0;\n\n\t\t//If the class is new then create a series to represent it\n\t\tif (!isset($result[$class]))\n\t\t{\n\t\t\t$result[$class] = array();\n\t\t}\n\n\t\t//Determine the range of x positions covered by the read\n\t\t$a1 = floor($start * $pixels / $bases);\n\t\t$b2 = ceil($end * $pixels / $bases);\n\t\t\n\t\t//For each of the x positions, convert to a genome position and add to the count\n\t\tfor ($x=$a1; $x<=$b2; $x++)\n\t\t{\n\t\t\t// if ($x > $a2 && $x < $b1) continue;\n\t\t\t\n\t\t\t$gpos = $x * $bases / $pixels;\n\t\t\n\t\t\tif (!isset($result[$class][\"$gpos\"]))\n\t\t\t{\n\t\t\t\t$result[$class][\"$gpos\"] = array($gpos,0,0);\n\t\t\t}\n\t\t\t\n\t\t\t// $amt = 0;\n\t\t\t\n\t\t\t// if ($gpos < $start)\n\t\t\t// {\n\t\t\t// \t$amt = $gpos + $unit - $start;\n\t\t\t// }\n\t\t\t// else if ($gpos + $unit > $end && $gpos < $end)\n\t\t\t// {\n\t\t\t// \t$amt = $end - $gpos;\n\t\t\t// }\n\t\t\t// else\n\t\t\t// {\n\t\t\t// \t$amt = $unit;\n\t\t\t// }\n\t\t\t\n\t\t\t$amt = $count;\n\t\t\t// $amt *= $count;\n\t\t\t$amt = round($amt/($bases/$pixels));\n\t\t\t\n\n\t\t\tif ($strand == '+')\n\t\t\t{\n\t\t\t\t$result[$class][\"$gpos\"][1] += $amt;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$result[$class][\"$gpos\"][2] += $amt;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//Simplify the data stream\n\tforeach ($result as $class => $data)\n\t{\n\t\t$clean = array();\n\t\t\n\t\tforeach ($data as $datum)\n\t\t{\n\t\t\t$clean[] = $datum;\n\t\t}\n\t\t$result[$class] = $clean;\n\t}\n\n\t//Create cache and stream to user\n\tcache_create($query, $result, true, $table);\n}", "public function loadCampaignStatistics(): array\n {\n $campaign = $this->getCampaignById(request()->campaign_id);\n return [\n 'campaign_title' => $campaign ? $campaign->name : '',\n 'games' => $campaign ? $this->populateGamesStatistics($campaign->games) : []\n ];\n }", "final public function all(): array\n {\n return $this->stats;\n }", "public function get_stats() {\n global $CFG, $DB;\n\n $convenors = $DB->count_records('tmp_connect_enrolments', array(\n 'role' => 'sds_convenor'\n ));\n\n $teachers = $DB->count_records('tmp_connect_enrolments', array(\n 'role' => 'sds_teacher'\n ));\n\n $students = $DB->count_records('tmp_connect_enrolments', array(\n 'role' => 'sds_student'\n ));\n\n $total = ($convenors + $teachers + $students);\n\n echo \" - $total enrolments found.\\n\";\n echo \" - $convenors convenors\\n\";\n echo \" - $teachers teachers\\n\";\n echo \" - $students students\\n\";\n\n return array($total, $convenors, $teachers, $students);\n }", "public function getStatistics(){\n\t\t\t\treturn json_decode(self::getClient()->getStatistics($this->getDomain()));\n\t\t\t}", "public function getMonthlyStatistics()\n\t{\n $affiliates[$this->columns['monthly'][0]] = DB::table($this->aggregated_table)->select($this->columns['monthly'][0])\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->orderBy('revenue','desc')\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->take($this->limit)\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->get();\n\n $affiliates = $this->getAffiliateDetails($affiliates);\n return $affiliates;\n\t}", "public function stats() {\n\t\t$stats = $this->getStats();\n\n\t\techo '<p>';\n\t\techo \"<strong>Cache Hits:</strong> {$stats['cache_hits']}<br />\";\n\t\techo \"<strong>Cache Misses:</strong> {$stats['cache_misses']}<br />\";\n\t\techo '</p>';\n\n\t\techo \"<p><strong>Groups:</strong></p>\";\n\t\techo '<ul>';\n\n\t\t$groups = $this->cache;\n\t\tksort( $groups );\n\t\tforeach ( $groups as $group => $cache ) {\n\t\t\tprintf(\n\t\t\t\t\"<li><code>%s</code> (%s&ndash;%s, %sk)</li>\",\n\t\t\t\tesc_html( $group ),\n\t\t\t\tisset( $this->cache_hits[ $group ] ) ? $this->cache_hits[ $group ] : 0,\n\t\t\t\tisset( $this->cache_misses[ $group ] ) ? $this->cache_misses[ $group ] : 0,\n\t\t\t\tnumber_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 )\n\t\t\t);\n\t\t}\n\t\techo '</ul>';\n\t}", "function draw_stats($args = false, $property = false)\n {\n global $wp_properties, $post;\n\n if (!$property) {\n $property = $post;\n }\n\n $property = prepare_property_for_display($property, false, false);\n\n if (is_array($property)) {\n $property = WPP_F::array_to_object($property);\n }\n\n $defaults = array(\n 'sort_by_groups' => 'false',\n 'display' => 'dl_list',\n 'show_true_as_image' => 'false',\n 'make_link' => 'true',\n 'hide_false' => 'false',\n 'first_alt' => 'false',\n 'return_blank' => 'false',\n 'include' => '',\n 'exclude' => '',\n 'make_terms_links' => 'false',\n 'include_taxonomies' => 'false',\n 'include_clsf' => 'attribute', // Show attributes or meta ( details ). Available value: \"detail\"\n 'stats_prefix' => sanitize_key(WPP_F::property_label('singular'))\n );\n\n if (!empty($wp_properties['configuration']['property_overview']['sort_stats_by_groups'])) {\n $defaults['sort_by_groups'] = $wp_properties['configuration']['property_overview']['sort_stats_by_groups'];\n }\n\n if (!empty($wp_properties['configuration']['property_overview']['show_true_as_image'])) {\n $defaults['show_true_as_image'] = $wp_properties['configuration']['property_overview']['show_true_as_image'];\n }\n\n extract($args = wp_parse_args($args, $defaults), EXTR_SKIP);\n\n $property_stats = array();\n $groups = isset($wp_properties['property_groups']) ? (array)$wp_properties['property_groups'] : array();\n\n /**\n * Determine if we should draw meta data.\n * The functionality below is related to WPP2.0\n * Now it just adds compatibility with new Denali versions\n */\n if ($args['include_clsf'] === 'detail') {\n $sort_by_groups = 'false';\n if (!empty($wp_properties['property_meta'])) {\n foreach ($wp_properties['property_meta'] as $k => $v) {\n if ($k == 'tagline') {\n continue;\n }\n if (!empty($property->$k)) {\n $property_stats[$k] = array('label' => $v, 'value' => $property->$k);\n }\n }\n }\n } else {\n $property_stats = WPP_F::get_stat_values_and_labels($property, array('label_as_key' => 'false'));\n }\n\n /* Extend $property_stats with property taxonomy */\n if (($args['include_taxonomies'] === 'true' || $args['include_taxonomies'] === true) && !empty($wp_properties['taxonomies']) && is_array($wp_properties['taxonomies'])) {\n foreach ($wp_properties['taxonomies'] as $taxonomy => $data) {\n if ($data['public'] && empty($wp_properties['taxonomies'][$taxonomy]['hidden']))\n $property_stats[$taxonomy] = array('label' => $data['label'], 'value' => $property->$taxonomy);\n }\n }\n\n /** Include only passed attributes */\n if (!empty($include)) {\n $include = !is_array($include) ? explode(',', $include) : $include;\n foreach ((array)$property_stats as $k => $v) {\n if (!in_array($k, $include)) {\n unset($property_stats[$k]);\n }\n }\n }\n\n /** Exclude specific attributes from list */\n if (!empty($exclude)) {\n $exclude = !is_array($exclude) ? explode(',', $exclude) : $exclude;\n foreach ($exclude as $k) {\n if (isset($property_stats[$k])) {\n unset($property_stats[$k]);\n }\n }\n }\n\n if (empty($property_stats)) {\n return false;\n }\n\n //* Prepare values before display */\n $property_stats = apply_filters('wpp::draw_stats::attributes', $property_stats, $property, $args);\n\n $stats = array();\n\n foreach ($property_stats as $tag => $data) {\n\n if (empty($data['value'])) {\n continue;\n }\n\n $value = $data['value'];\n\n $attribute_data = UsabilityDynamics\\WPP\\Attributes::get_attribute_data($tag);\n\n //print_r($attribute_data);\n //** Do not show attributes that have value of 'value' if enabled */\n if ($args['hide_false'] == 'true' && $value == 'false') {\n continue;\n }\n\n //* Skip blank values (check after filters have been applied) */\n if ($args['return_blank'] == 'false' && empty($value)) {\n continue;\n }\n\n if (!is_array($value))\n $value = html_entity_decode($value);\n\n if (is_array($value) && isset($attribute_data['data_input_type']) && ($attribute_data['data_input_type'] == 'image_advanced' || $attribute_data['data_input_type'] == 'image_upload')) {\n $imgs = implode(',', $value);\n $img_html = do_shortcode(\"[gallery ids='$imgs']\");\n $value = \"<ul>\" . $img_html . \"</ul>\";\n } elseif (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'oembed') {\n $value = wp_oembed_get(trim($value));\n } elseif (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'date') {\n $value = date_i18n(get_option('date_format'), strtotime($value));\n } elseif (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'datetime') {\n $value = date_i18n(get_option('date_format') . \" \" . get_option('time_format'), strtotime($value));\n } elseif (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'time') {\n $value = date_i18n(get_option('time_format'), strtotime($value));\n } elseif (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'file_advanced') {\n wp_enqueue_style('front-file-style', ud_get_wp_property()->path('static/styles/fields/front-file.css'), array(), ud_get_wp_property('version'));\n\n $file_html = '';\n $imgs = array();\n $files = array();\n foreach ($value as $file) {\n $isIMG = wp_attachment_is_image($file);\n if ($isIMG) {\n $imgs[] = $file;\n } else {\n $files[] = $file;\n }\n }\n\n if (count($imgs)) {\n $imgs = implode(\",\", $imgs);\n $file_html .= do_shortcode(\"[gallery ids='$imgs']\");\n }\n\n if (count($files)) {\n foreach ($files as $file) {\n $li = '\n <li id=\"item_%s\">\n <div class=\"rwmb-icon\">%s</div>\n <div class=\"rwmb-info\">\n <a href=\"%s\" target=\"_blank\">%s</a>\n <p>%s</p>\n </div>\n </li>';\n $mime_type = get_post_mime_type($file);\n $file_html .= sprintf(\n $li,\n $file,\n @wp_get_attachment_image($file, array(60, 60), true), // Wp genereate warning if image not found.\n wp_get_attachment_url($file),\n get_the_title($file),\n $mime_type\n );\n }\n }\n\n $value = \"<ul class='rwmb-file'>\" . $file_html . \"</ul>\";\n }\n\n // Taxonomies. Adding terms link, only if multi-value taxonomy.\n if (isset($attribute_data['storage_type']) && $attribute_data['storage_type'] == 'taxonomy' && isset($attribute_data['multiple']) && $attribute_data['multiple']) {\n\n $terms = wp_get_post_terms($property->ID, $tag);\n if (count($terms) == 0 || is_wp_error($terms)) {\n continue;\n }\n\n $value = \"<ul>\";\n\n foreach ($terms as $key => $term) {\n $term_link = $term->name;\n if (isset($make_terms_links) && $make_terms_links == \"true\") {\n $term_link = \"<a href='\" . get_term_link($term->term_id, $tag) . \"'>{$term->name}</a>\";\n }\n $value .= \"<li class='property-terms property-term-{$term->slug}'>$term_link</li>\";\n }\n\n $value .= \"</ul>\";\n\n }\n\n if ($tag == \"property_type\" || $tag == \"wpp_listing_type\") {\n $terms = wp_get_post_terms($property->ID, \"wpp_listing_type\");\n if (count($terms) && !is_wp_error($terms)) {\n foreach ($terms as $key => $term) {\n $value = \"<a href='\" . get_term_link($term->term_id, \"wpp_listing_type\") . \"'>{$term->name}</a>\";\n }\n }\n }\n\n //** Single \"true\" is converted to 1 by get_properties() we check 1 as well, as long as it isn't a numeric attribute */\n if (isset($attribute_data['data_input_type']) && $attribute_data['data_input_type'] == 'checkbox' && in_array(strtolower($value), array('true', '1', 'yes'))) {\n if ($args['show_true_as_image'] == 'true') {\n $value = '<div class=\"true-checkbox-image\"></div>';\n } else {\n $value = __('Yes', ud_get_wp_property()->domain);\n }\n } else if ($value == 'false') {\n if ($args['show_true_as_image'] == 'true') {\n continue;\n }\n $value = __('No', ud_get_wp_property()->domain);\n }\n\n //* Make URLs into clickable links */\n $label = $data['label'];\n if (is_array($value)) {\n if ($args['make_link'] == 'true') {\n $link_value = array();\n foreach ($value as $val) {\n if (WPP_F::isURL($val)) {\n $link = \"<a href='{$val}' title='{$label}' target='_blank'>{$label}</a>\";\n } else {\n $term = get_term_by('name', $val, $tag);\n if ($term && !is_wp_error($term)) {\n $term_url = get_term_link($term->term_taxonomy_id, $term->taxonomy);\n if (!is_wp_error($term_url)) {\n $link = \"<a href='{$term_url}' title='{$term->name}'>{$term->name}</a>\";\n }\n } else {\n $link = $val;\n }\n }\n array_push($link_value, $link);\n }\n $value = $link_value;\n }\n $value = implode(', ', $value);\n } else {\n if ($args['make_link'] == 'true') {\n if (WPP_F::isURL($value)) {\n $value = str_replace('&ndash;', '-', $value);\n $value = \"<a href='{$value}' title='{$label}' target='_blank'>{$value}</a>\";\n } else {\n $term = get_term_by('name', $value, $tag);\n if($term && !is_wp_error($term)){\n $term_url = get_term_link($term->term_taxonomy_id, $term->taxonomy);\n if (!is_wp_error($term_url)) {\n $value = \"<a href='{$term_url}' title='{$term->name}'>{$term->name}</a>\";\n }\n }\n }\n }\n }\n\n //* Make emails into clickable links */\n if ($args['make_link'] == 'true' && WPP_F::is_email($value)) {\n $value = \"<a href='mailto:{$value}'>{$value}</a>\";\n }\n\n $data['value'] = $value;\n $stats[$tag] = $data;\n }\n\n if (empty($stats)) {\n return false;\n }\n\n if ($args['display'] == 'array') {\n\n if ($args['sort_by_groups'] == 'true' && is_array($groups)) {\n\n $stats = sort_stats_by_groups($stats);\n\n foreach ($stats as $gslug => $gstats) {\n\n foreach ($gstats as $tag => $data) {\n $data['label'] = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $data['value'] = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : apply_filters('wpp::attribute::value', $data['value'], $tag);\n $gstats[$tag] = $data;\n }\n\n $stats[$gslug] = $gstats;\n }\n\n } else {\n\n foreach ($stats as $tag => $data) {\n $data['label'] = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $data['value'] = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : apply_filters('wpp::attribute::value', $data['value'], $tag);\n $stats[$tag] = $data;\n }\n\n }\n\n return $stats;\n\n }\n\n $alt = $args['first_alt'] == 'true' ? \"\" : \"alt\";\n\n //** Disable regular list if groups are NOT enabled, or if groups is not an array */\n if ($args['sort_by_groups'] != 'true' || !is_array($groups)) {\n\n if (!WPP_LEGACY_WIDGETS) echo '<div class=\"wpp_features_box wpp_features_box_without_groups\">'; // for v2 widget\n\n foreach ($stats as $tag => $data) {\n\n $label = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $value = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : apply_filters('wpp::attribute::value', $data['value'], $tag);\n $alt = ($alt == \"alt\") ? \"\" : \"alt\";\n\n switch ($args['display']) {\n case 'dl_list':\n ?>\n <dt\n class=\"<?php echo $args['stats_prefix']; ?>_<?php echo $tag; ?> wpp_stat_dt_<?php echo $tag; ?>\"><?php echo $label; ?>\n <span class=\"wpp_colon\">:</span></dt>\n <dd\n class=\"<?php echo $args['stats_prefix']; ?>_<?php echo $tag; ?> wpp_stat_dd_<?php echo $tag; ?> <?php echo $alt; ?>\"><?php echo $value; ?>\n &nbsp;</dd>\n <?php\n break;\n case 'list':\n ?>\n <li\n class=\"<?php echo $args['stats_prefix']; ?>_<?php echo $tag; ?> wpp_stat_plain_list_<?php echo $tag; ?> <?php echo $alt; ?>\">\n <span class=\"attribute\"><?php echo $label; ?><span class=\"wpp_colon\">:</span></span>\n <span class=\"value\"><?php echo $value; ?>&nbsp;</span>\n </li>\n <?php\n break;\n case 'plain_list':\n ?>\n <span class=\"<?php echo $args['stats_prefix']; ?>_<?php echo $tag; ?> attribute\"><?php echo $label; ?>\n :</span>\n <span class=\"<?php echo $args['stats_prefix']; ?>_<?php echo $tag; ?> value\"><?php echo $value; ?>\n &nbsp;</span>\n <br/>\n <?php\n break;\n case 'detail':\n ?>\n <h4 class=\"wpp_attribute\"><?php echo $label; ?><span class=\"separator\">:</span></h4>\n <p class=\"value\"><?php echo $value; ?>&nbsp;</p>\n <?php\n break;\n }\n }\n\n if (!WPP_LEGACY_WIDGETS) echo '</div>'; // for v2 widget\n\n } else {\n\n $stats_by_groups = sort_stats_by_groups($stats);\n $main_stats_group = $wp_properties['configuration']['main_stats_group'];\n\n if (!WPP_LEGACY_WIDGETS) echo '<div class=\"wpp_features_box\">'; // for v2 widget\n\n foreach ($stats_by_groups as $gslug => $gstats) {\n ?>\n <div class=\"wpp_feature_list\">\n <?php\n if ($main_stats_group != $gslug || !@array_key_exists($gslug, $groups)) {\n $group_name = (@array_key_exists($gslug, $groups) ? $groups[$gslug]['name'] : __('Other', ud_get_wp_property()->domain));\n ?>\n <h2 class=\"wpp_stats_group\"><?php echo $group_name; ?></h2>\n <?php\n }\n\n switch ($args['display']) {\n case 'dl_list':\n ?>\n <dl class=\"wpp_property_stats overview_stats\">\n <?php foreach ($gstats as $tag => $data) : ?>\n <?php\n $label = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $value = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : $data['value'];\n ?>\n <?php $alt = ($alt == \"alt\") ? \"\" : \"alt\"; ?>\n <dt\n class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dt_<?php echo $tag; ?>\"><?php echo $label; ?></dt>\n <dd\n class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dd_<?php echo $tag; ?> <?php echo $alt; ?>\"><?php echo $value; ?>\n &nbsp;</dd>\n <?php endforeach; ?>\n </dl>\n <?php\n break;\n case 'list':\n ?>\n <ul class=\"overview_stats wpp_property_stats list\">\n <?php foreach ($gstats as $tag => $data) : ?>\n <?php\n $label = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $value = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : apply_filters('wpp::attribute::value', $data['value'], $tag);\n $alt = ($alt == \"alt\") ? \"\" : \"alt\";\n ?>\n <li\n class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_plain_list_<?php echo $tag; ?> <?php echo $alt; ?>\">\n <span class=\"attribute\"><?php echo $label; ?>:</span>\n <span class=\"value\"><?php echo $value; ?>&nbsp;</span>\n </li>\n <?php endforeach; ?>\n </ul>\n <?php\n break;\n case 'plain_list':\n foreach ($gstats as $tag => $data) {\n $label = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $value = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : $data['value'];\n if (WPP_LEGACY_WIDGETS) { // If use old widget\n ?>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> attribute\"><?php echo $label; ?>\n :</span>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> value\"><?php echo $value; ?>\n &nbsp;</span>\n <br/>\n <?php\n } else {\n ?>\n <div class=\"wpp_attribute_row\">\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> attribute\"><?php echo $label; ?>\n :</span>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> value\"><?php echo $value; ?>\n &nbsp;</span>\n </div>\n <?php\n }\n }\n break;\n case 'detail':\n foreach ($gstats as $tag => $data) {\n $label = apply_filters('wpp::attribute::label', $data['label']);\n //check if the tag is property type to get the translated value for it\n $value = ($tag == 'property_type') ? apply_filters('wpp_stat_filter_property_type', $data['value']) : $data['value'];\n if (WPP_LEGACY_WIDGETS) { // If use old widget\n ?>\n <strong class=\"wpp_attribute <?php echo $stats_prefix; ?>_<?php echo $tag; ?>\"><?php echo $label; ?>\n <span class=\"separator\">:</span></strong>\n <p class=\"value\"><?php echo $value; ?>&nbsp;</p>\n <br/>\n <?php\n } else {\n ?>\n <div class=\"wpp_attribute_row\">\n <strong\n class=\"wpp_attribute <?php echo $stats_prefix; ?>_<?php echo $tag; ?>\"><?php echo $label; ?>\n <span class=\"separator\">:</span></strong>\n <p class=\"value\"><?php echo $value; ?>&nbsp;</p>\n </div>\n <?php\n }\n }\n ?>\n <?php\n break;\n }\n ?>\n </div>\n <?php\n }\n\n if (!WPP_LEGACY_WIDGETS) echo '</div>'; // for v2 widget\n\n }\n\n }", "public static function generateYoungMembersReport() {\n /** @var ElggUser[] $allUnbannedUsers */\n $allUnbannedUsers = elgg_get_entities([\n 'type' => 'user',\n 'subtype' => 'user',\n 'metadata_name_value_pairs' => [\n [\n 'name' => 'banned',\n 'value' => 'no',\n 'operand' => '='\n ]\n ],\n 'limit' => '0'\n ]);\n $report = [];\n foreach ($allUnbannedUsers as $user) {\n // Check if the member is a teen\n $birthday = date_create_from_format(\"Y-m-d\", $user->getProfileData('birthday'));\n if (!$birthday) {\n $birthday = date_create_from_format(\"d.m.Y\", $user->getProfileData('birthday'));\n }\n $diff = date_diff($birthday, new \\DateTime());\n if ($diff and $diff->y < 18) {\n [$givenName, $name] = self::splitName($user->username);\n array_push($report, [\n ucfirst($givenName),\n ucfirst($name),\n $user->getDisplayName(),\n $user->getProfileData(\"street\"),\n $user->getProfileData(\"zip\"),\n $user->getProfileData(\"city\"),\n $user->getProfileData(\"telephone\"),\n $user->getProfileData(\"mobile\"),\n $user->email,\n $birthday->format('Y-m-d'),\n $diff->y\n ]);\n }\n }\n\n return $report;\n }", "public function getHistogram(){\n\n $this->feed_url = $this->feed_bin['otter'];\n $this->query = 'searchhistogram.json';\n $this->query .= '?q=from:'.$this->handle;\n $this->query .= '&slice='.$this->slice;\n $this->query .= '&period='.$this->period;\n\n $this->get();\n\n }", "public function getTotalMembers() {\n\t\treturn quickQuery('SELECT COUNT(*) as result FROM ' . sql_table('profile') . ' WHERE ptype=\"4700\"');\n\t}", "public function visitorStatsSummary()\n {\n $visits1w = VisitStats::query()->visits()\n ->except(['ajax', 'bots'])\n ->period(Carbon::now()->subDays(7))->unique()->count();\n\n $visits1m = VisitStats::query()->visits()\n ->except(['ajax', 'bots'])\n ->period(Carbon::now()->subMonth(1))->unique()->count();;\n\n $visits1y = VisitStats::query()->visits()\n ->except(['ajax', 'bots'])\n ->period(Carbon::now()->subYears(1))->unique()->count();;\n\n $total_unique = VisitStats::query()->visits()->except(['ajax', 'bots'])->unique()->count();\n $online_now = VisitStats::query()->visits()\n ->except(['ajax', 'bots'])\n ->period(Carbon::now()->subMinutes(30))->unique()->count();\n\n\n return ['this_week' => $visits1w, 'this_month' => $visits1m, 'this_year' => $visits1y, 'total_unique' => $total_unique, 'online_now' => $online_now ];\n\n }", "public static function &getStatistics()\r\n\t{\r\n\t\treturn self::getClassInstance('AEUtilStatistics');\r\n\t}", "public function actuals()\n {\n // Columns to pull from the DB\n $properties = $this->metrics;\n\n $query = $this->query();\n $query = $query->whereIn('program', $this->programs);\n $query = $this->checkInitiative($query);\n $query = $query->get();\n\n $query = $this->addKeys($query);\n\n $returnArray = [];\n\n foreach ($query as $c) {\n $key = $c->key;\n\n if (!array_key_exists($key, $returnArray)) {\n $returnArray[$key] = $this->createElement($key);\n }\n\n $yearMonth = $this->timeIndex($c);\n\n // Add Monthly Values to all properties\n foreach ($properties as $prop) {\n if (substr($yearMonth, 0, 4) >= 2017) {\n $returnArray[$key]->$prop[$yearMonth] += $c->$prop;\n }\n }\n }\n\n return $returnArray;\n }", "function calculate_statistics($word_type, $filename, $calculate_total)\n{\n $rows = read_csv($filename);\n\n return array(\n 'type' => $word_type,\n 'unique' => count($rows),\n 'all' => $calculate_total? calculate_total($rows) : 'n/a',\n );\n}", "public function getStatistics()\n\t{\n\t\t$sql = 'SELECT COUNT(*)\n\t\t\t\tFROM Functions';\n\t\t$function_count = $this->db->fetchValue($sql);\n\n\t\treturn array(\n\t\t\t'Functions' => $function_count,\n\t\t);\n\t}", "function statsOverview(DataSet $logs) {\n\t$items = array_count_values($logs->getColumn('title'));\n\n //Sort by the title of the entry\n ksort($items);\n\n //Map the associative array to be displayed in the table\n array_walk($items, function (&$value, $key) {\n $value = ['name' => $key, 'value' => $value];\n });\n\n return $items;\n}", "private function stats() {\n DatabaseConnection::getInstance();\n $viciousResult = DatabaseConnection::$pdo->query('SELECT stat_result from past_stats where id = 4');\n $todaysViciousKiller = $viciousResult->fetchColumn();\n $stats = [];\n\n $stats['vicious_killer'] = $todaysViciousKiller;\n $playerCount = DatabaseConnection::$pdo->query(\"SELECT count(player_id) FROM players WHERE active = 1\");\n $stats['player_count'] = $playerCount->fetchColumn();\n\n return $stats;\n }", "public function callUsageStat(): array\n {\n $response = $this->call('GET', 'usage/stat');\n $items = $response->getPayload();\n $result = [];\n\n if (!empty($items) && is_array($items)) {\n foreach ($items as $_item) {\n if (isset($_item->spentChannels)) {\n $result[] = new Models\\UsageStatItemStat($_item);\n } elseif (isset($_item->spentObjects)) {\n $result[] = new Models\\UsageStatItemCallback($_item);\n } elseif (isset($_item->spentWords)) {\n $result[] = new Models\\UsageStatItemSearch($_item);\n }\n }\n }\n\n return $result;\n }", "function get_members()\n\t{\n\t\treturn $this->connection->query_value('members','COUNT(*)');\n\t}", "public function getStats()\n\t{\n\t\t$this->_stats['count'] = $this->_stats['get'] + $this->_stats['mget'] + $this->_stats['set'] + $this->_stats['add'] + $this->_stats['delete'] + $this->_stats['flush'];\n\t\tif ($this->enableProfiling)\n\t\t{\n\t\t\t$logger = Yii::getLogger();\n\t\t\t$this->_stats['get_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.get'));\n\t\t\t$this->_stats['mget_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.mget'));\n\t\t\t$this->_stats['set_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.set'));\n\t\t\t$this->_stats['add_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.add'));\n\t\t\t$this->_stats['delete_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.delete'));\n\t\t\t$this->_stats['flush_time'] = array_sum($logger->getProfilingResults(null, $this->_logCategory.'.flush'));\n\t\t\t$this->_stats['time'] = $this->_stats['get_time'] + $this->_stats['mget_time'] + $this->_stats['set_time'] + $this->_stats['delete_time'] + $this->_stats['flush_time'];\n\t\t}\n\t\treturn $this->_stats;\n\t}", "public function getUserStats($args = array()) {\n\t\t$defaultArgs = array(\n\t\t\t'order_by' => 'quantity',\n\t\t\t'order' => 'DESC',\n\t\t\t'group_by' => 'ip',\n\t\t\t'fields' => array(\n\t\t\t\t'post_id',\n\t\t\t\t'ip',\n\t\t\t\t'COUNT(ip) AS quantity',\n\t\t\t\t'SUM(price) AS amount'\n\t\t\t)\n\t\t);\n\t\t$args = array_merge($defaultArgs, $args);\n\n\t\treturn $this->getResults($args);\n\t}", "public function getStatistics()\n {\n if ($this->cmdexists) {\n //Command invokes nvidia-smi in query all mode with XML return\n $this->stdout = shell_exec(self::CMD_UTILITY . ES . sprintf(self::STATISTICS_PARAM, $this->settings['GPUID']));\n if (!empty($this->stdout) && strlen($this->stdout) > 0) {\n $this->parseStatistics();\n } else {\n $this->pageData['error'][] = Error::get(Error::VENDOR_DATA_NOT_RETURNED);\n }\n } else {\n $this->pageData['error'][] = Error::get(Error::VENDOR_UTILITY_NOT_FOUND);\n }\n }", "public function stats()\n {\n }", "protected function members(): array\n {\n return array_merge(\n $this->meta,\n array_filter([$this->jsonApi, $this->selfLink, $this->relatedLink]),\n );\n }", "public function getGlobalStatisticsForUsers(): array\n {\n return $this\n ->createQueryBuilder('userResponse')\n ->select(\n 'user.id as id',\n 'user.firstname as firstname',\n 'user.lastname as lastname',\n 'COUNT(response) as responseCount',\n 'MAX(userResponse.date) as lastDate'\n )\n ->join('userResponse.user', 'user')\n ->join('userResponse.response', 'response')\n ->join('response.quiz', 'quiz')\n ->groupBy('user.id')\n ->orderBy('responseCount', 'DESC')\n ->getQuery()\n ->getResult()\n ;\n }", "public function getStats() {\n\n }", "public function statistics(){\n $user_count = User::all()->count();\n $newTicket = Ticket::where('status', 'Open')->count();\n $unique_visitors = DB::table('visitlogs')->get()->count();\n $total_subscription = DB::table('subscriptions')->get()->count();\n return ['users' => $user_count, \n 'newTicket' => $newTicket, \n 'unique_visitors' => $unique_visitors,\n 'total_subscription' => $total_subscription\n ];\n\n }", "function draw_stats( $args = false, $property = false ) {\n global $wp_properties, $post;\n\n if ( !$property ) {\n $property = $post;\n }\n\n $property = prepare_property_for_display( $property );\n\n if ( is_array( $property ) ) {\n $property = WPP_F::array_to_object( $property );\n }\n \n $defaults = array(\n 'sort_by_groups' => 'false',\n 'display' => 'dl_list',\n 'show_true_as_image' => 'false',\n 'make_link' => 'true',\n 'hide_false' => 'false',\n 'first_alt' => 'false',\n 'return_blank' => 'false',\n 'include' => '',\n 'exclude' => '',\n 'include_clsf' => 'attribute', // Show attributes or meta ( details ). Available value: \"detail\"\n 'stats_prefix' => sanitize_key( WPP_F::property_label( 'singular' ) )\n );\n \n if( !empty( $wp_properties[ 'configuration' ][ 'property_overview' ][ 'sort_stats_by_groups' ] ) ) {\n $defaults[ 'sort_by_groups' ] = $wp_properties[ 'configuration' ][ 'property_overview' ][ 'sort_stats_by_groups' ];\n }\n \n if( !empty( $wp_properties[ 'configuration' ][ 'property_overview' ][ 'show_true_as_image' ] ) ) {\n $defaults[ 'show_true_as_image' ] = $wp_properties[ 'configuration' ][ 'property_overview' ][ 'show_true_as_image' ];\n }\n\n extract( $args = wp_parse_args( $args, $defaults ), EXTR_SKIP );\n \n $property_stats = array();\n $groups = isset( $wp_properties[ 'property_groups' ] ) ? (array)$wp_properties[ 'property_groups' ] : array();\n\n /**\n * Determine if we should draw meta data.\n * The functionality below is related to WPP2.0\n * Now it just adds compatibility with new Denali versions\n */\n if ( $include_clsf == 'detail' ) {\n $sort_by_groups = 'false';\n foreach ( $wp_properties[ 'property_meta' ] as $k => $v ) {\n if ( $k == 'tagline' ) {\n continue;\n }\n if ( !empty( $property->$k ) ) {\n $property_stats[ $k ] = array( 'label' => $v, 'value' => $property->$k );\n }\n }\n } else {\n $property_stats = WPP_F::get_stat_values_and_labels( $property, array( 'label_as_key' => 'false' ) );\n }\n \n /** Include only passed attributes */\n if( !empty( $include ) ) {\n $include = !is_array( $include ) ? explode( ',', $include ) : $include; \n foreach( $property_stats as $k => $v ) {\n if( !in_array( $k, $include ) ) {\n unset( $property_stats[ $k ] );\n }\n }\n }\n \n /** Exclude specific attributes from list */\n if( !empty( $exclude ) ) {\n $exclude = !is_array( $exclude ) ? explode( ',', $exclude ) : $exclude; \n foreach( $exclude as $k ) {\n if( isset( $property_stats[ $k ] ) ) {\n unset( $property_stats[ $k ] );\n }\n }\n }\n\n if ( empty( $property_stats ) ) {\n return false;\n }\n \n //echo \"<pre>\"; print_r( $property_stats ); echo \"</pre>\"; die();\n\n //* Prepare values before display */\n $property_stats = apply_filters( 'wpp::draw_stats::attributes', $property_stats, $property );\n $stats = array();\n\n foreach ( $property_stats as $tag => $data ) {\n\n if ( empty( $data[ 'value' ] ) ) {\n continue;\n }\n \n $value = $data[ 'value' ];\n\n $attribute_data = UsabilityDynamics\\WPP\\Attributes::get_attribute_data( $tag );\n\n //** Do not show attributes that have value of 'value' if enabled */\n if ( $hide_false == 'true' && $value == 'false' ) {\n continue;\n }\n\n //* Skip blank values (check after filters have been applied) */\n if ( $return_blank == 'false' && empty( $value ) ) {\n continue;\n }\n\n $value = html_entity_decode( $value );\n\n //** Single \"true\" is converted to 1 by get_properties() we check 1 as well, as long as it isn't a numeric attribute */\n if ( isset( $attribute_data[ 'data_input_type' ] ) && $attribute_data[ 'data_input_type' ] == 'checkbox' && in_array( strtolower( $value ), array( 'true', '1', 'yes' ) ) ) {\n if ( $show_true_as_image == 'true' ) {\n $value = '<div class=\"true-checkbox-image\"></div>';\n } else {\n $value = __( 'Yes', ud_get_wp_property()->domain );\n }\n } else if ( $value == 'false' ) {\n if ( $show_true_as_image == 'true' ) {\n continue;\n }\n $value = __( 'No', ud_get_wp_property()->domain );\n }\n\n //* Make URLs into clickable links */\n if ( $make_link == 'true' && WPP_F::isURL( $value ) ) {\n $value = str_replace( '&ndash;', '-', $value );\n $value = \"<a href='{$value}' title='{$label}'>{$value}</a>\";\n }\n\n //* Make emails into clickable links */\n if ( $make_link == 'true' && WPP_F::is_email( $value ) ) {\n $value = \"<a href='mailto:{$value}'>{$value}</a>\";\n }\n\n $data[ 'value' ] = $value;\n $stats[ $tag ] = $data;\n }\n \n if( empty( $stats ) ) {\n return false;\n }\n\n if ( $display == 'array' ) {\n if( $sort_by_groups == 'true' && is_array( $groups ) ) {\n $stats = sort_stats_by_groups( $stats );\n }\n return $stats;\n }\n\n $alt = $first_alt == 'true' ? \"\" : \"alt\";\n\n //** Disable regular list if groups are NOT enabled, or if groups is not an array */\n if ( $sort_by_groups != 'true' || !is_array( $groups ) ) {\n\n foreach ( $stats as $tag => $data ) {\n \n $label = $data[ 'label' ];\n $value = $data[ 'value' ];\n $alt = ( $alt == \"alt\" ) ? \"\" : \"alt\";\n \n switch ( $display ) {\n case 'dl_list':\n ?>\n <dt class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dt_<?php echo $tag; ?>\"><?php echo $label; ?>\n <span class=\"wpp_colon\">:</span></dt>\n <dd class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dd_<?php echo $tag; ?> <?php echo $alt; ?>\"><?php echo $value; ?>\n &nbsp;</dd>\n <?php\n break;\n case 'list':\n ?>\n <li class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_plain_list_<?php echo $tag; ?> <?php echo $alt; ?>\">\n <span class=\"attribute\"><?php echo $label; ?><span class=\"wpp_colon\">:</span></span>\n <span class=\"value\"><?php echo $value; ?>&nbsp;</span>\n </li>\n <?php\n break;\n case 'plain_list':\n ?>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> attribute\"><?php echo $label; ?>:</span>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> value\"><?php echo $value; ?>&nbsp;</span>\n <br/>\n <?php\n break;\n case 'detail':\n ?>\n <h4 class=\"wpp_attribute\"><?php echo $label; ?><span class=\"separator\">:</span></h4>\n <p class=\"value\"><?php echo $value; ?>&nbsp;</p>\n <?php\n break;\n }\n }\n } else {\n\n $stats_by_groups = sort_stats_by_groups( $stats );\n $main_stats_group = $wp_properties[ 'configuration' ][ 'main_stats_group' ];\n\n foreach ( $stats_by_groups as $gslug => $gstats ) {\n ?>\n <div class=\"wpp_feature_list\">\n <?php\n if ( $main_stats_group != $gslug || !@array_key_exists( $gslug, $groups ) ) {\n $group_name = ( @array_key_exists( $gslug, $groups ) ? $groups[ $gslug ][ 'name' ] : __( 'Other', ud_get_wp_property()->domain ) );\n ?>\n <h2 class=\"wpp_stats_group\"><?php echo $group_name; ?></h2>\n <?php\n }\n\n switch ( $display ) {\n case 'dl_list':\n ?>\n <dl class=\"wpp_property_stats overview_stats\">\n <?php foreach ( $gstats as $tag => $data ) : ?>\n <?php\n $label = $data[ 'label' ];\n $value = $data[ 'value' ];\n ?>\n <?php $alt = ( $alt == \"alt\" ) ? \"\" : \"alt\"; ?>\n <dt class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dt_<?php echo $tag; ?>\"><?php echo $label; ?></dt>\n <dd class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_dd_<?php echo $tag; ?> <?php echo $alt; ?>\"><?php echo $value; ?>\n &nbsp;</dd>\n <?php endforeach; ?>\n </dl>\n <?php\n break;\n case 'list':\n ?>\n <ul class=\"overview_stats wpp_property_stats list\">\n <?php foreach ( $gstats as $tag => $data ) : ?>\n <?php\n $label = $data[ 'label' ];\n $value = $data[ 'value' ];\n $alt = ( $alt == \"alt\" ) ? \"\" : \"alt\";\n ?>\n <li class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> wpp_stat_plain_list_<?php echo $tag; ?> <?php echo $alt; ?>\">\n <span class=\"attribute\"><?php echo $label; ?>:</span>\n <span class=\"value\"><?php echo $value; ?>&nbsp;</span>\n </li>\n <?php endforeach; ?>\n </ul>\n <?php\n break;\n case 'plain_list':\n foreach ( $gstats as $tag => $data ) {\n $label = $data[ 'label' ];\n $value = $data[ 'value' ];\n ?>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> attribute\"><?php echo $label; ?>:</span>\n <span class=\"<?php echo $stats_prefix; ?>_<?php echo $tag; ?> value\"><?php echo $value; ?>&nbsp;</span>\n <br/>\n <?php\n }\n break;\n }\n ?>\n </div>\n <?php\n }\n }\n\n }", "public function get_stats()\n\t{\n\t\treturn $this->stats;\n\t}", "function getGeneralCountStats($db) {\n return pg_query($db, \"SELECT header, count\n FROM(\n SELECT 'admins' AS header, COUNT(*), '1' AS idx\n FROM member a\n WHERE is_admin = 1\n UNION\n SELECT 'non-admins', COUNT(*), '2' AS idx\n FROM member m\n WHERE is_admin = 0\n UNION\n SELECT 'total_projects', COUNT(*), '3' AS idx\n FROM advertised_project p\n UNION\n SELECT 'fully_funded', COUNT(*), '4' AS idx\n FROM advertised_project ff\n WHERE status = 1\n UNION\n SELECT 'ongoing', COUNT(*), '5' AS idx\n FROM advertised_project op\n WHERE status = 0\n ) AS subq\n ORDER BY idx;\");\n }", "function get_members()\n\t{\n\t\treturn $this->connection->query_value('users','COUNT(*)');\n\t}", "public function getInfoTypeStatsList(){\n return $this->_get(2);\n }", "public function stats()\n {\n $countMutants = $countHumans = $ratio = 0; \n \n $result = Dna::selectRaw('is_mutant, count(is_mutant) as total')->groupBy('is_mutant')->get();\n\n if ($result) {\n foreach ($result as $item) {\n \n if ($item->is_mutant) {\n $countMutants = $item->total;\n } else {\n $countHumans = $item->total;\n }\n \n }\n }\n \n $data = [\n 'count_mutant_dna' => $countMutants,\n 'count_human_dna' => $countHumans,\n 'ratio' => ($countHumans > 0) ? $countMutants / $countHumans : 0\n ];\n\n return response()->json($data);\n }", "public static function generateAdultMembersReport() {\n /** @var ElggUser[] $allUnbannedUsers */\n $allUnbannedUsers = elgg_get_entities([\n 'type' => 'user',\n 'subtype' => 'user',\n 'metadata_name_value_pairs' => [\n [\n 'name' => 'banned',\n 'value' => 'no',\n 'operand' => '='\n ]\n ],\n 'limit' => '0'\n ]);\n $report = [];\n foreach ($allUnbannedUsers as $user) {\n // Check if the member is a teen\n $birthday = date_create_from_format(\"Y-m-d\", $user->getProfileData('birthday'));\n if (!$birthday) {\n $birthday = date_create_from_format(\"d.m.Y\", $user->getProfileData('birthday'));\n }\n $diff = date_diff($birthday, new \\DateTime());\n if ($diff and $diff->y >= 18) {\n [$givenName, $name] = self::splitName($user->username);\n array_push($report, [\n ucfirst($givenName),\n ucfirst($name),\n $user->getDisplayName(),\n $user->getProfileData(\"street\"),\n $user->getProfileData(\"zip\"),\n $user->getProfileData(\"city\"),\n $user->getProfileData(\"telephone\"),\n $user->getProfileData(\"mobile\"),\n $user->email,\n $birthday->format('Y-m-d'),\n $diff->y\n ]);\n }\n }\n\n return $report;\n }", "public function countMembers() {\n\t\treturn $this->getMembers(array('count' => true));\n\t}", "public function getAllMembers(){\n\t\t try{\n\t\t\t $conn=DBConnection::GetConnection();\n\t\t\t $myQuery=\"SELECT profile_pic,user_name,password,email,name,country,dob,gender,address FROM member\";\n\t\t\t $result=$conn->query($myQuery);\n\t\t\t $mArray=array();\n\t\t\t foreach($result as $member){\n\t\t\t\t $m=new Member();\n\t\t\t\t $m->setCountry($member[\"country\"]);\n\t\t\t\t $m->setDOB($member[\"dob\"]);\n\t\t\t\t $m->setGender($member[\"gender\"]);\n\t\t\t\t $m->setAddress($member[\"address\"]);\t\t\t\t \n\t\t\t\t $m->setName($member[\"name\"]);\n\t\t\t\t $m->setEmail($member[\"email\"]);\n\t\t\t\t $m->setPassword($member[\"password\"]);\n\t\t\t\t $m->setUserName($member[\"user_name\"]);\n\t\t\t\t $m->setImage($member[\"profile_pic\"]);\n\t\t\t\t array_push($mArray,$m);\n\t\t\t }\n\t\t\t $conn=null;\n\t\t\t return $mArray;\n\t\t }catch(PDOException $p){\n\t\t\t echo 'Fail to connect';\n\t\t\t echo $p->getMessage();\n\t\t }\n\t }", "public function getIncidentStatistics(): array;", "public function fillStatistic()\n\t{\n\t\tforeach ($this->questions as &$qs)\n\t\t\tforeach ($qs[\"ANSWERS\"] as &$as)\n\t\t\t\t$as[\"STAT\"] = array();\n\n\t\t$dbRes = \\Bitrix\\Vote\\EventTable::getList(array(\n\t\t\t\"select\" => array(\n\t\t\t\t\"V_\" => \"*\",\n\t\t\t\t\"Q_\" => \"QUESTION.*\",\n\t\t\t\t\"A_\" => \"QUESTION.ANSWER.*\",\n\t\t\t\t\"U_ID\" => \"USER.USER.ID\",\n\t\t\t\t\"U_NAME\" => \"USER.USER.NAME\",\n\t\t\t\t\"U_LAST_NAME\" => \"USER.USER.LAST_NAME\",\n\t\t\t\t\"U_SECOND_NAME\" => \"USER.USER.SECOND_NAME\",\n\t\t\t\t\"U_LOGIN\" => \"USER.USER.LOGIN\",\n\t\t\t\t\"U_PERSONAL_PHOTO\" => \"USER.USER.PERSONAL_PHOTO\",\n\t\t\t),\n\t\t\t\"filter\" => array(\"VOTE_ID\" => $this->id, \"VALID\" => \"Y\"),\n\t\t\t\"order\" => array(\n\t\t\t\t\"USER.USER.LAST_NAME\" => \"ASC\",\n\t\t\t\t\"USER.USER.NAME\" => \"ASC\",\n\t\t\t\t\"USER.USER.LOGIN\" => \"ASC\"\n\t\t\t)\n\t\t));\n\t\twhile ($dbRes && ($res = $dbRes->fetch()))\n\t\t{\n\t\t\tif (array_key_exists($res[\"Q_QUESTION_ID\"], $this->questions) &&\n\t\t\t\tarray_key_exists($res[\"A_ANSWER_ID\"], $this->questions[$res[\"Q_QUESTION_ID\"]][\"ANSWERS\"]))\n\t\t\t{\n\t\t\t\t$stat = &$this->questions[$res[\"Q_QUESTION_ID\"]][\"ANSWERS\"][$res[\"A_ANSWER_ID\"]][\"STAT\"];\n\t\t\t\t$result = array(\n\t\t\t\t\t\"USER\" => array(\n\t\t\t\t\t\t\"ID\" => 0,\n\t\t\t\t\t),\n\t\t\t\t\t\"MESSAGE\" => $res[\"A_MESSAGE\"]\n\t\t\t\t);\n\t\t\t\tif ($this[\"ANONYMITY\"] !== \\Bitrix\\Vote\\Vote\\Anonymity::ANONYMOUSLY &&\n\t\t\t\t\t$res[\"V_VISIBLE\"] == \"Y\" && $res[\"U_ID\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$result[\"USER\"] = array(\n\t\t\t\t\t\t\"ID\" => $res[\"U_ID\"],\n\t\t\t\t\t\t\"NAME\" => $res[\"U_NAME\"],\n\t\t\t\t\t\t\"LAST_NAME\" => $res[\"U_LAST_NAME\"],\n\t\t\t\t\t\t\"SECOND_NAME\" => $res[\"U_SECOND_NAME\"],\n\t\t\t\t\t\t\"LOGIN\" => $res[\"U_LOGIN\"],\n\t\t\t\t\t\t\"PERSONAL_PHOTO\" => $res[\"U_PERSONAL_PHOTO\"],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$stat[$res[\"A_ID\"]] = $result;\n\t\t\t}\n\t\t}\n\t}", "private function graphStats(): array\n {\n $customers = Customer::select(\"id\", \"created_at\")->get()->groupBy(function ($date) {\n return Carbon::parse($date->created_at)->format('m');\n })->collect()->map(function ($items) {\n return $items->count();\n });\n\n $getMonth = function ($date) {\n return date('F', mktime(0, 0, 0, $date, 10));\n };\n\n $result = [];\n foreach ($customers as $key => $val) {\n $composeKey = $key;\n if (array_key_exists($composeKey, $result)) {\n }\n array_push($result, [\n \"period\" => $composeKey,\n \"Customers\" => $val,\n \"Orderings\" => 20\n ]);\n }\n\n return $result;\n }", "public function stats()\n {\n $ret = '';\n $ret .= '<p>';\n $ret .= \"<strong>Cache Hits:</strong> {$this->cache_hits}<br />\";\n $ret .= \"<strong>Cache Misses:</strong> {$this->cache_misses}<br />\";\n $ret .= '</p>';\n $ret .= '<ul>';\n $total = 0;\n foreach ($this->cache as $group => $cache) {\n $ret .= '<li><strong>Group:</strong> '.esc_html($group).' - ( '.number_format(\\strlen(serialize($cache)) / KB_IN_BYTES, 2).'K )</li>';\n $total += \\strlen(serialize($cache));\n }\n $ret .= '</ul>';\n echo '<p>total: '.number_format($total / KB_IN_BYTES).'</p>';\n echo $ret;\n }", "public function getMemberArr() {\n return $this->member_arr;\n }", "private function buildSimpleMetrics(): array\n {\n $userAgentPart = explode('/', $this->headers['User-Agent'], 2);\n $metrics = $this->getConfig('metrics');\n\n return [\n 'bouncers' => [\n [\n 'last_pull' => $metrics['bouncer']['last_pull'] ?? $this->formatDate(null),\n 'custom_name' => $metrics['bouncer']['custom_name'] ?? $userAgentPart[0],\n 'name' => self::BOUNCER_NAME,\n 'version' => $metrics['bouncer']['version'] ?? $userAgentPart[1],\n ],\n ],\n 'machines' => [\n [\n 'last_update' => $metrics['machine']['last_update'] ?? $this->formatDate(null),\n 'name' => $metrics['machine']['name'] ?? $userAgentPart[0],\n 'last_push' => $metrics['machine']['last_push'] ?? $this->formatDate(null),\n 'version' => $metrics['machine']['version'] ?? $userAgentPart[1],\n ],\n ],\n ];\n }", "public function getLifetimeStats() {\n if(!$this->isPublic()) {\n return;\n }\n\n if(empty($this->lifetimeStats)) {\n parent::getLifetimeStats();\n $this->lifetimeStats['avgAdrenalineShared'] = (float) $this->xmlData->stats->lifetime->adrenalineshared;\n $this->lifetimeStats['avgAdrenalineUsed'] = (float) $this->xmlData->stats->lifetime->adrenalineused;\n $this->lifetimeStats['avgDefibrillatorsUsed'] = (float) $this->xmlData->stats->lifetime->defibrillatorsused;\n }\n\n return $this->lifetimeStats;\n }" ]
[ "0.6108417", "0.6026728", "0.600337", "0.58875924", "0.5847526", "0.58153206", "0.57751054", "0.5770831", "0.5770831", "0.57395416", "0.5705578", "0.5666157", "0.56169254", "0.56169254", "0.5607143", "0.5607143", "0.556979", "0.556494", "0.5549599", "0.554724", "0.55360526", "0.55326974", "0.5531873", "0.54713744", "0.5451357", "0.54405826", "0.538396", "0.5367941", "0.53643", "0.5363995", "0.5356213", "0.5319653", "0.52966493", "0.5289635", "0.5281833", "0.52780724", "0.527054", "0.5266894", "0.5262773", "0.52440655", "0.52424407", "0.52350557", "0.5234718", "0.523074", "0.5207478", "0.51889926", "0.5164952", "0.51602244", "0.51576656", "0.51337004", "0.5130795", "0.5119952", "0.5119952", "0.5117428", "0.5115354", "0.51152664", "0.5115046", "0.5102955", "0.51017904", "0.5101383", "0.5086342", "0.5079692", "0.50786006", "0.50774086", "0.5073152", "0.5072562", "0.5061906", "0.50594664", "0.5056403", "0.504687", "0.50439996", "0.504161", "0.50392133", "0.503042", "0.50296855", "0.50284135", "0.50278616", "0.5020102", "0.5014249", "0.5004466", "0.50044477", "0.50017583", "0.49911612", "0.4987533", "0.49846995", "0.49812323", "0.49802604", "0.497741", "0.49769002", "0.49587578", "0.49365115", "0.49361038", "0.49359074", "0.49349853", "0.4931548", "0.4924922", "0.492476", "0.49243736", "0.49212953", "0.4910617" ]
0.723998
0
Update the searchname field.
Обновите поле searchname.
private function _update_searchname() { $this->searchname = sprintf('%s%s', text::searchable($this->first_name), text::searchable($this->last_name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSearchName($name_search)\n {\n $this->name_search = $name_search;\n $this->search = true;\n }", "public function updateSearchIndex()\n {\n $searchIndex =\n $this->getFullName()\n . ' '\n . $this->getEmail();\n \n $this->setSearchIndex($searchIndex);\n }", "public function updateName( $sName );", "public function updatingSearch(): void\n {\n $this->gotoPage(1);\n }", "public function updatingSearch() {\n $this->resetPage();\n }", "public function updatingSearch(): void\n {\n $this->resetPage();\n }", "public function updatedSearch()\n {\n $this->resetPage();\n }", "public function setSearchName($searchName)\n {\n $this->searchName = $searchName;\n return $this;\n }", "function setName($a_sName)\n {\n $this->_sName = (string) $a_sName;\n $this->setSearchParameter('name', $this->_sName);\n }", "public function getSearchName()\n {\n return $this->searchName;\n }", "public function updatedNewName()\n {\n $this->newName = 'Professior Oak';\n }", "public function updateSearch( $searchName, $searchParams )\r\n\t{\r\n\t\t$where = $this->dbNameFieldName.\"=\".$this->connection->prepareString( $searchName );\t\r\n\t\t$this->update($searchParams, $where);\t\t\t\t\r\n\t}", "private function setSearch($search)\n\t{\n\t\t$this->search=$search;\n\t}", "private function setSearch($search)\n {\n $this->search = $search;\n }", "public function setSearchQuery(string $search)\n {\n $this->searchQuery = $search;\n }", "public function actionSearchName()\r\n\t{\r\n\t\t\r\n\t\tif (isset($_POST['search'])) {\r\n\t\t\t$searchName = (isset($_POST['searchName']) ? $_POST['searchName'] : '');\r\n\t\t\t\r\n\t\t\t// If the search is for a postcode, change spaces into %%\r\n\t\t\t$searchPcode = str_replace(' ', '%%', preg_replace('/\\s\\s+/', ' ',$searchName));\r\n\t\t\t\r\n\t\t\t$criteria=new CDbCriteria;\r\n\t\t\t$criteria->with='address';\r\n\t\t\t$criteria->condition='name LIKE :name OR mobile_phone LIKE :name OR landline LIKE :name OR postcode LIKE :pcode OR addr1 LIKE :name';\r\n\t\t\t$criteria->params=array(':name'=>'%'.$searchName.'%', ':pcode'=>'%'.$searchPcode.'%');\r\n\t\t\t\r\n\t\t\t$contacts = new CActiveDataProvider('Contact', array('criteria' => $criteria));\r\n\t\r\n\t//echo \"<pre>Contact - search '$searchName'<br>\"; print_r($contacts); echo \"</pre>\";\r\n\t\r\n\t\t\t// Search contacts with the supplied name\r\n\t\t\t\r\n\t\t\t$this->render('searchName', array('contacts'=>$contacts));\r\n\t\t} elseif (isset($_POST['addnew'])) {\r\n\t\t\t$this->redirect(array('/contact/create'));\r\n\t\t}\r\n\t\t\r\n//\t\texit(0);\r\n\t}", "public function updateName()\n {\n $this->name = $this->slugify($this->label) . \"-imagine-block\";\n }", "function setName($new_name)\n {\n $this->name = $new_name;\n }", "function setSearchString($searchString){\n\t\t$this->searchString = $searchString;\n\t}", "public function getName()\n {\n return \"search\";\n }", "public function actionSuggestName()\n\t{\n\t\tif(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')\n\t\t{\n\t\t\t$titles=Document::model()->suggestName($keyword);\n\t\t\tif($titles!==array())\n\t\t\t\techo implode(\"\\n\",$titles);\n\t\t}\n\t}", "public function set_search($search)\n\t\t{\n\t\t\t$this->set_config(\"search\", $search);\n\t\t}", "public function savesearchAction()\n {\n \t$this->_helper->viewRenderer->setNoRender();\n \t\n \t$searchform = $this->getSearchForm();\n \t$formData = $this->getRequest()->getParams();\n\t \t\t\n \tif ($searchform->isValidPartial($formData))\n \t{\n \t\t$values = $searchform->getValues();\n\t \t$searchname = $values[\"savesearchinput\"];\n\t\t\t$jsondata = $values[\"advancedsearchparameters\"];\n\t\t\t$this->saveSearch($searchname, $jsondata);\n \t}\n \telse \n \t{\n \t\t//Assign the override input name\n \t\t$formData['hiddenoverridesearchnameinput'] = $formData['savesearchinput'];\n \t\t$this->displaySearchErrors($formData, 'There is a problem with your search name. Please try again.');\n\t\t}\n }", "public function setSearchWord($searchWord) {\n \t$this->searchWord = $searchWord;\n }", "function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n // check if the user has filled the form\n if (isset($data->name))\n {\n // creates a filter using what the user has typed\n $filter = new TFilter('name', 'like', \"%{$data->name}%\");\n \n // stores the filter in the session\n TSession::setValue('City_filter', $filter);\n TSession::setValue('City_name', $data->name);\n \n // fill the form with data again\n $this->form->setData($data);\n }\n \n $param = array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "public function setSearchString($searchString){\n $this->searchString = $searchString;\n }", "public function actionSuggestName()\n\t{\n\t\tif(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')\n\t\t{\n\t\t\t$titles=Order::model()->suggestName($keyword);\n\t\t\tif($titles!==array())\n\t\t\t\techo implode(\"\\n\",$titles);\n\t\t}\n\t}", "function set_name($newname) {\n $this->name = $newname;\n }", "function setName($name)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->name = $name;\n\t}", "function set_field_name($name) {\n $this->field_name = $name;\n }", "public function admin_search() {\n $this->search();\n }", "function _admin_search_query()\n{\n}", "public function resetSearch() : void\n\t{\n\t\t$this->eligebleForPermission = collect();\n\t\t$this->query = '';\n\t\t$this->isSearching = false;\n\t}", "protected function setSearch($search = 0) {\n\n $this->search = $search ? 1 : 0;\n }", "private function defineSearch($search) {\n $this->search = trim(mb_strtolower(preg_replace('/[^'.$this->alchr.' _-]+/i', '', $search), 'utf-8')); // sets page name\n\n // sets $ssep_words and $cache_file lowercase and space instead of '-'\n if(strlen($this->search)>2) {\n $search = $this->ssep_words = $this->setSrcWords($this->search);\n sort($search);\n $this->cache_file = implode('_', $search);\n }\n else $this->cache_file = str_replace('.', '_', preg_replace(\"#^www\\.#is\", '', DOMAIN));\n }", "public function editName($current_album_name, $album_new_name);", "public function updating($name, $value)\n {\n //page number needs to be set to\n //first page\n\n $changePagintionToOne = [\n 'search',\n ];\n\n if(in_array($name,$changePagintionToOne)):\n $this->gotoPage(1);\n endif;\n return;\n }", "private function putSearch($key, $data)\r\n\t{\r\n\t\t// Todo: Check that user is allowed to access this search\r\n\t\t$search = new SearchModel($this->deps);\t\t\r\n\r\n\t\tif ($search->update($key, $data)) {\t\t\t\t\r\n\t\t\techo json_encode(array(\"status\"=>\"success\", \"search\"=>$search));\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"status\"=>\"failure\", \"errors\"=>$search->errors));\r\n\t\t}\r\n\t}", "public function search() : void\n\t{\n\t\tif (empty($this->query)) {\n\t\t\t$this->resetSearch();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->eligebleForPermission = $this->getAction()->search($this->query)->get();\n\t\t$this->isSearching = true;\n\t}", "public function render_users_index_name_field() {\n $name = 'users_index';\n $option = self::get( $name );\n ?>\n <input type=\"text\" name=\"redipress_users_index\" id=\"redipress_users_index\" value=\"<?php echo \\esc_attr( $option ) ?: 'users'; ?>\" <?php $this->disabled( $name ); ?>>\n <p class=\"description\" id=\"users-index-name-description\">\n <?php \\esc_html_e( 'RediSearch users index name, must be unique within the database.', 'redipress' ); ?>\n </p>\n <?php\n }", "public function getName()\n {\n return 'search_form';\n }", "public function suggest() {\r\n if (empty($this->request->data) && isset($this->params['url']['suggestion'])) {\r\n $this->request->data['Product']['name'] = $this->params['url']['suggestion'];\r\n }\r\n }", "public function search_contact(){\r\n\r\n\t\t\t$name_of_the_contact = $this->input->post('contact_name_input');\r\n\r\n\t\t\t// var_dump($name);\r\n\t\t\t$name_of_the_contact = trim($name_of_the_contact);\r\n\t\t\t$this->Contacts_Model->display_contacts_searched($name_of_the_contact, $this->root_path);\r\n\t }", "public function update( $name ) {\n\t}", "public function setName($name)\n {\n $this->_name = trim($name);\n }", "public function nameAction() {\n $request = $this->getRequest();\n $type = $request->getParam(\"nametype\");\n $value = $request->getParam(\"value\", null);\n\n if (!isset($this->view->browse_mode))\n $this->view->browse_mode = $type;\n\n $request->setParam(\"field\", $type . \"_facet\");\n //$request->setParam(\"field\", $type);\n\n if (is_null($value)) {\n $this->_forward(\"browsefield\");\n } else {\n // note: using exact match so we don't get confusing results where names partially match\n $request->setParam(\"exact\", true);\n $this->_forward(\"browse\");\n }\n }", "public function setName($name)\n {\n $this->name = trim($name);\n }", "protected function searchField()\r\n\t{\r\n\t\tif (isset($this->htmlOptions['class'])) {\r\n\t\t\t$this->htmlOptions['class'] .= ' search-query';\r\n\t\t} else {\r\n\t\t\t$this->htmlOptions['class'] = 'search-query';\r\n\t\t}\r\n\r\n\t\t$this->setPlaceholder();\r\n\t\techo $this->getPrepend();\r\n\t\techo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);\r\n\t\techo $this->getAppend();\r\n\t\techo $this->getError() . $this->getHint();\r\n\t}", "protected function applySearch() {\n\n }", "function update($new_name)\n {\n //SQL string executed to update clients names in the table\n $GLOBALS['DB']->exec(\"UPDATE clients SET name = '{$new_name}' WHERE id = {$this->getId()};\");\n $this->setName($new_name);\n }", "public function setName($name)\n\t{\n\t\t$this->name = htmlspecialchars($name);\n\t}", "public function setSearchQuery($query){\n\t\t$this->_query = $query;\n\t}", "public function setName($name) {\r\n $this->_name = $name;\r\n }", "public function setName($newName){\r\n $this->name = $newName;\r\n }", "public function action_updatefundname()\n {\n $user = parent::checklogin('admin');\n\n $cid = $_REQUEST['cid'];\n $fid = $_REQUEST['fid'];\n $name = addslashes($_REQUEST['name']);\n $sql = \"UPDATE funds_names SET displayname='$name'\n WHERE client_id = $cid AND fund_id=$fid\";\n $res = DB::query(Database::UPDATE, $sql, TRUE)->execute();\n $success = ($res) ? 'true' : \"Could not update name. Please try again\";\n echo json_encode($success);\n exit;\n }", "public function set_name($name){\n\t\t$mysql = mysql_connection::get_instance();\n\t\t\n\t\t$stmt = $mysql->prepare('UPDATE `shipping_destinations` SET `shipping_destination_name` = ? WHERE `shipping_destination_id` = ?');\n\t\t$stmt->bind_param('si', $name, $this->id);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t\t\n\t\t$this->name = $name;\n\t}", "public function runSearch()\n {\n $this->modifyDatabaseCriteriaAccordingToValuesFromFilterForm();\n }", "public function update(Request $request, Search $search)\n {\n //\n }", "function updateName($oldName, $newName, $collection){\n \t\t$newdata = array('$set' => array(\"name\" => $newName));\n\t\t$collection->update(array(\"name\" => $oldName), $newdata);\n }", "public function setName($name){\n \n\t \t$this->Name = $name;\n\t\t\t\n }", "function setName ($in) {\n $this->name = $in;\n }", "public function setName($name)\n {\n $this->name = strval($name);\n }", "public function setName($newName)\n {\n }", "public function setName($name) {\n\t\t$this->__set('name', $name);\n\t}", "function property_search(){\t\t\n\t\tif (isset($_GET['term']))\n\t\t{\n\t\t\t$search_value = strtolower($_GET['term']);\n\t\t\t\n\t\t\t$search = $this->Basicmodel->product_name_search($search_value);\n\t\t\t print_r($search ); exit; \n\t\t\techo $search;\n\t\t}\n\t}", "public function setName($name){\n $this->name = $name;\n }", "function setSearchField($arr_field)\r\n\t{\r\n\t\t$this->arr_search_field = $arr_field;\r\n\t}", "public function setName($name){\n\t\t$this->name = $name;\n\t}", "function setName($name)\n\t{\n\t\t$this->updateAttributes(array ('name' => $name));\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function setSearchKey( $key )\n {\n $this->searchKey = $key;\n }", "public function setName($name) {\r\n $this->name = $name;\r\n }", "public function setName($name) {\r\n $this->name = $name;\r\n }", "function UTKdrupal_form_islandora_solr_simple_search_form_alter(&$form, &$form_state, $form_id) {\n $form['simple']['islandora_simple_search_query']['#attributes']['placeholder'] = t(\"Search Repository\");\n}", "protected function setName($name) {\n\n\t \t\t \t$this->name = $name;\n\t }", "public function setName($name){\n $this->name = $name;\n }", "function setName($name) {\t$this->name = $name; }", "public function setName( $name ) {\n $this->name = $name; \n }", "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "function makeSearchKey() {\n\t\t\tif($this->get(\"searchkey\")) {\n\t\t\t\treturn $this->get(\"searchkey\");\n\t\t\t}\n\t\t\treturn $this->get(\"name\");\n\t\t\t\n\t\t}", "function makeSearchKey() {\n\t\t\tif($this->get(\"searchkey\")) {\n\t\t\t\treturn $this->get(\"searchkey\");\n\t\t\t}\n\t\t\treturn $this->get(\"name\");\n\t\t\t\n\t\t}", "public function setName($name) {\n\t\t$this->_name = $name;\n\t}", "function setBuildingName($newBuildingName){\n $this->buildingName=$newBuildingName;\n }", "function setName($name)\n {\n $this->_name = $name;\n }", "function setName($name)\n {\n $this->_name = $name;\n }", "public function setName($name) \n\t\t{\n\t\t\t$this->name = $name;\n\t\t}", "public function set_Name($str_Name_In) {\n $this->name = $str_Name_In;\n }", "public function changeSearchUrl()\n {\n if ( is_search() && ! empty( $_GET['s'] ) ) {\n wp_redirect( home_url( '/search?' ) . urlencode( get_query_var( 's' ) ) );\n exit();\n }\n }", "public function setName($name) {\n\n\t \t\t $this->name = $name;\n\t }", "public function Updated()\n {\n if(Request::GetPost(\"Name\") != \"\")\n {\n $this->Entity->Code->Value = Format::ReplaceForUrl(Request::GetPost(\"Name\"));\n parent::updated();\n }\n }", "function setName($name) {\r\n\t\t$name [0] = strtoupper ( $name [0] );\r\n\t\t$this->name = $name;\r\n\t}", "public function submitSearch()\n {\n }", "public function setDefaultName()\n\t{\n\t\t/** @var $this self|Has_Name */\n\t\t$name = trim($this->first_name . SP . $this->last_name);\n\t\tif (strlen($name)) {\n\t\t\t$this->name = trim($this->first_name . SP . $this->last_name);\n\t\t}\n\t}", "public function setName($name){\n\t\t$this->name\t\t\t=\t$name;\n\t}", "public function setName($name)\n {\n $this->set('name', $name);\n }", "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "public function setName($name) {\n\t\t$this->name = $name;\n\t}" ]
[ "0.78626394", "0.70388836", "0.68125737", "0.66192096", "0.6534201", "0.64795756", "0.63940513", "0.63769346", "0.6370071", "0.6305634", "0.6259021", "0.6208206", "0.61456174", "0.6129177", "0.61110586", "0.6038199", "0.60266393", "0.59991777", "0.59419763", "0.593425", "0.5908265", "0.5868445", "0.58446944", "0.5800199", "0.57559144", "0.5751834", "0.5704747", "0.5699904", "0.56559867", "0.5644182", "0.5639632", "0.5635775", "0.5631655", "0.56077915", "0.56048834", "0.559723", "0.5577353", "0.5574902", "0.555698", "0.5554998", "0.55357623", "0.55349857", "0.5520867", "0.5518952", "0.5516493", "0.55120575", "0.5511785", "0.55072063", "0.5494894", "0.5494725", "0.54923904", "0.5468228", "0.544142", "0.5437328", "0.54367346", "0.5435886", "0.543564", "0.5433041", "0.54320765", "0.5421554", "0.5415503", "0.5404494", "0.5402826", "0.54009473", "0.5393749", "0.53900295", "0.5389068", "0.5385798", "0.5381496", "0.537836", "0.5374884", "0.5374746", "0.5374746", "0.5372737", "0.537124", "0.5366805", "0.5361886", "0.5360062", "0.5357039", "0.5357039", "0.53566897", "0.53566897", "0.53554994", "0.53536725", "0.5349496", "0.5349496", "0.5348024", "0.5345079", "0.5344095", "0.534212", "0.5337601", "0.53345895", "0.5330535", "0.5330144", "0.53264916", "0.53232795", "0.5320649", "0.5320649", "0.5320649", "0.5320649" ]
0.90800065
0
Conexion para la Base De Datos
Соединение с базой данных
public function Conexion() { $usuario = $this->GetUsuario(); $clave = $this->GetClave(); $servidor = $this->GetServidor(); $nomBD = $this->GetNomBaseDatos(); $this->SetDsn ( "postgres8://$usuario:$clave@$servidor/$nomBD" );//postgres8!=mysql $this->SetDB ( NewADOConnection ( $this->GetDsn () ) ); if (! $this->GetDB ()) { $this->SetEstatusBaseDatos("FALSE"); //die ( "<b>ERROR FATAL:</b> FALLO LA CONEXION A LA BASE DE DATOS" ); } else { $this->SetEstatusBaseDatos("TRUE"); } $this->GetDB ()->debug = false; //True para ver las sentencias (SQL) del código mientras se ejecutan y FAlSE no las muestra $this->GetDB ()->port = 5432;//postgres5432 mysql 3366 return $this->GetDB (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function conectarConBaseDatos(){\n\n //Configurar la conexión\n $this->conexion= mysqli_connect(\n $this->servidor,\n $this->usuario,\n $this->clave,\n $this->nombreBaseDatos\n );\n\n //Verificar la conexión\n if(!($this->conexion)){\n die(\"Error de conexión:\");\n }else{\n echo(\"Conexión exitosa\");\n }\n }", "function Conexion()\n\t{\n\t\t$conection['server']=\"localhost:8889\"; //host\n\t\t$conection['user']=\"root\"; // usuario\n\t\t$conection['pass']=\"root\"; //password\n\t\t$conection['base']=\"aceitera\"; //base de datos\n\t\t\n\t\t// crea la conexion pasandole el servidor , usuario y clave\n\t\t$conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n\n\t\tif ($conect) // si la conexion fue exitosa , selecciona la base\n\t\t{\n\t\t\tmysql_select_db($conection['base']);\t\t\t\n\t\t\t$this->con=$conect;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Error de Conexion\";\n\t\t}\n\t}", "public function getConnection(){\n $this->_connexion = null;\n\n // Trying to connect to the base\n try{\n $this->_connexion = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->_connexion->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Erreur de connexion : \" . $exception->getMessage();\n }\n }", "public function conectar()\r\n {\r\n try {\r\n $this->conn = new mysqli($this->db_host, $this->db_user, $this->db_pass, $this->db_name);\r\n $this->conn->set_charset(\"utf8\");\r\n } catch (Exception $e) {\r\n echo \"<h2>No me pude conectar con la Base de Datos...<br></h2>\" . $e->getMessage();\r\n }\r\n }", "protected function coneccion()\t{\n\t\t\ttry{\n\t\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->db\",$this->user,$this->pass,$this->opciones);\n\t\t\t}catch(PDOException $pe){\n\t\t\t\tdie('Error de conexion, Mensaje: ' -$pe->getMessage());\n\t\t\t}\n\t\t\t\n\t\t}", "function Conectar(){\n\t\t\n\t\tif($this->Servidor==\"\" & $this->Usuarios==\"\" & $this->BaseDeDatos==\"\")\n\t\t{\n\t\t\t//Mostramos el error de conexion\n\t\t\t\n\t\t\techo \"Error Verifique los datos de conexion<br>\";\n\t\t\techo \"Servidor: \"\t\t.$this->Servidor.\"<br>\";\n\t\t\techo \"Usuario: \"\t\t.$this->Usuarios.\"<br>\";\n\t\t\techo \"Password: \"\t\t.$this->Password.\"<br>\";\n\t\t\techo \"Base de Datos: \"\t.$this->BaseDeDatos;\n\t\t\texit();\n\t\t}\t\n\t\telse \n\t\t{\n\t\t\t//Realizamos la conexion \n\t\tif(!($link = mysql_connect($this->Servidor,$this->Usuarios)))\t\t\t\n\t\t\t{\n\t\t\t\techo \"Error Conectandose a la Base de datos\";\n\t\t\t\texit();\n\t\t\t}\n\t\t\tif(!(mysql_select_db($this->BaseDeDatos,$link)))\n\t\t\t{\n\t\t\t\techo \"Error seleccionando la base de datos.\";\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t}", "protected function conectar()\n\t{\n\t\t$this->cone = new mysqli(self::$host,self::$user,self::$clave,$this->basedato);\n\t\tif(mysqli_connect_errno()){\n\t\t\techo \"<h3>Error al conectar el servidor</h3>\";\n\t\t\texit();\n\t\t}\n\t}", "function Conexion() {\r\n $this->BaseDatos = \"bdtutorial\";\r\n $this->Servidor = \"localhost\";\r\n $this->Usuario = \"root\";\r\n $this->Clave = \"\";\r\n }", "public function conectar()\n\t{\n\t\t$this->objetoconexion= mysqli_connect($this->servidor,$this->usuario,$this->pass,$this->bd) or die (\"error en conexion\");\n\t}", "private function conectar(){\n\n $dsn = 'mysql:host='.$this->servidor.';port=3306;dbname='.$this->base_datos;\n $opciones = array(\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'\n\n );\n//PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => true,\n //$gbd = new PDO($dsn, $this->usuario, $this->password, $opciones);\n \t \t$this->link= new PDO($dsn, $this->usuario, $this->password);\n\t\t//echo $dsn;\n \t}", "public function conect(){\r\n\r\n\t\ttry{\r\n\t\t\tself::$pdo = new PDO(\"mysql:host={$this->dbHost};port={$this->dbPort};dbname={$this->dbName};charset=utf8;\",\r\n\t\t\t$this->dbUser,\r\n\t\t\t$this->dbPass) ;\r\n\t\t} catch (Exception $e){\r\n\t\tdie (\"Error en conectar la BBDD\");\r\n\t\t}\r\n\t}", "public function conexion() {\n\t\t$this->conexion = mysql_connect('127.0.0.1:3306', 'nssystem', 'ns2sy0st1em3');\n\t\tmysql_select_db('newsucrip', $this->conexion);\n\t}", "public function conectar()\n {\n include('../../php/datos.php');\n $this -> conn = new mysqli($host, $user, $pw, $db);\n $this->conn->set_charset('utf8');\n if (mysqli_connect_error()) {\n die(\"Error en conexión, intenta de nuevo.\");\n }\n \n }", "private function conectar()\n {\n\n // Uso de try{} y catch{} para capturar los posibles errores que ocurran\n try {\n $mbd = new PDO('mysql:host=127.0.0.1;dbname=' . BD . ';charset=utf8', USER, PASS);\n // $mbd = new PDO('mysql:host=localhost:3308;dbname='.BD.';charset=utf8', USER, PASS);\n $mbd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) { // En caso de algún error\n echo \"No hay una conexion con la BD\";\n die();\n }\n\n // Pasar el valor de conexion a una variable global privada\n $this->conexion = $mbd;\n }", "private function connect() {\n\t\trequire (\"models/configuracion.php\");\n\n\t\tif (!$this -> connection = mysqli_connect($servidor, $usuariobd, $clavebd, $bd)) {\n\t\t\techo \"Error al tratar de conectar\";\n\t\t}\n\t\n\t// Previne errores con SetCharset\n\t\t$this -> connection -> set_charset('utf8');\n\t}", "function connexion_base(){\n\t\t$host=\"localhost\";\n\t\t$user=\"root\";\n\t\t$bdd=\"ummisco\";\n\t\t$pwd=\"\";\n\t\tmysql_connect($host,$user,$pwd) or die(\" Erreur de connexion au serveur\");\n\t\tmysql_select_db($bdd)or die(\" Erreur de connexion a la base de données\");\n\t}", "function conectar()\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t//$this->bd = @pg_connect(\"dbname=$this->mnombreBD port=$this->mpuerto host=$this->mservidor user=$this->musuario password=$this->mclave\");\r\n\r\n \r\n\t\t\t $this->bd = @mysql_connect($this->mservidor, $this->musuario, $this->mclave);\r\n \t\t\t\t@mysql_select_db($this->mnombreBD, $this->bd) or die(\"Error: \".mysql_error());\r\n \r\n\t\t\t\tif( !$this->bd )\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch( Exception $e )\r\n\t\t\t{\r\n\t\t\t\tdie( $e->getMessage() );\r\n\t\t\t}\r\n\t\t}", "function conectaBaseDatos(){\n\ttry{\n\t\t$servidor = \"localhost\";\n\t\t$puerto = \"3306\";\n\t\t$basedatos = \"sistema\";\n\t\t$usuario = \"root\";\n\t\t$contrasena = \"\";\n\t\n\t\t$conexion = new PDO(\"mysql:host=$servidor;port=$puerto;dbname=$basedatos\",\n\t\t\t\t\t\t\t$usuario,\n\t\t\t\t\t\t\t$contrasena,\n\t\t\t\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\t\n\t\t$conexion->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\t\treturn $conexion;\n\t}\n\tcatch (PDOException $e){\n\t\tdie (\"No se puede conectar a la base de datos\". $e->getMessage());\n\t}\n}", "private function dbConnect(){\r\n $con = new PDO('mysql:dbname=db_run;host=localhost','samuel','malherbesa.etml', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')) or die(\"Connexion a échoué\");\r\n $this->connexion = $con;\r\n\r\n }", "public function connexion()\n {\n try\n {\n //connection\n $this->connexion = new PDO('mysql:host=localhost;charset=UTF8;dbname=info2-2015-jobdating',\"info2-2015-jobda\",\"jobdating\");\t//on se connecte au sgbd\n $this->connexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\t//on active la gestion des erreurs et d'exceptions\n }\n catch(PDOException $e)\n {\n throw new ConnexionException(\"Erreur de connection\");\n }\n //connection reussie\n\n }", "private function abrir_conexion() {\n\t\t\t$this->conexion = \n\t\t\tnew mysqli(self::$db_host, self::$db_user, self::$db_pass, self::$db_name);\n\t\t}", "public function conexionBase()\n {\n $conn = mysqli_connect('localhost:3308', 'root', '', 'partehome');\n\n\n if(!isset($conn)){\n echo \"Error al conectarse a la base\";\n return 0;\n }\n\n return $conn;\n }", "function conectar() /* Creamos la funcion donde Realizamos conexion a la bd */\n{\t\n$this->cn = mysql_connect($this->servidor, $this->user, $this->pass ); \nif ( !$this->cn )\ndie(\"Fallo en la conexion a la base de datos: \".mysql_error());\nif(!mysql_select_db($this->db))\ndie ( \"No fue posible comunicarse con la base de datos $db: \".mysql_error());\n}", "public static function connection(){\n try\n {\n self::$bdd = new PDO(self::$TYPE_SQL.':host='.self::$host.';dbname='.self::$db, self::$user, self::$pwd);\n }\n catch (Exception $e)\n {\n die('Erreur : ' . $e->getMessage());\n }\n }", "public function conectar() {\n $this->conn = new mysqli($this->host, $this->email, $this->password, $this->databaseName);\n if($this->conn->connect_errno) {\n die(\"Error de conexion: (\" . $this->conn->connect_error . \")\" . $this->conn->connect_errno);\n }\n }", "private function connect() {\n $sDSN = \"$this->sDbType:host=$this->sHost;dbname=$this->sDatabase;charset=utf8\";\n\n try {\n $this->pdoData = new \\PDO($sDSN, $this->sUser, $this->sPassword);\n \n $this->pdoData->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $this->pdoData->query(\"SET NAMES utf8\");\n $this->bStatus = true;\n } catch (PDOException $e) {\n $this->sError = $e->getMessage();\n }\n }", "function conecta_db() {\n \n //Notebook\n //$voConexao = mysqli_connect($_SESSION['vsHostBD'], $_SESSION['vsUsuarioDB'], $_SESSION['vsSenhaBD'], $_SESSION['vsBancoDados']);\n \n //cobraservice.orgfree.com\n //$voConexao = mysqli_connect(\"localhost\", \"1229252\", \"soporhoje\", \"1229252\");\n \n //ubuntu\n //$voConexao = mysqli_connect(\"localhost\", \"root\", \"\", $_SESSION['vsBancoDados']);\n \n $voConexao = mysqli_connect(\"localhost\", \"root\", \"soporhoje\", 'modulos');\n \n \n $voConexao->autocommit(FALSE);\n\n return $voConexao;\n}", "final public function conectar()\n \n {\n global $config; //carrega a varivel do arquivo config.php\n \n $dsn = \"$config[driver]:host=$config[host];dbname=$config[dbname]\";\n $user = $config['username'];\n $password = $config['password'];\n \n try {\n $this->conn = new \\PDO($dsn, $user, $password);\n $this->conn->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n } catch (\\PDOException $erro) {\n echo 'Erro: ' . $erro->getMessage();\n }\n }", "public function conextar_db()\n\n\t{\n\t\t#creamos una nueva conexion \n\t\t$this->mysqli = new mysqli('localhost','root','','admision2');\n\n\t\tif ($this->mysqli->connect_errno)\n\t\t{\n\t\t\techo 'Fallo al conextarse ala base de datos'. $this->mysqli->connect_error;\n\n\t\t}\n\t}", "private static function conectar() {\n try {\n $opc = array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\");\n $dsn = \"mysql:host=localhost;dbname=dwes\";\n $usuario = 'root';\n $pass = '';\n $conexion = new PDO($dsn, $usuario, $pass, $opc);\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $ex) {\n die('Abortamos la aplicación por fallo al conectar con la BD' . $ex->getMessage());\n }\n self::$conexion = $conexion;\n }", "private function conectar(){\n\t\t$this->mysqli = new mysqli($this->servidor,$this->usuario,$this->password,$this->basedatos);\n\t}", "function conecta_bd (&$bd, $servidor, $baseDatos, $usuario, $clave){\n try {\n $bd = new PDO(\n 'mysql:host=' . $servidor . ';dbname=' . $baseDatos . ';charset=utf8',\n $usuario, $clave, array(PDO::ATTR_PERSISTENT => true,\n PDO::MYSQL_ATTR_INIT_COMMAND => 'set names utf8')\n );\n } catch (PDOException $e) {\n echo (\"ERROR: <br/>\" . $e->getMessage(). \"<br/>\");\n }\n }", "function ConnextionBD()\n{\n $host = 'mysql-tristan-info.alwaysdata.net';\n $baseName = 'tristan-info_root';\n $user = '167519';\n $mdp = 'root';\n try {\n $bdd = new PDO('mysql:host=mysql-tristan-info.alwaysdata.net;dbname=tristan-info_root', '167519', 'root');\n } catch (Exception $e) {\n die('Erreur Coonnextion BD : ' . $e->getMessage());\n }\n}", "static function conectar() \n {\n // guardar los datos de la conexion\n $listaDatos = self::datosConexion();\n // recorrer la lista con los datos de la conexion y guardarlos\n foreach ($listaDatos as $key => $value) {\n self::$dsn = $value['dsn'];\n self::$host = $value['host'];\n self::$db = $value['database'];\n self::$user = $value['user'];\n self::$pass = $value['password'];\n }\n\n try {\n //! conectar a la BD\n // 'mysql:host=localhost;dbname=nombreDB','root',''\n $conn = new \\PDO(\n self::$dsn . \":host=\" . self::$host . \";dbname=\" . self::$db,\n self::$user, \n self::$pass\n );\n\n //* control de errores\n // muestra los errores comunes y las advertencias\n $conn->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n //* devolver la conexion\n return $conn;\n // capturar error \n } catch (\\PDOException $exception) {\n exit($exception->getMessage());\n }\n }", "public function conectar() \n\t{\n\t\t$dbname = \"Activos\";\n\t\t$host = \"localhost\"; \n\t\t$port = \"5432\";\n\t\t$dbuser = \"postgres\";\n\t\t$password = \"root\"; //$dbuser = \"postgres\";\n\t\t$this->conexion = pg_connect(\"host=$host port=$port dbname=$dbname user=$dbuser password=$password\")\n\t\t\tor die ('sin conexion!!');\n\n\t\tif(!$this->conexion)\n\t\t{\n \techo (\"no conecto\");\n\t\t\treturn;\n\t\t}\n\t}", "protected function connessione() {\n\n\t\t\tif (!$this->dbconn = @mysql_connect($this->host, $this->user, $this->password))\n\t\t\t\tdie(\"Error connecting to the host indicated.\");\n\t\t\telse\n\t\t\t\t$this->load_db($this->databs);\n\n\t\t}", "function db_connect()\n\t{\n\t\t$parametro = new Conect();\n\t\t$otro = $parametro->infoConection();\n\t\t// echo \"<pre>\".print_r($otro, true).'</pre>';\n\t\t$host = $otro['DB_HOSTNAME']; \n\t\t$db_name = $otro['DB_NAME'];\n\t\t$user = $otro['DB_USERNAME'];\n\t\t$passwd = $otro['DB_PASSWORD'];\n \n\t\t$this->conexion = mysql_connect($host, $user, $passwd);\n\t\tmysql_select_db($db_name) or die (\"No se pudo conectar\");\n\t\t//mysql_query (\"SET NAMES 'utf8'\");\n\t}", "private function connect()\n {\n try {\n $this->connexion = new PDO('mysql:host=' . $this->config['host'] . ';port=' . $this->config['port'] . ';dbname=' . $this->config['database'], $this->config['username'], $this->config['password'], [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci']);\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "static function conectar(){\n R::setup(\"mysql:host=\".CONFIG_HOST.\";dbname=\".CONFIG_BD,CONFIG_USER,CONFIG_PASS);\n }", "public static function connect(){\n\n $servidor='localhost';\n $usuario='root';\n $password='';\n $basededatos='tienda_master';\n\n // para infinity\n // $servidor='sql209.epizy.com';\n // $usuario='epiz_28857635';\n // $password='9FFnOmhg8j';\n // $basededatos='epiz_28857635_tienda_master\t';\n\n $db = new mysqli($servidor,$usuario,$password,$basededatos);\n //ejecutamos una consulta que va permitir que los resultados que saque de la base de datos sean en castellano totalmente(tildes,eñe,etc) \n $db->query(\"SET NAMES 'utf8'\");\n return $db;\n }", "private function connect_to_contao_db()\n\t{\n\t\t//Verbindung zur Contao Datenbank herstellen\n\t\t$this->contaoDB = new ezSQL_mysqli(\n\t\t\t$_SESSION['plugin_contao_import_db_user'],\n\t\t\t$_SESSION['plugin_contao_import_db_passwort'],\n\t\t\t$_SESSION['plugin_contao_import_db_name'],\n\t\t\t$_SESSION['plugin_contao_import_db_server'],\n\t\t\ttrue);\n\t\t$this->contaoDB->query(\"SET NAMES 'utf8'\");\n\t}", "function BD ()\n\t\t{\n\t\t\t$this->connetion=$this->create_connetion();\n\t\t\t\n\t\t}", "protected function abrir_conexion() {\n $this->_link = mysql_connect(DB_SERVER, DB_USER, DB_PASS, false, 1);\n if (!$this->_link) {\n $this->guardar_error(\"Fallo la conexion a la base de datos: \" . mysql_error());\n } else {\n $db = mysql_select_db(DB_NAME, $this->_link);\n if (!$db)\n $this->guardar_error(\"Fallo en la selección de la base de datos: \" . mysql_error());\n }\n mysql_query(\"SET NAMES 'utf8'\");\n }", "public static function conectar()\n\t\t{\n\t\t\tif ( self::$conexion == null ) { //corta la conexion\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tself::$conexion = new PDO(\"mysql:host=localhost;dbname=test\", \"root\", \"1234\");\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\techo $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "public function connectToDB() {}", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "private function connect()\n {\n $connectionData= $this->app->file->call('config.php');\n extract($connectionData);\n try{\n static::$connection = new PDO('mysql:host='.$server.';dbname='.$dbname,$dbuser,$dbpass);\n static::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\n static::$connection->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n static::$connection->exec('SET NAMES utf8');\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "function connect() {\n\t\tLumineLog::logger(1, 'Método <strong>connect</strong> invocado por ' . get_class($this), __FILE__, __LINE__);\n\t\tif($this->oTable == null) {\n\t\t\tLumineLog::logger(3, 'Entidade não encontrada: ' . get_class($this), __FILE__, __LINE__);\n\t\t\texit;\n\t\t}\n\t\tif($this->conn == null) {\n\t\t\t$this->conn = &$this->oTable->config->conn;\n\t\t}\n\t\tif($this->conn->IsConnected() == false) {\n\t\t\tLumineLog::logger(1, 'Criando uma nova conexão em ' . get_class($this), __FILE__, __LINE__);\n\t\t\t$c = $this->oTable->config->config;\n\t\t\t$this->conn->connect($c['host'],$c['user'],$c['password'],$c['database']);\n\t\t} else {\n\t\t\tLumineLog::logger(1, 'Usando conexão cacheada', __FILE__, __LINE__);\n\t\t}\n\t}", "public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}", "private function conectar(){\r\n try{\r\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\r\n\t\t}\r\n\t\tcatch(Exception $e)\r\n\t\t{\r\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\r\n\t\t}\r\n }", "public function connect(){\t\t\n\t\t\n\t \t//mysqli_connect(BD_HOST,BD_USER,BD_PASS,BD_DATA);\t\t \t\n\t\tif(@mysqli_connect(BD_HOST, BD_USER, BD_PASS)){\t\t\t\n\t\t\t$this->conn = @mysqli_connect(BD_HOST, BD_USER, BD_PASS);\n\t\t\t@mysqli_query(\"SET NAMES 'UTF8'\");\n\t\t\tif(!mysqli_select_db($this->conn,BD_DATA)){\t\t\t\t\n\t\t\t\tdie('Khong the ket noi toi co so du lieu');\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\tdie('Khong the ket noi serve');\n\t\t}\n\t}", "function fn_conectarse(){\n\t\tglobal $nom_db_pk;\n\t\tglobal $dbhost;\n\t\tglobal $dbuser;\n\t\tglobal $dbpass;\n\n\n\t\t$nom_db_pk \t= \t'deck_db';\n\t\t$dbhost \t= \t'localhost';\n\t\t$dbuser\t\t=\t'root';\n\t\t$dbpass\t\t=\t'mysql';\n\n\t\t$this->va_resultado = mysqli_connect($dbhost,$dbuser,$dbpass,$nom_db_pk);\n\n\t\t\n\n\t\t/* check connection */\n\t\tif (mysqli_connect_errno()) {\n\t\t printf(\"Connect failed: %s\\n\", mysqli_connect_error());\n\t\t exit();\n\t\t}\n\n\t\t//if (!$prueba = mysql_select_db($nom_db_pk)) return false;\t\n\t\t//mysqli_select_db($nom_db_pk)\n\t\t//or die(\"Seleccion de base de datos fallida \" . mysqli_error());\t\n\n\t\t//mysql_set_charset(\"utf8\");\n\t}", "private function criarBase(){\n\t\t\t$dados = \"mysql:host=\" . $this->host;\n\t\t\t$dados = $dados . \";port=\" . $this->porta;\n\t\t\t$this->conexao = new PDO($dados, $this->usudb, $this->senhadb); // pdo php data objectve, classe generica pra banco de dados\n\t\t\t$this->criaBanco($this->nomedb, $this->host, $this->usudb);\n\t\t\t//\n\t\t\t//conecta ao banco e cria as tabelas\n\t\t\t$dados = $dados . \";dbname=\" . $this->nomedb;\n\t\t\t$this->conexao = new PDO($dados, $this->usudb, $this->senhadb); // pdo php data objectve, classe generica pra banco de dados\n\t\t\t$this->criaTabelas($this->nomedb);\n\t\t\t//\n\t\t\t//Retorna mensagem e pede login novamente\n\t\t\t$_SESSION['logado'] = false;\n\t\t\t$_SESSION['mensagem'] = \"Executamos uma atualização do sistema <br> Tente novamente\";\n \t\t$_SESSION['tipoMsg'] = \"info\";\n\t\t\theader('Location: index.php');\n\t\t\texit;\n\t\t}", "function BaseDatos(){\r\n\t\t$this->host=ORM_HOST;\r\n\t\t$this->usuario=ORM_USUARIO;\r\n\t\t$this->pass=ORM_PASS;\r\n\t\t$this->bd=ORM_BD;\r\n\t}", "public function connect(): void {\r\n\r\n if(false === $this -> connection instanceof connection) {\r\n\r\n $this -> connection = new connection($this -> data -> host, $this -> data -> username, $this -> data -> password, $this -> data -> databaseName, $this -> data -> port);\r\n\r\n if($this -> data -> charset) {\r\n $this -> connection -> set_charset($this -> data -> charset);\r\n }\r\n }\r\n }", "public function connect(){\n\t\t$mysqli = new mysqli($this->se, $this->us, $this->co, $this->bd);\n\t\t/* ESTABLECIMIENTO DE LA CONEXION */\n\t\tif ($mysqli->connect_errno) {\n\t\t\tprintf(\"Error en la conexion: %s\\n\", $mysqli->connect_error);\n\t\t\texit();\n\t\t}else{\n\t\t\techo \"Estás conectado\";\n\t\t}\n\t\t$mysqli->set_charset(\"utf8\");\n\t}", "public function conectar(){\n\t\t//declaramos las variables que vamos a ocupar\n\t\t$localhost = \"localhost\";\n\t\t$database = \"tienda_curso\";\n\t\t$user = \"root\";\n\t\t$password = \"\";\n\t\t//construccion mediante pdo\n\t\t//que mierda es PDO\n\t\t$link = new PDO(\"mysql:host=$localhost;dbname=$database\",$user,$password);\n\t\treturn $link;\n\t}", "public function connectDB() {}", "protected function conexion(){\r\n try {\r\n $options = [\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n PDO::ATTR_EMULATE_PREPARES => FALSE,\r\n ];\r\n return new PDO(parent::SGBD,parent::USER,parent::PASS,$options);\r\n } catch (PDOException $e) {\r\n echo \"Error: \".$e;\r\n die();\r\n }\r\n }", "public function __construct(){\n $PARAM_hote='localhost';\n //Le port de connexion à la base de données\n $PARAM_port='3306';\n // Le nom de votre base de données\n $PARAM_nom_bd='minifacebook';\n // nom d'utilisateur pour se connecter\n $PARAM_utilisateur='adminMiniFacebook';\n // mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe='minifacebook';\n\n try{\n $this->connexion = new PDO (\n 'mysql:host='.$PARAM_hote.';dbname='.$PARAM_nom_bd,\n $PARAM_utilisateur,\n $PARAM_mot_passe);\n } catch(Exception $e){\n echo 'Erreur : '.$e->getMessage().'<br />';\n echo 'N° : '.$e->getCode();\n } \n }", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function connect()\n\t{\n\t\t$os = BIOS::activeOS();\n\t\t$env = $os->getEnv();\n\t\t$dbconfig = $os->getConf('database.'. $env);\n\t\tprint_r($dbconfig);\n\t\t$conn = mysql_connect($dbconfig['host'], $dbconfig['user'], $dbconfig['password']);\n\t\tif (!parent::$connection)\n\t\t{\n\t\t\tBIOS::raise('DBConnectionTimeout');\n\t\t}\n\t\tmysql_select_db($dbconfig['database']);\n\t\tmysql_query('SET NAMES ' . $dbconfig['charset']);\n\t}", "private function abrir() {\r\n\t\tif($this->conn = mysql_connect($this->host, $this->user, $this->password)){\r\n\t\t\tif(!mysql_select_db($this->database, $this->conn) ){\r\n\t\t\t\tthrow new Exception(\"Error al seleccionar la base de datos '\".$this->database.\"', MySQL Error \".mysql_error());\r\n\t\t\t}else{\r\n\t\t\t\tmysql_query (\"SET NAMES 'utf8'\",$this->conn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"Error al conectarse con '\".$this->host.\"', MySQL Error \".mysql_error());\r\n\t\t}\r\n\t}", "public function __construct(){\n $PARAM_hote='localhost';\n // le port de connexion à la base de données\n $PARAM_port='3306';\n // le nom de la base de données\n $PARAM_nom_bd='minifacebook';\n // Le nom d'utilisateur pour se connecter \n $PARAM_utilisateur='adminMiniFacebook';\n // le mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe='Mini_facebook';\n\n // Attraper les exceptions (au cas où ce qui est dans le try ne marche pas)\n try{\n $this->connexion = new PDO (\n 'mysql:host='.$PARAM_hote.';\n dbname='.$PARAM_nom_bd, $PARAM_utilisateur, $PARAM_mot_passe);\n $this->connexion-> setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, \"SET NAMES 'utf8'\");\n } catch (Exception $e) {\n echo 'Erreur: ' .$e->getMessage() . '<br/>';\n echo 'N° : '.$e->getCode();\n }\n }", "public function __construct(){\n $PARAM_hote='localhost';\n // le port de connexion à la base de données\n $PARAM_port='3306';\n // le nom de la base de données\n $PARAM_nom_bd='minifacebook';\n // Le nom d'utilisateur pour se connecter \n $PARAM_utilisateur='adminMiniFacebook';\n // le mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe='Mini_facebook';\n\n // Attraper les exceptions (au cas où ce qui est dans le try ne marche pas)\n try{\n $this->connexion = new PDO (\n 'mysql:host='.$PARAM_hote.';\n dbname='.$PARAM_nom_bd, $PARAM_utilisateur, $PARAM_mot_passe);\n $this->connexion-> setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, \"SET NAMES 'utf8'\");\n } catch (Exception $e) {\n echo 'Erreur: ' .$e->getMessage() . '<br/>';\n echo 'N° : '.$e->getCode();\n }\n }", "protected function conectaDB(){\n try {\n $Con = new PDO(\"mysql:host=localhost;dbname=idioma\", \"root\", \"\");\n //$Con = new PDO(\"mysql:host=localhost;dbname=id11380331_idioma\", \"root_idioma\", \"Root_IdiomaZ\"); \n return $Con;\n } catch (PDOException $ex) {\n return $ex->getMessage();\n }\n }", "function connexion()\r\n {\r\n require($this->nomFichierInfosSensibles);\r\n try {\r\n $this->cBD = new PDO('mysql:host=localhost;dbname=' . $strNomBD, $strNomAdmin, $strMotPasseAdmin);\r\n $this->cBD->exec('SET NAMES \"UTF8\"');\r\n } catch (PDOException $e) {\r\n echo 'Erreur : ' . $e->getMessage();\r\n die();\r\n }\r\n return $this->cBD;\r\n }", "public static function abrir_conexion(){\n if(!isset(self::$conexion))//SI NO ESTA INICIADA LA SESION, ES DECIR, SI NO ESTA CONTECTADO\n {\n try{\n include_once 'config.inc.php'; //INCLUYENDO TODO LO QUE SE ENCUENTRA EN config.inc.php\n \n self::$conexion=new PDO('mysql:host='.NOMBRE_SERVIDOR.';dbname='.NOMBRE_BD.'',NOMBRE_USUARIO,PASSWORD);\n self::$conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); //PARA OBTENER LOS ERRORES DE LA BASE DE DATOS\n self::$conexion->exec(\"SET CHARACTER SET utf8\");\n }catch(PDOException $e){\n print \"ERROR\".$e->getMessage().\"<br>\";\n die();\n }\n\n } \n \n }", "function conectar_a_bd($basededatos=\"CER\") {\r\n\t$usuario='root';\r\n\t$contrasenia='toor0908';\t\r\n\t$host='localhost';\r\n\t$link = mysqli_connect($host, $usuario, $contrasenia, $basededatos);\r\n\tif (mysqli_connect_errno()) {\r\n\t\tprintf(\"Connect failed: %s\\n\", mysqli_connect_error());\r\n\t\texit();\r\n\t}\t\r\n\t/*\r\n\t$db_selected = mysqli_select_db($basededatos, $link);\r\n\tif (!$db_selected) {\r\n\t\tdie ('Can\\'t use '.$basededatos.' : ' . mysqli_error($link);\r\n\t}\r\n\t*/\r\n\treturn $link;\r\n}", "function DbConnect(){\n\t\t$this->conexion = @mysqli_connect($this->hostname_logon, $this->username_logon, $this->password_logon) or die ('No se puede conectar a la base de datos');\n\t\tmysqli_select_db($this->conexion,$this->database_logon) or die ('No se puede seleccionar la base de datos!');\n\t\t@mysqli_query($this->conexion,\"SET NAMES 'utf8'\"); \t\n\t\treturn;\n\t}", "private function getConnection() {\n // Datos de conexion\n// $parametros = parse_ini_file(\"../conf/conexion.ini\");\n \n $parametros=ConexionesBDPojo::dataBD(Session::getSesion(\"tipo\"));\n \n $server = $parametros[\"01\"];\n $user = $parametros[\"02\"];\n $pass=$parametros[\"03\"];\n $db=$parametros[\"04\"];\n if($this->cn == null) {\n try {\n $this->cn = mysqli_connect($server,$user,$pass,$db);\n mysqli_set_charset($this->cn, 'utf8');\n if($this->cn) {\n// echo 'ok';\n }\n else { \n throw new Exception(\"No se tiene acceso al servidor o la Base de datos no existe.\");\n }\n } catch( Exception $e ) {\n throw $e;\n }\n }\n return $this->cn;\n }", "private function setConexion(){\n\t\t$conf = Config::getInstance();\n\t\t$this->direccion=$conf->getDireccion();\n\t\t$this->nameBD=$conf->getBD();\n\t\t$this->puerto=$conf->getpuerto();\n\t\t$this->usuario=$conf->getUsuarioBD();\n\t\t$this->password=$conf->getPasswd();\n\t\t//print_r($conf); die();\n\t\t\n\t}", "public function connect(){\n\t\t//try to connect to the database\n\t\t$this->conexao = mysql_connect($this->hostname, $this->username, $this->password);\n\n\t\t//if connection is made, try to select the database\n\t\tif($this->conexao){\n\t\t\tif(mysql_select_db ($this->database, $this->conexao)){\n\t\t\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\t\t\tmysql_query('SET character_set_connection=utf8');\n\t\t\t\tmysql_query('SET character_set_client=utf8');\n\t\t\t\tmysql_query('SET character_set_results=utf8');\n\t\t\t\treturn json_encode(array('success'=>true,'result'=>'{}',\"msg\"=>\"Conexão com o banco bem sucedida\"));\n\t\t\t}\n\t\t}\n\t\treturn json_encode(array('success'=>false,'result'=>'{}',\"msg\"=>mysql_error()));\n\t}", "private function connect(){\n $this->conn = new mysqli($this->host, $this->user, $this->password, $this->data)\n or die('Ket noi khong thanh cong');\n $this->conn->query('set names UTF8');\n }", "function connectToDB()\n {\n $this->connection->connect();\n }", "private function connect() {\n try {\n $dsn = 'mysql:host=127.0.0.1;dbname=bd_android;mysql:port=3306;mysql:charset=utf8mb4';\n $usuario = 'root';\n $contraseña = '';\n $this->db = new PDO($dsn, $usuario, $contraseña,array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n }", "private function accesoBD() {\n try {\n // Array con opciones\n $arrOptions = array(\n PDO::ATTR_EMULATE_PREPARES => FALSE,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"\n );\n // se crea la conexión\n $con = new PDO('mysql:host=localhost;dbname=morosos', 'dwes', 'abc123.', $arrOptions);\n return $con;\n } catch (Exception $e) { // Se controla las excepciones\n print $e->getMessage();\n die();\n }\n }", "function conectar1 ($servidor, $usuario, $pass, $base) {\n\t$db_con = mysql_connect ($servidor,$usuario,$pass);\n\tif (!$db_con) return false; \n\tif (!mysql_select_db ($base, $db_con)) return false;\n\tif (!mysql_query(\"SET NAMES 'utf8'\")) return false;\n\treturn $db_con; \n}", "function DBConnect()\n\t\t{\n\t\t\t\t$this->host = HOST;\n\t\t\t\t$this->user = USER;\n\t\t\t\t$this->password = PASSWORD;\n\t\t\t\t$this->database = DATABASE;\n\t\t\t\t$this->status=false;\n\t\t}", "public function connect( ) {\n\t\tglobal $LANG, $CONFIG;\n\t\t// Crea connessione\n\t\t$this->link = mysql_connect($CONFIG['db_serv'], $CONFIG['db_user'], $CONFIG['db_pass']);\n\t\tif( !$this->link ) {\n\t\t\t// Termina e visualizza un messaggio di errore in caso di insuccesso\n\t\t\tdie($LANG['DB_ERROR'] . showdebug(\" - \". mysql_error()));\n\t\t}\n\t\t// Assicura connessione UTF8 al database\n\t\tmysql_query(\"SET NAMES 'utf8'\", $this->link);\n\t\t// Imposta fuso orario della connessione\n\t\tmysql_query(\"SET time_zone '{$CONFIG['timezone']}'\", $this->link);\n\t\t// Seleziona database\n\t\t$this->usedb($CONFIG['db_database']);\n\t}", "public function connect()\n {\n $this->db = DriverManager::getConnection([\n 'dbname' => $this->dbName,\n 'user' => $this->user,\n 'password' => $this->password,\n 'host' => $this->host,\n 'port' => $this->port,\n 'driver' => $this->driver,\n 'charset' => $this->charset\n ]);\n }", "public function connect()\n {\n $connstring = 'mysql:host='. $this->ip .';dbname='. $this->database .';';\n $this->db = new PDO($connstring, $this->username, $this->password, array(\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\'',\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ));\n }", "private function makeConnection(){\n $this->database = new \\PDO('mysql:host=localhost;dbname=healthone', \"root\", \"\");\n }", "function connexion()\r\n {\r\n $connexion = new PDO(\"mysql:host=localhost;dbname=grindhouse\", 'root', ''); // connexion à la BDD\r\n\r\n $this->db=$connexion;\r\n \r\n $this->database = new Database();\r\n }", "protected function connect() {\n\t\tif (!empty($this->connection)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dbConfig = Config::getInstance()->get('resource.database.tru.*');\n\n\t\t$dsn = 'mysql:host=' . $dbConfig['host'] . ';dbname=' . $dbConfig['database'];\n\t\t$this->connection = new PDO($dsn, $dbConfig['user'], $dbConfig['password']);\n\t}", "private function connect()\n {\n $dsn = \"mysql:host=$this->host;dbname=$this->db;charset=$this->charset\";\n $this->connection = new PDO($dsn, $this->user, $this->pass, $this->opt);\n }", "public function __construct() {\n $this->conexion = DataBase::getInstance();\n }", "private function open_connection()\n\t {\n\t\tswitch($this->tp_db)\n\t\t{\n\t\t\tcase \"PGSQL\":\n\t\t\t #echo ConfigDB;\n\t\t\t $this->conn = pg_connect(\"host=\".$this->ConfigDB['dbhost'].\" dbname=\".$this->ConfigDB['dbname'].\" user=\".$this->ConfigDB['dbuser'].\" password=\".$this->ConfigDB['dbpass'])\n\t\t\t or die('No se ha podido conectar: ' . pg_last_error());\n\t\t\t pg_set_client_encoding($this->conn, 'utf8');\n\n\t\t\tbreak;\n\t\t\tcase \"MYSQL\":\n\t\t\t $this->conn = new mysqli($this->ConfigDB['dbhost'], $this->ConfigDB['dbuser'], $this->ConfigDB['dbpass'], $this->ConfigDB['dbname'],$this->ConfigDB['dbport']);\n\t\t\t\t//verifica si hubo algun error\n\t\t\t\tif ($this->conn->connect_error) {\n\t\t\t\t\techo 'Error de conexión con la base de datos: ( error #' . $this->conn->connect_error . ') '\n\t\t\t\t\t\t\t. $this->conn->connect_error;\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t\tmysqli_set_charset($this->conn,\"utf8\");\n\t\t\tbreak;\n\t\t}\n\t }", "public function conectar()\n\t{\n $host = \"localhost\";\n $port = \"5432\";\n $datab = \"ANALISISDESISTEMAS\";\n $user = \"UMG\"; //usuario de postgres\n $pass = \"INGENIERIA\"; //password de usuario de postgres\n\n $conn_string = \"host=\". $host . \" port=\" . $port . \" dbname= \" . $datab . \" user=\" . $user . \" password=\" . $pass;\n\n $dbconn = pg_connect($conn_string) or die;\n\n // validar la conexión\n if(!$dbconn) {\n echo \"Error al conectar a la Base de datos\\n\";\n exit;\n }\n else {\n //echo \"Coneccion Exitosa.\";\n }\n }", "function conectarBD(){\r\n\r\n \t$this->consulta = new mysqli($this->servidor,$this->nombreDeUsuario, $this->contrasena, $this->nombreBD);\r\n\t\t\r\n\t\tif ($this->consulta->connect_error) {\r\n\t \tprintf('Connect failed: %s\\n', $consulta->connect_error);\r\n\t \texit();\r\n\t\t}\r\n\r\n\t\t$this->consulta->set_charset('ISO-8859-1');\r\n }", "public function connect() {\n $this->db->setSQLQueries($this->sql_queries);\n $this->db->setDbConnectionSettings($this->db_connection_settings);\n $this->db->setLogger($this->logger);\n $this->db->makeDbConnection();\n }", "private function connect(){\n try{\n $this->conn = new AtomicPDO(\"mysql:host=\" . $this->settings[\"hostname\"] . \";dbname=\" . $this->settings[\"database_name\"] . \";charset=utf8\", $this->settings[\"database_username\"], \n $this->settings[\"database_password\"], array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // set the PDO error mode to exception\n $this->conn->setAttribute( PDO::ATTR_EMULATE_PREPARES, true ); //emulate prepared statements, allows for more flexibility\n }\n catch(PDOException $e){\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "public function Conectar(){\n\t\t\t$cn = new PDO('mysql:host=127.0.0.1:3306; dbname='.$this->Bdatos, $this->User, $this->Pass);\n\t\t\treturn $cn;\n\t\t}" ]
[ "0.7984605", "0.77093685", "0.7690302", "0.7661626", "0.7632539", "0.7606131", "0.758884", "0.7582044", "0.7563489", "0.7558513", "0.75079155", "0.7503986", "0.7489331", "0.74865955", "0.7465534", "0.7435732", "0.7386728", "0.73854107", "0.7350121", "0.7343738", "0.7327039", "0.72836727", "0.7280188", "0.7273687", "0.7268781", "0.7267415", "0.7261166", "0.72528386", "0.7250603", "0.7236047", "0.7217493", "0.7209791", "0.720664", "0.72061133", "0.7201275", "0.71996254", "0.7184968", "0.7182371", "0.71807563", "0.7177666", "0.71691436", "0.71654665", "0.71653134", "0.7161854", "0.71613455", "0.7143766", "0.71389407", "0.7123416", "0.7111896", "0.70982206", "0.7089457", "0.70751107", "0.7070284", "0.7070258", "0.705176", "0.7034403", "0.7031291", "0.7030943", "0.70133376", "0.701322", "0.7005972", "0.7005972", "0.7005972", "0.7005972", "0.7005972", "0.7005972", "0.7005972", "0.7005972", "0.7003093", "0.6995912", "0.69953877", "0.69953877", "0.6979437", "0.69730085", "0.6968742", "0.6966741", "0.6966505", "0.696537", "0.69595116", "0.6951141", "0.69465894", "0.69421273", "0.69374555", "0.69234186", "0.6921501", "0.6920171", "0.691474", "0.691059", "0.6905412", "0.69043005", "0.6899081", "0.68967015", "0.68921363", "0.6885319", "0.6883807", "0.6881948", "0.6881091", "0.6874456", "0.68704134", "0.6865738" ]
0.7978354
1
Gets the isDowngradeJustificationRequired property value. Exposes whether justification input is required on label downgrade.
Получает значение свойства isDowngradeJustificationRequired. Отображает необходимость ввода обоснования при понижении метки.
public function getIsDowngradeJustificationRequired(): ?bool { $val = $this->getBackingStore()->get('isDowngradeJustificationRequired'); if (is_null($val) || is_bool($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'isDowngradeJustificationRequired'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIsDowngradeJustificationRequired(?bool $value): void {\n $this->getBackingStore()->set('isDowngradeJustificationRequired', $value);\n }", "public function getIsDiscountLossProtection()\n {\n return isset($this->IsDiscountLossProtection) ? $this->IsDiscountLossProtection : null;\n }", "public function getJustification()\n {\n if (array_key_exists(\"justification\", $this->_propDict)) {\n return $this->_propDict[\"justification\"];\n } else {\n return null;\n }\n }", "public function getJustification()\n {\n return $this->justification;\n }", "public static function isDisabled()\n {\n return self::$layoutDisabled;\n }", "public function getHasRecommendedBudgetUnwrapped()\n {\n return $this->readWrapperValue(\"has_recommended_budget\");\n }", "public function getJustification(): ?string {\n $val = $this->getBackingStore()->get('justification');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'justification'\");\n }", "public function getDangerLevelAttribute()\n {\n return $this->is_freescan ? 0 : 10;\n }", "protected function downForMaintenance()\n {\n if (! $this->option('force')) {\n return $this->laravel->isDownForMaintenance();\n }\n\n return false;\n }", "public function getIsValidationOnly()\n {\n if (array_key_exists(\"isValidationOnly\", $this->_propDict)) {\n return $this->_propDict[\"isValidationOnly\"];\n } else {\n return null;\n }\n }", "public function maintenanceCheck()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\tif (!$this->User->hasAccess('maintenance', 'modules'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tif (\\System::getContainer()->get('lexik_maintenance.driver.factory')->getDriver()->isExists())\n\t\t\t{\n\t\t\t\treturn '<p class=\"tl_error\">' . $GLOBALS['TL_LANG']['MSC']['maintenanceEnabled'] . '</p>';\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\n\t\treturn '';\n\t}", "public function getIsDistribut()\n {\n return $this->is_distribut;\n }", "public function getIsDistribut()\n {\n return $this->is_distribut;\n }", "public function getLossy()\n {\n return $this->config()->lossy;\n }", "function isUpgrade() {\n\t\treturn true;\n\t}", "function isUpgrade() {\n\t\treturn true;\n\t}", "public function isDemanded() {\n return $this->required || $this->isLocked();\n }", "public function getHttpsRequired()\n {\n return $this->https_required;\n }", "public function getKeepFlat(): bool\n\t{\n\t\treturn $this->productKeepFlat ?? false;\n\t}", "public function getRestricted() : bool\n {\n return $this->restricted;\n }", "public function getConsistencyGroupPolicy()\n {\n return isset($this->consistency_group_policy) ? $this->consistency_group_policy : '';\n }", "public function isDown()\n {\n return $this->options['direction'] === 'down';\n }", "public function isDownForMaintenance();", "public function allowBackwardsCompatibleVerification() {\n return (bool)Mage::getStoreConfig(self::CONFIG_PATH_BACKWARDS_COMPATIBLE);\n }", "public function hasWeightKg()\n {\n return $this->weight_kg !== null;\n }", "public function isDeprecated()\r\n\t{\r\n\t\treturn $this->_deprecated; \r\n\t}", "public function isDownForMaintenance()\n {\n // TODO: Implement isDownForMaintenance() method.\n }", "public function hasGradedVersion() {\n return $this->graded_version !== -1;\n }", "public static function downgrade()\n\t{\n\t\t$account_data = \\V1\\Model\\Account::get_account();\n\t\t\n\t\t// Do we need to downgrade them?\n\t\tif (\n\t\t\tisset($account_data) &&\n\t\t\t$account_data['free_account_on'] !== 0 &&\n\t\t\t\\Date::forge($account_data['free_account_on'])->format('%Y/%m/%d') !== \\Date::forge()->format('%Y/%m/%d')\n\t\t) {\n\t\t\treturn \\V1\\Model\\Account::be_free_my_brother();\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static function needs_update() {\n\t\t$needs_upgrade = self::compare_for_update(\n\t\t\tarray(\n\t\t\t\t'option' => 'frm_db_version',\n\t\t\t\t'new_db_version' => FrmAppHelper::$db_version,\n\t\t\t\t'new_plugin_version' => FrmAppHelper::plugin_version(),\n\t\t\t)\n\t\t);\n\n\t\tif ( ! $needs_upgrade ) {\n\t\t\t$needs_upgrade = apply_filters( 'frm_db_needs_upgrade', $needs_upgrade );\n\t\t}\n\n\t\treturn $needs_upgrade;\n\t}", "public function getOverrideWarningsFlag(): ?string\n {\n return $this->overrideWarningsFlag;\n }", "public function isDownForMaintenance(): bool\n {\n return $this['files']->exists($this->storagePath('app.down'));\n }", "public function isDoubleOptInEnabled()\n {\n return $this->getConfigForStore(self::XML_PATH_LOGGED_CONFIRM_EMAIL_TEMPLATE);\n }", "public function getIsRequired()\n {\n if (array_key_exists(\"isRequired\", $this->_propDict)) {\n return $this->_propDict[\"isRequired\"];\n } else {\n return null;\n }\n }", "public function getIsRequired()\n {\n if (array_key_exists(\"isRequired\", $this->_propDict)) {\n return $this->_propDict[\"isRequired\"];\n } else {\n return null;\n }\n }", "public function getIsObsolete()\n {\n return $this->is_obsolete;\n }", "public function isWarning() {\n return $this->isWarning;\n }", "public function is_weight_formatted() {\n\t\treturn $this->is_column_formatted('Weight');\n\t}", "public function getNeedMedicalRelease()\n\t{\n\t\treturn $this->need_medical_release;\n\t}", "function needsLayout() {\n\t\treturn $this->layoutDirty;\n\t}", "protected function getAsLowAs()\n {\n return ( $this->helper('breadcheckout')->isAsLowAsPDP() ) ? 'true' : 'false';\n }", "public function getProtectionEligibility()\n {\n return $this->_getField(self::$PROTECTION_ELIGIBILITY);\n }", "public function canDegradeFurther(): bool\n {\n return !$this->isPastSellByDate() && $this->quality - $this->getDegradationAmount() < 50;\n }", "public function needs_grading() {\n return ($this->timemodified > $this->timegraded);\n }", "public function getPasswordRequired()\n {\n if (array_key_exists(\"passwordRequired\", $this->_propDict)) {\n return $this->_propDict[\"passwordRequired\"];\n } else {\n return null;\n }\n }", "public function getInSales() : string\n {\n return (string) false;\n }", "#[Pure] public function getDeprecation(): ?Deprecation;", "public function getIsNotAdminAttribute()\n {\n return !$this->isAdmin();\n }", "public function isRestricted()\n {\n return (bool)$this->restricted;\n }", "public function getGradedVersion() {\n $version = false;\n /** @var GradedComponent $graded_component */\n foreach ($this->graded_components as $graded_component) {\n $v = $graded_component->getGradedVersion();\n if ($version === false) {\n $version = $v;\n continue;\n }\n if ($v !== $version) {\n return false;\n }\n }\n return $version;\n }", "public function getTaGradedGradeable() {\n return $this->ta_graded_gradeable;\n }", "public function getTaGradedGradeable() {\n return $this->ta_graded_gradeable;\n }", "public function getProtection()\n {\n if (array_key_exists(\"protection\", $this->_propDict)) {\n if (is_a($this->_propDict[\"protection\"], \"\\Beta\\Microsoft\\Graph\\Model\\WorkbookFormatProtection\") || is_null($this->_propDict[\"protection\"])) {\n return $this->_propDict[\"protection\"];\n } else {\n $this->_propDict[\"protection\"] = new WorkbookFormatProtection($this->_propDict[\"protection\"]);\n return $this->_propDict[\"protection\"];\n }\n }\n return null;\n }", "function isRequired() {\n\t\treturn $this->data_array['is_required'];\n\t}", "public function isSetWeight()\n {\n return !is_null($this->_fields['Weight']['FieldValue']);\n }", "public function getDeliveryOptimizationMode()\n {\n if (array_key_exists(\"deliveryOptimizationMode\", $this->_propDict)) {\n if (is_a($this->_propDict[\"deliveryOptimizationMode\"], \"\\Beta\\Microsoft\\Graph\\Model\\WindowsDeliveryOptimizationMode\") || is_null($this->_propDict[\"deliveryOptimizationMode\"])) {\n return $this->_propDict[\"deliveryOptimizationMode\"];\n } else {\n $this->_propDict[\"deliveryOptimizationMode\"] = new WindowsDeliveryOptimizationMode($this->_propDict[\"deliveryOptimizationMode\"]);\n return $this->_propDict[\"deliveryOptimizationMode\"];\n }\n }\n return null;\n }", "public function has_weight()\n {\n }", "public function has_weight()\n {\n }", "public function setJustification($var)\n {\n GPBUtil::checkString($var, True);\n $this->justification = $var;\n\n return $this;\n }", "public static function IsInMaintenance()\n {\n return self::$bInMaintenance;\n }", "public function getRequired() {\n return @$this->attributes['required'];\n }", "public function get_weight_loss()\n {\n return $this->current_weight_comp - $this->previous_weight_comp;\n }", "public function getRequired(): bool\n {\n return $this->_required;\n }", "public static function isDownForMaintenance()\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->isDownForMaintenance();\n }", "public function getRequired(): bool\n {\n return $this->required;\n }", "public function isBilateralStandardOnly()\n {\n return $this->id == self::BILATERALS_STANDARD_PERMITS_ONLY_ID;\n }", "public function isSuffixRequired()\n {\n return (bool)$this->_getAttribute('suffix')->getIsRequired();\n }", "public function isStrict()\n {\n return $this->get(self::STRICT);\n }", "public function render_uncompatible()\n {\n $compatible = $this->compatible_column();\n $column = $this->manager->get_current_width();\n $text = wp_kses(sprintf(__('This module works best for column <strong>%s</strong> ( current column width <strong>%s</strong> ). This warning will only show if you login as Admin.', 'jnews'), implode(', ', $compatible), $column), wp_kses_allowed_html());\n $element =\n \"<div class=\\\"alert alert-error alert-compatibility\\\">\n <strong>\" . jnews_return_translation('Optimal Column','jnews', 'optimal_column') . \"</strong> {$text}\n </div>\";\n\n return $element;\n }", "public function getMaintenancePolicy()\n {\n return $this->maintenance_policy;\n }", "public function getDeprecated()\n {\n return $this->deprecated;\n }", "public function getDeprecated()\n {\n return $this->deprecated;\n }", "public function getIsRemoveDeviceDisabled()\n {\n if (array_key_exists(\"isRemoveDeviceDisabled\", $this->_propDict)) {\n return $this->_propDict[\"isRemoveDeviceDisabled\"];\n } else {\n return null;\n }\n }", "public function getFailedRequirement()\n {\n return $this->requirement;\n }", "public function getUpgradeDiscount()\n\t{\n\t\tif ( $this->ordering <= 1 )\n {\n\t\t\treturn 0;\n }\n \t\t\t\n\t\treturn $this->getValue( 'upgrade_discount', 0 );\n\t}", "public function getVueDevisDroitSuppr(): ?bool {\n return $this->vueDevisDroitSuppr;\n }", "public function getDeprecated()\n {\n return $this->deprecated;\n\n }", "public function getProtectionLevel()\n {\n return $this->protection_level;\n }", "public function getDisabled()\n {\n return isset($this->disabled) ? $this->disabled : false;\n }", "public function isDairyFree() {\n return (bool) $this->getDairyFree();\n }", "public function getSellerThirdPartyCheckoutDisabled()\n {\n return $this->sellerThirdPartyCheckoutDisabled;\n }", "public function isSetupFixed()\n {\n return $this->setup_fixed;\n }", "public function getValidForMaxWeight() : ?float\n {\n return $this->validForMaxWeight;\n }", "public function getConversionAdjustment()\n {\n return isset($this->conversion_adjustment) ? $this->conversion_adjustment : false;\n }", "public function getHasRecommendedBudget()\n {\n return isset($this->has_recommended_budget) ? $this->has_recommended_budget : null;\n }", "function getLicensure() {\r\n\t\treturn $this->getData('licensure');\r\n\t}", "protected function maintenance_mode() {\n\t\treturn file_exists(ABSPATH . '.maintenance') || defined('WP_INSTALLING');\n\t}", "public function getRequired(){\n\t\treturn false;\n\t}", "function componentUpgradeEligibility($deployment_descriptor, $is_label_addon = true) {\n if (property_exists($deployment_descriptor, 'INSTANCE_TOKEN') && $deployment_descriptor->INSTANCE_TOKEN) {\n if (!$is_label_addon) {\n $content='<span rel=\"tooltip\" data-original-title=\"This instance is eligible for upgrades.\"><i class=\"icon-flag\"></i></span>'; \n } else { \n $content='<span class=\"label label-addon\" rel=\"tooltip\" data-original-title=\"This instance is eligible for upgrades.\"><i class=\"icon-flag\"></i></span>';\n }\n return $content;\n }\n return '';\n}", "protected function _getDisabled()\n {\n return $this->getElement()->getDisabled() ? ' disabled' : '';\n }", "public function getDairyFree() {\n return $this->dairy_free;\n }", "public function getRatingUpgradeFlag() \n {\n return Mage::getStoreConfig(static::XML_PATH_RATING);\n }", "public function getRequiresAttribute()\n {\n return unserialize($this->attributes['requires']);\n }", "public function getVpnEnableAlwaysOnLockdownMode(): ?bool {\n $val = $this->getBackingStore()->get('vpnEnableAlwaysOnLockdownMode');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'vpnEnableAlwaysOnLockdownMode'\");\n }", "public function getIsLocked() {\n return @$this->attributes['is_locked'];\n }", "public function isAutoLayoutEnabled(): bool\n {\n return $this->autoLayout;\n }", "public function getNotSwitchableReason()\n {\n $message = parent::getNotSwitchableReason();\n\n if ($this->getProcessor()\n && Paypal\\Main::PP_METHOD_PAD === $this->getServiceName()\n && $this->getProcessor()->getWarningNote($this)\n ) {\n $message = static::t(\n 'To enable this payment method, you need <Multi-vendor> module installed.',\n array(\n 'link' => \\XLite\\Core\\Converter::buildURL(\n 'addons_list_marketplace',\n '',\n array(\n 'moduleName' => 'XC\\MultiVendor'\n )\n )\n )\n );\n }\n\n return $message;\n }", "public function getSkipSaleableCheck()\n {\n /* @var $helper Mage_Catalog_Helper_Product */\n $helper = Mage::helper('catalog/product');\n if (method_exists($helper, 'getSkipSaleableCheck')) {\n return $helper->getSkipSaleableCheck();\n }\n return false;\n }", "public function getPasswordRequireToUnlockFromIdle()\n {\n if (array_key_exists(\"passwordRequireToUnlockFromIdle\", $this->_propDict)) {\n return $this->_propDict[\"passwordRequireToUnlockFromIdle\"];\n } else {\n return null;\n }\n }", "public function needUpgrade()\n {\n return $this->currentVersion() !== $this->userVersion();\n }" ]
[ "0.6643391", "0.5520487", "0.53588325", "0.5305857", "0.51270336", "0.49677268", "0.49421895", "0.48778743", "0.4834891", "0.48045918", "0.47323826", "0.46895826", "0.46895826", "0.46798998", "0.4651015", "0.4651015", "0.46365902", "0.46221855", "0.46172783", "0.46080548", "0.46044904", "0.4592793", "0.45910305", "0.45900697", "0.4566925", "0.45599467", "0.4550259", "0.45438296", "0.45426244", "0.45247877", "0.45145917", "0.45038062", "0.4502304", "0.4498454", "0.4498454", "0.4492135", "0.44889614", "0.44769946", "0.44725394", "0.44704875", "0.44611084", "0.44595864", "0.4459258", "0.44530886", "0.445158", "0.44451267", "0.4443308", "0.443547", "0.44344693", "0.44327635", "0.44302356", "0.44302356", "0.44296226", "0.44276917", "0.442239", "0.44160897", "0.44032764", "0.44030017", "0.4398555", "0.4394193", "0.43902352", "0.43879452", "0.43862268", "0.4385608", "0.43820673", "0.43782693", "0.43762016", "0.4366037", "0.43636832", "0.4363302", "0.4362961", "0.4362961", "0.43498155", "0.4348227", "0.4346109", "0.43387547", "0.43372527", "0.43359277", "0.43330187", "0.43217567", "0.4312097", "0.43108404", "0.43100962", "0.43089974", "0.43081406", "0.4302778", "0.43007737", "0.42974478", "0.429504", "0.4294379", "0.42939276", "0.4291148", "0.42868125", "0.4284254", "0.4278172", "0.4277824", "0.4275614", "0.42744398", "0.42711487", "0.42689687" ]
0.72811425
0
Sets the defaultLabelId property value. The defaultLabelId property
Устанавливает значение свойства defaultLabelId. Свойство defaultLabelId
public function setDefaultLabelId(?string $value): void { $this->getBackingStore()->set('defaultLabelId', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setDefault($id, $value){ }", "public function setDefaultId(SetCalendarItemInfo $defaultId)\n {\n return $this->setChild('default', $defaultId);\n }", "protected function defaultLabel() {\n return $this->label;\n }", "public function getDefaultLabel()\n {\n $this->_display = Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_display' . $this->_labeltype);\n $this->setPosition(Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_position' . $this->_labeltype));\n $this->getImage(Mage::getStoreConfig('label/label_group' . $this->_labeltype . '/label_image' . $this->_labeltype));\n }", "protected function createDefaultLabel() {\r\n\t \tif(preg_match('/<.*?>/', $this->labelName)) {\r\n\t\t\t// label contains html\r\n\t\t\t$fragNode = $this->convertNode($this->labelName);\r\n\t\t\t$this->labelName = preg_replace('/<.*?>/', '', $this->labelName);\r\n\t\t\t$node = new Larc_Html_Element('label');\r\n\t\t} else {\r\n\t\t\t$node = new Larc_Html_Element('label', $this->labelName);\r\n\t\t}\r\n\t\tif($this->blockTag == 'none') {\r\n\t\t\t$this->labelNode = $this;\r\n\t\t} else if($this->labelNode) {\r\n\t\t\t$this->replaceChild($node, $this->labelNode);\r\n\t\t\t$this->labelNode = $node;\r\n\t\t} else {\r\n\t\t\t$this->labelNode = $this->appendChild($node);\r\n\t\t}\r\n\r\n\t\tif(isset($fragNode)) {\r\n\t\t\t$this->labelNode->appendChild($fragNode);\r\n\t\t}\r\n\t\t$this->labelNode->setAttribute(\"for\", $this->fieldName);\r\n\t\tif(isset($this->fieldNode) && !$this->labelNode->getAttribute(\"id\")) {\r\n\t\t\t$this->labelNode->setAttribute(\"id\", $this->fieldName);\r\n\t\t}\r\n\t\t$this->labelNode->setAttribute(\"title\", $this->titleAttrib);\r\n\t}", "public function getDefaultId()\n {\n return $this->getChild('default');\n }", "protected function lblId_Create() {\n\t\t\t$this->lblId = new QLabel($this);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objFile->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t}", "public function set_default( $default ) {\n\n\t\t$this->data['default'] = $default;\n\t}", "function getSetAsDefaultUrl() {\n $params = $this->getRoutingContextParams();\n \n if(empty($params)) {\n $params = array('label_id' => $this->getId());\n } else {\n $params['label_id'] = $this->getId();\n } // if\n \n return Router::assemble($this->getRoutingContext() . '_set_as_default', $params);\n }", "function id_for_label( $id ) {\n return $id;\n }", "protected function setMemberDefaults(){\n parent::setMemberDefaults();\n $this->id = $this->id ? $this->id : UniqId::get(\"lsbm-\");\n }", "public function setLabel(?string $label);", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objFlowchartGrid->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function set_default($default) {\n $this->default = $default;\n }", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objPackage->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objPackageContribution->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function setDefaultElement($label, $value = null)\n\t{\n\t\t$this->defaultElement = array((string) $label, (string) $value);\n\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objMinistry->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objOnlineDonation->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objFluxogramaItem->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objPublicLogin->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\t$this->lblId->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblId->LinkedNode = QQN::TypeTest()->Id;\n\t\t\t$this->lblId->Text = $this->blnEditMode ? $this->objTypeTest->Id : QApplication::Translate('N\\A');\n\t\t\treturn $this->lblId;\n\t\t}", "public function setDefault ( $default )\r\n\t{\r\n\t\t$this->default = $default;\r\n\t}", "public function setDefaultAdTagId($var)\n {\n GPBUtil::checkString($var, True);\n $this->default_ad_tag_id = $var;\n\n return $this;\n }", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objParentPagerAddress->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objArticleRevision->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function id($default = null)\n {\n $id = $this->attr[\"id\"];\n return $id ? $id : $default;\n }", "public function getDefaultLabelId(): ?string {\n $val = $this->getBackingStore()->get('defaultLabelId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'defaultLabelId'\");\n }", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objFormProduct->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function setDefault($default) {\n\t\t$this->default = $default;\n\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objSignupEntry->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "function setLabel($label) {\n\t\t\n\t\t$this->labels[$this->getName()] = $label;\n\t\t\n\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objColecao->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function updateDefault($id);", "public function lblId_Create($strControlId = null) \n {\n $this->lblId = new \\QCubed\\Control\\Label($this->objParentObject, $strControlId);\n $this->lblId->Name = t('Id');\n $this->lblId->PreferredRenderMethod = 'RenderWithName';\n $this->lblId->LinkedNode = QQN::TouristAnswer()->Id;\n\t\t\t$this->lblId->Text = $this->blnEditMode ? $this->objTouristAnswer->Id : t('N\\A');\n return $this->lblId;\n }", "public function getLabelAttribute($name, $default = null);", "public function setDefault($default)\n {\n $this->default = $default;\n }", "public function setDefault($default)\n {\n $this->default = $default;\n }", "public static function getDefaultId()\n {\n if (self::$default_id === 0) {\n self::$default_id = self::getDefault()['id'] ?? 0;\n }\n\n return self::$default_id;\n }", "public function setDefaultSlateId($var)\n {\n GPBUtil::checkString($var, True);\n $this->default_slate_id = $var;\n\n return $this;\n }", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objIssue->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objOutgoingEmailQueue->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function getLabel($_id){\r\n if($_id != 0){\r\n $label = $this->labelService->get( $_id );\r\n }\r\n // Creating a new one\r\n else{\r\n $label = new Label();\r\n }\r\n return $label;\r\n }", "public function setDefault($default)\r\n\t{\r\n\t\t$this->default = $default;\r\n\t}", "function ChangeLabel($button_id,$label)\n\t{\n\t\t$btncnt = count($this->buttons);\n\t\tfor($i = 0; $i < $btncnt;$i++)\n\t\t{\n\t\t\tif($this->buttons[$i]['button']->id == $button_id)\n\t\t\t\t$this->buttons[$i]['label'] = $label;\n\t\t}\n\t\treturn $this;\n\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objRooms->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function id()\n {\n return 'default';\n }", "public function setLabel($label) {\r\n\t\t$this->createLabel($label);\r\n\t}", "public function setAsDefault();", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "public function admin_set_as_default ($content_id)\r\n\t{\r\n\t\t$this->setDefaultItem($content_id);\r\n\t}", "public function setLabel($label){\n\t\t$this->label = $label;\n\t}", "public function isUseDefaultLabel()\n {\n return $this->_getData('label') === null;\n }", "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "public function setLabel( $label ){\n \t$this->_label = $label;\n }", "public function setLabel(?string $label): self;", "public function setDefault($default);", "public function setDefault($default);", "public function setDefault($default);", "public function set_id_table_label_name($val)\t{\t$this->input ['id_ujian_label_name'] = $val ;\t}", "public function testSetIndicatorDefault() : void\n {\n $indicator = self::$client->get(array('a' => 'formEditor/indicator/6'));\n\n $this->assertNotNull($indicator);\n $this->assertEquals('', $indicator['6']['default']);\n\n self::$client->post(array('a' => 'formEditor/6/default'), array('default' => 'some default'));\n\n $indicator = self::$client->get(array('a' => 'formEditor/indicator/6'));\n\n $this->assertNotNull($indicator);\n $this->assertEquals('some default', $indicator['6']['default']);\n }", "function setdefault()\r\n\t{\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$cid\t= JRequest::getVar( 'cid', 0, 'method', 'array' );\r\n\t\t$cid\t= ((int) $cid[0]);\r\n\t\t$model = JModel::getInstance( 'Connection', 'FabrikModel' );\r\n\t\t$link = 'index.php?option=com_fabrik&c=connection&view=display';\r\n\t\t$model->setDefault( $cid );\r\n\t\t$this->setRedirect( $link, JText::_( 'DEFAULT CONNECTION UPDATED' ) );\t\r\n\t}", "public function setLabel($label) {\n $this->label = $label;\n }", "public function setId($v) { $this->_id = (string)$v; }", "public function setLabel($key, $label) {\n $this->labels[$key] = $label;\n }", "public function defaultValueId()\n {\n foreach($this->getValuesList() as $value) {\n if ($value->is_default) return $value->id;\n }\n\n return null;\n }", "public function defaultValueId()\n {\n foreach($this->getValuesList() as $value) {\n if ($value->is_default) return $value->id;\n }\n\n return null;\n }", "public function setId($id = null)\n {\n if (is_null($id)) {\n $id = Helper::generateID();\n }\n\n $this->id = $id;\n\n }", "protected function setMemberDefaults(){\n parent::setMemberDefaults();\n if(!$this->id) $this->id = UniqId::get(\"ssf-\");\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($serverId, $label)\n {\n $args = [\n 'SUBID' => (int) $serverId,\n 'label' => $label\n ];\n\n return $this->adapter->post('server/label_set', $args, true);\n }", "function setId($value) { $this->id=$value; }", "public function setLabel($sLabel) {\n\n $this->label = SssSBla::translateIfNeeded($sLabel, array('noDIV' => true));\n\n\t\t// becomes the BlaID or false if isn't prefixed with the BlaPrefix\n\t\t$this->sLabelBlaID = SssSBla::removeBlaPrefixIfHas($sLabel);\n\n }", "public function setLabel(?string $label)\n {\n $this->label = $label;\n }", "public function setDefaultTitle($defaultTitle)\n {\n $this->defaultTitle = $defaultTitle;\n }", "static function setasdefault(){}", "public function setId($id=null){\n $this->id = $id;\n }", "public function setDefaultValue($defaultValue) {\n\t\t$formDefinition = $this->getRootForm();\n\t\t$formDefinition->addElementDefaultValue($this->identifier, $defaultValue);\n\t}", "public function setLabel($label)\n {\n $this->_label = $label;\n }", "public function setLabel( $value );", "public function setLabel($label) {\r\n $this->label = $label;\r\n $this->handleAttribute(\"label\", $label);\r\n }", "protected function defaultLabel() {\n $type = redhen_contact_get_types($this->type);\n return $type->label . ': ' . $this->name;\n }", "public static function label( $uid, $default = '' ) {\n\t\t$uid = sanitize_key( $uid );\n\n\t\t$label = WPRM_Settings::get( 'label_' . $uid );\n\n\t\treturn $label ? $label : $default;\n\t}", "public function setDefault($name, $default);", "public function plantilla_resaltar_dato_label_default($param){\n $plantilla = \"<span class='label label-default' >$param</span>\";\n return $plantilla;\n }", "public function setDefaultInd($defaultInd)\n {\n $this->defaultInd = $defaultInd;\n return $this;\n }", "function setLabel(&$label) {\n $this->label =& $label;\n }", "function setLabel(&$label) {\n $this->label =& $label;\n }", "function SetId($value) { $this->id=$value; }", "function SetId($value) { $this->id=$value; }", "public function setLabelAttribute($name, $value);", "public function setDefault(string $name, $default);", "public function get_default_button_labels()\n {\n }", "public function setDefaultValue($defaultValue);" ]
[ "0.64870733", "0.6314512", "0.6272941", "0.6247607", "0.62231964", "0.62171036", "0.60467035", "0.6026453", "0.5972191", "0.59211034", "0.5799472", "0.57908475", "0.57795167", "0.5778368", "0.57721245", "0.5769674", "0.57538134", "0.5752518", "0.57431215", "0.57360166", "0.57185674", "0.5716332", "0.5713774", "0.57119477", "0.5697968", "0.56977355", "0.5693724", "0.5686122", "0.5672481", "0.56675196", "0.566509", "0.5662484", "0.56624645", "0.5659097", "0.56443924", "0.564036", "0.5637511", "0.5637511", "0.56343025", "0.5633941", "0.56275856", "0.56163955", "0.561096", "0.5609127", "0.5579885", "0.5573527", "0.5573218", "0.55631727", "0.55564106", "0.55554175", "0.55554175", "0.55554175", "0.55554175", "0.55554175", "0.55512685", "0.553637", "0.55162233", "0.5497812", "0.5497812", "0.5497812", "0.54784614", "0.5471232", "0.5454194", "0.5454194", "0.5454194", "0.5453132", "0.5437348", "0.54293674", "0.54289347", "0.5426803", "0.54179764", "0.5401271", "0.5401271", "0.53897846", "0.53884387", "0.5386205", "0.5384498", "0.5382082", "0.53812355", "0.5376055", "0.5373764", "0.5373547", "0.53635174", "0.53621393", "0.53523093", "0.5345984", "0.5340865", "0.5338066", "0.5327469", "0.5325481", "0.5319516", "0.5310546", "0.53008", "0.53008", "0.5294729", "0.5294729", "0.52855974", "0.52850395", "0.5261689", "0.52601945" ]
0.76983887
0
Sets the isDowngradeJustificationRequired property value. Exposes whether justification input is required on label downgrade.
Устанавливает значение свойства isDowngradeJustificationRequired. Открывает возможность указания, требуется ли ввод обоснования при понижении метки.
public function setIsDowngradeJustificationRequired(?bool $value): void { $this->getBackingStore()->set('isDowngradeJustificationRequired', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsDowngradeJustificationRequired(): ?bool {\n $val = $this->getBackingStore()->get('isDowngradeJustificationRequired');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isDowngradeJustificationRequired'\");\n }", "public function setJustification(?string $value): void {\n $this->getBackingStore()->set('justification', $value);\n }", "public function setSSLRequired(bool $SSLRequired): void\n {\n $this->SSLRequired = $SSLRequired;\n }", "public function setIsDiscountLossProtection($isDiscountLossProtection = null)\n {\n // validation for constraint: boolean\n if (!is_null($isDiscountLossProtection) && !is_bool($isDiscountLossProtection)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a bool, \"%s\" given', gettype($isDiscountLossProtection)), __LINE__);\n }\n if (is_null($isDiscountLossProtection) || (is_array($isDiscountLossProtection) && empty($isDiscountLossProtection))) {\n unset($this->IsDiscountLossProtection);\n } else {\n $this->IsDiscountLossProtection = $isDiscountLossProtection;\n }\n return $this;\n }", "public function setTLSRequired(bool $TLSRequired): void\n {\n $this->TLSRequired = $TLSRequired;\n }", "public function setDietingWeightLoss($dietingWeightLoss) { $this->dietingWeightLoss = $dietingWeightLoss ; }", "public function setJustification($var)\n {\n GPBUtil::checkString($var, True);\n $this->justification = $var;\n\n return $this;\n }", "function make_weight_required($shipping_fields, $product_id)\r\n\t{\r\n\t$shipping_fields['weight']['custom_attributes'] = array(\r\n\t\t'required' => 1\r\n\t);\r\n\r\n\tunset($shipping_fields['shipping_class']);\r\n\treturn $shipping_fields;\r\n\t}", "private function add_ssl_required_admin_notice() {\n\n\t\t// check settings: gateway active and SSl enabled\n\t\t$settings = get_option( 'woocommerce_elavon_settings' );\n\n\t\tif ( isset( $settings['enabled'] ) && 'yes' == $settings['enabled'] && isset( $settings['environment'] ) && 'production' == $settings['environment'] ) {\n\t\t\t// SSL check if gateway enabled/production mode\n\t\t\tif ( 'no' === get_option( 'woocommerce_force_ssl_checkout' ) ) {\n\t\t\t\t$message = sprintf(\n\t\t\t\t\t__( \"%Elavon Error%s: WooCommerce is not being forced over SSL; your customer's payment data is at risk.\", self::TEXT_DOMAIN ),\n\t\t\t\t\t'<strong>', '</strong>'\n\t\t\t\t);\n\t\t\t\t$this->get_admin_notice_handler()->add_admin_notice( $message, 'ssl-required' );\n\t\t\t}\n\t\t}\n\t}", "protected function setRequired($required)\n {\n $this->required = (bool) $required;\n }", "public function setPasswordRequired(?bool $value): void {\n $this->getBackingStore()->set('passwordRequired', $value);\n }", "public function setRequired($required): void\n {\n $this->_required = (bool)$required;\n }", "public function deactivate_free_admin_notice() {\n\n\t\t?>\n\n\t\t\t<div class=\"notice notice-error is-dismissible mwb-notice\">\n\t\t\t\t<p><strong><?php esc_html_e( 'Upsell Order Bump Offer for WooCommerce', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></strong> <?php esc_html_e( 'is deactivated, Please Update the Free version as this version is outdated and will not work with the current', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?><strong> <?php esc_html_e( 'Upsell Order Bump Offer for WooCommerce Pro', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></strong> <?php esc_html_e( 'version.', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></p>\n\t\t\t</div>\n\n\t\t<?php\n\t}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "public function setRequiredFitness($requiredFitness)\n {\n if ($this->requiredFitness !== $requiredFitness) {\n $this->requiredFitness = isset($requiredFitness) ? $requiredFitness : '';\n }\n }", "public function setRequired($required)\n {\n if ($required) {\n $this->setAttribute('required', 'required');\n } else {\n $this->removeAttribute('required');\n }\n return parent::setRequired($required);\n }", "public function disableLayout($disable=true){\n\t\tif($disable){\n\t\t\t$this->levelUp = 0;\n\t\t} else {\n\t\t\t$this->levelUp = -1;\n\t\t}\n }", "public function license_downgrade( $args, $assoc_args ) {\n\n\t\t// Check validity of username or ID, retrieve the user object.\n\t\tif ( empty( $args[0] ) ) {\n\n\t\t\t\\WP_CLI::error( __( 'A valid license ID must be specified as the first argument.' ) );\n\n\t\t} else {\n\n\t\t\t$license = get_post( $args[0] );\n\n\t\t\tif ( ! $license || 'edd_license' !== $license->post_type ) {\n\t\t\t\t\\WP_CLI::error( sprintf( __( 'No license was found with ID %d.' ), $args[0] ) );\n\t\t\t}\n\n\t\t}\n\n\t\t$price_id = isset( $assoc_args['price_id'] ) ? (int) $assoc_args['price_id'] : false;\n\t\t$download_id = edd_software_licensing()->get_download_id( $license->ID );\n\t\t$limit = edd_software_licensing()->get_price_activation_limit( $download_id, $price_id );\n\n\t\tupdate_post_meta( $license->ID, '_edd_sl_download_price_id', $price_id );\n\t\tupdate_post_meta( $license->ID, '_edd_sl_limit', $limit );\n\n\t\tWP_CLI::success( 'License downgraded' );\n\n\t}", "public function setJustification($val)\n {\n $this->_propDict[\"justification\"] = $val;\n return $this;\n }", "public function allowBackwardsCompatibleVerification() {\n return (bool)Mage::getStoreConfig(self::CONFIG_PATH_BACKWARDS_COMPATIBLE);\n }", "public function requirements_not_met_notice()\n {\n // Output our error.\n echo '<div id=\"message\" class=\"error\">';\n echo '<p>' . sprintf(__('CCB GRAVITY Functionality is missing the Gravity Form plugin and has been <a href=\"%s\">deactivated</a>. Please make sure all requirements are available.', 'ccb-gravity'), admin_url('plugins.php')) . '</p>';\n echo '</div>';\n }", "public function forceGradeUpdate()\n {\n global $DIC;\n ilMumieTaskGradeOverrideService::deleteGradeOverridesForTask($this->object);\n ilMumieTaskLPStatus::updateGrades($this->object, true);\n $DIC->ui()->mainTemplate()->setOnScreenMessage('success', $this->i18N->txt('msg_suc_saved'), false);\n $cmd = 'editLPSettings';\n $this->performCommand($cmd);\n }", "public function required() {\n\t\t$this->required = true;\n\t}", "public function getJustification()\n {\n if (array_key_exists(\"justification\", $this->_propDict)) {\n return $this->_propDict[\"justification\"];\n } else {\n return null;\n }\n }", "protected function downForMaintenance()\n {\n if (! $this->option('force')) {\n return $this->laravel->isDownForMaintenance();\n }\n\n return false;\n }", "public function setSecurityDeviceRequired(?bool $value): void {\n $this->getBackingStore()->set('securityDeviceRequired', $value);\n }", "public function setRequired($required = true);", "protected function set_additional_properties_to_false($schema)\n {\n }", "function setLicensure($licensure) {\r\n\t\treturn $this->setData('licensure', $licensure);\r\n\t}", "public function SetRequired ($required = TRUE);", "public static function enableLayout()\n {\n self::$layoutDisabled = false;\n }", "public function requiredWithout(string $requirement) : FormField\n\t{\n\t\t$this->addValidatorAttribute(Validator::REQUIRED_WITHOUT . $requirement);\n\n\t\treturn $this;\n\t}", "public function getJustification()\n {\n return $this->justification;\n }", "public function setRequired($var)\n {\n GPBUtil::checkBool($var);\n $this->required = $var;\n\n return $this;\n }", "public function setRequired($var)\n {\n GPBUtil::checkBool($var);\n $this->required = $var;\n\n return $this;\n }", "function isUpgrade() {\n\t\treturn true;\n\t}", "function isUpgrade() {\n\t\treturn true;\n\t}", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "function wc_product_weight_enabled()\n {\n }", "public static function downgrade()\n\t{\n\t\t$account_data = \\V1\\Model\\Account::get_account();\n\t\t\n\t\t// Do we need to downgrade them?\n\t\tif (\n\t\t\tisset($account_data) &&\n\t\t\t$account_data['free_account_on'] !== 0 &&\n\t\t\t\\Date::forge($account_data['free_account_on'])->format('%Y/%m/%d') !== \\Date::forge()->format('%Y/%m/%d')\n\t\t) {\n\t\t\treturn \\V1\\Model\\Account::be_free_my_brother();\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function isRequired(): bool\n {\n return $this->getOption('attributes.required', parent::isRequired());\n }", "public function setAllowWindows11Upgrade(?bool $value): void {\n $this->getBackingStore()->set('allowWindows11Upgrade', $value);\n }", "public function setRequired($required);", "public function setRequired($required);", "public function setRequired($required=false)\n {\n if(!\\in_array($required,array(true, flase)))return false;\n $this->REQUIRED = $required;\n return true;\n }", "public static function disableLayout()\n {\n self::$layoutDisabled = true;\n }", "public function setUseStringOnlyBinding( $yesNo )\n\t{\n\t\t$this->flagUseStringOnlyBinding = (boolean) $yesNo;\n\t}", "public function setRequired($required)\n {\n $this->required = (boolean) $required;\n if ($this->isRequired()) {\n $this->setAttribute('required');\n return $this;\n }\n\n if ($this->getAttributes()->containsKey('required')) {\n $this->getAttributes()->remove('required');\n }\n return $this;\n }", "public function isDownForMaintenance()\n {\n // TODO: Implement isDownForMaintenance() method.\n }", "public function setAmountIsWeight($amountIsWeight);", "public function maybe_set_required_attribute( $args ) {\r\n\t\t\tif ( ! isset( $args['required'] ) ) {\r\n\t\t\t\treturn $args;\r\n\t\t\t}\r\n\r\n\t\t\t// Comply with HTML specs.\r\n\t\t\tif ( true === $args['required'] ) {\r\n\t\t\t\t$args['required'] = 'required';\r\n\t\t\t}\r\n\r\n\t\t\treturn $args;\r\n\t\t}", "public function needUpgrade()\n {\n return $this->currentVersion() !== $this->userVersion();\n }", "public function setUnRequired();", "public function setDeprecated($var)\n {\n GPBUtil::checkBool($var);\n $this->deprecated = $var;\n\n return $this;\n }", "public static function isDisabled()\n {\n return self::$layoutDisabled;\n }", "function componentUpgradeEligibility($deployment_descriptor, $is_label_addon = true) {\n if (property_exists($deployment_descriptor, 'INSTANCE_TOKEN') && $deployment_descriptor->INSTANCE_TOKEN) {\n if (!$is_label_addon) {\n $content='<span rel=\"tooltip\" data-original-title=\"This instance is eligible for upgrades.\"><i class=\"icon-flag\"></i></span>'; \n } else { \n $content='<span class=\"label label-addon\" rel=\"tooltip\" data-original-title=\"This instance is eligible for upgrades.\"><i class=\"icon-flag\"></i></span>';\n }\n return $content;\n }\n return '';\n}", "public function getIsDiscountLossProtection()\n {\n return isset($this->IsDiscountLossProtection) ? $this->IsDiscountLossProtection : null;\n }", "public static function setEnforceNamingPolicy( $yesNo )\n\t{\n\t\tself::$enforceNamingPolicy = (boolean) $yesNo;\n\t}", "public function has_weight()\n {\n }", "public function has_weight()\n {\n }", "public function SetNotRequired()\n {\n $unsetIndices = array();\n foreach($this->validators as $index=>$validator)\n {\n if ($validator instanceof Validation\\Required)\n $unsetIndices[] = $index;\n }\n foreach($unsetIndices as $index)\n {\n unset($this->validators[$index]);\n }\n }", "public function setStorageRequireEncryption(?bool $value): void {\n $this->getBackingStore()->set('storageRequireEncryption', $value);\n }", "public function getDangerLevelAttribute()\n {\n return $this->is_freescan ? 0 : 10;\n }", "public function render_uncompatible()\n {\n $compatible = $this->compatible_column();\n $column = $this->manager->get_current_width();\n $text = wp_kses(sprintf(__('This module works best for column <strong>%s</strong> ( current column width <strong>%s</strong> ). This warning will only show if you login as Admin.', 'jnews'), implode(', ', $compatible), $column), wp_kses_allowed_html());\n $element =\n \"<div class=\\\"alert alert-error alert-compatibility\\\">\n <strong>\" . jnews_return_translation('Optimal Column','jnews', 'optimal_column') . \"</strong> {$text}\n </div>\";\n\n return $element;\n }", "public function setFreeShipping($freeShipping)\n\t{\n\t\tif(is_bool($freeShipping))\n\t\t{\n\t\t\t$this->freeShipping = $freeShipping;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new ShoppingcartInvalidDataTypeException;\n\t\t}\n\t}", "public static function wc_disabled_notice()\n {\n echo '<div class=\"error\"><p>' . sprintf(__('<strong>WooCommerce Dynamic Pricing & Discounts</strong> requires WooCommerce to be active. You can download WooCommerce %s.', 'rp_wcdpd'), '<a href=\"http://url.rightpress.net/woocommerce-download-page\">' . __('here', 'rp_wcdpd') . '</a>') . ' ' . sprintf(__('If you have any questions, please contact %s.', 'rp_wcdpd'), '<a href=\"http://url.rightpress.net/new-support-ticket\">' . __('RightPress Support', 'rp_wcdpd') . '</a>') . '</p></div>';\n }", "public function ssl_notice() {\n\n\t\tif ( ! class_exists( 'LLMS_Admin_Notices' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$id = 'stripe-ssl-warning';\n\n\t\tif ( 'yes' === get_option( 'llms_gateway_stripe_enabled' ) && ( function_exists( 'llms_is_site_https' ) && ! llms_is_site_https() ) && 'no' === get_option( 'lifterlms_checkout_force_ssl' ) ) {\n\n\t\t\t$html = sprintf(\n\t\t\t\t__( 'LifterLMS Stripe is currently enabled but the %sForce SSL%s option is disabled. Your checkout may not be secure and Stripe will only work in test mode! %sLearn More%s.', 'lifterlms-stripe' ),\n\t\t\t\t'<a href=\"' . admin_url( 'admin.php?page=llms-settings&tab=checkout' ) . '\">', '</a>',\n\t\t\t\t'<a href=\"https://lifterlms.com/docs/ssl-and-https/ \" target=\"_blank\">', '</a>'\n\t\t\t);\n\n\t\t\tLLMS_Admin_Notices::add_notice( $id, $html, array(\n\t\t\t\t'type' => 'error',\n\t\t\t\t'dismissible' => false,\n\t\t\t\t'remindable' => false,\n\t\t\t) );\n\n\t\t} elseif ( LLMS_Admin_Notices::has_notice( $id ) ) {\n\n\t\t\tLLMS_Admin_Notices::delete_notice( $id );\n\n\t\t}\n\n\t}", "public static function defaultDown()\n {\n echo static::errorMarkup(\n\t\t\t'Oops!',\n\t\t\t'<p>App is under maintainance, please check back soon.</p>'\n\t\t);\n }", "function AllowAutoUpgrade()\n\t{\n\t\treturn TRUE;\n\t}", "public function getRequired(){\n return false;\n }", "public function setRequiresAttribute($value)\n {\n $this->attributes['requires'] = serialize($value);\n\n return $this;\n }", "public function testWeightRedistributionActivatesOrNot(): void\n {\n // first pack normally - expecting 2+2 after balancing\n\n $packer = new Packer();\n $packer->addBox(new TestBox('Box', 1, 1, 4, 0, 1, 1, 2, 3,1));\n $packer->addItem(new TestItem('Item', 1, 1, 1, 1, true), 4);\n\n /** @var PackedBox[] $packedBoxes */\n $packedBoxes = iterator_to_array($packer->pack(), false);\n\n self::assertCount(2, $packedBoxes[0]->getItems());\n self::assertCount(2, $packedBoxes[1]->getItems());\n\n // same items, but with redistribution turned off - expecting 3+1 based on pure fit\n $packer = new Packer();\n $packer->addBox(new TestBox('Box', 1, 1, 3, 0, 1, 1, 3, 3,1));\n $packer->addItem(new TestItem('Item', 1, 1, 1, 1, false), 4);\n $packer->setMaxBoxesToBalanceWeight(1);\n\n /** @var PackedBox[] $packedBoxes */\n $packedBoxes = iterator_to_array($packer->pack(), false);\n\n self::assertCount(3, $packedBoxes[0]->getItems());\n self::assertCount(1, $packedBoxes[1]->getItems());\n }", "public function requiredCollateral($requiredCollateral)\n {\n return $this->setProperty('requiredCollateral', $requiredCollateral);\n }", "public function maybe_show_disabled_notice()\n {\n }", "public function setPasswordRequired($val)\n {\n $this->_propDict[\"passwordRequired\"] = boolval($val);\n return $this;\n }", "public function setAllowFallback($bool)\n\t\t{\n\t\t\t$this->allowFallback = (bool) $bool;\n\t\t}", "public function setOptionsRequired($optionsRequired)\n {\n $this->optionsRequired = (bool)$optionsRequired;\n }", "public function disableLayout()\r\n\t{\r\n\t\t$this->disableLayout = true;\r\n\t}", "public function addIsAttributeRequiredColumn()\n {\n $select = $this->getConnection()->select()\n ->from(array(\n 'mac' => $this->getTable('xcom_mapping/attribute_channel'),)\n , array())\n ->where('is_required = 1')\n ->join(array('channel' => $this->getTable('xcom_mapping/channel')),\n 'mac.channel_code=channel.channel_code and channel.is_enabled=1', array())\n ->group('mapping_attribute_id')\n ->columns(array(\n 'mapping_attribute_id',\n 'is_required' => new Zend_Db_Expr('MAX(is_required)')\n ));\n $this->getSelect()->joinLeft(array('req' => new Zend_Db_Expr('(' . $select . ')')),\n 'req.mapping_attribute_id = main_table.mapping_attribute_id', array('is_required'));\n return $this;\n }", "public function setIsUseSecondary(bool $isUseSecondary): void\n {\n $this->isUseSecondary = $isUseSecondary;\n }", "public function setDoubleOption($doubleOptin)\n {\n $this->setDoubleOptin($doubleOptin);\n }", "protected function maintenanceCheck()\n {\n if ($this->app['config']->get('general/maintenance_mode', false)) {\n $notice = json_encode([\n 'severity' => 1,\n 'notice' => \"Bolt's <strong>maintenance mode</strong> is enabled. This means that non-authenticated users will not be able to see the website.\",\n 'info' => \"To make the site available to the general public again, set <tt>maintenance_mode: false</tt> in your <tt>config.yml</tt> file.\"\n ]);\n $this->app['logger.flash']->configuration($notice);\n }\n }", "public function setIsDisableCapable($flag);", "public function setExclusivePackages($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->exclusive_packages = $arr;\n\n return $this;\n }", "public static function invalidDirectionsRequestAvoidHighways()\n {\n return new static('The directions request avoid hightways flag must be a boolean value.');\n }", "public function maintenanceCheck()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\tif (!$this->User->hasAccess('maintenance', 'modules'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tif (\\System::getContainer()->get('lexik_maintenance.driver.factory')->getDriver()->isExists())\n\t\t\t{\n\t\t\t\treturn '<p class=\"tl_error\">' . $GLOBALS['TL_LANG']['MSC']['maintenanceEnabled'] . '</p>';\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\n\t\treturn '';\n\t}", "public function isSuffixRequired()\n {\n return (bool)$this->_getAttribute('suffix')->getIsRequired();\n }", "public function setDeviceLockRequired($val)\n {\n $this->_propDict[\"deviceLockRequired\"] = boolval($val);\n return $this;\n }", "public function setDeviceLockRequired($val)\n {\n $this->_propDict[\"deviceLockRequired\"] = boolval($val);\n return $this;\n }", "public function isDownForMaintenance();", "public function canDegradeFurther(): bool\n {\n return !$this->isPastSellByDate() && $this->quality - $this->getDegradationAmount() < 50;\n }", "public function onNeedsMigration(): bool\n\t{\n\t\t$cParams = ComponentHelper::getParams('com_akeebabackup');\n\t\t$alreadyMigrated = $cParams->get('migrated_from_pkg_akeeba', 0) == 1;\n\t\t$hasPkgAkeeba = !empty($this->upgradeModel->getExtensionId('com_akeeba'));\n\n\t\treturn $hasPkgAkeeba && !$alreadyMigrated;\n\t}", "final public function setStrengthAttribute(?string $value): void {\n if (empty($value)) {\n $this->attributes['Strength'] = null;\n } else {\n $this->attributes['Strength'] = $value;\n }\n }", "public function setIsFullRegression($isFullRegression = null)\n {\n // validation for constraint: boolean\n if (!is_null($isFullRegression) && !is_bool($isFullRegression)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a bool, \"%s\" given', gettype($isFullRegression)), __LINE__);\n }\n if (is_null($isFullRegression) || (is_array($isFullRegression) && empty($isFullRegression))) {\n unset($this->IsFullRegression);\n } else {\n $this->IsFullRegression = $isFullRegression;\n }\n return $this;\n }", "public function setLicenceForbid() {\r\n $this->licenceForbid = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_libconnect.']['settings.']['dbislicenceforbid.'];\r\n }", "public function setVpnEnableAlwaysOnLockdownMode(?bool $value): void {\n $this->getBackingStore()->set('vpnEnableAlwaysOnLockdownMode', $value);\n }", "public function getRequired(){\n\t\treturn false;\n\t}", "public function safeUp()\n {\n $this->addColumn('{{%order_chat}}', 'danger', $this->integer()->notNull()->defaultValue(0));\n }", "public function setRequired($isRequired)\r\r\n {\r\r\n $this->required = (bool) $isRequired;\r\r\n\r\r\n return $this;\r\r\n }" ]
[ "0.58590525", "0.46192506", "0.45975095", "0.4596133", "0.4399195", "0.43901506", "0.43623197", "0.43206373", "0.4296451", "0.42407954", "0.42234066", "0.41937667", "0.413793", "0.40989488", "0.40989488", "0.40545747", "0.4043705", "0.40272954", "0.40220627", "0.40055147", "0.39798728", "0.39671627", "0.39305967", "0.3927423", "0.39270338", "0.39237246", "0.3918431", "0.3900462", "0.38927126", "0.38700187", "0.3866602", "0.38616157", "0.38562554", "0.3853355", "0.3848051", "0.3848051", "0.38471755", "0.38471755", "0.38431093", "0.38404477", "0.3824729", "0.38172683", "0.38163725", "0.38147378", "0.38147378", "0.38123184", "0.38051677", "0.3803396", "0.3793257", "0.3787656", "0.37861204", "0.37848043", "0.37831125", "0.37815642", "0.37796533", "0.37740326", "0.37731224", "0.37575814", "0.37511897", "0.3746538", "0.37462187", "0.373934", "0.3736965", "0.37351182", "0.37266538", "0.37208045", "0.37165874", "0.37087896", "0.3702991", "0.37013057", "0.37010166", "0.37002653", "0.36946034", "0.3684546", "0.3683577", "0.36806226", "0.36775967", "0.36744362", "0.36740342", "0.36719733", "0.36650303", "0.36646453", "0.36503792", "0.3646032", "0.36354074", "0.36282548", "0.3624714", "0.36216623", "0.36197272", "0.36197272", "0.36174756", "0.361644", "0.3607233", "0.36063093", "0.36044803", "0.360241", "0.36016178", "0.3601339", "0.35958907", "0.35923362" ]
0.751954
0
Sets the isMandatory property value. Exposes whether mandatory labeling is enabled.
Устанавливает значение свойства isMandatory. Открывает возможность включения обязательной метки.
public function setIsMandatory(?bool $value): void { $this->getBackingStore()->set('isMandatory', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIsMandatory($isMandatory)\n {\n $this->isMandatory = $isMandatory;\n return $this;\n }", "public function setIsMandatory($val)\n {\n $this->_propDict[\"isMandatory\"] = boolval($val);\n return $this;\n }", "public function setMandatory($mandatory)\n {\n $this->mandatory = $mandatory;\n return $this;\n }", "public function setMandatory($value)\n {\n return $this->set(self::MANDATORY, $value);\n }", "public function setMandatory($value)\n {\n return $this->set(self::MANDATORY, $value);\n }", "public function setSerialNumberRequired($value) {\r\n $this->_data[\"SerialNumberRequired\"] = filter_var($value, FILTER_VALIDATE_BOOLEAN);\r\n return $this;\r\n }", "public function setRequired($required): void\n {\n $this->_required = (bool)$required;\n }", "protected function setRequired($required)\n {\n $this->required = (bool) $required;\n }", "public function setRequired($required = true);", "public function required() {\n\t\t$this->required = true;\n\t}", "public function SetRequired ($required = TRUE);", "public function getIsMandatory()\n {\n if (array_key_exists(\"isMandatory\", $this->_propDict)) {\n return $this->_propDict[\"isMandatory\"];\n } else {\n return null;\n }\n }", "public function setIsRequired($val)\n {\n $this->_propDict[\"isRequired\"] = $val;\n return $this;\n }", "public function setIsRequired($val)\n {\n $this->_propDict[\"isRequired\"] = $val;\n return $this;\n }", "public function setRequired($required);", "public function setRequired($required);", "public function setRequired($isRequired)\r\r\n {\r\r\n $this->required = (bool) $isRequired;\r\r\n\r\r\n return $this;\r\r\n }", "public function mandatory($mandatory)\n\t{\n\t\t$this->mandatory = $mandatory;\n\t\treturn $this;\n\t}", "public function setRequired( bool $value )\n {\n\n parent::setRequired( $value );\n\n return $this;\n\n }", "public function setRequired($required=false)\n {\n if(!\\in_array($required,array(true, flase)))return false;\n $this->REQUIRED = $required;\n return true;\n }", "public function required(bool $value = true): self\n {\n $new = clone $this;\n $new->options['required'] = $value;\n return $new;\n }", "public function required(bool $value = true): self\n {\n $new = clone $this;\n $new->options['required'] = $value;\n return $new;\n }", "public function hasMandatory()\n {\n return $this->get(self::MANDATORY) !== null;\n }", "public function hasMandatory()\n {\n return $this->get(self::MANDATORY) !== null;\n }", "public function setIsRequired($isRequired) {\n $this->container['IsRequired'] = $isRequired;\n return $this;\n\t}", "public function isRequired(): bool\n {\n return $this->getOption('attributes.required', parent::isRequired());\n }", "public function setRequired($var)\n {\n GPBUtil::checkBool($var);\n $this->required = $var;\n\n return $this;\n }", "public function setRequired($var)\n {\n GPBUtil::checkBool($var);\n $this->required = $var;\n\n return $this;\n }", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "public function setRequired($required)\n {\n $this->required = (boolean)$required;\n return $this;\n }", "public function setRequired();", "public function setOptional($isOptional)\n {\n $this->isOptional = $isOptional;\n }", "public function setRequired($required) {\n\n\t\t$this->required = (bool) $required;\n\t\treturn $this;\n\n\t}", "public function set_is_default( $is_default ) {\n\t\t\t$this->set_prop( 'is_default', $is_default );\n\t\t}", "public function setRequired($required)\n {\n if ($required) {\n $this->setAttribute('required', 'required');\n } else {\n $this->removeAttribute('required');\n }\n return parent::setRequired($required);\n }", "public function set_required( $required = true ) {\n\t\t$this->required = $required;\n\t\treturn $this;\n\t}", "public function getMandatory()\n {\n $value = $this->get(self::MANDATORY);\n return $value === null ? (boolean)$value : $value;\n }", "public function getMandatory()\n {\n $value = $this->get(self::MANDATORY);\n return $value === null ? (boolean)$value : $value;\n }", "public function isMandatoryOptionDisabled(): bool\n\t{\n\t\t$focus = $this->getModule()->getEntityInstance();\n\t\t$compulsoryMandatoryFieldList = $focus->mandatory_fields ?? [];\n\n\t\treturn \\in_array($this->getName(), $compulsoryMandatoryFieldList) || \\in_array($this->get('uitype'), ['4', '70']);\n\t}", "public function setRequired($required)\n {\n $this->required = (boolean) $required;\n if ($this->isRequired()) {\n $this->setAttribute('required');\n return $this;\n }\n\n if ($this->getAttributes()->containsKey('required')) {\n $this->getAttributes()->remove('required');\n }\n return $this;\n }", "function required($required=true)\n {\n if($required)\n $this->attributes['required']='required';\n else\n unset($this->attributes['required']);\n return $this;\n }", "public function setRequireWorkflow( bool $bool ) : Property\n {\n if( !c\\BooleanValues::isBoolean( $bool ) )\n throw new e\\UnacceptableValueException(\n S_SPAN . \"The value $bool must be a boolean.\" . E_SPAN );\n\n $this->require_workflow = $bool;\n return $this;\n }", "public function isRequired(){\n return (isset( $this->required )? (bool)$this->required : false );\n }", "public function addField(string $name, bool $is_mandatory = true): self\n {\n $this->fields[$name] = $is_mandatory;\n\n return $this;\n }", "public function setRequired($required = TRUE)\n\t{\n\t\t$this->required = $required;\n\t\treturn $this;\n\t}", "public function setIsCODRequired($value)\n {\n $this->_fields['IsCODRequired']['FieldValue'] = $value;\n return $this;\n }", "public function setRequireInteraction(bool $value): void\n {\n $this->requireInteraction = $value;\n }", "public static function element_mandatory( $required = false ) {\n\n\t\t\tif ( true == $required ) {\n\t\t\t\treturn '<span style=\"color:#F00;\">*</span>'; }\n\t\t}", "public function setRequired(bool $required): Field\n {\n $this->required = $required;\n return $this;\n }", "public function setParRequired($required)\n {\n ValidationUtility::ensureBoolean('$required', $required);\n\n $this->parRequired = $required;\n\n return $this;\n }", "public function setIsDefault($value)\n {\n $this->setProperty(\"IsDefault\", $value, true);\n }", "public function is_required() {\n\t\treturn $this->required;\n\t}", "public function isValueRequired()\n {\n return $this->valueRequired === \\Parable\\Console\\Parameter::OPTION_VALUE_REQUIRED;\n }", "public function isRequired() {\n\t\treturn $this->required;\n\t}", "public function isRequired()\n {\n return $this->required;\n }", "public function isRequired()\n {\n return $this->required;\n }", "public function setIsInitial($value)\n {\n $this->setProperty(\"IsInitial\", $value, true);\n }", "public function setOpenYes()\n\t{\n\t\t$this->setAttribute( \"open\");\n\t}", "public function required()\n\t{\n\t\treturn (bool) $this->required;\n\t}", "public function is_required()\n\t{\n\t\treturn $this->required;\n\t}", "protected function setMandatoryProperties()\n {\n $this->mandatoryProperties = ['username','email','password','role'];\n }", "public function required($Bol_Required=true)\n\t{\n\t\t//Decouple field values.\n\t\t$Arr_NewFields = $this->Arr_Fields;\n\n\t\tif ($Bol_Required)\n\t\t{\n\t\t\t$Arr_NewFields[$this->Arr_Active['field']]['required'] = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$Arr_NewFields[$this->Arr_Active['field']]['required'] = false;\n\t\t}\n\n\t\t//Recouple field values.\n\t\t$this->Arr_Fields = $Arr_NewFields;\n\n\t\treturn $this;\n\t}", "public function isRequired(): bool\n {\n return $this->required ?? false;\n }", "public function setDefaults()\r\n {\r\n $this->configuration = array(\r\n 'description' => $this->name,\r\n 'required' => false,\r\n 'requiredError' => 'The field must be checked',\r\n 'uncheckedValue' => false,\r\n 'checkedValue' => true,\r\n );\r\n }", "public function setPositive($positive)\n {\n $this->_positive = $positive;\n }", "public function isRequired()\n\t{\n\t\treturn $this->required;\n\t}", "public function __construct(bool $required = false, string $label = '', $smallNote = '')\n {\n $this->label = $label;\n $this->required = $required;\n $this->smallNote = $smallNote;\n }", "public function required(): bool\n {\n return $this->required;\n }", "public function is_required()\n\t{\n\t\treturn !empty($this->required);\n\t}", "public function set_default($is_default)\n {\n }", "protected function setRequired()\n {\n if (!in_array('OPTIONAL', $this->modeArray)) {\n $this->modeArray[] = 'REQUIRED';\n }\n\n return $this;\n }", "public function setValueRequired($valueRequired)\n {\n if (!in_array(\n $valueRequired,\n [\n \\Parable\\Console\\Parameter::OPTION_VALUE_REQUIRED,\n \\Parable\\Console\\Parameter::OPTION_VALUE_OPTIONAL,\n ]\n )) {\n throw new \\Parable\\Console\\Exception('Value required must be one of the OPTION_VALUE_* constants.');\n }\n $this->valueRequired = $valueRequired;\n return $this;\n }", "public function isRequired()\n {\n return $this->_required;\n }", "public function isRequired()\n {\n return $this->_required;\n }", "public function setOptionsRequired($optionsRequired)\n {\n $this->optionsRequired = (bool)$optionsRequired;\n }", "public function setSecurityDeviceRequired(?bool $value): void {\n $this->getBackingStore()->set('securityDeviceRequired', $value);\n }", "public function isRequired()\n {\n return !empty($this->required);\n }", "public function isRequired()\n {\n return $this->_getAttribute('taxvat') ? (bool)$this->_getAttribute('taxvat')->isRequired() : false;\n }", "public function required()\n {\n $this->required = true;\n return $this;\n }", "public function isRequired()\n {\n return !empty($this->_required);\n }", "public function isSetIsCODRequired()\n {\n return !is_null($this->_fields['IsCODRequired']['FieldValue']);\n }", "public function isRequired() {\r\n if(isset($this->options['required'])) {\r\n return filter_var($this->options['required'], FILTER_VALIDATE_BOOLEAN);\r\n }else{\r\n return false;\r\n }\r\n }", "public function setFieldRequired($fieldRequired) {\n\t\t$this->_fieldRequired = $fieldRequired;\n\t}", "public function setSelectedYes()\n\t{\n\t\t$this->setAttribute( \"selected\");\n\t}", "public function isRequired() {\n\t\treturn $this->_fieldRequired;\n\t}", "public function setRequired($required) {\n\t\t$this->required = $required;\n\t\treturn $this;\n\t}", "public function setRequired($required) {\n\t\t$this->required = $required;\n\t\treturn $this;\n\t}", "public function setRequired($required)\n {\n $this->isRequired = $required;\n\n return $this;\n }", "public function setRequiredWithAttribute($value) {\n $this->attributes['required_with'] = json_encode($value);\n }", "public function getRequired(): bool\n {\n return $this->required;\n }", "final public function model_required($state = TRUE) {\n\t\t$this->model_required = $state;\n\t}", "public function is_required( $label ){\n $cluster = $this->cluster;\n if( !empty($cluster[$label.'.'.'required']) ){\n return true;\n }\n }", "function rules_forms_action_set_required($form, $element, $required) {\r\n $form_element = &_rules_forms_get_element($form, $element);\n if (isset($form_element['#type'])) {\r\n $form_element['#required'] = $required == 1;\n }\r\n}", "public function setEnabledAttribute($value)\n\t{\n\t\tif (empty($value)) {\n\t\t\t$this->attributes['enabled'] = 0;\n\t\t} else {\n\t\t\t$this->attributes['enabled'] = $value;\n\t\t}\n\t}", "function setIsFormRequire()\r\n\t{\r\n\t\tif (!$this->isFormRequire)\r\n\t\t{\r\n\t\t\tforeach ($this->arrInput as $input)\r\n\t\t\t{\r\n\t\t\t\tif ($input->isRequire)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->isFormRequire = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->isFormRequire;\r\n\t}", "public function setRequiredFields($requiredFields)\n\t{\n\t\t$this->_requiredFields = $requiredFields;\n\n\t\tif (isset($this->_attributeConfigs))\n\t\t{\n\t\t\tforeach (craft()->fields->getAllFields() as $field)\n\t\t\t{\n\t\t\t\tif (in_array($field->id, $this->_requiredFields) && isset($this->_attributeConfigs[$field->handle]))\n\t\t\t\t{\n\t\t\t\t\t$this->_attributeConfigs[$field->handle]['required'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function checkIsRequired(): bool\n {\n return ! empty($this->reflectionProperty->getAttributes(Attributes\\Required::class));\n }", "public function setIsDefault($isDefault = false) {\n\t\t$this->isDefault = $isDefault;\n\t}", "public function setIsSingleLineQuestion($val)\n {\n $this->_propDict[\"isSingleLineQuestion\"] = boolval($val);\n return $this;\n }", "public function required($required=null) {\n\t\tif($required===null) return $this->required;\n\t\t$this->required = $required ? true : false;\n\t\treturn $this;\n\t}" ]
[ "0.75773144", "0.71457034", "0.6682013", "0.66472", "0.66472", "0.6475998", "0.63951194", "0.6351878", "0.6239574", "0.618667", "0.61564535", "0.61451876", "0.6118286", "0.6118286", "0.59960693", "0.59960693", "0.5983344", "0.597214", "0.5912987", "0.5829744", "0.58255196", "0.58255196", "0.57834923", "0.57834923", "0.57736576", "0.57268465", "0.56817096", "0.56817096", "0.56796604", "0.56607014", "0.56534755", "0.560186", "0.5540866", "0.5532713", "0.5518421", "0.5505629", "0.54920745", "0.54920745", "0.54834586", "0.5460134", "0.54457784", "0.54337347", "0.538924", "0.53806347", "0.53621477", "0.53454745", "0.5336118", "0.53130776", "0.5289585", "0.5276201", "0.5270385", "0.52519876", "0.5248341", "0.5239913", "0.52323633", "0.52323633", "0.52287227", "0.52276963", "0.5217114", "0.51788336", "0.51759917", "0.514342", "0.51354086", "0.5131447", "0.5120526", "0.51199424", "0.51196843", "0.50982213", "0.5070264", "0.5064831", "0.5055873", "0.5042281", "0.50375885", "0.50375885", "0.5026261", "0.49750054", "0.49652565", "0.49404272", "0.49133185", "0.4912205", "0.49085653", "0.49047843", "0.49009", "0.4900114", "0.48808342", "0.48775056", "0.48775056", "0.4867503", "0.48513234", "0.48493874", "0.48353308", "0.48212576", "0.48144868", "0.48093733", "0.48009476", "0.47880602", "0.47747833", "0.47598615", "0.47592035", "0.4758253" ]
0.72451216
1
Sets the moreInfoUrl property value. Exposes the more information URL that can be configured by the administrator.
Устанавливает значение свойства moreInfoUrl. Открывает URL-адрес с дополнительной информацией, который может быть настроен администратором.
public function setMoreInfoUrl(?string $value): void { $this->getBackingStore()->set('moreInfoUrl', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_more_info( array $more_info ) {\n\t\treturn $this->setMoreInfo( $more_info );\n\t}", "public function setMoreInfo( array $more_info ) {\n\t\treturn $this->more_info = $more_info;\n\t}", "public function getMoreInfo() {\n\t\treturn $this->more_info;\n\t}", "protected function setThemeDetailsUrl() {\n\t\tif ( $this->packageInfo['type'] === 'theme' && !isset($this->metadata['details_url']) && isset($this->metadata['homepage']) ){\n\t\t\t$this->metadata['details_url'] = $this->metadata['homepage'];\n\t\t}\n\t}", "public function get_more_info() {\n\t\treturn $this->getMoreInfo();\n\t}", "public function setInfoDescription($infoDescription)\n {\n if ($this->infoDescription !== $infoDescription) {\n $this->infoDescription = isset($infoDescription) ? $infoDescription : '';\n }\n }", "public function setWillShowMoreLink($flag) {\n $this->showMore = $flag;\n }", "function act_excertp_more ($more)\n {\n global $post;\n return '... <a class=\"c-post-thumb__link-more\" href=\"' . get_permalink($post->ID) . '\">' . __('View Article', 'html5blank') . '</a>';\n }", "function hba_theme_filter_tips_more_info() {\n return '<p>' . l(t('More information about text formats'), 'filter/tips', array('attributes' => array('target' => '_blank'))) . '</p>';\n}", "function hba_theme_filter_tips_more_info() {\n return '<p>' . l(t('More information about text formats'), 'filter/tips', array('attributes' => array('target' => '_blank'))) . '</p>';\n}", "function ndf_more_info_settings_callback() {\n echo '<p>More information column UI.</p>';\n}", "public function getInfoLink()\n {\n return $this->getLink(self::INFO_LINK_REL);\n }", "function change_more_link_text( $more_link ) {\n\t$new_more_link_text = __( 'Continue Reading &#10140;', 'child-theme-text-domain' );\n\n\treturn sprintf( '&hellip; <div><a href=\"%s\" class=\"more-link\">%s</a></div>',\n\t\tget_the_permalink(),\n\t\tgenesis_a11y_more_link( $new_more_link_text )\n\t);\n}", "public function addMoreInfo($key, $value)\n {\n $this->more_info[$key] = $value;\n\n return $this;\n }", "function eatlases_more_link ($variables) {\n\t$url = $variables['url'];\n\t$title = $variables['title'];\n\t$target = NULL;\n\n\tif (stristr($url, 'aggregator/')) {\n\t\t$feed_id = substr($url, strrpos($url, '/') + 1);\n\t\t$nerp_url = _get_feed_url($feed_id);\n\t\tif ($nerp_url) {\n\t\t\t$url = $nerp_url;\n\t\t\t$target = '_blank';\n\t\t}\n\t}\n\treturn '<div class=\"more-link\">' . t('<a href=\"@link\" title=\"@title\"'.($target ? ' target=\"'.$target.'\"' : '').'>more</a>', array('@link' => check_url($url), '@title' => $title)) . '</div>';\n}", "public function getMoreInfoUrl(): ?string {\n $val = $this->getBackingStore()->get('moreInfoUrl');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'moreInfoUrl'\");\n }", "function gluu_add_url_options(){\n\t\tadd_management_page( \"go-live-setting\", \"Go Live\", \"manage_options\", basename( __FILE__ ), array(\n\t\t\t\t$this,\n\t\t\t\t\"adminToolsPage\"\n\t\t\t) );\n\t}", "public function getDetailViewUrl()\n\t{\n\t\treturn '?module=Profiles&parent=Settings&view=Detail&record=' . $this->getId();\n\t}", "function commerce_pos_gift_card_ui_entity_property_info_alter(&$info) {\n $info['commerce_pos_gift_card']['properties']['edit_url'] = array(\n 'label' => t('Edit URL'),\n 'description' => t(\"The URL of the gift card's edit page.\"),\n 'getter callback' => 'commerce_pos_gift_card_get_properties',\n 'type' => 'uri',\n );\n}", "function enableInfoWindow() {\n $this->info_window = true;\n }", "public function setMoreData($moreData)\n {\n $this->values['MoreData'] = $moreData;\n return $this;\n }", "public function setInfo($info) {\n\t\t$this->info = $info;\n\t}", "function ncstate_official_more_link($variables) {\n return '<div class=\"more-link\">' . l(t('More ‚Ä∫'), $variables['url'], array('attributes' => array('title' => $variables['title']))) . '</div>';\n}", "function bjorn_modify_read_more_link() {\n return '<a class=\"more-link btn\" href=\"' . esc_url(get_permalink()) . '\">'.esc_html__('Read more', 'bjorn').'</a>';\n}", "public function cn_see_more() {\n\t\t$pages = get_pages(\n\t\t\tarray(\n\t\t\t\t'sort_order'\t=> 'ASC',\n\t\t\t\t'sort_column'\t=> 'post_title',\n\t\t\t\t'hierarchical'\t=> 0,\n\t\t\t\t'child_of'\t\t=> 0,\n\t\t\t\t'parent'\t\t=> -1,\n\t\t\t\t'offset'\t\t=> 0,\n\t\t\t\t'post_type'\t\t=> 'page',\n\t\t\t\t'post_status'\t=> 'publish'\n\t\t\t)\n\t\t);\n\n\t\techo '\n\t\t<fieldset>\n\t\t\t<label><input id=\"cn_see_more\" type=\"checkbox\" name=\"cookie_notice_options[see_more]\" value=\"1\" ' . checked( true, $this->options['general']['see_more'], false ) . ' />' . __( 'Enable privacy policy link.', 'cookie-notice' ) . '</label>\n\t\t\t<div id=\"cn_see_more_opt\"' . ($this->options['general']['see_more'] === false ? ' style=\"display: none;\"' : '') . '>\n\t\t\t\t<input type=\"text\" class=\"regular-text\" name=\"cookie_notice_options[see_more_opt][text]\" value=\"' . esc_attr( $this->options['general']['see_more_opt']['text'] ) . '\" />\n\t\t\t\t<p class=\"description\">' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '</p>\n\t\t\t\t<div id=\"cn_see_more_opt_custom_link\">';\n\n\t\tforeach ( $this->links as $value => $label ) {\n\t\t\t$value = esc_attr( $value );\n\n\t\t\techo '\n\t\t\t\t\t<label><input id=\"cn_see_more_link-' . $value . '\" type=\"radio\" name=\"cookie_notice_options[see_more_opt][link_type]\" value=\"' . $value . '\" ' . checked( $value, $this->options['general']['see_more_opt']['link_type'], false ) . ' />' . esc_html( $label ) . '</label>';\n\t\t}\n\n\t\techo '\n\t\t\t\t</div>\n\t\t\t\t<p class=\"description\">' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '</p>\n\t\t\t\t<div id=\"cn_see_more_opt_page\"' . ($this->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style=\"display: none;\"' : '') . '>\n\t\t\t\t\t<select name=\"cookie_notice_options[see_more_opt][id]\">\n\t\t\t\t\t\t<option value=\"0\" ' . selected( 0, $this->options['general']['see_more_opt']['id'], false ) . '>' . __( '-- select page --', 'cookie-notice' ) . '</option>';\n\n\t\tif ( $pages ) {\n\t\t\tforeach ( $pages as $page ) {\n\t\t\t\techo '\n\t\t\t\t\t\t<option value=\"' . $page->ID . '\" ' . selected( $page->ID, $this->options['general']['see_more_opt']['id'], false ) . '>' . esc_html( $page->post_title ) . '</option>';\n\t\t\t}\n\t\t}\n\n\t\techo '\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">' . __( 'Select from one of your site\\'s pages.', 'cookie-notice' ) . '</p>';\n\n\t\tglobal $wp_version;\n\n\t\tif ( version_compare( $wp_version, '4.9.6', '>=' ) ) {\n\t\t\techo '\n\t\t\t\t\t\t<label><input id=\"cn_see_more_opt_sync\" type=\"checkbox\" name=\"cookie_notice_options[see_more_opt][sync]\" value=\"1\" ' . checked( true, $this->options['general']['see_more_opt']['sync'], false ) . ' />' . __( 'Synchronize with WordPress Privacy Policy page.', 'cookie-notice' ) . '</label>';\n\t\t}\n\n\t\techo '\n\t\t\t\t</div>\n\t\t\t\t<div id=\"cn_see_more_opt_link\"' . ($this->options['general']['see_more_opt']['link_type'] === 'page' ? ' style=\"display: none;\"' : '') . '>\n\t\t\t\t\t<input type=\"text\" class=\"regular-text\" name=\"cookie_notice_options[see_more_opt][link]\" value=\"' . esc_attr( $this->options['general']['see_more_opt']['link'] ) . '\" />\n\t\t\t\t\t<p class=\"description\">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"cn_see_more_link_target\">';\n\n\t\tforeach ( $this->link_targets as $target ) {\n\t\t\techo '\n\t\t\t\t\t<label><input id=\"cn_see_more_link_target-' . $target . '\" type=\"radio\" name=\"cookie_notice_options[link_target]\" value=\"' . $target . '\" ' . checked( $target, $this->options['general']['link_target'], false ) . ' />' . $target . '</label>';\n\t\t}\n\n\t\techo '\n\t\t\t\t\t<p class=\"description\">' . esc_html__( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"cn_see_more_link_position\">';\n\n\t\tforeach ( $this->link_positions as $position => $label ) {\n\t\t\techo '\n\t\t\t\t\t<label><input id=\"cn_see_more_link_position-' . $position . '\" type=\"radio\" name=\"cookie_notice_options[link_position]\" value=\"' . $position . '\" ' . checked( $position, $this->options['general']['link_position'], false ) . ' />' . esc_html( $label ) . '</label>';\n\t\t}\n\n\t\techo '\n\t\t\t\t\t<p class=\"description\">' . esc_html__( 'Select the privacy policy link position.', 'cookie-notice' ) . '</p>\n\t\t\t\t</div></div>\n\t\t</fieldset>';\n\t}", "function new_excerpt_more($more) {\n global $post;\n return '&nbsp;<a href=\"'. get_permalink($post->ID) . '\">' . 'Read more' . '</a>';\n }", "function wpdocs_excerpt_more( $more ) {\n\t\t\treturn sprintf( '<p><a class=\"read-more\" href=\"%1$s\">%2$s</a></p>',\n\t\t\tget_permalink( get_the_ID() ),\n\t\t\t__( 'Read More', 'psychicpurple' )\n\t\t\t);\n\t\t}", "public function excerpt_more( $more ) {\n\t\tglobal $post;\n\t\treturn ' <a href=\"'.get_permalink().'\" class=\"excerpt-more\"><strong>' . __('[...]', 'firestarter') . '</strong></a>';\n\t}", "public function getDetailViewUrl()\n\t{\n\t\t$module = $this->getModule();\n\n\t\treturn 'index.php?module=' . $this->getModuleName() . '&parent=Settings&view=' . $module->getDetailViewName() . '&record=' . $this->getId();\n\t}", "public function getDetailViewUrl()\n\t{\n\t\treturn 'index.php?module=TreesManager&parent=Settings&view=Edit&record=' . $this->getId();\n\t}", "function gridbox_more_link() {\r\n\r\n\t\t// Get theme options from database.\r\n\t\t$theme_options = gridbox_theme_options();\r\n\r\n\t\t// Display read more button if there is excerpt.\r\n\t\tif ( $theme_options['excerpt_length'] > 0 ) : ?>\r\n\r\n\t\t\t<a href=\"<?php echo esc_url( get_permalink() ) ?>\" class=\"more-link\"><?php esc_html_e( 'Read more', 'gridbox' ); ?></a>\r\n\r\n\t\t<?php\r\n\t\tendif;\r\n\t}", "function twentyfifteen_excerpt_more($more)\n {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>',\n esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */\n sprintf(__('Continue reading %s', 'twentyfifteen'), '<span class=\"screen-reader-text\">' . get_the_title(get_the_ID()) . '</span>')\n );\n return ' &hellip; ' . $link;\n }", "function setInfo($info) {\n $this->info = $info;\n }", "public function willShowMoreLink() {\n return $this->showMore ? true : false;\n }", "function ndotone_excerpt_more() {\n\t\t$link = sprintf( '<a href=\"%1$s\" class=\"more-link\">%2$s</a>',\n\t\t\t\tesc_url( get_permalink( get_the_ID() ) ),\n\t\t\t\t/* translators: %s: Name of current post */\n\t\t\t\tsprintf( __( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'ndotone' ), get_the_title( get_the_ID() ) )\n\t\t);\n\t\treturn ' &hellip; ' . $link;\n\t}", "function affinity_mikado_modify_read_more_link() {\n\t\t$link = '<div class=\"mkd-more-link-container\">';\n if(affinity_mikado_core_installed()) {\n $link .= affinity_mikado_get_button_html(array(\n 'link' => get_permalink() . '#more-' . get_the_ID(),\n 'text' => esc_html__('Continue reading', 'affinity'),\n 'size' => 'small'\n ));\n }else{\n $link .= '<a href=\"'.get_permalink() . '#more-' . get_the_ID().'\" target=\"_self\" class=\"mkd-btn mkd-btn-small mkd-btn-solid mkd-btn-hover-outline\"><span class=\"mkd-btn-text\">'.esc_html__('Continue reading', 'affinity').'</span></a>';\n }\n\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "function hibi_excerpt_more( $more ) {\n\tglobal $post;\n \treturn '... <p><a class=\"moretag button\" href=\"'. get_permalink( $post->ID ) . '\">Get the Show Notes</a></p>';\n}", "public function setInfo($a_info)\n\t{\n\t\t$this->info = $a_info;\n\t}", "function ndf_data_results_more_info_register_settings() {\n\tadd_settings_section(\n\t\t'ndf_more_info_settings_section',\n\t\t'More Information Settings',\n\t\t'ndf_more_info_settings_callback',\n\t\t'ndf_more_info_settings_option'\n\t);\n\n\t/* Initialize More Information Settings Section Fields */\n\tadd_settings_field( \n\t\t'ndf_more_info_column_show',\n\t\t'Show Column',\n\t\t'ndf_more_info_column_show_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section',\n\t\tarray(\n\t\t\t'Display more information column in Data Results table.'\n\t\t)\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_more_info_button_label',\n\t\t'Button Label',\n\t\t'ndf_more_info_button_label_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\n\tadd_settings_field(\n\t\t'ndf_more_info_button_font_size',\n\t\t'Button Font Size',\n\t\t'ndf_more_info_button_font_size_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section',\n\t\tarray(\n\t\t\t'8px' => '8px',\n\t\t\t'10px' => '10px',\n\t\t\t'12px' => '12px',\n\t\t\t'14px' => '14px',\n\t\t\t'16px' => '16px',\n\t\t\t'18px' => '18px',\n\t\t\t'20px' => '20px',\n\t\t\t'22px' => '22px',\n\t\t\t'24px' => '24px',\n\t\t\t'26px' => '26px',\n\t\t\t'28px' => '28px',\n\t\t\t'30px' => '30px',\n\t\t)\n\t);\n\n\tadd_settings_field(\n\t\t'ndf_more_info_button_lineheight',\n\t\t'Button Line Height',\n\t\t'ndf_more_info_button_lineheight_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section',\n\t\tarray(\n\t\t\t'1' => '1 em',\n\t\t\t'1.2' => '1.2 em',\n\t\t\t'1.4' => '1.4 em',\n\t\t\t'1.6' => '1.6 em',\n\t\t\t'1.8' => '1.8 em',\n\t\t\t'2' => '2 em',\n\t\t\t'2.2' => '2.2 em',\n\t\t\t'2.4' => '2.4 em',\n\t\t\t'2.6' => '2.6 em',\n\t\t\t'2.8' => '2.8 em',\n\t\t\t'3' => '3 em',\n\t\t)\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_more_info_button_fontcolor',\n\t\t'Button Font Color',\n\t\t'ndf_more_info_button_fontcolor_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_more_info_button_hover_fontcolor',\n\t\t'Button Hover Font Color',\n\t\t'ndf_more_info_button_hover_fontcolor_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_more_info_button_background_color',\n\t\t'Button Background Color',\n\t\t'ndf_more_info_button_background_color_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_more_info_button_hover_background_color',\n\t\t'Button Hover Background Color',\n\t\t'ndf_more_info_button_hover_background_color_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_more_info_button_border_color',\n\t\t'Button Border Color',\n\t\t'ndf_more_info_button_border_color_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_more_info_button_border_width',\n\t\t'Button Border Size',\n\t\t'ndf_more_info_button_border_width_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_more_info_button_border_radius',\n\t\t'Button Border Radius',\n\t\t'ndf_more_info_button_border_radius_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_more_info_button_padding_top',\n\t\t'Button Padding Top',\n\t\t'ndf_more_info_button_padding_top_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\tadd_settings_field( \n\t\t'ndf_more_info_button_padding_bottom',\n\t\t'Button Padding Bottom',\n\t\t'ndf_more_info_button_padding_bottom_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\tadd_settings_field( \n\t\t'ndf_more_info_button_padding_left',\n\t\t'Button Padding Left',\n\t\t'ndf_more_info_button_padding_left_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\tadd_settings_field( \n\t\t'ndf_more_info_button_padding_right',\n\t\t'Button Padding Right',\n\t\t'ndf_more_info_button_padding_right_callback',\n\t\t'ndf_more_info_settings_option',\n\t\t'ndf_more_info_settings_section'\n\t);\n\n\t/* Register More Information Settings Section Fields */\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_column_show' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_label' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_font_size' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_lineheight' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_fontcolor' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_hover_fontcolor' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_background_color' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_hover_background_color' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_border_color' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_border_width', 'intval' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_border_radius', 'intval' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_padding_top', 'intval' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_padding_bottom', 'intval' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_padding_left', 'intval' );\n\tregister_setting( 'ndf_more_info_settings_option', 'ndf_more_info_button_padding_right', 'intval' );\n}", "function bfa_auto_excerpt_more( $more ) {\n\treturn sprintf( '&hellip; <a class=\"read-more\" href=\"%1$s\">%2$s &raquo;</a>',\n\t\tget_permalink( get_the_ID() ),\n\t\t__( 'Read More', 'textdomain' )\n\t);\n}", "function restruxure_content_more_link() {\n\treturn '<a class=\"more-link\" href=\"' . get_permalink() . '\">&hellip;' . esc_html__( 'Read More', 'restruxure' ) . '</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' ... <a href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n }", "function inhabitent_excerpt_more( $more ) {\n\n\t\tglobal $post;\n\n\t\treturn '<a class=\"read-more\" href=\"'.get_permalink( $post->ID ) .'\"><button> Read More &rarr; </button> </a>';\n\n\t}", "function electxan_custom_excerpt_more( $more ) {\n\t\tif ( ! is_admin() ) {\n\t\t\t$more = '';\n\t\t}\n\t\treturn $more;\n\t}", "function adfc2010_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() . '\">Weiterlesen <span class=\"meta-nav\">&rarr;</span></a>';\n}", "function new_excerpt_more($more) {\n\t global $post;\n\t\treturn ' <a class=\"readMoreLink\" href=\"'. get_permalink($post->ID) . '\"> Read More</a>';\n\t}", "function electxan_all_excerpts_get_more_link( $post_excerpt ) {\n\t\tif ( ! is_admin() ) {\n\t\t\t$post_excerpt = $post_excerpt . '<p><a class=\"btn btn-secondary electxan-read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() ) ) . '\">' . __( 'Read More',\n\t\t\t'electxan' ) . '</a></p>';\n\t\t}\n\t\treturn $post_excerpt;\n\t}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\r\n\t\tif ( ! is_admin() ) {\r\n $read_more_link = sprintf( ' <a class=\"aethercomm-read-more-link read-more-link\" href=\"%1$s\">%2$s</a>',\r\n esc_url( get_permalink( get_the_ID() ) ),\r\n sprintf( '<span class=\"readmore-read\">%1$s </span><span class=\"readmore-more\">%2$s</span>',\r\n __( 'Read', 'aethercomm' ),\r\n __( 'More', 'aethercomm' )\r\n )\r\n );\r\n\t\t\t$post_excerpt = $post_excerpt . $read_more_link;\r\n\t\t}\r\n\t\treturn $post_excerpt;\r\n\t}", "public function get_morelink(){\n if (!empty($this->params['morelink'])) :\n $href = 'href=\"' . get_category_link($this->lcp_category_id) . '\"';\n $readmore = ($this->params['morelink'] !== '' ? $this->params['morelink'] : 'More posts');\n return '<a ' . $href . ' >' . $readmore . '</a>';\n else:\n return null;\n endif;\n }", "public function set_channel_about($url)\n\t{\n\t\t$this->data['channel_about'] = $url; \n\t}", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;';\n\t}", "function starter_read_more() {\n\treturn sprintf( '&hellip; <a href=\"%s\" class=\"more-link\">%s</a>',\n\t\tget_the_permalink(),\n\t\tgenesis_a11y_more_link( __( 'Read more', 'starter' ) )\n\t);\n}", "function new_excerpt_more($more)\n {\n global $post;\n return '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> ...read more.</a>';\n }", "function genesis_read_more_link() {\n\treturn '...</p><p><a href=\"' . get_permalink() . '\" class=\"more-link button\" role=\"button\">' . __( 'Read more', 'coaching-pro' ) . '<span class=\"screen-reader-text\"> ' . __( 'about', 'coaching-pro' ) . ' ' . get_the_title() . '</span></a>';\n}", "function new_excerpt_more($more) {\r\n\tglobal $post;\r\n\treturn '... <a href=\"'. get_permalink($post->ID) . '\">(ادامه مطلب)</a>';\r\n\t}", "function twentyten_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . twentyten_continue_reading_link();\n}", "function twentyten_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . twentyten_continue_reading_link();\n}", "function twentyten_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . twentyten_continue_reading_link();\n}", "function understrap_custom_excerpt_more( $more ) {\r\n\t\tif ( ! is_admin() ) {\r\n\t\t\t$more = '';\r\n\t\t}\r\n\t\treturn $more;\r\n\t}", "function aton_qodef_modify_read_more_link() {\n\t\t$link = '<div class=\"qodef-more-link-container\">';\n\t\t$link .= aton_qodef_get_button_html(array(\n\t\t\t'link' => get_permalink().'#more-'.get_the_ID(),\n\t\t\t'type' => 'transparent',\n\t\t\t'size' => 'small',\n\t\t\t'text' => esc_html__('Continue reading', 'aton'),\n\t\t\t'font_weight' => '700'\n\t\t));\n\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "function capstone_read_more_link() {\n\t\treturn '<div class=\"read-more\"><a href=\"' . get_permalink() . '\">'. esc_html__('Learn More', 'capstone').' <img src=\"'. esc_url( get_template_directory_uri() . '/images/arrow-right.svg' ) .'\" alt=\"'. esc_attr__('Learn More', 'capstone') .'\"></a></div>';\n\t}", "private static function more( $moreURL, $class ) {\n\t\t#TODO: Modify add more to HTML checkbox that trigger more terms to display or not\n\t\t$html = '<li>' .\n\t\t\t'<a id=\"hierarchy-' .\n\t\t\t$class .\n\t\t\t'-more\" class=\"' .\n\t\t\t$class .\n\t\t\t'-more\" href=\"' .\n\t\t\t$GLOBALS['call_function']( Helper::encodeURL( $moreURL ) ) .\n\t\t\t'\">more...</a>' .\n\t\t\t'</li\">';\n\t\treturn $html;\n\t}", "function all_excerpts_get_more_link( $post_excerpt ) {\n\n return $post_excerpt . '<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Baca Artikel',\n 'understrap' ) . '</a></p>';\n }", "public function getDetailViewUrl()\n\t{\n\t\treturn '?module=MailSmtp&parent=Settings&view=Detail&record=' . $this->getId();\n\t}", "function affinity_mikado_excerpt_more($more) {\n\t\treturn '...';\n\t}", "function my_custom_excerpt_more( $more ) {\n\t\treturn sprintf( '<br /><p><a class=\"read-more\" href=\"%1$s\">%2$s</a></p>',\n\t\t\tget_permalink( get_the_ID() ),\n\t\t\t__( 'Read More', 'Avada' )\n\t\t);\n\t}", "function setInfo($info)\n {\n if (File_XSPF::_validateURL($info)) {\n $this->_info = $info;\n return true;\n } else {\n return false;\n }\n }", "function modify_read_more_link() {\r\n\treturn '<a class=\"more\" href=\"' . get_permalink() . '\">Read More</a>';\r\n}", "function mantra_auto_excerpt_more( $more ) {\n\tglobal $mantra_excerptdots;\n\treturn wp_kses_post( $mantra_excerptdots ). mantra_continue_reading_link();\n}", "public function setInfoWindow(InfoWindow $infoWindow)\n {\n $this->infoWindow = $infoWindow;\n }", "public function set_info($message, $url = null, $dismissable = false)\n {\n $this->set_message($message, 'info', $url, $dismissable, 'info-circle');\n }", "public function getHelpUrl(){\n return $this->getUrl('help');\n }", "public function setInfoTitle($infoTitle)\n {\n if ($this->infoTitle !== $infoTitle) {\n $this->infoTitle = isset($infoTitle) ? $infoTitle : '';\n }\n }", "function hackeryou_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . hackeryou_continue_reading_link();\n}", "function picostrap_custom_excerpt_more( $more ) {\n\t\tif ( ! is_admin() ) {\n\t\t\t$more = '';\n\t\t}\n\t\treturn $more;\n\t}", "public function excerpt_more( $more ) {\n\t\tglobal $post;\n\t\treturn '&hellip;';\n\t}", "function mixtape_qodef_modify_read_more_link() {\n\t\t$link = '<div class=\"qodef-more-link-container\">';\n\n\t\tif(mixtape_qodef_core_installed()) {\n\t\t\t$link .= mixtape_qodef_get_button_html(array(\n\t\t\t\t'link' => get_permalink() . '#more-' . get_the_ID(),\n\t\t\t\t'text' => esc_html__('Continue reading', 'mixtapewp')\n\t\t\t));\n\t\t} else {\n\t\t\t$link .= '<a class=\"qodef-btn qodef-btn-medium qodef-btn-solid\" href=\"' . get_permalink() . '#more-' . get_the_ID() . '\">'. esc_html__('Continue reading', 'mixtapewp') .'</a>';\n\t\t}\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "function restruxure_excerpt_more( $more ) {\n\n\treturn sprintf( '<a class=\"more-link\" href=\"%1$s\">%2$s</a>', get_permalink( get_the_ID() ), esc_html__( '&hellip; Read more', 'restruxure' ) );\n}", "function themamastore_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . themamastore_continue_reading_link();\n}", "protected function showInfoAboutSocialNetwork()\n {\n $this->command->info('Configuring social network ' . ucfirst($this->name()) . '...');\n $this->command->info('Please register a new OAuth app for ' . ucfirst($this->name()) .\n '. Go to URL <question>' . $this->infoURL() . '</question>');\n $this->showOptionalAdditionalInfo();\n $this->command->info('Then ask the following questions:');\n }", "function new_excerpt_more( $more ) {\n\t\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Read More</a>';\n\t}", "function libero_mikado_modify_read_more_link() {\n\t\t$link = '<div class=\"mkd-more-link-container\">';\n\t\t$link .= libero_mikado_get_button_html(array(\n\t\t\t'link' => get_permalink().'#more-'.get_the_ID(),\n\t\t\t'text' => esc_html__('Continue reading', 'libero'),\n\t\t\t'size' => 'medium',\n\t\t\t'icon_pack' => 'font_elegant',\n\t\t\t'fe_icon' => 'arrow_carrot-right'\n\t\t));\n\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "protected function setLargeFileBaseHref()\n {\n $largeFileBaseHREF = $this->getSetting('cdn', 'largeFileBaseHREF');\n if($largeFileBaseHREF) {\n $this->page->setVar('cdnLargeFileBaseHREF', $largeFileBaseHREF);\n } else {\n $this->page->setVar('cdnLargeFileBaseHREF', 'CDN_LARGE_FILE_HREF_MISSING');\n } \n }", "public function infoPage() {\n\n $output['info'] = array(\n '#markup' => $this->t('This demonstrates the different variable systems in Drupal 8. The following examples are available:'),\n );\n\n $output['pages'] = array(\n '#theme' => 'item_list',\n '#items' => array(\n $this->t('Settings: @link.', array('@link' => \\Drupal::l('/demo/variable/setting', New Url('demo_variable.setting')))),\n $this->t('State: @link.', array('@link' => \\Drupal::l('/demo/variable/state', New Url('demo_variable.state')))),\n $this->t('Simple configuration: @link.', array('@link' => \\Drupal::l('/demo/variable/config', New Url('demo_variable.config')))),\n ),\n );\n\n return $output;\n }", "function portfolio_web_excerpt_read_more( $more ) {\r\n\r\n\t\t$output = $more;\r\n\t\tglobal $portfolio_web_customizer_all_values;\r\n\t\t$more_text = esc_html( $portfolio_web_customizer_all_values['portfolio-web-blog-archive-more-text'] );\r\n\t\tif ( ! empty( $more_text ) ) {\r\n\t\t\t$output = ' <br /><a href=\"'. esc_url( get_permalink() ) . '\" class=\"more-link btn btn-primary\">' . esc_html( $more_text ) . '</a>';\r\n\t\t\t$output = apply_filters( 'portfolio_web_filter_read_more_link' , $output );\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __(' read more <span class=\"meta-nav\">&raquo;</span>', 'codium_extend' );\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\">' . $readmore . '</a>';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __(' read more <span class=\"meta-nav\">&raquo;</span>', 'codium_extend' );\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\">' . $readmore . '</a>';\n}", "protected function renderMoreInformation()\n {\n return\n <<<EOD\n<table class=\"account-person-list app_table\" border=\"1\">\n <tr><th colspan=\"2\">My Teams</th></tr>\n <tr class=\"trAction\"><td style=\"text-align: center;\" colspan=\"2\" >\n <a href=\"/project/natgames/person/1/teams?_back=%2Fhome\">Add/Remove Teams\n </a>\n </td></tr>\n</table>\n\n<table class=\"account-person-list app_table\" border=\"1\">\n <tr><th colspan=\"2\">My Crew</th></tr>\n <tr><td style=\"text-align: center;\" colspan=\"2\">\n Primary: Art Hundiak\n </td></tr>\n <tr class=\"trAction\"><td style=\"text-align: center;\" colspan=\"2\" >\n <a href=\"/project/natgames/person/1/persons?_back=%2Fhome\">Add/Remove People\n </a>\n </td></tr>\n</table>\nEOD;\n }", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a href=\"'. get_permalink($post->ID) . '\">&nbsp; read more &#187;</a>';\n}", "function ollomedia_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . ollomedia_continue_reading_link();\n}", "function new_excerpt_more( $more ) {\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">[Lees meer ...]</a>';\n}", "function get_morepage_permalink( $morepageid, $morePage ) {\r\n\r\n\tglobal $wp_rewrite;\r\n\r\n\t$link = $wp_rewrite->get_page_permastruct();\t\t\t## check whether permalink enabled or not\r\n\tif ( ! empty( $link ) ) {\t\t\t\t## Return SEO more page URL if permalink enabled\r\n\t\tif ( isset( $morePage ) ) {\r\n\t\t\t$type = $morePage;\r\n\t\t\tswitch ( $type ) {\r\n\t\t\t\tcase 'popular':\r\n\t\t\t\t\t$location = get_site_url() . '/popular_videos/';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'recent':\r\n\t\t\t\t\t$location = get_site_url() . '/recent_videos/';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'featured':\r\n\t\t\t\t\t$location = get_site_url() . '/featured_videos/';\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'random':\r\n\t\t\t\t $location = get_site_url() .'/random_videos/';\r\n\t\t\t\tbreak;\t\r\n\t\t\t\tcase 'categories':\r\n\t\t\t\t\t$location = get_site_url() . '/all-category_videos/';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $location;\r\n\t} else {\t\t\t\t\t\t\t## Return Non SEO more page URL if permalink disabled\r\n\t\treturn get_site_url() . '/?page_id=' . $morepageid . '&amp;more=' . $morePage;\r\n\t}\r\n}", "function libero_mikado_excerpt_more( $more ) {\n\t\treturn '...';\n\t}", "public function setAdditionalInfo($val)\n {\n $this->_propDict[\"additionalInfo\"] = $val;\n return $this;\n }", "public function setAdditionalInfo($info) {\n $this->err_addInfo = $info;\n }", "function perrymnmlist_excerpt_more( $more ) {\r\n global $post;\r\n\treturn '...<br /><a href=\"'. get_permalink($post->ID) . '\" class=\"alignright\">' . __( 'Read more', 'perrymnmlist' ) . '</a>';\r\n}", "function hermi_read_more_link() {\n\t// Wrapper helps to fix problems with floated link in certain cases.\n\treturn sprintf( '<span class=\"read-more-wrap\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></span>',\n\t\t\t\t\t\t\t\t\t esc_url( get_permalink() ),\n\t\t\t\t\t\t\t\t\t esc_html__( 'Read More &rsaquo;', 'hermi' )\n\t);\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\n\treturn ' &hellip; ' . $link;\n}", "function excerpt_more_link( $output ) {\n if (has_excerpt() && !is_attachment()) {\n $output .= self::get_more_link();\n }\n return $output;\n }", "private static function getMoreLink(): ?string {\n\t\t$conf = CookieWarning::getConfig();\n\t\tif ( $conf->get( 'CookieWarningMoreUrl' ) ) {\n\t\t\treturn $conf->get( 'CookieWarningMoreUrl' );\n\t\t}\n\n\t\t$cookieWarningMessage = wfMessage( 'cookiewarning-more-link' );\n\t\tif ( $cookieWarningMessage->exists() && !$cookieWarningMessage->isDisabled() ) {\n\t\t\treturn $cookieWarningMessage->text();\n\t\t}\n\n\t\t$cookiePolicyMessage = wfMessage( 'cookiewarning-policy-link' );\n\t\tif ( $cookiePolicyMessage->exists() && !$cookiePolicyMessage->isDisabled() ) {\n\t\t\treturn $cookiePolicyMessage->text();\n\t\t}\n\n\t\treturn null;\n\t}" ]
[ "0.72342706", "0.72158843", "0.60150266", "0.58062106", "0.57732284", "0.57554066", "0.5714154", "0.56402206", "0.5629214", "0.5629214", "0.5569417", "0.555205", "0.5501795", "0.5494463", "0.5428504", "0.5422514", "0.53674453", "0.53377515", "0.5308631", "0.52803403", "0.5279291", "0.5272534", "0.52667344", "0.5265948", "0.52649605", "0.5255102", "0.52530223", "0.5252463", "0.5249294", "0.5245022", "0.5232013", "0.5214031", "0.52125484", "0.52036697", "0.5198006", "0.51851857", "0.51809", "0.51681757", "0.51675767", "0.515709", "0.51382107", "0.5135716", "0.5134805", "0.5126301", "0.51084256", "0.5108208", "0.5106704", "0.5102639", "0.50929546", "0.508488", "0.5072954", "0.5069802", "0.50686294", "0.5062474", "0.505058", "0.5050294", "0.5050294", "0.5050294", "0.50411195", "0.50378937", "0.5037736", "0.5037471", "0.50322044", "0.5029788", "0.5028066", "0.50191784", "0.5015177", "0.5010918", "0.5000488", "0.49982673", "0.49982604", "0.4996968", "0.49956086", "0.49936566", "0.49933234", "0.49899903", "0.49889243", "0.49866903", "0.49821237", "0.49779657", "0.4967812", "0.49625236", "0.49619228", "0.4955733", "0.49425423", "0.49402988", "0.49402988", "0.4938998", "0.4938647", "0.49300689", "0.49300325", "0.4929784", "0.4929699", "0.4922533", "0.49220064", "0.4918331", "0.49143618", "0.4912931", "0.49122056", "0.49093184" ]
0.7803096
0
Generates a custom mail link, based on host
Генерирует кастомную ссылку на электронную почту на основе хоста
function mailLink($mail){ $mail = strtolower($mail); $b1 = strchr($mail, "@"); $b2 = strchr($b1, "."); $host = str_replace($b2 ,"",$b1); $host = str_replace("@","",$host); switch($host){ case "gmail": return "http://www.gmail.com"; case "hotmail": return "http://www.hotmail.com"; case "yahoo": return "http://www.yahoo.com"; case "aol": return "http://webmail.aol.com"; default: return "index.php"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modify_email_from_address() : string {\n $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );\n if ( 'www.' === substr( $sitename, 0, 4 ) ) {\n $sitename = substr( $sitename, 4 );\n }\n\n return 'info@' . $sitename;\n}", "function emaillink($address, $name = null) {\n }", "function email_link($addr, $link_content = false) {\n\t\tif ( ! $link_content) {\n\t\t\t$link_content = $addr;\n\t\t}\n\n\t\t//build the mailto link\n\t\t$unencrypted_link = '<a href=\"mailto:'.$addr.'\">'.$link_content.'</a>';\n\t\t//build this for people with js turned off\n\t\t$noscript_link = '<noscript><span style=\"unicode-bidi:bidi-override;direction:rtl;\">'.strrev($link_content.' ;tg& '.$addr.' ;tl&').'</span></noscript>';\n\t\t//put them together and encrypt\n\t\t$encrypted_link = '<script type=\"text/javascript\">Rot13.write(\\''.str_rot13($unencrypted_link).'\\');</script>'.$noscript_link;\n\n\t\treturn $encrypted_link;\n\t}", "function emaillink($address, $name = NULL) {\n $this->doc .= '\\href{mailto:'.$this->_xmlEntities($address).'}{'.$this->_xmlEntities($address).'}';\n }", "public static function getLink($config_key, $text=null) {\n\t\t$email = Config::get('email', $config_key, true);\n\t\tif(!$email) return null;\n\t\t$html = '<a href=\"mailto:'.strtolower($email).'\">'.($text ? $text : $email).'</a>';\n\t\t$code = bin2hex($html);\n\t\t$fake_address = 's'.mt_rand(100000,999999).'@example.'.(rand(0,1) ? 'com' : 'org');\n\t\treturn \"<span class=\\\"m-protected\\\" data-real=\\\"$code\\\"><!--googleoff: index--><a href=\\\"mailto:$fake_address\\\">$fake_address</a> (This e-mail address is invalid because it is protected against spam bots. Please enable JavaScript to see the real address.)<!--googleon: index--></span>\";\n\t}", "function freshports_CommitterEmailLinkExtra($committer, $extrabits) {\n\t#\n\t# in an attempt to reduce spam, encode the mailto\n\t# so the spambots get rubbish, but it works OK in\n\t# the browser.\n\t#\n\n\t$new_addr = \"\";\n\t$addr = $committer . \"@FreeBSD.org\";\n\n\t$new_addr = freshportsObscureHTML($addr);\n\n\t$HTML = \"<A HREF=\\\"\" . MAILTO . \":$new_addr?$extrabits\\\">$committer</A>\";\n\n\treturn $HTML;\n}", "function adelman_auction_cron_mail(){\n adelman_ping_url( get_site_url(null, '/?auction-cron=mails', 'https') );\n}", "function get_email_link( $p_email, $p_text ) {\n\t\tif ( !access_has_project_level( config_get( 'show_user_email_threshold' ) ) ) {\n\t\t\treturn $p_text;\n\t\t}\n\t\t\n\t\t# If we apply string_url() to the whole mailto: link then the @\n\t\t# gets turned into a %40 and you can't right click in browsers to\n\t\t# do Copy Email Address.\n\t\t$t_mailto\t= string_attribute( \"mailto:$p_email\" );\n\t\t$p_text\t\t= string_display( $p_text );\n\n\t\treturn \"<a href=\\\"$t_mailto\\\">$p_text</a>\";\n\t}", "public function EmailShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = $this->owner->AbsoluteLink();\n $subject = rawurlencode(_t('JonoM\\ShareCare\\ShareCare.EmailSubject', 'Thought you might like this'));\n $body = rawurlencode(_t('JonoM\\ShareCare\\ShareCare.EmailBody', 'Thought of you when I found this: {URL}', array('URL' => $pageURL)));\n\n return ($pageURL) ? \"mailto:?subject=$subject&body=$body\" : false;\n }", "public static function createDefaultEmail()\n {\n $fulldom = Director::absoluteBaseURL();\n $host = parse_url($fulldom, PHP_URL_HOST);\n if (!$host) {\n $host = 'localhost';\n }\n $dom = str_replace('www.', '', $host);\n\n return 'postmaster@' . $dom;\n }", "function ent_link($eVal)\n{\n // generic mail match regex\n $mailRegex = '!^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$!';\n if (preg_match($mailRegex, $eVal)) {\n $eVal = \"<a href='mailto:$eVal'>$eVal</a>\";\n } else {\n $urlRegex = '#(http|https|ftp|news)://([^\\s]+)#S';\n $eVal = preg_replace_callback($urlRegex, 'url_callback', $eVal);\n }\n return $eVal;\n}", "static public function mailto()\n\t\t{\n\t\t\t# code...\n\t\t}", "public function generateEmail()\n {\n return sprintf('printeros%s@%s', uniqid(), $this->config->get('host'));\n }", "public function link($include_host = false)\n {\n return $this->url($include_host);\n }", "public static function createlinkEmail($email,$text) {\n return HTML::createLink(\"mailto:$email\",$text);\n }", "function print_email_link( $p_email, $p_text ) {\n\t\techo get_email_link($p_email, $p_text);\n\t}", "function mailto_href($recipients=\"\",$cc=\"\",$subject=\"\",$body=\"\",$echome=false)\r\n{\r\n // OUTLOOK VERLANGT PARAMETER MIT UNMASKIERTEM & VERKNUEPFT (STANDARD WAERE &amp;)\r\n\r\n $retVal = \"<a href='mailto:\".$recipients.\"?\";\r\n\r\n if ($cc!=\"\") $retVal .= $cc.\"&\";\r\n\r\n if ($subject!=\"\")$retVal .= \"subject=\".$subject.\"&\";\r\n\r\n if ($body!=\"\")\r\n {\r\n $body = str_replace(array(\"\\n\",\" \",\"&\",\"\\\"\",\"'\"),array(\"%0D%0A\",\"%20\",\"%26\",\"%22\",\"%27\"),$body);\r\n $retVal .= \"body=\".$body;\r\n }\r\n\r\n $retVal .= \"'>\";\r\n \r\n if ($echome) echo $retVal;\r\n else return $retVal;\r\n}", "private function href()\n {\n $html = app('html');\n $queries = $this->queries();\n $email = $this->email();\n\n if ($queries) {\n return $html->obfuscate('mailto:') . $email . $html->obfuscate($queries);\n }\n\n return $html->obfuscate('mailto:') . $email;\n }", "function link_email($email, $options = array())\n {\n // if options is not an array, it is the link text\n if (!is_array($options)) { $options = array('text' => $options); }\n\n $url = 'mailto:' . $email;\n if (empty($options['text'])) { $options['text'] = $email; }\n\n return link_url($url, $options);\n }", "public function EncodedEmailLink()\n {\n if ($email = $this->getBestEmail()) {\n $obj = $this->retrieveEmailObject();\n if ($obj) {\n return $obj->MailTo;\n } else {\n return \"mailto:\".$email;\n }\n }\n }", "function sed_build_pm($user)\r\n{\r\n\tglobal $usr, $L;\r\n\treturn '<a href=\"'.sed_url('pm', 'm=send&to='.$user).'\" title=\"'.$L['pm_sendnew'].'\"><img src=\"skins/'.$usr['skin'].'/img/system/icon-pm.gif\" alt=\"'.$L['pm_sendnew'].'\" /></a>';\r\n}", "function wpb_sender_email( $original_email_address ) {\n $url = home_url();\n $pattern = '/(https?):\\/\\/(.*)/';\n preg_match( $pattern, $url, $matches );\n return 'onlineshop@' . $matches[2];\n}", "public function shareEmail()\n {\n return 'subject=' . urlencode($this->current()->title)\n . '&body=' . ($this->shortDescription() . \"\\n\\nRead more at \")\n . 'http://'\n . $_SERVER['HTTP_HOST']\n . $_SERVER['REQUEST_URI'];\n\n }", "function mail_ToTech($subject,$msg){\r\n\t$techMan = \"admin@nautilusvx.com\";\r\n\t$header = \"From: webmaster@simplyelectronics.com \\r\\n\";\r\n\t$msg = $msg.\"\\r\\n Site: {$_SERVER['SERVER_NAME']}\\r\\n File: \".__FILE__.\"\\r\\n Line: \".__LINE__.\"\\r\\n From: {$_SERVER['REMOTE_HOST']}\\r\\n\";\r\n\tmail($techMan,$subject,$msg,$header);\r\n}", "public function mswClickableEmail($matches) {\n $email = $matches[2] . '@' . $matches[3];\n return $matches[1] . '<a href=\"mailto:' . $email . '\" title=\"' . $email . '\" rel=\"nofollow\">' . $email . '</a>';\n }", "function reclinks_domain( $echo = true, $before = '(', $after = ')' ) {\n\tglobal $post;\n\tif ( $href = get_post_meta( $post->ID, '_href', true ) )\n\t\t$host = parse_url( $href, PHP_URL_HOST );\n\n\tif ( empty( $host ) ) return;\n\n\tif ( $echo )\n\t\techo $before . $host . $after;\n\telse\n\t\treturn $before . $host . $after;\n}", "function mailLinkTracking($id,$link,$name){\n if ($id == '') return $link;\n return absoluteURL().\"track/ml?tc=\".$id.\"&l=\".urlencode($link).\"&ln=\".$name;\n }", "public function email() {\n if (!empty($this->config['username'])) {\n $user = $this->config['username'];\n }\n else {\n $user = $this->username();\n }\n $parsed = parse_url($this->config['baseUrl']);\n if (!pathinfo($this->config['baseUrl'], PATHINFO_EXTENSION)) {\n $parsed['host'] = \"website.com\";\n }\n\n return $user . '@' . $parsed['host'];\n }", "public function getEmailOnBrokenLinkOnly() {}", "function webim_mail($toaddr, $reply_to, $subject, $body, $link)\n{\n\tglobal $webim_encoding, $webim_mailbox, $mail_encoding, $current_locale;\n\n\t$headers = \"From: $webim_mailbox\\r\\n\"\n\t\t\t . \"Reply-To: \" . myiconv($webim_encoding, $mail_encoding, $reply_to) . \"\\r\\n\"\n\t\t\t . \"Content-Type: text/plain; charset=$mail_encoding\\r\\n\"\n\t\t\t . 'X-Mailer: PHP/' . phpversion();\n\n\t$real_subject = \"=?\" . $mail_encoding . \"?B?\" . base64_encode(myiconv($webim_encoding, $mail_encoding, $subject)) . \"?=\";\n\n\t$body = preg_replace(\"/\\n/\", \"\\r\\n\", $body);\n\n\t@mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body), 70), $headers);\n}", "function _getLinkContent($fieldname,$content,$confDBField)\n\t\t{\n\t\t$isEMail = (strstr($content,'@') == true);\n\t\t$isPage = (preg_match('#\\d+#',$content) == true);\n\n\t\t$strContent = $content;\n\t\tif($isEMail && strstr($content,'mailto:') == false)\n\t\t\t{\n\t\t\t$confDBField['makelinks'] = 1;\n\n\t\t\t$strContent = 'mailto:' . $content;\n\t\t\t$strContent = $this->cObj->parseFunc($strContent,$confDBField);\n\t\t\t}\n\t\telse if($isPage)\n\t\t\t{\n\t\t\t$confDBField['makelinks'] = 1;\n\t\t\t$confDBField['parameter'] = $strContent;\n\t\t\t$strContent = $this->cObj->typoLink($this->pi_getLL(\"continue_on_page\",\"more...\"),$confDBField);\n\t\t\t}\n\t\telse if(strlen(trim($content)) > 0) // External URL - only if the content is not blank\n\t\t\t{\n\t\t\t$defaultProtocol = 'http://';\n\t\t\t$confDBField['makelinks'] = 1;\n\t\t\t$confDBField['parameter'] = $strContent;\t\t// for the typolink function\n\t\t\t$confDBField['protocol'] = isset($confDBField['protocol']) ? $confDBField['protocol'] : $defaultProtocol;\n\n\t\t\t$strTarget = isset($confDBField['target']) ? $confDBField['target'] : '_blank';\n\t\t\t$strLink = $content;\n\t\t\tif(preg_match('#(.*\\.\\D{2,4})/(.*)#',$content,$aTreffer))\n\t\t\t\t{\n\t\t\t\t$strLink \t= $aTreffer[1];\n\t\t\t\t$strTarget \t= $aTreffer[2];\n\t\t\t\t}\n\t\t\tif(strstr($strLink,$confDBField['protocol']) == false)\n\t\t\t\t{\n\t\t\t\t$strLink \t\t\t\t\t= $confDBField['protocol'] . $strLink;\n\t\t\t\t$content\t\t\t\t\t= $confDBField['protocol'] . $content;\n\t\t\t\t//$confDBField['parameter'] \t= $confDBField['protocol'] . $strLink;\n\t\t\t\t}\n\n\t\t\t$confDBField['makelinks.']['http.']['extTarget'] = $strTarget;\n\t\t\t\n\t\t\t// Just a code sample\n\t\t\t// $confDBField['makelinks.']['http.']['wrap'] = \"[ | ]\";\n\t\t\t// it does the same as: (TS-Code)\n\t\t\t// plugin.tx_mmreflist_pi1.typodbfield.web.makelinks.http.wrap = [> | <]\n\n\t\t\tif(isset($confDBField['typolink']) && $confDBField['typolink'] == 1)\n\t\t\t\t{\n\t\t\t\t//$strLink = (isset($confDBField['linktext']) ? $confDBField['linktext'] : $this->pi_getLL(\"continue_on_page\",\"more...\"));\n\t\t\t\t$strLinkText = $strLink;\n\t\t\t\tif(isset($confDBField['labelStdWrap.']))\n\t\t\t\t\t{\n\t\t\t\t\t$strLinkText = $this->cObj->stdWrap($strLink,$confDBField['labelStdWrap.']);\n\t\t\t\t\t}\n\n\t\t\t\t$strContent = $this->cObj->typoLink($strLinkText,$confDBField);\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t$strContent = $this->cObj->parseFunc($content,$confDBField);\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn $strContent;\n\t\t}", "function mail_to($email, $link_title = null, $html_options = null, $amphersand_encode = false)\n{\n return CTag::mail_to($email, $link_title,\n $html_options, $amphersand_encode);\n}", "function form_links($email)\n {\n list($name,$domain) = explode('@',$email);\n if(!$name || !$domain)\n return false;\n $domain = substr($domain,0,-3);\n if($domain == 'corp.mail')\n $domain = 'corp';\n $name = urlencode($name);\n $ret['my'] = 'http://r.mail.ru/cln3587/my.mail.ru/'.$domain.'/'.$name;\n $ret['foto'] = 'http://r.mail.ru/cln3565/foto.mail.ru/'.$domain.'/'.$name;\n $ret['video'] = 'http://r.mail.ru/cln3567/video.mail.ru/'.$domain.'/'.$name;\n $ret['blogs'] = 'http://r.mail.ru/cln3566/blogs.mail.ru/'.$domain.'/'.$name;\n return $ret;\n }", "function ait_dashboard_contact_function() {\n\techo '<p>For technical support please, <a href=\"mailto:support@aitsolution.ca\"> click here email to support@aitsolution.ca </a></p>';\n}", "function email_host($userEmail, $returnType='actualUrl')\n\t{\n\t\tlog_message('debug', '_network/email_host');\n\t\tlog_message('debug', '_network/email_host:: [1] userEmail='.$userEmail.' returnType='.$returnType);\n\t\t\n\t\t#First get the domain of the email \n\t\t$emailDomain = strtolower(substr(stristr($userEmail, '@'), 1));\n\t\t\n\t\t#Search the known mail hosts\n\t\t$host = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_row_as_array', 'query'=>'get_known_mail_host', 'variables'=>array('domain'=>$emailDomain) ));\n\t\tlog_message('debug', '_network/email_host:: [2] host='.$host);\n\t\t\n\t\tif(!empty($host))\n\t\t{\n\t\t\tif($returnType == 'actualUrl')\n\t\t\t{\n\t\t\t\tif(!empty($host['actual_url'])) $emailHost = $host['actual_url'];\n\t\t\t\telse $emailHost = \"{\".$host['host_url'].\":\".$host['port'].\"/imap/ssl}INBOX\";\n\t\t\t}\n\t\t\telse $emailHost = $host['host_url'];\n\t\t\tlog_message('debug', '_network/email_host:: [3] emailHost='.$emailHost);\n\t\t}\n\t\t\n\t\treturn array('host_url'=>(!empty($emailHost)? $emailHost: ''));\n\t}", "public static function url()\n {\n $config = rcmail::get_instance()->config;\n $storage_host = $_SESSION['storage_host'];\n\n $host = $config->get('password_cpanel_webmail_host', $storage_host);\n $port = $config->get('password_cpanel_webmail_port', 2096);\n\n return \"https://$host:$port/execute/Email/passwd_pop\";\n }", "function ajan_send_public_message_link() {\n\techo ajan_get_send_public_message_link();\n}", "function mailVLink($email, $nonce)\n{\n\t$link = (\"http://students.deepdivecoders.com/~jordan/capstone_2/registration/signup.php?nonce=\" . $nonce);\n\t$delivery = mail($email, \"NM Business Hub Registration\",\n\t\"Hello! \\r\\n\n\tThank you for signing up for NMBN. \\r\\n\n\tTo verify your email and complete the process, copy the following url into your browser: \n\t\\r\\n\"\n\t. $link . \n\t\"\\r\\n\n\tIf you feel you have received this email by mistake, disregard this message.\");\n\tif ($delivery !== true)\n\t{\n\t\tthrow new Exception (\"Mail not sent.\");\n\t}\n}", "static function prepare_email_value_for_email( $p_value ) {\n\t\treturn 'mailto:' . $p_value;\n\t}", "private function sendLinkEmail($m): bool {\n $rec = $m->register;\n $app = $this->app;\n $prefix = \"https://\" . $app->domain;\n $editUrl = $prefix . '/reglink/' . $rec->linkcode . '/' . $rec->id;\n if (!empty($rec->email)) {\n $event = $m->event;\n $name = $rec->fname . ' ' . $rec->lname;\n // model for email template\n $model = new WConfig();\n $model->link = $editUrl;\n $model->userName = $name;\n\n $model->domain = $app->organization;\n if (!empty($event->reg_detail)) {\n $model->detail = $event->reg_detail;\n } else {\n $model->detail = null;\n }\n $params['m'] = $model;\n $params['app'] = $app;\n\n $htmlMsg = static::simpleView('events/signup_html', $params);\n $textMsg = Html2Text::convert($htmlMsg);\n\n $mailer = new SwiftMail($this->app);\n $msg = [\n \"subject\" => 'Event registration for ' . $m->eblog->title,\n \"text\" => $textMsg,\n \"html\" => $htmlMsg,\n \"to\" => [\n \"email\" => $rec->email,\n \"name\" => $name\n ]\n ];\n $isValid = $mailer->send($msg);\n if ($isValid['success']) {\n $this->flash('Email sent');\n return true;\n } else {\n $this->error($isValid['errors']);\n return false;\n }\n }\n // this was for view render\n // $m->editUrl = $editUrl; \n }", "function mail_ToTech($subject,$msg){\r\n\t$techMan = \"jesslyn@eservicesgroup.net,challis@eservicesgroup.net,edward@eservicesgroup.net\";\r\n\t//$techMan = \"jesslyn@econsultancygroup.net\";\r\n\t//$techMan = \"admin@nautilusvx.com\";\r\n\t$header = \"From: webmaster@simplyelectronics.com \\r\\n\";\r\n\t$msg = $msg.\"\\r\\n\";//Site: {$_SERVER['SERVER_NAME']}\\r\\n File: \".__FILE__.\"\\r\\n Line: \".__LINE__.\"\\r\\n From: {$_SERVER['REMOTE_HOST']}\\r\\n\";\r\n\tmail($techMan,$subject,$msg,$header);\r\n}", "function carawebs_nav_encode_email( $atts, $item, $args ) {\n\n\tif ( preg_match( '/^mailto:(.+)/', $atts['href'], $match ) ) {\n\n\t\t$atts['href'] = 'mailto:' . antispambot( $match[1] );\n\n\t}\n\treturn $atts;\n }", "public function EmailAddr() {\n\tthrow new exception('Does anything call this? It should use the template defined in site.php.');\n\treturn 'order-'.$this->NumberString().'@'.KS_EMAIL_DOMAIN;\n }", "function mailto($address, $alternative='(e-mail address hidden)')\n{\n if (empty($address)) {\n echo '&nbsp;';\n } else {\n $prog = urlenc(\"var a='\" . urlenc(str_replace('@', '&#64;', $address)) .\n \"';document.write('<a href=\\\"mailto:'+unescape(a)+'\\\">'+unescape(a)+'</a>');\");\n return \"<script type='text/javascript'>eval(unescape('\" .\n $prog . \"'));</script><noscript>$alternative</noscript>\";\n }\n}", "function sed_build_pm($user)\n\t{\n\tglobal $usr, $cfg, $L, $out;\n\t$result = \"<a href=\\\"\".sed_url(\"pm\", \"m=send&to=\".$user).\"\\\">\".$out['ic_pm'].\"</a>\";\n\treturn($result);\n\t}", "function format_link($subpat, $doNospamEmail=false) {\n $exc_string = \"/e\\.g|i\\.e|et\\.c/i\";\n //If it says abc://de.fg\n if (preg_match(\"/[\\S]*\\:\\/\\/[\\S]*\\.[\\S]*/i\", $subpat) == 1) {\n return \"<a href='\" . $subpat . \"' target='_top'>\" . $subpat . \"</a>\";\n }\n //If it says abc@de.fg\n else if (preg_match(\"/[\\S]*@[\\S]*\\.[\\S]*/i\", $subpat) == 1) {\n \t\n \t$used = $subpat;\n \tif($doNospamEmail) {\n \t\t$used = no_spam($used);\n \t}\n \t\n return \"<a href='mailto:\" . $used . \"'>\" . $used . \"</a>\";\n }\n //If it says \"e.g.\" don't link\n else if (preg_match($exc_string, $subpat) == 1) {\n return $subpat;\n }\n //If it says abc.de\n else\n return \"<a href='http://\" . $subpat . \"' target='_top'>\" . $subpat . \"</a>\";\n}", "function slb_get_option_link( $email, $list_id=0 ) {\n\t$link_href = '';\n\n\ttry {\n\n\t\t$page = get_post( slb_get_option('slb_confirmation_page_id') );\n\t\t$slug = $page->post_name;\n\t\t$permalink = get_permalink($page);\n\n\t\t// get character to start querystring\n\t\t$starquery = slb_get_querystring_start($permalink);\n\n\t\t$link_href = $permalink . $starquery . 'email=' . urlencode($mail) . '&list=' . $list_id;\n\t\t \n\t} catch (Exception $e) {\n\t\t// $link_href = $e->getMessge();\n\t}\n\n\treturn esc_url($link_href);\n}", "public function link() {\n return \"<a href=\\\"\". config('app.url') .\"/person/\". $this->id .\"\\\">\". $this->name .\"</a>\";\n }", "public function getLinkMail()\n {\n return $this->link_mail;\n }", "private function generateEmail() {\n return 'ut_' . debug_backtrace(null, 2)[1]['function'] . '_'. rand() . '@example.com';\n }", "private function generateLink()\n {\n $separatedListener = explode(':', $this->_listener);\n\n $this->_link = $separatedListener[0] == '*' ?\n \"0.0.0.0:{$separatedListener[1]}\" : $separatedListener;\n }", "function linkchecker($project_id) {\n $project = $this->Project->find('Project.id='.$project_id);\n if ($project) {\n # get dev emails\n $emails = \"\";\n foreach($project['Employee'] as $i => $employee) {\n if ($employee['department'] == 'developer') {\n $emails = $employee['email'] . ', ';\n }\n }\n\n # check site -- default to dev site\n $site = \"http://\" . $project['Project']['dns_dev'];\n $output = `linkchecker -o html $site`;\n\n\n # send html email\n $this->Email->template = 'email/linkchecker';\n $this->set('output', $output);\n $this->Email->from = \"projectTool_noreply@cmdagency.com\";\n $this->Email->fromName = \"Project Tool\";\n #$this->Email->to = $emails; \n $this->Email->to = 'jaustin@cmdagency.com'; \n $this->Email->subject = \"$site - linkcheck - \" . date(\"m-d-Y\");\n $result = $this->Email->send();\n die;\n }\n\n }", "public function getLink()\n {\n return 'http://' . $this->directory->getFilename() . '.192.168.33.11.xip.io';\n }", "function generateLink($code) {\r\n\treturn 'http://www.uottawa.ca/academic/info/regist/calendars/arts/' . $code . '.html';\r\n}", "private function makeLink($params) {\n\t\tif($params[0] == \"inSite\") {\n\t\t\treturn \"<a href=\\\"?\" . $this->pdo->getSiteName() . \"/\" . $params[2] . \"\\\">\" . $params[1] . \"</a>\";\t\n\t\t}\n\t\tif($params[0] == \"otherSite\") {\n\t\t\treturn \"<a href=\\\"?\" . $params[2] . \"/\" . $params[3] . \"\\\">\" . $params[1] . \"</a>\";\n\t\t}\n\t\tif($params[0] == \"www\") {\n\t\t\treturn \"<a href=\\\"\" . $params[2] . \"\\\">\" . $params[1] . \"</a>\";\n\t\t}\n\t\tif($params[0] == \"userDefined\") {\n\t\t\treturn \"<a href=\\\"\" . $params[2] . \"\\\">\" . $params[1] . \"</a>\";\n\t\t}\n\t}", "function getContactLink($vid, $hubID){\n return 'https://app.hubspot.com/sales/'.$hubID.'/contact/'.$vid.'/';\n}", "public function replyLink()\n {\n return \"<a class=\\\"at\\\" href=\\\"\" . $this->author->profileLink() . \"\\\">@\" . $this->author->name .\"</a>\";\n }", "public function mailto($email) {\n\t\t$email = $this->escape($email);\n\t\treturn \"<a href=\\\"mailto://$email\\\">$email</a>\";\n\t}", "function mailtoModule()\n{\n global $ACMSCfg;\n // FIXME: There should be an easy way to override templates with a theme.\n $parts = pathinfo(__FILE__);\n $this->templatePath = $parts[\"dirname\"] . \"/mailto_\";\n $this->recipient = \"\";\n $this->rcptName = \"\";\n $this->subject = \"\";\n $this->message = \"\";\n $this->sendername = \"\";\n $this->senderemail = \"\";\n\n $this->validRcpts = array();\n // Load the valid recipeints\n $tags = split(':', $ACMSCfg['mod_mailto']['tags']);\n foreach($tags as $tag) {\n $ctag = 'tag_' . $tag;\n if (!empty($ACMSCfg['mod_mailto'][$ctag])) {\n list($addr,$name) = split(':', $ACMSCfg['mod_mailto'][$ctag],2);\n $this->validRcpts[] = array('tag' => $tag, 'addr' => $addr, 'name' => $name);\n }\n }\n\n}", "function createMail () {\n\t\n\t}", "function cot_build_pm($user)\n{\n\tglobal $L;\n\treturn cot_rc('pm_link', array('url' => cot_url('pm', 'm=send&to='.$user).'\" title=\"'.$L['pm_sendnew']));\n}", "function omega_get_site_link() {\r\n\treturn sprintf( '<a class=\"site-link\" href=\"%s\" rel=\"home\">%s</a>', esc_url( home_url() ), get_bloginfo( 'name' ) );\r\n}", "function get_part_url(){\n\r\n\t\t//$email = preg_replace(\"`(http://|https://)?(www.)?(.*?)`is\",\"$3\", site_url());\n\t\t// Get the site domain and get rid of www.\n\t\t$sitename = strtolower( $_SERVER['SERVER_NAME'] );\n\t\tif ( substr( $sitename, 0, 4 ) == 'www.' ) {\n\t\t\t$sitename = substr( $sitename, 4 );\n\t\t}\n\t\treturn $sitename;\n\t\t\r\n\t\t//return $email;\r\n\t}", "function mailTo(\n $from, // the sender or 'no-reply'\n $to, // the destination email\n $subject, // the email subject\n $message // the basic HTML content\n) {\n // common prefix for all email subjects\n // users can create a rule in this case\n // and decide how to be notified\n static $logo = 'equolo - ';\n\n // if no-reply, the user should not be able to reply indeed\n $name = $from === 'no-reply' ? $from : 'equolo - '.$from;\n return mail(\n $to,\n $logo.$subject,\n $message,\n \"From: {$name} <{$from}@equolo.org>\\r\\n\".\n \"Reply-To: {$name} <{$from}@equolo.org>\\r\\n\".\n \"MIME-Version: 1.0\\r\\nContent-Type: text/html; charset=utf-8\\r\\n\".\n \"X-Mailer: PHP/\".phpversion().\"\\r\\n\"\n // if you are wondering ... NO, this is not needed\n // still a common procedure to flag the env\n // that generated and sent the email\n );\n}", "public static function linkify($str) {\n $str = preg_replace(\"/\\\\b([a-z\\\\.-_]*@[a-z\\\\.]*\\\\.[a-z]{1,6})\\\\b/i\", \"<a href='mailto:\\\\1' target='_blank'>\\\\1</a>\", $str);\n $str = preg_replace('#\\b((?:[a-z]{1,5}://|www\\.)([a-z0-9\\-\\.]*\\.[a-z]{1,6}(?:[a-z_\\-0-9/\\#=\\?\\.]*)))\\b#i', \"<a href='\\\\1' target='_blank'>\\\\2</a>\", $str);\n return $str;\n }", "function makeLink($string){\n\n /*** make sure there is an http:// on all URLs ***/\n $string = preg_replace(\"/([^\\w\\/])(www\\.[a-z0-9\\-]+\\.[a-z0-9\\-]+)/i\", \"$1http://$2\",$string);\n /*** make all URLs links ***/\n $string = preg_replace(\"/([\\w]+:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/i\",\"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\",$string);\n /*** make all emails hot links ***/\n $string = preg_replace(\"/([\\w-?&;#~=\\.\\/]+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?))/i\",\"<a href=\\\"mailto:$1\\\">$1</a>\",$string);\n\n return $string;\n}", "protected function makeEmails()\n {\n }", "public function getEmailWithLink()\n {\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $html = '<a href=\"mailto:' . $this->email . '\">' . Html::encode($this->email) . '</a>';\n } else {\n $html = '<span class=\"error\">' . Html::encode($this->email) . '</span>';\n }\n\n return $html;\n }", "function mail_newsletter_zapisz($do,$grupa,$code){\n\t$serw = \"<a href='http://\".$_SERVER['HTTP_HOST'].\"/newsletter.html?add=$code'>http://\".$_SERVER['HTTP_HOST'].\"/newsletter.html?add=$code</a>\";\n\t$mes = \"Aby aktywować newsletter: $grupa kliknij w link:\n\t$serw\";\n\n\t$temat=\"Newsletter Kryniczno\";\n\t$wiadomosc=\"<html><head><title>Zapisanie do newslettera Kryniczno</title></head>\n\t<body>\n\t<center><b>Witaj</b></center>\n\t$mes\n\t<br>\n\t<p align=\\\"right\\\">Wiadomość automatyczna serwisu kryniczno.pl</p>\n\t</body> \n\t</html>\";\n\t$result = $this->baza->select(\"value\",\"cmsconfig\",\"name='ADM_EMAIL'\");\n\t$row = $this->baza->row($result);\n\t$naglowki = \"MIME-Version: 1.0\\r\\n\";\n\t$naglowki .= \"Content-type: text/html; charset=utf-8\\r\\n\";\n\t$naglowki .= \"From: Kryniczno<\".$row[value].\">\\r\\n\";\n\tmail($do, $temat, $wiadomosc, $naglowki);\n}", "function mailto()\n\t{\n\t\t$people_to_email=$this->input->post('ids');\n\t\t\n\t\tif($people_to_email!=false)\n\t\t{\n\t\t\t$mailto_url='mailto:';\n\t\t\tforeach($this->Person->get_multiple_info($people_to_email)->result() as $person)\n\t\t\t{\n\t\t\t\t$mailto_url.=$person->email.',';\t\n\t\t\t}\n\t\t\t$mailto_url=substr($mailto_url,0,strlen($mailto_url)-1); # simply removes trailing comma\n\t\t\t\n\t\t\techo $mailto_url;\n\t\t\texit;\n\t\t}\n\t\techo '#';\n\t}", "public function display_link();", "function uga_track_mailto($mailto) {\r\n // return tracker string for mailto: link\r\n uga_debug(\"Start uga_track_mailto: $mailto\");\r\n $tracker='';\r\n if (uga_get_option('track_mail_links')) {\r\n $tracker=uga_get_option('prefix_mail_links').$mailto;\r\n } \r\n uga_debug(\"Ending uga_track_mailto: $tracker\");\r\n return $tracker;\r\n}", "function sed_build_email($email, $hide = false)\n\t{\n\tglobal $L;\n\tif ($hide)\n\t\t{ $result = $L['Hidden']; }\n\telseif (!empty($email) && mb_strpos($email, '@') !== FALSE)\n\t\t{\n\t\t$email = sed_cc($email);\n\t\t$result = \"<a href=\\\"mailto:\".$email.\"\\\">\".$email.\"</a>\";\n\t\t}\n\n\treturn($result);\n\t}", "private function _getDownloadLink(){\n\t\t$link = $this->modx->getOption('site_url').\"core/packages/$this->pkg_name.transport.zip\";\n\t\treturn '<a href=\"'.$link.'\">here</a>';\n\t}", "abstract protected function generateLinks();", "public function sendLink(){\n\t\t$errors = [];\n\t\t$email = $_POST['email'];\n\n\t\t// Validate the form\n\t\t// Each field has been filled out\n\n\t\t// Email pattern\n\t\t$emailPattern = '/^[a-zA-Z0-9_\\-.]{1,100}@[a-zA-Z0-9_\\-.]{1,100}\\.[a-zA-Z.]{1,100}$/';\n\n\n\t\tif( preg_match($emailPattern, $email) ) {\n\t\t\t// Check database\n\t\t\t// die('Email good, check database');\n\n\t\t\t// Look the email in database\n\t\t\t$user = new UsersModel();\n\n\t\t\t$result = $user->doesThisEmailExist( $email );\n\n\t\t\t// If the result is true\n\t\t\tif( $result == true ) {\n\t\t\t\t// Provide the user a message\n\t\t\t\theader(\"Location:./?page=passwordChangeMessage\");\n\n\t\t\t\t$view = new PasswordChangeEmailView(compact('email'));\n \t\t\t$view->render();\n\t\t\t} else {\n\t\t\t\t// Generate error message\n\t\t\t\t$errors['email'] = 'Please register for an account.';\n\t\t\t}\n\n\n\t\t} else {\n\t\t\t// Generate error message\n\t\t\t$errors['email'] = 'Please enter a valid E-Mail address';\n\t\t\t\n\t\t}\n\t\t// If validation failed\n\t\tif( count($errors) > 0 ) {\n\t\t\t// Oh dear, errors.\n\t\t\t$view = new HelpView($errors);\n \t\t$view->render();\n \t\treturn;\n\t\t}\n\t}", "public function address()\n {\n return $this->local_part . '@' . $this->domain->domain;\n }", "function createEmailAddress() {\n global $seed;\n global $tlds;\n\n $part[0] = $seed[rand(0, count($seed)-1)];\n $part[1] = $seed[rand(0, count($seed)-1)];\n $part[2] = $seed[rand(0, count($seed)-1)];\n\n $tld = $tlds[rand(0, count($tlds)-1)];\n\n $len = rand(1,3);\n\n $ret = '';\n for($i=0; $i<$len; $i++) {\n $ret .= (empty($ret)) ? '' : '.';\n $ret .= $part[$i];\n }\n\n if($len == 1) {\n $ret .= rand(10, 99);\n }\n\n return \"{$ret}@example{$tld}\";\n}", "function bloglink(&$blog) {\n return '<a href=\"'.hsc($blog->getURL()).'\" title=\"'._BLOGLIST_TT_VISIT.'\">'. hsc( $blog->getName() ) .'</a>';\n }", "function gravatar_link($email)\n{\n\n\treturn \"//www.gravatar.com/avatar/\".md5($email).\"?s=35\";\n\t\n}", "function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}", "function append_website_URL($page_address){\n\t$home_url = substr($_SERVER['SCRIPT_NAME'], 0, -9);\n\techo 'http://' . $_SERVER['HTTP_HOST'] . $home_url . $page_address;\n}", "function send_email($email=array(), $link='', $key='', $password='') {\r\n\t\t\r\n\t\tif ( strlen( $link ) <= 0 ) {\r\n\t\t\t\r\n\t\t\treturn 'missing link! need a link for the user to be forwarded (like: \"https://www.app-arena.com/myapp/modules/auth/recover_password.php/recovery_redirect.php?aa_inst_id=4656&activationkey=fc43607492acab2a42ff51312e189179\")';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Get email content\r\n\t\tif (array_key_exists('body', $email))\r\n\t\t\t$email_body = $email['body'];\r\n\t\telse $email_body = \"\";\r\n\t\tif (array_key_exists('subject', $email))\r\n\t\t\t$email_subject = $email['subject'];\r\n\t\telse $email_subject = \"\";\r\n\t\t\r\n\t\t// Get receiver data (the customer gets the mail from the contact form, the user is the sender)\r\n\t\tif (array_key_exists('name', $this->customer))\r\n\t\t\t$receiver_name = $this->customer['name'];\r\n\t\telse $receiver_name = \"\";\r\n\t\tif (array_key_exists('email', $this->customer))\r\n\t\t\t$receiver_email = $this->customer['email'];\r\n\t\telse $receiver_email = \"\";\r\n\t\t\r\n\t\t// prepare link because it is https!!! (does not work grrr)\r\n\t\t//$link = '<a href=\"' . $link . '\">Ich möchte mein Passwort zurücksetzen.</a>';\r\n\t\t\r\n\t\t// Replace variables in Email-text\r\n\t\t$email_body = str_replace( \"{{link}}\", $link, $email_body );\r\n\t\t$email_body = str_replace( \"{{password}}\", $password, $email_body );\r\n\r\n\t\t// Setup Zend SMTP server\r\n\t\t$smtp_config = array(\r\n\t\t\t'ssl'\t =>'tls',\r\n\t\t\t'username' => $this->smtp_user, \r\n\t\t\t'password' => $this->smtp_pass,\r\n\t\t\t'port'\t => $this->smtp_port,\r\n\t\t\t'auth'\t => 'login'\r\n\t\t);\r\n\t\t$transport = new Zend_Mail_Transport_Smtp($this->smtp_host, $smtp_config);\r\n\t\t\r\n\t\t// setup email\r\n\t\t$mail = new Zend_Mail('UTF-8');\r\n\t\t$mail->setBodyHtml($email_body);\r\n\t\t$mail->setFrom($this->customer['email'], $this->customer['name']);\r\n\t\t$mail->addTo($this->user['email'], 'User'/*$this->user['firstname'] . ' ' . $this->user['lastname']*/);\r\n\t\t$mail->setSubject($email_subject);\r\n\t\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t// if the mail is sent successfully we need to save the link and password to the db...\r\n\t\t\t$_GET[ 'aa_inst_id' ] = $this->aa_inst_id;\r\n\t\t\tinclude_once '../../config.php';\r\n\t\t\tinclude_once '../../init.php';\r\n\t\t\tinclude_once 'check_database.php';\r\n\t\t\t\r\n\t\t\t$user_id = 0;\r\n\t\t\t\r\n\t\t\t// get the users id by email\r\n\t\t\t$query = \"SELECT * FROM `user_data` WHERE `aa_inst_id` = \" . $this->aa_inst_id . \" AND `email` = '\" . mysql_real_escape_string( $this->user[ 'email' ] ) . \"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif ( $result ) {\r\n\t\t\t\tif ( mysql_num_rows( $result ) > 0 ) {\r\n\t\t\t\t\t$row = mysql_fetch_assoc( $result );\r\n\t\t\t\t\t$user_id = $row[ 'id' ];\r\n\t\t\t\t}\r\n\t\t\t\tmysql_free_result( $result );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( $user_id <= 0 ) {\r\n\t\t\t\treturn 'email not found in db, please try again...';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$return = $mail->send($transport);\r\n\t\t\t\r\n\t\t\t$data = array(\r\n\t\t\t\t'password' => md5( $password ),\r\n\t\t\t\t'key' => $key,\r\n\t\t\t\t'email' => $this->user[ 'email' ]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// very unlikely to happen but check if this password has already been created once before...\r\n\t\t\t$query = \"SELECT * FROM `user_log` WHERE `aa_inst_id` = \" . $this->aa_inst_id . \" AND `action` = 'user_password_recover' AND `data` = '\" . json_encode( $data ) . \"' AND `user_id` = \" . $user_id;\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif ( $result ) {\r\n\t\t\t\tif ( mysql_num_rows( $result ) > 0 ) {\r\n\t\t\t\t\treturn 'the password was already used by the password recovery, please try again...';\r\n\t\t\t\t}\r\n\t\t\t\tmysql_free_result( $result );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// insert the recovery action and the new password\r\n\t\t\t$query = \"INSERT INTO `user_log` SET `aa_inst_id` = \" . $this->aa_inst_id . \", `action` = 'user_password_recover', `data` = '\" . json_encode( $data ) . \"', `user_id` = \" . $user_id;\r\n\t\t\tmysql_query( $query );\r\n\t\t\t\r\n\t\t\treturn $return;\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t//send mail failed\r\n\t\t\t$return_msg = \"<strong>Receiver: </strong>\" . var_dump($this->user);\r\n\t\t\t$return_msg .= \"<strong>Email: </strong>\" . var_dump($email);\r\n\t\t\t$return_msg .= \"<strong>SMT-Settings: </strong>\" . var_dump($smtp_config) . \"Smtp-Host: \" . $this->smtp_host;\r\n\t\t\treturn 'exception:' . $return_msg . $e->getMessage();\r\n\t\t}\r\n\t}", "private function get_host() {\n\t\tif (preg_match('/(http[s]?:)?([\\/]{0,2})([^\\/\\?\\#]+)/', $this->url, $match)) {\n\t\t\tif (empty($match[1])) $match[1] = 'http:';\n\t\t\tif (empty($match[2])) $match[2] = '//';\n\t\t\treturn $match[1] . $match[2] . $match[3];\n\t\t} else {\n\t\t\treturn $this->url;\n\t\t}\n\t}", "function hostURL()\n {\n return serverProtocol() . $_SERVER['HTTP_HOST'];\n }", "function mailresetlink($to,$token){\n //Subject line\n $subject = \"Forgot Password on zeus.co.uk\";\n //The website that you have requested this for\n $uri = 'http://'. $_SERVER['HTTP_HOST'] ;\n $message = '\n <html>\n <head>\n <title>Forgot Password For zeus.co.uk</title>\n </head>\n <body>\n <p>Click on the given link to reset your password <a href=\"'.$uri.'/login_system/reset.php?token='.$token.'\">Reset Password</a></p>\n </body>\n </html>';\n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n //The email address that it was sent from\n $headers .= 'From: Admin<group@wearezeus.co.uk>' . \"\\r\\n\";\n \n if(mail($to,$subject,$message,$headers)){\n echo \"If you're registered we will send you an email with instructions on how to reset your password. <b>\".$to.\"</b>\"; \n }\n }", "public function getAddress()\n {\n return sprintf('https://%s.amocrm.%s', $this->subdomain, $this->top_level_domain);\n }", "public function formatEmail($value)\r\n\t{\r\n\t\treturn CHtml::mailto($value);\r\n\t}", "function homeLink() : string {\n\tstatic $home;\n\tif ( isset( $home ) ) {\n\t\treturn $home;\n\t}\n\t\n\t$home = website() . getRoot();\n\treturn $home;\n}", "public function routeNotificationForMail(): string\n {\n return $this->email;\n }", "function getNotifyUrl()\n {\n if (isset($this->domain)) {\n return 'http://' . $this->domain . ':' . $this->port . $this->path;\n } else {\n return 'http://' . $this->ip . ':' . $this->port . $this->path;\n }\n }", "function generate_server_url() {\n return $this->protocol . \"://\" . $this->host;\n }", "public function message()\n {\n $str = 'The link should begin with ' . $this->domain1;\n\n if ($this->domain2) {\n $str .= ' or ' . $this->domain2;\n }\n\n return $str;\n }", "function send_wp_mail_from($email)\n {\n return \"Email Address\";\n }", "public function Link()\n\t{\treturn SITE_URL . 'multimedia/' . $this->id . '/' . $this->details['mmslug'] . '/';\n\t}", "function aaron()\n{\n\treturn '<a href=\"http://www.aarondm.com/\">Aaron DM</a>';\n}", "function hide_mail($atts , $content = null) {\n for ($i = 0; $i < strlen($content); $i++) $encodedmail .= \"&#\" . ord($content[$i]) . ';'; \n \n $hide_mail = '<a href=\"mailto:' . $encodedmail . '\">' . $encodedmail . '</a>';\n\n return $hide_mail;\n }", "public function email();", "public function email();", "function safe_mailto($email, $name = null, $opt = array(null))\n{\n\t$opt = array_merge(\n\t\tarray(\n\t\t\t'link' \t\t=> TRUE,\n\t\t\t'subject' \t=> '',\n\t\t\t'name' \t\t=> $name,\n\t\t\t'bcc' \t\t=> '',\n\t\t\t'cc' \t\t=> '',\n\t\t\t'class' \t=> 'email',\n\t\t\t'id' \t\t=> ''\n\t\t), \n\t$opt);\n\t\n\t$opt['subject']\t= !empty($opt['subject'])\t? 'subject='.$opt['subject'] : '';\n\t$opt['cc'] \t\t= !empty($opt['cc']) ? '&cc='.$opt['cc'] : '';\t\n\t$opt['bcc'] \t= !empty($opt['bcc']) ? '&bcc='.$opt['bcc'] : '';\n\t$opt['class'] \t= !empty($opt['class'])\t? ' class=\"'.$opt['class'].'\"' : '';\n\t$opt['id'] \t\t= !empty($opt['id'])\t? ' id=\"'.$opt['id'].'\"' : '';\n\t\n\tif($opt['link'] == TRUE)\n\t{\n\t\t$email = '<a href=\"mailto:'.$email.'?'.$opt['subject'].$opt['cc'].$opt['bcc'].'\"'.$opt['class'].$opt['id'].'>'.$opt['name'].'</a>';\n\t}\n\n\t$email = str_replace(array('\"','@','.','/'),array('\\\"','\\100','\\56','\\057'),$email);\n\t$email = str_rot13($email);\n\t\n\treturn '<script type=\"text/javascript\">document.write(\"'.$email.'\".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<=\"Z\"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));</script>';\n}" ]
[ "0.6658858", "0.6603748", "0.6591502", "0.65795285", "0.64149874", "0.6376494", "0.6374564", "0.6357162", "0.6304129", "0.6289649", "0.6289001", "0.6276879", "0.62686265", "0.6221273", "0.6208649", "0.6200831", "0.6189265", "0.6164481", "0.61220473", "0.6117297", "0.6116252", "0.60809034", "0.60717154", "0.6071068", "0.60567844", "0.6054325", "0.60306525", "0.60245836", "0.60155034", "0.6004894", "0.5999763", "0.598706", "0.595255", "0.59520924", "0.59328866", "0.59308666", "0.59143615", "0.590685", "0.590407", "0.58876705", "0.5878538", "0.58275855", "0.58126354", "0.58045864", "0.57905126", "0.57811165", "0.57707155", "0.57610965", "0.57558346", "0.57513297", "0.5744769", "0.5733774", "0.57318145", "0.5718893", "0.5709103", "0.57047945", "0.5694791", "0.56884664", "0.5665303", "0.5652904", "0.56455874", "0.5644169", "0.56387615", "0.5634048", "0.56225544", "0.5618894", "0.56165636", "0.56124675", "0.56104434", "0.56090325", "0.559782", "0.55896366", "0.5586698", "0.55855495", "0.55795455", "0.5550138", "0.5548422", "0.5545925", "0.55342877", "0.5521338", "0.55184823", "0.5517493", "0.5515224", "0.5512835", "0.5512344", "0.5510576", "0.5505285", "0.5502008", "0.54938287", "0.5491618", "0.54915744", "0.5491187", "0.5486802", "0.5480914", "0.54761285", "0.5474018", "0.5467278", "0.54651564", "0.54651564", "0.54632723" ]
0.76197267
0
api/useropeninviteswithcreds?userId=text,1&authToken=text, user authentication token&lat=34.017&lon=118.495
api/useropeninviteswithcreds?userId=text,1&authToken=text, пользовательский токен аутентификации&lat=34.017&lon=118.495
public function useropeninviteswithcredsAction() { $status=array(); $data=array(); $request = $this->getRequest(); $user= new DatabaseObject_User($this->db); if ($user->loadByValidatedSession($request->getParam('userId'), $request->getParam('authToken'))){ //Check Session //Check Session $status['code']='200'; $data['invites']=$user->arrayRepresentationOpenInvites(); }else{ $status['code']='401'; $status['msg']="Could not authenticate"; } $response['status']=$status; $response['data']=$data; $this->sendJson($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function oauthOpen($params = []);", "function get_user_data() {\n $paramUserId = $_GET[\"UserId\"];\n $getIndividualProfile = \"/Individuals/Profile/\" . $paramUserId;\n $data = authenticate();\n $response = send_request($data->uri . $getIndividualProfile, null, array('usertoken: ' . $data->userToken, 'apptoken:' . $data->appToken,));\n // Only return response if _getUSerID has a value\n return $response;\n}", "function jxfbinviteuser()\r\n\t{\r\n\t\t$user=$this->session->userdata(\"user\");\r\n\t\tif($this->input->post(\"uids\")==false || $user==false)\r\n\t\t\tdie(\"Error\");\r\n\t\t$fb=new Facebook($this->fb_apikey,$this->fb_secretkey);\r\n\t\t$uids=explode(\",\",$this->input->post(\"uids\"));\r\n\t\t$url=site_url(\"deals/invite/{$user['inviteid']}\");\r\n\t\t$action[0]=array('text'=>\"Invitation link\",\"href\"=>$url);\r\n\t\tforeach($uids as $uid)\r\n\t\t\t$fb->api_client->stream_publish(\"Check out great deals in LocalSquare. My invitation link : $url Please click to sign up for free and join me as friend.\",null,json_encode($action),$uid);\r\n\t}", "function getUserLove($username, $fromUsername = \"\", $startDate = \"\", $endDate = \"\") {\n defineSendLoveAPI();\n $params = array (\n\t\t'action' => 'getlove',\n\t\t'api_key' => LOVE_API_KEY,\n\t\t'username' => $username,\n\t\t'startDate' => $startDate, \n\t\t'endDate' => $endDate,\n\t\t'pagination' => 0 );\n\t\n if($fromUsername != \"\") {\n\t$params['fromUsername'] = $fromUsername;\n }\n\n $referer = (empty($_SERVER['HTTPS'])?'http://':'https://').$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];\n $retval = json_decode(postRequest (LOVE_API_URL, $params, array(CURLOPT_REFERER, $referer)), true);\n \n if (isset($retval['status']) && $retval['status'] == \"ok\") {\n return $retval['data'];\n } else {\n return -1;\n }\n}", "function f180GetUserData($data) {\n $userid = $data['userid'];\n\n $request_string = \"/userdata\";\n $timestamp_string = date('Y-m-d H:i:s');\n $auth_header = f180GetInterfolioAuthHeader($timestamp_string, $request_string);\n \n # set headers\n $opts = array(\n 'http'=>array(\n 'method'=>\"GET\",\n 'header'=>\"TimeStamp: $timestamp_string\\r\\n\" .\n \"Authorization: $auth_header\\r\\n\" .\n \"INTF-DatabaseID: \" . INTERFOLIO_DATABASE_ID . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n $request_string .= '?userlist=' . $userid;\n\t$user = file_get_contents(INTERFOLIO_HOST . $request_string, false, $context);\n\n return json_decode($user);\n}", "public function actionListInvitesByUser()\n {\n $email = Yii::$app->request->get('email');\n return $this->renderPartial('listInvitesByUser', [\n 'email' => $email\n ]);\n }", "function invites($userId, $level, $offset, $limit, $phrase)\n\t{\n\t\tlog_message('debug', '_network/invites');\n\t\tlog_message('debug', '_network/invites:: [1] userId='.$userId.' level='.$level.' offset='.$offset.' limit='.$limit.' phrase='.$phrase);\n\t\t$phraseCondition = (!empty($phrase)? \" AND (I.first_name LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%' OR I.last_name LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%' OR I.email_address LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%')\": '');\n\t\t\n\t\tlog_message('debug', '_network/invites:: [2] phraseCondition='.$phraseCondition);\n\t\t$invites = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_searchable_invite_list', 'variables'=>array('user_id'=>$userId, 'phrase_condition'=>$phraseCondition, 'limit_text'=>\" LIMIT \".$offset.\",\".$limit.\" \") ));\n\t\tlog_message('debug', '_network/invites:: [3] get_searchable_invite_list='.json_encode($invites));\n\t\t\n\t\t$referrals = get_column_from_multi_array($invites, 'referral_id');\n\t\tlog_message('debug', '_network/invites:: [4] get_column_from_multi_array='.implode(' ', $referrals));\n\t\t$referralInviteCount = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_total_invites', 'variables'=>array('user_ids'=>implode(\"','\",array_diff($referrals, array('')))) )); \n\t\tlog_message('debug', '_network/invites:: [5] referralInviteCount='.json_encode($referralInviteCount));\n\t\t$referralInviteCount = use_multi_column_as_key($referralInviteCount, 'referral_id');\n\t\tlog_message('debug', '_network/invites:: [6] referralInviteCount='.json_encode($referralInviteCount));\n\t\t\n\t\t$final = array();\n\t\tforeach($invites AS $row) {\n\n\t\t\tlog_message('debug', '_network/invites:: [7] looping over invites='.json_encode($row));\n\n\t\t\t# invitee signed up\n\t\t\tif(!empty($row['referral_id'])) {\n\t\t\t\tlog_message('debug', '_network/invites:: [8] referal_id not empty');\n\t\t\t\t$photo = $this->_query_reader->get_row_as_array('get_user_photo', array('user_id'=>$row['referral_id'] ));\n\t\t\t\tlog_message('debug', '_network/invites:: [9] get_user_photo');\n\t\t\t\t$row['photo_url'] = !empty($photo['photo_url'])? s3_url($photo['photo_url']): ''; \n\t\t\t\tlog_message('debug', '_network/invites:: [10] photo url='.$row['photo_url']);\n\t\t\t\t$row['invite_count'] = !empty($referralInviteCount[$row['referral_id']])? $referralInviteCount[$row['referral_id']]['invite_count']: '0';\n\t\t\t\tlog_message('debug', '_network/invites:: [11] invite count='.$row['invite_count']);\n\t\t\t}\n\t\t\t# invitee not yet signed up\n\t\t\telse {\n\t\t\t\tlog_message('debug', '_network/invites:: [12] inviter not yet signed up');\n\t\t\t\t$row['photo_url'] = '';\n\t\t\t\t$row['invite_count'] = '';\n\t\t\t}\n\t\t\t\n\t\t\t$final[] = $row;\n\t\t}\n\t\tlog_message('debug', '_network/invites:: [13] final='.json_encode($final));\n\t\t\n\t\treturn $final;\n\t}", "public function inviteresponseAction() {\n $request = $this->getRequest();\n $user= new DatabaseObject_User($this->db);\n $data=array();\n if ($user->loadByValidatedSession($request->getParam('userId'), $request->getParam('authToken'),$request->getParam('lat'),$request->getParam('lon'))){\n $fp = new FormProcessor_RespondToInvite($user,$this->config);\n $status=array();\n if ($fp->process($request)){\n $status['code']='200';\n $status['msg']=$fp->msg();\n $data['og_url']=$fp->ogURL();\n }else{\n $status['code']='300';\n $status['msg']=\"Could not respond to the invite\";\n $status['errors']=implode(\",\",$fp->getErrors());\n }\n }else{\n $status['code']='401';\n $status['msg']=\"Could not authenticate\";\n }\n $response['status']=$status;\n $response['data']=$data;\n $this->sendJson($response);\n }", "function authenticate($email, $pass)\n{\n $email = urlencode($email);\n $pass = urlencode($pass);\n\n // Normally we would store API keys outside the app in the environment and out of the repo\n $url = 'https://api.expensify.com?command=Authenticate&partnerName=applicant&' .\n \"partnerPassword=d7c3119c6cdab02d68d9&partnerUserID=$email&partnerUserSecret=$pass\";\n\n return makeCall($url);\n}", "public function requestUserTicket($userCredentials, $flow = 'auto');", "public function makeApiCallWithAuthentication($user, $route, $method);", "public function getUserAccess($data = array()) {\n $access_token = $data['access_token'];\n $device_token = $data['device_token'];\n $longitude = $data['long'];\n $latitude = $data['lat'];\n $action = $data['action'];\n $appVersion = $data['app_version'];\n\n //echo $action;\n\n\n\n $retResult = $this->_funcObj->checkBlank($checkData = array($access_token, $longitude, $latitude));\n if ($retResult == 1) {\n $response = array(\"error\" => \"Some Parameter Missing!\");\n return $response;\n }\n\n $authenticate = $this->_funcObj->authenticateAccessToken($access_token);\n\n\n if (count($authenticate) <= 0) {\n $response = array(\"error\" => \"Invalid Access Token!\");\n return $response;\n } else {\n $userId = $authenticate['data'][0]['user_id'];\n \n \n\n $user_data = array(\"device_token\" => $device_token, \"access_token\" => $access_token, \"longitude\" => $longitude, \"latitude\" => $latitude);\n\n $this->updateUserDeviceTokenLoginTimeLongitudeLatitudeFromAccessToken($user_data);\n $versionUpdate=$this->updateVersionFromUserId($userId,$appVersion);\n $updateAppPopUp = $this->checkAppVersion($userId);\n\n\n $login_data = $this->getUserInfoFromUserid($userId);\n \n if($login_data['data'][0]['is_premium']==0)\n {\n $secsData=$this->checkBroadcastDataForUserId($userId,$login_data['data'][0]['broadcast_secs'],$login_data['data'][0]['broadcast_start_time']);\n list($secs,$broadcastTime)=$secsData;\n $current_date = date(\"Y-m-d H:i:s\");\n\n\n $outputdate = $this->_funcObj->getDateDifference($current_date, $broadcastTime);\n\n\n list($days, $hours, $minuts, $seconds) = $outputdate;\n $timeStart = $hours . \":\" . $minuts . \":\" . $seconds;\n $timeEnd = '23:60:60';\n\n $tResult = $this->_funcObj->timeDifference($timeEnd, $timeStart);\n \n }\n else\n {\n $secs=600; \n $tResult='23:60:60';\n }\n \n $response1['data'][0]['personal_data'][0]['session_exist'] = $sessionResult;\n \n\n $response1['data'][0]['personal_data'] = $login_data['data'];\n $response1['data'][0]['personal_data'][0]['broadcast_secs'] = $secs;\n $response1['data'][0]['personal_data'][0]['expires_in'] = $tResult;\n $response1['data'][0]['personal_data'][0]['popup'] = $updateAppPopUp;\n $response1['data'][0]['personal_data'][0]['popup_status'] = $this->_DAL->popupStatus;\n \n if($action==null)\n {\n $sessionResult = $this->_playlist->checkSessionForUserId($userId);\n\n\n $response1['data'][0]['personal_data'][0]['session_exist'] = $sessionResult;\n }\n \n \n \n \n \n \n\n\n if ($action != null && $action == 0) {\n // if want to destory previous session playlist and all playlist sharing data\n $user_data = array(\"access_token\" => $access_token);\n $responseLogout = $this->logoutFromUserId($user_data);\n }\n\n\n\n\n\n\n\n\n\n\n // $user_data = array(\"user_id\" => $userId, \"lon\" => $longitude, \"lat\" => $latitude);\n //$response1['data'][0]['near_dj'] = $this->nearByDjFromUserId($user_data);\n// $response1['data'][0]['user_Dj_Playlist'] = $this->_playlist->getDjPlayListFromUserId($user_data);\n// \n// $response1['data'][0]['personal_data'][0]['session_id'] = $response1['data'][0]['user_Dj_Playlist'][0]['session_id'];\n// if($response1['data'][0]['user_Dj_Playlist'][0]['song_name']==\"\")\n// {\n// $response1['data'][0]['user_Dj_Playlist']= array(); \n// }\n\n return $response1;\n }\n }", "public function invite($data, $user);", "#[OpenApi\\Operation(tags: ['Admin: Users'])]\n #[OpenApi\\Response(factory: AdminResponses\\UsersList::class, statusCode: 200)]\n #[OpenApi\\Response(factory: GeneralResponses\\Unauthenticated::class, statusCode: 401)]\n #[OpenApi\\Response(factory: GeneralResponses\\Forbidden::class, statusCode: 403)]\n public function index()\n {\n return response()->json(new DataWrapCollection(User::all()));\n }", "function f180GetUsersList() {\n // Get user list from Interfolio\n $request_string = \"/users\";\n $timestamp_string = date('Y-m-d H:i:s');\n $auth_header = f180GetInterfolioAuthHeader($timestamp_string, $request_string);\n \n # set headers\n $opts = array(\n 'http'=>array(\n 'method'=>\"GET\",\n 'header'=>\"TimeStamp: $timestamp_string\\r\\n\" .\n \"Authorization: $auth_header\\r\\n\" .\n \"INTF-DatabaseID: \" . INTERFOLIO_DATABASE_ID . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n $request_string .= '?data=detailed';\n\t$users = file_get_contents(INTERFOLIO_HOST . $request_string, false, $context);\n $users = json_decode($users);\n\n // Get local admin user email addresses, to compare\n $args = array (\n 'role' => 'administrator',\n 'order' => 'ASC',\n 'orderby' => 'display_name'\n );\n $wp_user_query = new WP_User_Query($args);\n $admin_users = $wp_user_query->get_results();\n $admin_emails = array();\n foreach ($admin_users as $admin) {\n $admin_emails[] = $admin->user_email;\n }\n\n // Only keep the Interfolio users that are also WP users\n $admins = array();\n foreach ($users as $user) {\n if (in_array($user->email, $admin_emails)) {\n $admins[] = $user;\n }\n }\n\n return $admins;\n}", "#[OpenApi\\Operation(tags: ['Users'], security: 'AccessTokenSecurityScheme')]\n #[OpenApi\\Parameters(factory: ShowUsersByEmailParameters::class)]\n #[OpenApi\\Response(factory: UserShowResponse::class, statusCode: 200)]\n #[OpenApi\\Response(factory: UnauthorizedResponse::class, statusCode: 401)]\n #[OpenApi\\Response(factory: NotFoundResponse::class, statusCode: 404)]\n #[\n OpenApi\\Response(\n factory: TooManyRequestsResponse::class,\n statusCode: 429\n )\n ]\n public function showByEmail(string $email) {\n return JsonResource::make(\n User::query()\n ->where('email', $email)\n ->firstOrFail()\n );\n }", "function getPrivateInvites($username) {\n\t$interval = time() - PHPSC_PRIVATE_INVITE_EXPIRE;\n\t$resultArray = array();\n\t$sql = \"SELECT * FROM chat_invites WHERE targetuser = '$username' AND requesttime > $interval AND joined = 0\";\n\tif ($result = dbQuery($sql)) {\n\t\twhile ($row = dbFetchArray($result)) {\n\t\t\t$user = $row[\"usr\"];\n\t\t\t$roomID = $row[\"roomid\"];\n\t\t\t$ID = $row[\"id\"];\n\t\t\t$resultArray[] = array('user'=>$user, 'roomID'=>$roomID, 'ID'=>$ID);\n\t\t}\n\t\treturn $resultArray;\n\t}\n\treturn false;\n}", "function get_oauth_user($f3) {\r\n \t$oauth2 = new \\Web\\OAuth2();\r\n \t$oauth_credentials = $f3->get('oauth_credentials');\r\n \t$auth_domain = $oauth_credentials['oauth_domain'];\r\n \t$redirect_uri = \"{$f3->get('SCHEME')}://{$f3->get('HOST')}{$f3->get('BASE')}/login\";\r\n \t\r\n \t//Set OAuth parameters\r\n \t$oauth2->set('redirect_uri', $redirect_uri);\r\n \t$oauth2->set('client_id', $oauth_credentials['oauth_client_id']);\r\n \t$oauth2->set('client_secret', $oauth_credentials['oauth_client_secret']);\r\n\r\n \tif ($f3->get('VERB') == 'GET' && !isset($_GET['code'])) {\r\n \t\t//Step 1: OAuth 2.0 flow (Send a user to /oauth endpoint, with these query string parameters)\r\n \t\theader('Location: ' . $oauth2->uri($auth_domain . '/oauth'));\r\n \t\t// Step 2: OAuth 2.0 flow (The user approves your app)\r\n \t}\r\n \telseif ($f3->get('VERB') == 'GET' && isset($_GET['code'])) {\r\n \t\t// Step 3: OAuth 2.0 flow (The user is redirected to redirect_uri, with these query string parameters)\r\n \t\t$oauth2->set('code', $_GET['code']); \t\r\n \t\t// Step 4: OAuth 2.0 flow (POST parameters to /oauth/access_token endpoint)\r\n \t\t$uri = $oauth2->uri($auth_domain . '/oauth/access_token/json');\r\n \t\t$request = $oauth2->request($uri, 'POST'); \t\t\r\n \t\tif (!array_key_exists('error_message',$request))\r\n \t\t{\r\n \t\t\t$oauth2 = new \\Web\\OAuth2();\r\n \t\t\t$web=\\Web::instance();\r\n \t\t\t$oauth2->set('access_token', $request['access_token']);\r\n \t\t\t$oauth2->set('key', $oauth_credentials['oauth_stackoverflow_key']);\r\n \t\t\t$oauth2->set('site', $oauth_credentials['oauth_stackoverflow_site']);\r\n \t\t\t$uri = $oauth2->uri('https://api.stackexchange.com/me',true,false);\r\n \t\t\t//$uri = \"https://api.stackexchange.com/2.2/me?access_token={$request['access_token']}&key=jYhy)W5d6ThTUK)iA60swg((&site=stackoverflow\";\r\n \t\t\t$options=[\r\n \t\t\t\t\t//'content'=>$url,\r\n \t\t\t\t\t'header'=>['Accept: application/json']\r\n \t\t\t];\r\n \t\t\t$me = $web->request($uri, $options);\r\n \t\t\tif ($me) {\r\n \t\t\t\t$f3->set('is_authenticated',true);\r\n \t\t\t\treturn json_decode($me['body'],1)['items'][0];\r\n \t\t\t}\r\n \t\t}\r\n \t\t$f3->set('is_authenticated',false);\r\n }\r\n }", "public function invites();", "function verify_appota_user($appota_access_token, $appota_userid, $appota_username) {\n $url = sprintf('https://api.appota.com/game/get_user_info?access_token=%s', $appota_access_token);\n $data = call_curl_get($url, null);\n if(!$data['status'])\n return false;\n else {\n if($data[\"data\"][\"username\"] == $appota_username & $data[\"data\"][\"user_id\"] == $appota_userid)\n return true;\n else\n return false;\n }\n \n}", "public function userget_ssotoken($via=null, $redirect=null, $playback=null, $forceaccess=null, $forceedit=null, $mobile=null) {\n global $CFG, $USER;\n\n if (!$mobile) {\n $muser = $USER->id;\n } else {\n $muser = $mobile;\n }\n\n if (!$userid = $this->get_user_via_id($muser, true)) {\n return false;\n }\n\n $url = 'UserGetSSOToken';\n\n $data = '<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ';\n $data .= 'xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" ';\n $data .= 'xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">';\n $data .= '<soap:Body>';\n $data .= \"<cApiGetUserToken>\";\n $data .= \"<ApiID>\".get_config('via', 'via_apiid').\"</ApiID>\";\n $data .= \"<CieID>\".get_config('via', 'via_cleid').\"</CieID>\";\n $data .= \"<ID>\" . $userid . \"</ID>\";\n if ($via) {\n $data .= \"<ActivityID>\".$via->viaactivityid.\"</ActivityID>\";\n }\n if ($playback) {\n $data .= \"<PlaybackID>\".$playback.\"</PlaybackID>\";\n }\n $data .= \"<RedirectType>\".$redirect.\"</RedirectType>\";\n $data .= \"<PortalAccess>\".get_config('via', 'via_portalaccess').\"</PortalAccess>\";\n $data .= \"<ForcedAccess>\".$forceaccess.\"</ForcedAccess>\";\n $data .= \"<ForcedEditRights>\".$forceedit.\"</ForcedEditRights>\";\n $data .= \"</cApiGetUserToken>\";\n $data .= \"</soap:Body>\";\n $data .= \"</soap:Envelope>\";\n\n $response = $this->send_saop_enveloppe($data, $url);\n\n if (!$resultdata = $response['dataxml'][\"soap:Envelope\"][\"soap:Body\"][\"cApiUsersSSO\"]) {\n throw new Exception(\"Problem reading getting VIA user token\");\n }\n\n if ($resultdata['Result']['ResultState'] == \"ERROR\") {\n throw new Exception($resultdata['Result']['ResultDetail']);\n }\n\n $token = $resultdata['TokenURL'] . '&from='. $CFG->wwwroot;\n\n return $token;\n }", "public function lookup(Request $req){\n\t\t\t$data = json_decode($req->getContent(), true);\n\t\t\t/*INIT*/\n\t\t\t$client = new \\GuzzleHttp\\Client();\n\t\t\t$res = $client->post('http://197.253.19.75/ctms/eftpos/devinterface/transactionadvice.php?action=TAMS_LOGIN&termid=203301ZA&userid='.$data['user_name'].'&control=INIT');\n\t\t\tif ($res->getStatusCode() == 200) {\n\t\t\t\t$fileContents = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $res->getBody()->getContents());\n\t\t\t\t$fileContents = trim(str_replace('\"', \"'\", $fileContents));\n\t\t\t\t$simpleXml = simplexml_load_string($fileContents);\n\t\t\t\t$json = json_encode($simpleXml);\n\t\t\t\t$phpArray = json_decode($json, true);\n\n\t\t\t/*print_r($phpArray);\n\t\t\texit();*/\n\n\n\t\t\tif ($phpArray['tran']['result'] == 1) {\n\n\t\t\t\treturn response()->json(['status' => 0, 'message' => 'Invalid credentials']);\n\n\t\t\t}else{\n\n\t\t\t\t$usrTID = $phpArray['tran']['macros_tid'];\n\t\t\t\t$clr = env('V_TEK');\n\t\t\t\t$hash = hash('SHA256', $usrTID.$clr.date('Y-m-d H:i'));\n\n\t\t\t\tif ($usrTID != $data['vice_id']) {\n\t\t\t\t\treturn response()->json(['status' => 0, 'message' => 'Unknown vice ID']);\n\t\t\t\t}else{\n\n\t\t\t\t\tif (count(Vice::where('vice_id', $usrTID)->first()) > 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Vice::where('vice_id', $usrTID)->update(['token' => $hash, 'created_at' => date('Y-m-d H:i:s', time()), 'status' => 0])) {\n\t\t\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t\t\t'vice_id' => $usrTID,\n\t\t\t\t\t\t\t\t'token' => $hash,\n\t\t\t\t\t\t\t\t'status' => 0,\n\t\t\t\t\t\t\t\t'message' => 'Authenticated successfully'\n\t\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}else{\n\n\t\t\t\t\t\t$vice = new Vice;\n\t\t\t\t\t\t$vice->token = $hash;\n\t\t\t\t\t\t$vice->vice_id = $usrTID;\n\t\t\t\t\t\t$vice->status = 0;\n\n\t\t\t\t\t\tif ($vice->save()) {\n\t\t\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t\t\t'vice_id' => $usrTID,\n\t\t\t\t\t\t\t\t'token' => $hash,\n\t\t\t\t\t\t\t\t'status' => 1,\n\t\t\t\t\t\t\t\t'message' => 'Authenticated successfully'\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}", "public function payForInvitedUsers(){\n \n $userService = parent::getService('user','user');\n \n $refererUsers = $userService->getUsersWithRefererNotPaid();\n foreach($refererUsers as $user):\n // if created at least 7 days ago\n if(strtotime($user['created_at'])>strtotime('-7 days')){\n continue;\n }\n // if logged within last 3 days ago\n if(!(strtotime($user['last_active'])>strtotime('-3 days'))){\n continue;\n }\n \n $values = array();\n $values['description'] = 'Referencing FastRally to user '.$user['username'];\n $values['income'] = 1;\n $userService->addPremium($user['referer'],10,$values);\n $user->referer_paid = 1;\n $user->save();\n endforeach;\n echo \"done\";exit;\n }", "function pg_api_login()\n {\n $form = \"grant_type=password&username=\".urlencode($this->username).\"&password=\".urlencode($this->password).\"&scope=openid profile&realm=clientsB2CPeugeot\";\n $param = \"access_token\";\n $ret = $this->post_api_psa_auth2($param, $form);\n //var_dump($ret[\"info\"]);\n //var_dump($ret[\"result\"]);\n $this->access_token = [];\n if ($ret[\"info\"][\"http_code\"] == \"200\") {\n $this->access_token[\"access_token\"] = $ret[\"result\"]->access_token;\n $this->access_token[\"refresh_token\"] = $ret[\"result\"]->refresh_token;\n $this->access_token[\"access_token_ts\"] = time(); // token consented on\n $this->access_token[\"access_token_dur\"] = intval($ret[\"result\"]->expires_in);\n $this->access_token[\"status\"] = \"OK\";\n }\n else {\n $this->access_token[\"status\"] = \"KO\";\n }\n return($this->access_token); // new login performed\n }", "function invite_token_values($type = 'all', $object = NULL) {\n $values = array();\n if ($type == 'invite' && is_object($object)) {\n $values['inviter'] = check_plain($object->inviter->name);\n $values['inviter-raw'] = $object->inviter->name;\n $values['invite-mail'] = $object->email;\n $values['invite-message'] = check_plain($object->data['message']);\n $values['invite-message-raw'] = $object->data['message'];\n $values['join-link'] = url('invite/accept/'. $object->code, array('absolute' => TRUE));\n }\n return $values;\n}", "public function quickLogin()\n {\n $openid = request('open_id');\n $app = request('app') ?? 'default';\n $appid = get_wechat_config($app)['app_id'];\n\n if (empty($openid)) {\n return $this->failed('Missing openid parameters.');\n }\n\n //1. openid 不存在相关用户和记录,直接返回 openid\n if (!$userBind = $this->userBindRepository->getByOpenId($openid)) {\n $userBind = $this->userBindRepository->create(['open_id' => $openid, 'type' => 'wechat',\n 'app_id' =>$appid,]);\n }\n\n //2. openid 不存在相关用户,直接返回 openid\n if (!$userBind->user_id) {\n return $this->success(['open_id' => $openid]);\n }\n\n //3. 绑定了用户,直接返回 token\n $user = $this->userRepository->find($userBind->user_id);\n\n $token = $user->createToken($user->id)->accessToken;\n\n return $this->success(['token_type' => 'Bearer', 'access_token' => $token]);\n }", "public function addinvitesAction() {\n $request = $this->getRequest();\n $user= new DatabaseObject_User($this->db);\n if ($user->loadByValidatedSession($request->getParam('userId'), $request->getParam('authToken'))){ //Check Session\n $fp = new FormProcessor_AddFriendInvites($user);\n $status=array();\n if ($fp->process($request)){\n $status['code']='200';\n $data['msg']=$fp->msg();\n }else{\n $status['code']='300';\n $status['msg']=\"Could not add invites\";\n $status['errors']=implode(\",\",$fp->getErrors());\n }\n }else{\n $status['code']='401';\n $status['msg']=\"Could not authenticate\";\n }\n $response['status']=$status;\n $response['data']=$data;\n $this->sendJson($response);\n }", "public function request( $method = 'GET', $url = 'user/info', $params = array() ) {\n\n $request_url = $this->base_api_url . $url;\n\n $this->load->model('access_token');\n $token_arr = $this->access_token->get( $this->provider );\n \t\n /*\n $token_arr\n array(2) {\n [\"access_token\"]=>\n string(50) \"z8QaCfObw3Blpurdb9z1xZbV4zRMVjpjjcytF8cJQnVS6Yxrb1\"\n [\"access_secret\"]=>\n string(50) \"bVdTKKGcIrHjgvPO4XXkhnY4UzgG260Ft91DDCwy5ESqLlmf2c\"\n } */\n\n $provider = $this->oauth->provider( $this->provider );\n\n if ( !empty( $token_arr['access_token'] ) && !empty( $token_arr['access_secret'] ) ) {\n $acces_token = OAuth_Token::forge('request', array(\n 'access_token' => $token_arr['access_token'],\n 'secret' => $token_arr['access_secret'],\n ));\n \n $params['oauth_consumer_key'] = $this->consumer->key;\n $params['oauth_token'] = $acces_token->access_token;\n\n } else {\n $acces_token = false;\n }\n\n $request = OAuth_Request::forge( 'resource', $method, $request_url, $params);\n\n\n if ( $acces_token ) {\n // Sign the request using the consumer and token\n $request->sign( $provider->signature, $this->consumer, $acces_token );\n }\n\n try {\n $response = json_decode( $request->execute() );\n } catch ( Exception $e ) {\n return false;\n }\n\n return $response;\n\t}", "function get_user_openids($id_or_name = null) {\n\t$user = get_userdata_by_various($id_or_name);\n\n\tif ( $user ) {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_col( $wpdb->prepare('SELECT url FROM '.liberatid_identity_table().' WHERE user_id = %s', $user->ID) );\n\t} else {\n\t\treturn array();\n\t}\n}", "public function testTokenUsersCanSeePrivateApi()\n {\n $user = User::getRandomUser(false);\n $token = JWTAuth::fromUser($user);\n\n $privateEndpointCheckPayload = [\n 'token' => $token\n ];\n\n $expectedApiResponseJsonStructure = [\n 'data' => [\n 'message',\n 'debug' => [\n 'original' => [\n 'user' => [\n 'id'\n ],\n ]\n ]\n ]\n ];\n\n $response = $this->json('GET','/api/closed', $privateEndpointCheckPayload);\n $response\n ->assertStatus(200)\n ->assertJsonStructure($expectedApiResponseJsonStructure)\n ->assertOk();\n }", "public function myInviteList()\r\n {\r\n\r\n $status = request()->input('status', 2); //Invite Member Status\r\n $user_id = Users::getUserId();\r\n $user = Users::where(\"id\", $user_id)->first();\r\n\r\n if (empty($user)) {\r\n return $this->error(\"Member Not Found\");\r\n }\r\n\r\n $list = Users::where('parent_id', $user_id);\r\n if ($status != 2) {\r\n $list = $list->where('status', $status);\r\n }\r\n $list = $list->orderBy('id', 'desc')->get()->toArray();\r\n\r\n return $this->success($list);\r\n }", "function pg_api_login()\n {\n $form = \"grant_type=password&username=\".urlencode($this->username).\"&password=\".urlencode($this->password).\"&scope=openid profile&realm=clientsB2CPeugeot\";\n $param = \"access_token\";\n $ret = $this->post_api_psa_auth($param, $form);\n //var_dump($ret[\"info\"]);\n //var_dump($ret[\"result\"]);\n $this->access_token = [];\n if ($ret[\"info\"][\"http_code\"] == \"200\") {\n $this->access_token[\"access_token\"] = $ret[\"result\"]->access_token;\n $this->access_token[\"refresh_token\"] = $ret[\"result\"]->refresh_token;\n $this->access_token[\"access_token_ts\"] = time(); // token consented on\n $this->access_token[\"access_token_dur\"] = intval($ret[\"result\"]->expires_in);\n $this->access_token[\"status\"] = \"OK\";\n }\n else {\n $this->access_token[\"status\"] = \"KO\";\n }\n return($this->access_token); // new login performed\n }", "function apiUserById()\n {\n $agencyToken = file_get_contents(codecept_data_dir('agency_token.json'));\n $agencyID = json_decode(file_get_contents(codecept_data_dir() . 'agency_data.json'))->id;\n $this->restModule->haveHttpHeader('token', $agencyToken);\n $this->restModule->haveHttpHeader('Content-Type', 'application/json');\n $this->restModule->sendGET('/users/' . $agencyID);\n $this->restModule->seeResponseIsJson();\n $this->restModule->seeResponseCodeIs(200);\n $this->restModule->seeResponseMatchesJsonType([\n 'id' => 'string',\n 'name' => 'string',\n 'subdomain' => 'string',\n 'firstName' => 'string',\n 'lastName' => 'string',\n 'email' => 'string'\n ]);\n }", "public function int_callback(){\n\t\tif (array_key_exists('code', $_GET) && !empty($_GET['code'])){\n\t\t\t$url = 'https://foursquare.com/oauth2/access_token';\n\t\t\t$params = array(\n\t\t\t\t'client_id' =>$this->strategy['client_id'],\n\t\t\t\t'client_secret' => $this->strategy['client_secret'],\n\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t'redirect_uri'=> $this->strategy['redirect_uri'],\n\t\t\t\t'code' => trim($_GET['code'])\n\t\t\t);\n\t\t\t$response = $this->serverGet($url, $params, null, $headers);\n\t\t\t\n\t\t\t$results = json_decode($response);\n\n\t\t\tif (!empty($results) && isset($results->access_token)){\n\t\t\t\t$info = $this->user_info($results->access_token);\n\t\t\t\t$user = $info->response->user;\n\t\t\t\t$this->auth = array(\n\t\t\t\t\t'provider' => 'Foursquare',\n\t\t\t\t\t'uid' => $user->id,\n\t\t\t\t\t'info' => array(\n\t\t\t\t\t\t'name' => $user->firstName.$user->lastName,\n\t\t\t\t\t\t'email' => $user->contact->email,\n\t\t\t\t\t\t'first_name' => $user->firstName,\n\t\t\t\t\t\t'last_name' => $user->lastName,\n\t\t\t\t\t\t'location' => $user->homeCity,\n\t\t\t\t\t\t//Cope with new api results\n\t\t\t\t\t\t'photo' => $user->photo->prefix.'original'.$user->photo->suffix\n\t\t\t\t\t),\n\t\t\t\t\t'credentials' => array(\n\t\t\t\t\t\t'token' => $results->access_token,\n\t\t\t\t\t),\n\t\t\t\t\t'raw' => $info\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->callback();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$error = array(\n\t\t\t\t\t'provider' => 'Foursquare',\n\t\t\t\t\t'code' => 'access_token_error',\n\t\t\t\t\t'message' => 'Failed when attempting to obtain access token',\n\t\t\t\t\t'raw' => $headers\n\t\t\t\t);\n\n\t\t\t\t$this->errorCallback($error);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array(\n\t\t\t\t'provider' => 'Foursquare',\n\t\t\t\t'code' => $_GET['error'],\n\t\t\t\t'message' => $_GET['error_description'],\n\t\t\t\t'raw' => $_GET\n\t\t\t);\n\t\t\t\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t}", "public function accessTokenAction()\n {\n $data = $this->serverService->accessToken(\n $this->request->attributes->get('oauth_request_parameters'),\n $this->request->attributes->get('oauth_request_method'),\n $this->request->attributes->get('oauth_request_url')\n );\n\n return $this->sendResponse($data);\n }", "public function userprofilewithcredentialsAction() {\n //api/userprofilewithcredentials?userId=text,1&authToken=text, user authentication token&lat=34.017&lon=-118.495\n $status=array();\n $data=array();\n $request = $this->getRequest();\n $user= new DatabaseObject_User($this->db);\n if ($user->loadByValidatedSession($request->getParam('userId'), $request->getParam('authToken'),$request->getParam('lat'),$request->getParam('lon'))){ //Check Session\n $status['code']='200';\n $data['profile']=$user->arrayRepresentationProfile($this->config);\n $data['profile']['bets']=$user->betsCount();\n $userBets=DatabaseObject_UserBet::BetCountBySportsGroup($this->db);\n $data['profile']['betTotalNFL']=$userBets['nfl']?(int)$userBets['nfl']:0;\n $data['profile']['betTotalNBA']=$userBets['nba']?(int)$userBets['nba']:0;\n $data['profile']['betTotalMLB']=$userBets['mlb']?(int)$userBets['mlb']:0;\n $data['profile']['betTotalNHL']=$userBets['nhl']?(int)$userBets['nhl']:0;\n }else{\n $status['code']='401';\n $status['msg']=\"Could not authenticate\";\n }\n $response['status']=$status;\n $response['data']=$data;\n $this->sendJson($response);\n }", "abstract public function getOauthUser();", "public static function accessTokenByClientCredentials($debug = TRUE) {\n\n\t\t$url = OpenPayU_Configuration::getServiceUrl() . 'oauth/authorize';\n\n\t\t$result = new OpenPayU_ResultOAuth();\n\t\t$result->setUrl($url);\n\t\t\t\n\t\tOpenPayU::setOpenPayuEndPoint($url);\n\t\tif ($debug) {\n\t\t\tOpenPayU::addOutputConsole('retrieve accessToken', 'retrieve accessToken, client credentials mode, url: ' . $url);\n\t\t}\n\t\t\t\n\t\ttry {\n\t\t\tOpenPayU::setOpenPayuEndPoint($url);\n\t\t\t$json = OpenPayUOAuth::getAccessTokenByClientCredentials(OpenPayU_Configuration::getClientId(), OpenPayU_Configuration::getClientSecret());\n\n\t\t\t$result->setAccessToken($json->{'access_token'});\n\t\t\t$result->setPayuUserEmail($json->{'payu_user_email'});\n\t\t\t$result->setPayuUserId($json->{'payu_user_id'});\n\t\t\t$result->setExpiresIn($json->{'expires_in'});\n\t\t\t$result->setRefreshToken($json->{'refresh_token'});\n\t\t\t$result->setSuccess(1);\n\t\t} catch (Exception $ex) {\n\t\t\t$result->setSuccess(0);\n\t\t\t$result->setError($ex->getMessage());\n\t\t}\n\t\t\t\n\t\treturn $result;\n\t}", "public function test_GET_item_by_logged_in_user_for_other_team_succeeds()\n {\n $this->loginAsUser('player1', 'player1');\n $iri = $this->findTeamIriByUsername('player2');\n $this->client->request('GET', $iri);\n $this->assertResponseIsSuccessful();\n }", "public function index()\n {\n $data['success'] = false;\n\n try {\n $user = Auth::user();\n $data['data'] = UserRepository::getUserApprovedInvitations($user);\n } catch (Exception $e) {\n $data['errors']['type'] = 'error';\n $data['errors']['message'] = $e->getTrace();\n return response()->json($data);\n }\n\n $data['success'] = true;\n return response()->json($data);\n }", "function authenticat_api_call($user_id,$access_token,$device_type,$device_id) {\n $access_session = strtotime(date('Y-m-d H:i:s'));\n $data = DB::table('tblapi_session')\n ->select(DB::raw('*'))\n ->where('user_id', '=', $user_id)\n ->where('device_type', '=', $device_type)\n ->where('device_id', '=', $device_id)\n ->where('access_token', '=', $access_token)\n ->where('access_session', '>=', $access_session)\n ->get();\n return $data;\n }", "public function getNearbyOpen($user_id, $latitude, $longitude, $page = 0, $limit = 0)\n {\n $cartesian = \\SoeHelper::getCartesian($latitude, $longitude);\n $query = \\SOE\\DB\\Entity::join('contests', 'entities.entitiable_id', '=', 'contests.id')\n ->leftJoin(\\DB::raw('(SELECT contests.* from contests inner join contest_applications on contests.id = contest_applications.contest_id where contest_applications.user_id = '.$user_id.') entered'), 'contests.id', '=', 'entered.id')\n ->whereNull('entered.id')\n ->where('entities.entitiable_type', '=', 'Contest')\n ->where(\\DB::raw('(sqrt(pow(entities.latm - '.$cartesian[\"latm\"].', 2) + pow(entities.lngm - '.$cartesian[\"lngm\"].', 2)))'), '<', 48000)\n ->where('entities.is_active', '=', '1')\n ->where('entities.is_demo', '=', '0')\n ->where(function($query)\n {\n $query->where('entities.starts_year', '=', date('Y'));\n $query->where('entities.starts_day', '<=', (date('z')+1));\n $query->orWhere('entities.starts_year', '<', (date('Y')));\n })\n ->where(function($query)\n {\n $query->where('entities.expires_year', '=', date('Y'));\n $query->where('entities.expires_day', '>=', (date('z')+1));\n $query->orWhere('entities.expires_year', '>=', (date('Y')+1));\n });\n $stats = $this->getStats(clone $query, $limit, $page);\n if($limit)\n $query = $query->skip($page*$limit)->take($limit);\n $contests = $query->groupBy('contests.id')\n ->get(array('entities.*', 'contests.display_name'));\n $stats['stats']['returned'] = count($contests);\n $objects = array('objects' => array());\n foreach($contests as $contest)\n {\n $objects['objects'][] = $contest;\n }\n return array_merge($objects, $stats);\n }", "#[OpenApi\\Operation(tags: ['Admin: Users'])]\n #[OpenApi\\Response(factory: AdminResponses\\UserShow::class, statusCode: 200)]\n #[OpenApi\\Response(factory: GeneralResponses\\Unauthenticated::class, statusCode: 401)]\n #[OpenApi\\Response(factory: GeneralResponses\\Forbidden::class, statusCode: 403)]\n #[OpenApi\\Response(factory: GeneralResponses\\ErrorNotFound::class, statusCode: 404)]\n public function show(User $user)\n {\n return response()->json(new JsonResource($user));\n }", "function view($params) {\r\n\t\tif (preg_match(\"/^email=/\", $params)) {\r\n\t\t\t$action = \"user_view_email\";\r\n\t\t}\r\n\t\telseif (preg_match(\"/^username=/\", $params)) {\r\n\t\t\t$action = \"user_view_username\";\r\n\t\t}\r\n\t\telseif (preg_match(\"/^id=/\", $params)) {\r\n\t\t\t$action = \"user_view\";\r\n\t\t}\r\n\t\t$request_url = \"{$this->url}&api_action={$action}&api_output={$this->output}&{$params}\";\r\n\t\t$response = $this->curl($request_url);\r\n\t\treturn $response;\r\n\t}", "function login_new_user_into_api($loginData) \n\t{\n\t\tlog_message('debug', '_bank_api/login_new_user_into_api');\n\t\tlog_message('debug', '_bank_api/login_new_user_into_api:: [1] loginData='.json_encode($loginData));\n\t\t\n\t\t# The unique code for the bank organization with the API\n\t\t$bankCode = $this->get_bank_code($loginData['bank_id']);\n\t\t\n\t\t# Check if user is already registered with the API\n\t\t$plaidToken = $this->get_user_access_token($loginData['email_address'], $bankCode);\n\t\t\n\t\t# User already registered\n\t\tif(!empty($plaidToken) && !empty($loginData['mfa']))\n\t\t{\n\t\t\t$dataArray = array(\n\t\t\t\t'client_id'=>PLAID_CLIENT_ID, \n\t\t\t\t'secret'=>PLAID_SECRET, \n\t\t\t\t'type'=>$bankCode, \n \t\t\t'access_token'=>$plaidToken\n\t\t\t);\n\t\t\t\n\t\t\t#If requires an access token sent to the device\n\t\t\tif(!empty($loginData['send_method'])) $dataArray['options'] = array('send_method'=>array('type'=>$loginData['send_method']));\n\t\t\telse $dataArray['mfa'] = $loginData['mfa'];\n\t\t\t\n\t\t\t$url = PLAID_CONNECTION_URL.'/connect/step';\n\t\t}\n\t\t#New user with the API\n\t\telse\n\t\t{\n\t\t\t#Prepare data for running on API\n\t\t\t$dataArray = array(\n\t\t\t\t'client_id'=>PLAID_CLIENT_ID, \n\t\t\t\t'secret'=>PLAID_SECRET, \n\t\t\t\t'credentials'=>array('username'=>$loginData['user_name'],'password'=>$loginData['password']), \n \t\t\t'type'=>$bankCode,\n\t\t\t\t'email'=>$loginData['email_address'],\n\t\t\t\t'options'=>array('pending'=>true, 'list'=>true, 'login'=>true, 'webhook'=>BASE_URL.'h/'.encrypt_value($loginData['user_id']))\n\t\t\t);\n\t\t\t#If requires a pin number too, add it\n\t\t\tif(!empty($loginData['bank_pin'])) $dataArray['credentials']['pin'] = $loginData['bank_pin'];\n\t\t\t\n\t\t\t$url = PLAID_CONNECTION_URL.'/connect';\n\t\t}\n\t\tlog_message('debug', '_bank_api/login_new_user_into_api:: [2] dataArray='.json_encode($dataArray));\n\t\t\n\t\treturn run_on_api($url, $dataArray);\n\t}", "function oauth2_get_accss_token($code) {\n \n if($code == '') {\n return null; \n }\n\n $req_url = t(\n variable_get('get oauth2 access_token'),\n array(\n '@APPID' => variable_get('wechat_py_AppID'),\n '@APPSECRET' => variable_get('wechat_py_AppSecret'),\n '@CODE' => $code,\n )\n );\n\n module_load_include('inc', 'wechat_api', 'wechat_api_php5');\n $result = wechat_php_curl_https_get($req_url);\n if ($result == Null)\n {\n watchdog('mobile shopping', 'error: get user openid return null in @line line:@filename',\n array(\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ),\n $severity = WATCHDOG_ERROR);\n return null;\n }\n\n //get user list, it will return maxmum 10000 open id each time.\n $json_value = json_decode($result);\n if(isset($json_value->errcode)){\n watchdog('mobile shopping', 'error code: @error and errmsg: @errmsg at @line in @filename',\n array(\n '@error' => $json_value->errcode,\n '@errmsg' => $json_value->errmsg,\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ),\n $severity = WATCHDOG_ERROR);\n return null;\n }\n return $json_value;\n\n}", "function oauth2_get_accss_token($code) {\n \n if($code == '') {\n return null; \n }\n\n $req_url = t(\n variable_get('get oauth2 access_token'),\n array(\n '@APPID' => variable_get('wechat_py_AppID'),\n '@APPSECRET' => variable_get('wechat_py_AppSecret'),\n '@CODE' => $code,\n )\n );\n\n module_load_include('inc', 'wechat_api', 'wechat_api_php5');\n $result = wechat_php_curl_https_get($req_url);\n if ($result == Null)\n {\n watchdog('mobile shopping', 'error: get user openid return null in @line line:@filename',\n array(\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ),\n $severity = WATCHDOG_ERROR);\n return null;\n }\n\n //get user list, it will return maxmum 10000 open id each time.\n $json_value = json_decode($result);\n if(isset($json_value->errcode)){\n watchdog('mobile shopping', 'error code: @error and errmsg: @errmsg at @line in @filename',\n array(\n '@error' => $json_value->errcode,\n '@errmsg' => $json_value->errmsg,\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ),\n $severity = WATCHDOG_ERROR);\n return null;\n }\n return $json_value;\n\n}", "public function get($openID)\n {\n $params = [\n 'user_list' => is_string($openID) ? [[\n 'openid' => $openID\n ]] : array_map(function ($item) {\n return [\n 'openid' => $item,\n ];\n }, $openID) ,\n ];\n\n return $this->httpPostJson('/rest/2.0/cambrian/user/info', $params);\n }", "function pg_api_mym_login()\n {\n $json_req = '{\"siteCode\":\"AP_FR_ESP\",\"culture\":\"fr-FR\",\"action\":\"authenticate\",\"fields\":{\"USR_EMAIL\":{\"value\":\"'.$this->username.'\"},\"USR_PASSWORD\":{\"value\":\"'.$this->password.'\"}}}';\n $param = \"mobile-services/GetAccessToken?jsonRequest=\".urlencode($json_req);\n //print(\"PARAM:\\n\".$param.\"\\n\");\n $ret = $this->post_api_psa_auth1($param);\n //var_dump($ret[\"info\"]);\n if ($this->debug_api)\n var_dump($ret[\"result\"]);\n if ($ret[\"info\"][\"http_code\"] == \"200\") {\n $this->access_token_mym = $ret[\"result\"]->accessToken;\n //printf(\"access_token_mym=\".$this->access_token_mym.\"\\n\");\n return(\"OK\");\n }\n else {\n $this->access_token_mym = \"\";\n return(\"KO\");\n }\n }", "private function insta_response($username)\n {\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"https://easy-instagram-service.p.rapidapi.com/username?username=\".$username.\"&random=x8n3nsj2\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"client_secret\\\"\\r\\n\\r\\nbab4b323a3f6e0ca69a1017f9afb019b\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"grant_type\\\"\\r\\n\\r\\nauthorization_code\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"redirect_uri\\\"\\r\\n\\r\\nhttps://calsob.cf/\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"code\\\"\\r\\n\\r\\nAQAEPcJuRD9XdUC1VB-gzuc5H-g6U4Y_xc62wpnxaMJN2QxKttKz5LkZHolwGvcLjn_00K-4kiEPS-rues2dPLIo_djbigWf1KzlBP-L0nraVSCOaMkCwkNojXCAZL8R1lqeV7vX-xpZrBXntx9EjpFtHdSXQfcVShe8G3cx_Ui477XiLVQ2-qDbkhUbpcdOe9RfOaw7vr7R4836IIMBOfEjJ_cu5tSZnQj_dsb-abXh2w\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"client_id\\\"\\r\\n\\r\\n234501778482042\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW--\",\n CURLOPT_HTTPHEADER => array(\n \"cache-control: no-cache\",\n \"content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\",\n \"postman-token: c262f872-2ffd-e1bf-6d77-8f67e7edcdf6\",\n \"x-rapidapi-host: easy-instagram-service.p.rapidapi.com\",\n \"x-rapidapi-key: 1b398dedacmsh3a0c864b03918c3p17a43ajsnd9fea44f80de\"\n ),\n ));\n $response = curl_exec($curl);\n curl_close($curl);\n return json_decode($response, true)['profile_pic_url'];\n }", "static function getAllInvitedUsersWithInvCode ( $user )\r\n\t{\t\r\n\t\t$invitedCodesId = array();\r\n\t\t\r\n\t\tforeach ( Invite_Code::fetchAllPrivileged(array('id_user'=>$user->id)) as $inviteCode )\r\n\t\t\t/* @var $inviteCode Invite_Code */\r\n\t\t{\r\n\t\t\t$invitedCodesId[] = $inviteCode->id;\r\n\t\t}\r\n\t\t\r\n\t\tif ( empty($invitedCodesId) )\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t\t\r\n\t\t$where = new Art_Model_Db_Where(array('name'=>'id_invite_code', 'value'=>$invitedCodesId, 'relation'=>Art_Model_Db_Where::REL_IN));\t\r\n\r\n\t\t$users = array();\r\n\t\t\r\n\t\tforeach ( User_X_Invite_Code::fetchAllPrivilegedActive($where) as $userInvCode ) \r\n\t\t\t/* @var $userInvCode User_X_Invite_Code */\r\n\t\t{\r\n\t\t\t$user = $userInvCode->getUser();\r\n\t\t\t$user->invCode = $userInvCode->getInviteCode()->code;\r\n\t\t\t$users[] = $user;\r\n\t\t}\r\n\t\t\r\n\t\treturn $users;\r\n\t}", "function get_opentok_paramenter() {\n\n ini_set('memory_limit', '-1');\n ini_set('display_errors', \"1\");\n error_reporting(E_ALL);\n // Creating an OpenTok Object\n $apiObj = new OpenTokSDK(API_Config::API_KEY, API_Config::API_SECRET);\n\n // Creating Simple Session object, passing IP address to determine closest production server\n // Passing IP address to determine closest production server\n $session = $apiObj->createSession($_SERVER[\"REMOTE_ADDR\"]);\n\n // Creating Simple Session object \n // Enable p2p connections\n $session = $apiObj->createSession($_SERVER[\"REMOTE_ADDR\"], array(SessionPropertyConstants::P2P_PREFERENCE => \"enabled\"));\n\n // Getting sessionId from Sessions\n // Option 1: Call getSessionId()\n $sessionId = $session->getSessionId();\n //echo \"Session=\". $sessionId;\n // Option 2: Return the object itself\n // After creating a session, call generateToken(). Require parameter: SessionId\n $token = $apiObj->generateToken($sessionId);\n\n // Giving the token a moderator role, expire time 5 days from now, and connectionData to pass to other users in the session\n $token = $apiObj->generateToken($sessionId, RoleConstants::MODERATOR, time() + (30 * 24 * 60 * 60), \"TxxChange Test\");\n // echo \"<br>Token=\". $token;\n\n $return = array();\n\n $return['sessionId'] = $sessionId;\n $return['token'] = $token;\n\n // print_r($return);\n // die;\n return $return;\n }", "public function login_api_request(){\n\t\t$data = json_decode(file_get_contents(\"php://input\"));\n\t\tif(isset($_GET['username']) && isset($_GET['password'])){\n\t\t\t$username = $_GET['username'];\n\t\t\t$password = $_GET['password'];\n\t\t\techo \"{\\\"username\\\":\\\"$username\\\", \\\"password\\\":\\\"$password\\\"}\";\n\t\t}else{\n\t\t\techo \"ops you have no creditials {\\\"username\\\":\\\"empty\\\", \\\"password\\\":\\\"empty\\\"}\";\n\t\t}\n\t\t\n\t}", "function get_userinfo($username) {\n $email = $this->config->email; \n $password = $this->config->password; \n\n $tokenResponse = $this-> getToken($email, $password);\n\n $key = \"access_token\";\n \n if (strpos($tokenResponse, $key) !== false) {\n \n $jsonObj = json_decode($tokenResponse);\n $access_token = $jsonObj->$key;\n\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n //CURLOPT_PORT => \"8205\",\n CURLOPT_URL => \"https://$subdomain.studentmanager.co.za/api/User/GetUser?email$username\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Bearer $access_token\",\n \"cache-control: no-cache\",\n \"postman-token: d2d5971f-3e02-ec52-b1e7-eaac5c8f5e2c\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n if ($err) {\n error_log('Error: ' . print_r($err, true));\n } else {\n error_log('Response: ' . print_r($response, true));\n }\n\n $obj = json_decode($response);\n \n $countries = get_string_manager()->get_list_of_countries();\n\n $countrykey = array_search($obj->{'CountryName'}, $countries);\n\n $result = array(\n \"firstname\" => $obj->{'firstName'},\n \"lastname\" => $obj->{'lastName'},\n \"middlename\" => $obj->{'middleName'},\n \"email\" => $obj->{'email'},\n \"username\" => $obj->{'email'}, \n \"country\" => $countrykey,\n \"idnumber\" => $obj->{'nationalId'}, \n );\n \n return $result;\n }\n }", "private function _doLogin() {\n\t\tif (!isset($_GET['provider']))\n\t\t\tthrow new Exception(\"You haven't supplied a provider\");\n\n\t\tif (!ctype_alpha($_GET['provider'])) {\n\t\t\tthrow new Exception(\"Invalid characters in provider string\");\n\t\t}\n\t\t//$this->module->getHybridauth()\n\n\t\t$identity = new RemoteUserIdentity($_GET['provider'],$this->module->getHybridauth());\n\t\t//$identity = new RemoteUserIdentity($_GET['provider'],Yii::app()->getModule('hybridauth')->getHybridAuth());\n\t\t/*print_r($identity);\n\t\texit;*/\n\t\tif ($identity->authenticate()) {\n\t\t\t$this->importContacts($identity->loginProvider,$identity->userContacts);\n\t\t\t//echo \"hiii--authenticated\";\n\t\t\t//exit;\n\t\t\t/* This piece of code is for checking friend is invited or not if exists then add as friend*/\n\t\t\t/*if($identity->loginProvider == \"facebook\")\n\t\t\t{\n\t\t\t\t$chckfrnd = InviteFriend::model()->findAllByAttributes(array('invitee_social_network_id'=>$identity->loginProviderIdentifier,'status'=>0));\n\t\t\t\tif(isset($chckfrnd))\n\t\t\t\t{\n\t\t\t\t\tforeach($chckfrnd as $eachfrnd)\n\t\t\t\t\t{\n\t\t\t\t\t\t$eachfrnd->status = 1;\n\t\t\t\t\t\t/*print_r($eachfrnd->status);\n\t\t\t\t\t\texit;\n\t\t\t\t\t\t$eachfrnd->save(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t// Check whether the page is from invite friends if it is then render invitefriends page nd to fetch contacts\n\t\t\t/*if (isset(Yii::app()->session['invitefriends']) && Yii::app()->session['invitefriends']['inviteallfriends']=='network-page')\n\t\t\t{\n\t\t\t\t//echo \"invite\";\n\t\t\t\tif($identity->loginProvider == \"facebook\")\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$this->redirect(array(\"/network/invitefbfriends\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->importContacts($identity->loginProvider,$identity->userContacts);\n\t\t\t\t}\n\t\t\t\t//$this->redirect($this->createUrl('/network/getContacts', array('known_contacts'=>$knownusers,'unknown_contacts'=>$notknownusers)));\n\t\t\t\t//$this->render('importcontacts',array('known_contacts'=>$knownusers));\n\t\t\t}*/\n\t\t\t// They have authenticated AND we have a user record associated with that provider\n\t\t\t// User is existed in db and registered in yahoo and logged in....\n\t\t\tif (isset(Yii::app()->session['login'])) {\n\t\t\t\t/*echo \"hii---loggeeduser\";\n\t\t\t\texit;*/\n\t\t\t\t$this->_loginUser($identity);\n\t\t\t} else {//User is existed in db and registered with yahoo and not logged in then do something...\n\t\t\t\t//echo \"not loggedin--\".Yii::app()->user->returnUrl;\n\t\t\t\t//exit;\n\t\t\t\t\n\t\t\t\t//they shouldn't get here because they are already logged in AND have a record for\n\t\t\t\t// that provider. Just bounce them on\n\t\t\t\t$login = array();\n\t\t\t\tif(isset(Yii::app()->session['login']))\n\t\t\t\t\tunset(Yii::app()->session['login']);\n\t\t\t\t$login[\"id\"] = $identity->userid;\n\t\t\t\t$login[\"username\"] = $identity->username;\n\t\t\t\t$login[\"email\"] = $identity->email;\n\t\t\t\t$login[\"socialnetworkid\"] = $identity->loginProviderIdentifier;\n\t\t\t\t$login[\"superuser\"] = $identity->Issuperuser;\n\t\t\t\t$shopusercookie = new CHttpCookie('shop_uname',$identity->email);\n\t $shopusercookie->expire = time()+2*604800; \n\t\t\t\t$shoppasscookie = new CHttpCookie('shop_upwd',base64_encode($identity->password));\n\t $shoppasscookie->expire = time()+2*604800;\n\t\t\t\tYii::app()->request->cookies['shop_uname'] = $shopusercookie;\n\t\t\t\tYii::app()->request->cookies['shop_upwd'] = $shoppasscookie;\n\t\t\t\tif($identity->userData == 1)\n\t\t\t\t{\n\t\t\t\t\t$login[\"userType\"] = \"parent\";\n\t\t\t\t\tYii::app()->session['login'] = $login;\n\t\t\t\t\t$this->redirect(array('/'));\n\t\t\t\t}\n\t\t\t\tif($identity->userData == 3)\n\t\t\t\t{\n\t\t\t\t\t$login[\"userType\"] = \"organization\";\n\t\t\t\t\tYii::app()->session['login'] = $login;\n\t\t\t\t\t$this->redirect(array('/'));\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\t// User not registered with yahoo then this condition works\n\t\telse if ($identity->errorCode == RemoteUserIdentity::ERROR_USERNAME_INVALID) {\n\t\t\n\t\t//Same as above added on 24-01-2013\n\t\t\t/*if($identity->loginProvider == \"facebook\")\n\t\t\t{\n\t\t\t\t$chckfrnd = InviteFriend::model()->findAllByAttributes(array('invitee_social_network_id'=>$identity->loginProviderIdentifier,'status'=>0));\n\t\t\t\tif(isset($chckfrnd))\n\t\t\t\t{\n\t\t\t\t\tforeach($chckfrnd as $eachfrnd)\n\t\t\t\t\t{\n\t\t\t\t\t\t$eachfrnd->status = 1;\n\t\t\t\t\t\t/*print_r($eachfrnd->status);\n\t\t\t\t\t\texit;\n\t\t\t\t\t\t$eachfrnd->save(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t/*if (isset(Yii::app()->session['invitefriends']) && Yii::app()->session['invitefriends']['inviteallfriends']=='network-page')\n\t\t\t{\n\t\t\t\t//echo \"hiiii--- else\";\n\t\t\t\t//condition added on 19-01-13 for not to fetch or import contacts from facebook\n\t\t\t\t$identity->userid = Yii::app()->session['login']['id'];\n\t\t\t\t$this->_linkProvider($identity);\n\t\t\t\tif($identity->loginProvider == \"facebook\")\n\t\t\t\t{\n\t\t\t\t\t$this->redirect(array(\"/network/invitefbfriends\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->importContacts($identity->loginProvider,$identity->userContacts);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t// They have authenticated to their provider but we don't have a matching HaLogin entry\n\t\t\tif (!isset(Yii::app()->session['login'])) {\n \t\t\t\t// They aren't logged in => display a form to choose their username & email \n\t\t\t\t// (we might not get it from the provider)\n\t\t\t\tif ($this->module->withYiiUser == true) {\n\t\t\t\t\tYii::import('application.modules.user.models.*');\n\t\t\t\t} else {\n\t\t\t\t\tYii::import('application.models.*');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$user = new User;\n\t\t\t\tif(isset(Yii::app()->session['userinfo']))\n\t\t\t\t{\n\t\t\t\t\t$existeduser = User::model()->findByAttributes(array('email'=>Yii::app()->session['userinfo']['email']));\n\t\t\t\t\t$model = User::model()->findByAttributes(array('email'=>Yii::app()->session['userinfo']['email'],'status'=>1));\n\t\t\t\t\tif($existeduser['email']!='' && isset($model))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->importContacts($identity->loginProvider,$identity->userContacts);\n\t\t\t\t\t\t$identity->userid = $model->userid;\n\t\t\t\t\t\t$this->_linkProvider($identity);\n\t\t\t\t\t\t$login = array();\n\t\t\t\t\t\tif(isset(Yii::app()->session['login']))\n\t\t\t\t\t\t\tunset(Yii::app()->session['login']);\n\t\t\t\t\t\t$login[\"id\"] = $model->userid;\n\t\t\t\t\t\t$login[\"username\"] = $model->fname.' '.$model->lname;\n\t\t\t\t\t\t$login[\"email\"] = $model->email;\n\t\t\t\t\t\t$login[\"socialnetworkid\"] = $model->socialnetworkid;\n\t\t\t\t\t\t$login[\"superuser\"] = $model->superuser;\n\t\t\t\t\t\t$shopusercookie = new CHttpCookie('shop_uname',$identity->email);\n\t\t\t $shopusercookie->expire = time()+2*604800; \n\t\t\t\t\t\t$shoppasscookie = new CHttpCookie('shop_upwd',base64_encode($identity->password));\n\t\t\t $shoppasscookie->expire = time()+2*604800;\n\t\t\t\t\t\tYii::app()->request->cookies['shop_uname'] = $shopusercookie;\n\t\t\t\t\t\tYii::app()->request->cookies['shop_upwd'] = $shoppasscookie;\n\t\t\t\t\t\tif($model->usertypeid == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$login[\"userType\"] == \"parent\";\n\t\t\t\t\t\t\tYii::app()->session['login'] = $login;\n\t\t\t\t\t\t\t$this->redirect(array('/site/index'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($model->usertypeid == 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$login[\"userType\"] == \"organization\";\n\t\t\t\t\t\t\tYii::app()->session['login'] = $login;\n\t\t\t\t\t\t\t$this->redirect(array('/organizationActivities/view'));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//$this->redirect(array('/site/fbreg','url'=>'fbreg'));\n\t\t\t\t\t\t$this->redirect(array('/site/index','url'=>'newfbreg'));\n\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$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// They are already logged in, link their user account with new provider\n\t\t\t\t$identity->userid = Yii::app()->session['login']['id'];\n\t\t\t\t$this->_linkProvider($identity);\n\t\t\t\t//$this->redirect(Yii::app()->session['hybridauth-ref']);\n\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\tunset(Yii::app()->session['hybridauth-ref']);\n\t\t\t}\n\t\t}\n\t}", "function apiAdminUsersList()\n {\n $adminToken = file_get_contents(codecept_data_dir('admin_token.json'));\n $this->restModule->haveHttpHeader('token', $adminToken);\n $this->restModule->haveHttpHeader('Content-Type', 'application/json');\n $this->restModule->sendGET('/users/1/25');\n $this->restModule->seeResponseIsJson();\n $this->restModule->seeResponseCodeIs(200);\n $this->restModule->seeResponseMatchesJsonType([\n 'total' => 'integer',\n 'count' => 'integer',\n 'page' => 'integer',\n 'data' => 'array'\n ]);\n }", "public function returnOpenLoanOffers() {\n return $this->request->exec([\n 'command' => 'returnOpenLoanOffers'\n ]);\n }", "public function getActivityByUserAction()\n {\n $request = $this->getRequest();\n if (!$request->headers->has('Trailburning-User-ID')) {\n throw new ApiException('Header Trailburning-User-ID is not set', 400);\n }\n $userId = $request->headers->get('Trailburning-User-ID');\n $user = $this->getDoctrine()\n ->getRepository('TBFrontendBundle:User')\n ->findOneById($userId);\n\n if (!$user) {\n throw new ApiException(sprintf('User with id \"%s\" does not exist', $userId), 404);\n }\n \n $activityFeedGenerator = $this->get('tb.activity.feed.generator');\n \n $feed = $activityFeedGenerator->getFeedForUser($user->getId());\n \n return $this->getRestResponse($feed);\n }", "public function actionIndex()\n {\n // 'email' => 'rifanfirdhaus@gmail.com',\n // 'username' => 'rifan',\n // 'password' => 'rifan1234'\n // ]);\n //\n // $account->save(false);\n\n /** @var Core $core */\n $core = Yii::$app->getModule('core');\n\n $response = $core->oauth2->handleTokenRequest();\n\n return $response->parameters;\n }", "function activity($user,$json=true){\n $curl = curl_init();\n curl_setopt($curl,CURLOPT_URL,$this->base_url.'/world/activity?app_id='.$user->get_app_id());\n curl_setopt($curl,CURLOPT_HTTPHEADER,array('Authorization:'.$user->get_user_name().\";\".$user->get_access_token()));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $result=curl_exec($curl);\n if($json){\n return $result;\n }\n else {\n return json_decode($result);\n }\n }", "public function getUserInfo(array $params);", "private function user_info($oauth_token){\n\t\t$info = $this->serverGet('https://api.foursquare.com/v2/users/self', \n\t\t\t\t\tarray('oauth_token' => $oauth_token,'v'=>date(\"Ymd\",time())) , null, $headers);\n\t\tif (!empty($info)){\n\t\t\t$res = json_decode($info);\n\t\t\tif($res->meta->code == 200) {\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$error = array(\n\t\t\t\t\t'provider' => 'Foursquare',\n\t\t\t\t\t'code' => 'user_info_error',\n\t\t\t\t\t'message' => 'Failed when attempting to get user information.',\n\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t'response' => $info,\n\t\t\t\t\t\t'headers' => $headers\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$this->errorCallback($error);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array(\n\t\t\t\t'provider' => 'Foursquare',\n\t\t\t\t'code' => 'user_info_error',\n\t\t\t\t'message' => 'Failed when attempting to query for user information',\n\t\t\t\t'raw' => array(\n\t\t\t\t\t'response' => $info,\n\t\t\t\t\t'headers' => $headers\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t\t}", "public function usersocialwithcredentialsAction() {\n $status=array();\n $data=array();\n $request = $this->getRequest();\n $user= new DatabaseObject_User($this->db);\n if ($user->loadByValidatedSession($request->getParam('userId'), $request->getParam('authToken'))){ //Check Session\n //Check Session\n $status['code']='200';\n $data['social']=$user->arrayRepresentationSocial();\n }else{\n $status['code']='401';\n $status['msg']=\"Could not authenticate\";\n }\n $response['status']=$status;\n $response['data']=$data;\n $this->sendJson($response);\n }", "function login( $email , $password )\n{\n $params = array();\n $params['email'] = $email;\n $params['password'] = $password;\n\n if($content = send_request( 'user_get_token' , $params ))\n {\n $data = json_decode( $content , 1 );\n if( ($data['err_code'] == 0) && is_array( $data['data'] ) )\n return $data['data'];\n else\n return false;\n }\n return null;\n}", "function loginRequest( $logintoken ) {\n\tglobal $endPoint;\n\n\t$params2 = [\n\t\t\"action\" => \"login\",\n\t\t\"lgname\" => \"bot_user_name\",\n\t\t\"lgpassword\" => \"bot_password\",\n\t\t\"lgtoken\" => $logintoken,\n\t\t\"format\" => \"json\"\n\t];\n\n\t$ch = curl_init();\n\n\tcurl_setopt( $ch, CURLOPT_URL, $endPoint );\n\tcurl_setopt( $ch, CURLOPT_POST, true );\n\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params2 ) );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $ch, CURLOPT_COOKIEJAR, \"cookie.txt\" );\n\tcurl_setopt( $ch, CURLOPT_COOKIEFILE, \"cookie.txt\" );\n\n\t$output = curl_exec( $ch );\n\tcurl_close( $ch );\n}", "function loginRequest( $logintoken ) {\n\tglobal $endPoint;\n\n\t$params2 = [\n\t\t\"action\" => \"login\",\n\t\t\"lgname\" => \"bot_user_name\",\n\t\t\"lgpassword\" => \"bot_password\",\n\t\t\"lgtoken\" => $logintoken,\n\t\t\"format\" => \"json\"\n\t];\n\n\t$ch = curl_init();\n\n\tcurl_setopt( $ch, CURLOPT_URL, $endPoint );\n\tcurl_setopt( $ch, CURLOPT_POST, true );\n\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params2 ) );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $ch, CURLOPT_COOKIEJAR, \"cookie.txt\" );\n\tcurl_setopt( $ch, CURLOPT_COOKIEFILE, \"cookie.txt\" );\n\n\t$output = curl_exec( $ch );\n\tcurl_close( $ch );\n}", "function loginRequest( $logintoken ) {\n\tglobal $endPoint;\n\n\t$params2 = [\n\t\t\"action\" => \"login\",\n\t\t\"lgname\" => \"bot_user_name\",\n\t\t\"lgpassword\" => \"bot_password\",\n\t\t\"lgtoken\" => $logintoken,\n\t\t\"format\" => \"json\"\n\t];\n\n\t$ch = curl_init();\n\n\tcurl_setopt( $ch, CURLOPT_URL, $endPoint );\n\tcurl_setopt( $ch, CURLOPT_POST, true );\n\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params2 ) );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $ch, CURLOPT_COOKIEJAR, \"cookie.txt\" );\n\tcurl_setopt( $ch, CURLOPT_COOKIEFILE, \"cookie.txt\" );\n\n\t$output = curl_exec( $ch );\n\tcurl_close( $ch );\n}", "public function Info_user(Request $request) {\n try {\n $find_id = DB::table('oauth_access_tokens')->where('id',$request->token)->get();\n $nomor = count($find_id);\n if($nomor > 0) {\n if (DB::table('oauth_clients')->where('secret', $request->token_secret)->exists()) {\n $find_users = DB::table('users')->where('id',$find_id[0]->user_id)->get();\n return response()->json($find_users);\n } else {\n return response()->json(['Akses Ditolak']);\n }\n } else {\n return response()->json(['logout']);\n }\n\n } catch (Exception $e) {\n return response()->exception($e->getMessage(), $e->getCode());\n }\n }", "function send_invitations($userId, $emailList, $ipAddress, $baseUrl)\n\t{\n\t\tlog_message('debug', '_networks/send_invitations');\n\t\tlog_message('debug', '_networks/send_invitations:: [1] userId='.$userId.' emailList='.$emailList.' ipAddress='.$ipAddress.' baseUrl='.$baseUrl);\n\t\t\n\t\t$result = FALSE;\n\t\t$perEmail = array(); # Per email results\n\t\t\n\t\t# check if there are emails for users who already signed up or those who this user has already invited\n\t\t$existingUserEmails = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_single_column_as_array', 'query'=>'get_existing_user_emails', 'column'=>'email_address', 'variables'=>array('email_list'=>implode(\"','\",$emailList), 'user_id'=>$userId) ));\n\t\tlog_message('debug', '_networks/send_invitations:: [2] existingUserEmails='.$existingUserEmails);\n\t\t\n\t\t$scheduleCount = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_count', 'query'=>'get_user_invitations_by_status', 'variables'=>array('user_id'=>$userId, 'status'=>'pending') ));\n\t\tlog_message('debug', '_networks/send_invitations:: [3] scheduleCount='.$scheduleCount);\n\t\t\n\t\tforeach($emailList AS $email){\n\t\t\tif(!in_array($email, $existingUserEmails)) {\n\t\t\t\tlog_message('debug', '_networks/send_invitations:: [4] existingUserEmails not in email list');\n\t\t\t\t\n\t\t\t\t$scheduleCount++;\n\t\t\t\t$status = 'pending';\n\t\t\t\t# check which rules apply for this user\n\t\t\t\tif(rule_check($this,'invite_daily_limit_10', array('user_id'=>$userId)) && $scheduleCount > 10){\n\t\t\t\t\tlog_message('debug', '_networks/send_invitations:: [5] invite_daily_limit_10');\n\t\t\t\t\t$status = 'paused';\n\t\t\t\t}\n\t\t\t\tif(rule_check($this,'invite_daily_limit_30', array('user_id'=>$userId)) && $scheduleCount > 30){\n\t\t\t\t\tlog_message('debug', '_networks/send_invitations:: [6] invite_daily_limit_30');\n\t\t\t\t\t$status = 'paused';\n\t\t\t\t}\n\t\t\t\tif(rule_check($this,'stop_new_invite_sending', array('user_id'=>$userId)) \n\t\t\t\t\t|| rule_check($this,'stop_all_invite_sending', array('user_id'=>$userId))\n\t\t\t\t){\n\t\t\t\t\tlog_message('debug', '_networks/send_invitations:: [6] stop_new_invite_sending or stop_all_invite_sending');\n\t\t\t\t\t$status = 'paused';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $this->schedule_invitation($email, $userId, $ipAddress, $status, $baseUrl.'r/'.format_id($userId));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t# The user with this email already exists\n\t\t\telse $perEmail[$email] = 'user already invited';\n\t\t}\n\t\tlog_message('debug', '_networks/send_invitations:: [7] result='.$result);\n\t\tlog_message('debug', '_networks/send_invitations:: [8] perEmail='.json_encode($perEmail));\n\t\treturn array(\n\t\t\t'result'=>($result? 'SUCCESS': 'FAIL'), \n\t\t\t'msg'=>($result? 'Your invitations have been scheduled for sending.': 'ERROR: No invitations could be scheduled for sending.'),\n\t\t\t'per_email'=>$perEmail\n\t\t);\n\t}", "public function retrieveAccessTokenByGlobReqArgs();", "function getAcctInfo($user){\n\n}", "static private function get_all_user_info($app_access_token,$flag)\n {\n $server_config = Config::get('app.server_config');\n $oa_server = $server_config['oa_server'];\n //获取所有公司成员的openid\n $all_user_info_data = file_get_contents(\"{$oa_server}/openapi/user/openid_list?access_token={$app_access_token}\");\n $all_user_info_data = json_decode($all_user_info_data, true);\n if ($all_user_info_data['state'] != 0) {\n// var_dump($all_user_info_data);exit;\n return 'redirect_to_getauth';\n }\n $all_user_array = $all_user_info_data['data'];\n if($flag == 1){\n return $all_user_array;\n }elseif($flag == 2){\n $res_data = array();\n $split = array_chunk($all_user_array,100);\n foreach($split as $s){\n $send_data = implode(',',$s);\n $url = \"{$oa_server}/openapi/user/batchget?access_token={$app_access_token}\";\n $post_data['openid_list'] = $send_data;\n $ch = curl_init();//初始化curl\n curl_setopt($ch, CURLOPT_URL,$url);//抓取指定网页\n curl_setopt($ch, CURLOPT_HEADER, 0);//设置header\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上\n curl_setopt($ch, CURLOPT_POST, 1);//post提交方式\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n $r = curl_exec($ch);//运行curl\n $res_json = json_decode($r,true);\n $res_data[] = $res_json['data'];\n curl_close($ch);\n }\n\n //获取所有公司成员的信息\n $redis_all_array = json_encode($all_user_array);\n Redis::set('all_user_info', $redis_all_array);\n\n return $res_data;\n }\n\n }", "#[OpenApi\\Operation(tags: ['Users'], security: 'AccessTokenSecurityScheme')]\n #[OpenApi\\Parameters(factory: ShowUsersParameters::class)]\n #[\n OpenApi\\Response(\n factory: UserShowDetailedResponse::class,\n statusCode: 200\n )\n ]\n #[OpenApi\\Response(factory: UnauthorizedResponse::class, statusCode: 401)]\n #[OpenApi\\Response(factory: NotFoundResponse::class, statusCode: 404)]\n #[\n OpenApi\\Response(\n factory: TooManyRequestsResponse::class,\n statusCode: 429\n )\n ]\n public function show(User $user) {\n $this->authorizeAnonymously('view', $user);\n\n return UserResource::make($user);\n }", "public function getOpenTesterDataAction($pos_loc_id)\n {\n header(\"Access-Control-Allow-Origin: *\");\n $em = $this->getDoctrine()->getManager();\n $pos_location = $em->getRepository('GistLocationBundle:POSLocations')->findOneBy(array('id'=>$pos_loc_id));\n $stock = $em->getRepository('GistInventoryBundle:OpenTesterEntry')->findBy(array('destination_inv_account'=>$pos_location->getInventoryAccount()->getTesterContainer()->getID()));\n $list_opts = [];\n foreach ($stock as $p) {\n $closing_user = '';\n if ($p->getClosingUser() != '') {\n $closing_user = $p->getClosingUser()->getDisplayName();\n }\n $list_opts[] = array(\n 'id' => $p->getID(),\n 'item_code' =>$p->getProduct()->getItemCode(),\n 'barcode' => $p->getProduct()->getBarcode(),\n 'item_name' => $p->getProduct()->getName(),\n 'statusFMTD' => $p->getStatusFMTD(),\n 'date_create' => $p->getDateCreateFormatted(),\n 'user_create' => $p->getOpeningUser()->getDisplayName(),\n 'date_consumed' => $p->getDateConsumedFormatted(),\n 'user_consumed' => $closing_user,\n 'flag_pickedup' => $p->isPickedUp(),\n );\n\n }\n\n $list_opts = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $list_opts)));\n return new JsonResponse($list_opts);\n }", "public function sendPhoneCallToken(TwoFactorAuthenticatable $user);", "public function getUserCompanyList() {\n try {\n $planList = $this->shortPositionService->getUserCompanyList(Auth::user()->email);\n if (!empty($planList)) {\n return $this->respond($planList);\n } else {\n return $this->respondBadRequest(['error' => 'No plans']);\n }\n } catch (EquioException $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('Subscription not found')]\n );\n } catch (\\Exception $e) {\n \\Log::info(\"==== getUserCompanyList Error \", [$e->getMessage()]);\n return $this->respondBadRequest(\n ['error' => __('messages.un_processable_request')]\n );\n }\n }", "function executePortfolioUserinfo()\n {\n $c = new Criteria();\n $username = $this->getRequestParameter('user');\n $c->add(sfGuardUserPeer::USERNAME,$username);\n $c->addJoin(sfGuardUserPeer::RESIDENCE_ID, ResidencePeer::ID, Criteria::LEFT_JOIN);\n //$user = sfGuardUserPeer::doSelectJoinResidence($c);\n $user = sfGuardUserPeer::doSelect($c);\n $this->user = array_shift($user);\n\n if (!$this->user)\n {\n return 0;\n }\n\n $c2 = new Criteria();\n $c2->add(UserInterestPeer::USER_ID, $this->user->getId());\n $this->interests = UserInterestPeer::doSelectJoinSubreaktor($c2);\n \n }", "public function findAccessToken();", "public function getCustomerAccessTokenWithPIN($username,$pin) { \r\n // Create a SOAP Client.\r\n $client = new SoapClient($this->accessTokenServiceWsdl, array(\r\n\t\t\t\t\t\t\t\t 'login' => $this->htUser,\r\n\t\t\t\t\t\t\t\t 'password' => $this->htPassword,\r\n\t\t\t\t\t\t\t\t 'exceptions' => true,\r\n\t\t\t\t\t\t\t\t 'cache_wsdl' => WSDL_CACHE_NONE,\r\n\t\t\t\t\t\t\t\t 'features' => SOAP_SINGLE_ELEMENT_ARRAYS\r\n\t\t\t\t\t\t\t\t ));\r\n\t\t\r\n // Set correct endpoint\r\n $client->__setLocation($this->accessTokenServiceEndPoint);\r\n\t\r\n // Define the submission details.\r\n $submitterDetails = $this->getSubmitterDetails();\r\n\t\t\r\n // Define the request.\r\n $requestDetails = array('username' => $username, 'pin' => $pin, 'submission' => $submitterDetails);\r\n\t\t\r\n // Call the operation\r\n $result = $client->getCustomerAccessTokenWithPIN($requestDetails);\t\t\t\r\n\t \r\n return $result;\r\n }", "public function make_api_call($url){\n\t\t$access_token = ACCESS_TOKEN;\n $opts = array(\n 'http'=>array(\n 'ignore_errors' => TRUE,\n 'method'=>\"GET\",\n 'header'=>\"Authorization: Bearer \". $access_token.\"\\r\\n\"\n ),\n \"ssl\"=>array(\n\t\t\t\t\t\t\"verify_peer\"=>false,\n\t\t\t\t\t\t\"verify_peer_name\"=>false,\n\t\t\t\t\t),\n );\n $context = stream_context_create($opts);\n $json = file_get_contents($url, false, $context);\n $response_data = json_decode($json, TRUE);\n\t\t\t\treturn $response_data;\n\t}", "public function apiRequest($access_token_url) {\n\n $apiURL = filter_var($access_token_url, FILTER_VALIDATE_URL)?$access_token_url:$this->apiURLBase.'user?access_token='.$access_token_url;\n\n $context = stream_context_create([\n 'http' => [\n 'user_agent' => 'Octus GitHub Login Engine',\n 'header' => 'Accept: application/json'\n ]\n ]);\n\n $response = @file_get_contents($apiURL, false, $context);\n return $response ? json_decode($response) : $response;\n \n }", "function enable_8hours_for_others($eventArray){\n\n http_response_code(200); // close modal\n \n $usersArray = $eventArray['view']['state']['values']['enablenotificationsforother']['enable8hoursforother']['selected_users'];\n $url = $_ENV[\"url_users.info\"];\n\n // get user info by slack id\n foreach ($usersArray as $user){\n $fields = [\n 'user' => $user\n ];\n\n $response = http_POST_urlencoded($url, $fields,true);\n // if user exists in slack\n if ($response['ok']){\n //add user to database\n $users = users_select_one($user); // check if user exists\n if (!$users) {\n // if user does not exist, insert user\n users_insert_to_database($user,$response['user']['name'],1,calculate_date());\n } \n }\n } \n}", "public function testInviteWithoutAccessToken()\n {\n $this->json('POST', $this->endpoint)\n ->assertStatus(401)\n ->assertJson($this->response);\n }", "function accessToken($requestParameters, $requestMethod, $requestUrl);", "public function loginAction()\n {\n\t\t$raw = $this->getRequest()->getRawBody();\n\t\t$json = Zend_Json::decode($raw);\n\t\t$pin = $json['pin'];\n\t\t$device_id = $json['device_id'];\n\t\t$registrant_id = $json['registrant_id'];\n\t\tif(!isset($pin) || !isset($device_id) || !isset($registrant_id)){\n\t\t\t$this->getResponse()->setHttpResponseCode(400);\n\t\t\t$data = array('status'=>'FAILED','message'=>'NO_DATA_PROVIDED');\n\t\t\techo $this->_helper->json($data);\n\t\t\texit();\n\t\t}\n\t\t$authTable = new Application_Model_DbTable_Auth();\n\t\t$user = $authTable->fetchRow($authTable->select()->where('pin=?',$pin)->where('device_id=?',$device_id));\n\t\t\n\t\t//Row not found\n\t\tif($user==null){\n\t\t\t$this->getResponse()->setHttpResponseCode(400);\n\t\t\t$data = array('status'=>'FAILED','message'=>'INVALID_LOGIN');\n\t\t\techo $this->_helper->json($data);\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//Generate SKEY now.\n\t\t$skey = $this->generateKey();\n\t\t//Save the users secret key for this session.\n\t\t$user->secret_key = $skey;\n\t\t$user->registrant_id = $registrant_id;\n\t\t$user->save();\n\t\t\n\t\t//Let the api consumer know it worked.\t\t\n\t\t$data = array('status'=>'SUCCESS','skey'=>$skey,'bsn'=>$user->bsn);\n\t\techo $this->_helper->json($data);\n }", "public function getAffilateInvite () {\n /**\n * 0: thành viên mới\n * 1: nhà phân phối\n * 2: tổng đại lý\n * 3: đại lý\n */\n $value_request = [0,1,2,3,'all'];\n $data['is_parent'] = $this->_checkAffliateOwner();\n\n if(!isset($data['is_parent']['open_chose'])) {\n\n $aListId = array();\n $iUserId = (int)$this->session->userdata('sessionUser');\n $info_public = $this->info_public;\n $data['user_infomation'] = $info_public;\n\n if( in_array($data['is_parent']['affiliate_level'], [1,2,3])) {\n $data['show_affiliate_menu'] = 1;\n }else {\n $data['show_affiliate_menu'] = 0;\n }\n\n // Tài add\n $user = $info_public;\n $user_id = (int)$this->session->userdata('sessionUser');\n $data['is_owner'] = $user['use_id'] == $user_id;\n $data['show_sub_aff'] = true;\n // end\n\n\n // include api\n $rent_header = null;\n if($this->session->userdata('token')) {\n $token = $this->session->userdata('token');\n $rent_header[] = \"Authorization: Bearer $token\" ;\n $rent_header[] = \"Content-Type: multipart/form-data\";\n }\n // data list user affiliate\n $url = $this->config->item('api_aff_list_invite');\n $url = str_replace(['{$user_id}','{$accept}'], [$user_id,0], $url);\n $params = null;\n $make_call = $this->callAPI('GET', $url, $params, $rent_header);\n $make_call = json_decode($make_call, true);\n\n if($make_call['status'] == 1) {\n $data['aListInvite'] = $make_call['data'];\n $data['data_aff']['total'] = array(\n 'all' => $make_call['iTotal'] ? $make_call['iTotal'] : 0,\n 'lv2' => $make_call['iTotalLv2'] ? $make_call['iTotalLv2'] : 0,\n 'lv3' => $make_call['iTotalLv3'] ? $make_call['iTotalLv3'] : 0,\n 'user_new' => $make_call['iUserNew'] ? $make_call['iUserNew'] : 0,\n 'user_buy' => $make_call['iUserBuy'] ? $make_call['iUserBuy'] : 0,\n );\n }\n } else {\n $data['open_chose'] = $data['is_parent']['open_chose'];\n }\n\n $this->set_layout('home/personal/profile-layout');\n $this->load->view('home/personal/affiliate/page/page-affiliate-user-list-invite', $data);\n \n }", "function wechat_api_validate_user_info($openid)\n{\n\n $token_url = t(variable_get('get user info') , array(\n '@ACCESS_TOKEN' => variable_get('access_token') ,\n '@OPENID' => $openid\n ));\n\n module_load_include('inc', 'wechat_api', 'wechat_api_php5');\n $result = wechat_php_curl_https_get($token_url);\n if (!$result)\n {\n watchdog('wechat get user info', 'error: return null in @line line:@filename', array(\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ) , $severity = WATCHDOG_ERROR);\n return '';\n }\n\n $json_value = json_decode($result);\n\n if (isset($json_value->errcode))\n {\n watchdog('wechat get user info', 'error code: @error and errmsg: @errmsg at @line in @filename', array(\n '@error' => $json_value->errcode,\n '@errmsg' => $json_value->errmsg,\n '@line' => __LINE__,\n '@filename' => __FILE__,\n ) , $severity = WATCHDOG_ERROR);\n return '';\n }\n\n //return user list json format\n return $json_value;\n}", "public function urlAccessToken()\n {\n return 'https://api.weibo.com/oauth2/access_token';\n }", "public function index()\n {\n $invites = Auth::user()->invites;\n return view('invites.index', compact('invites'));\n }", "function fetch_member_invite_list($projectid = 0)\n{\n global $ilance, $myapi;\n \n $html = '';\n \n $sql = $ilance->db->query(\"\n SELECT i.buyer_user_id, u.username\n FROM \" . DB_PREFIX . \"project_invitations AS i,\n \" . DB_PREFIX . \"users AS u\n WHERE i.buyer_user_id = u.user_id\n AND project_id = '\".intval($projectid).\"'\n GROUP BY buyer_user_id\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n { \n while ($res = $ilance->db->fetch_array($sql))\n {\n $html .= $res['username'] . \"\\n\"; \n }\n }\n \n return $html;\n}", "private function auth_request() {\n\n\t\tinclude_once(UPDRAFTPLUS_DIR.'/includes/onedrive/onedrive.php');\n\t\n\t\t$opts = $this->get_options();\n\t\t$use_master = $this->use_master($opts);\n\t\t\n\t\t// Get the client id\n\t\tif ($use_master) {\n\t\t\t$client_id = (isset($opts['endpoint_tld']) && 'de' == $opts['endpoint_tld']) ? $this->the_germany_client_id : $this->the_client_id;\n\t\t} else {\n\t\t\t$client_id = empty($opts['clientid']) ? '' : $opts['clientid'];\n\t\t}\n\t\t\n\t\t$instance_id = isset($_GET['updraftplus_instance']) ? $_GET['updraftplus_instance'] : '';\n\n\t\tif (!$use_master) {\n\t\t\t$redirect_uri = UpdraftPlus_Options::admin_page_url().'?page=updraftplus&action=updraftmethod-onedrive-auth';\n\t\t\t$callback_uri = '';\n\t\t} else {\n\t\t\t$redirect_uri = $this->the_callback;\n\t\t\t$callback_uri = UpdraftPlus_Options::admin_page_url().'?page=updraftplus&action=updraftmethod-onedrive-auth&endpoint-tld='.$opts['endpoint_tld'];\n\t\t}\n\n\t\t// For all permissions https://developer.microsoft.com/en-us/graph/docs/concepts/permissions_reference\n\t\tif ($use_master) {\n\t\t\t$scope = array(\n\t\t\t\t'openid',\n\t\t\t\t// 'wl.basic',\n\t\t\t\t// 'wl.contacts_skydrive',\n\t\t\t\t// 'wl.skydrive_update',\n\t\t\t\t// 'wl.offline_access',\n\t\t\t\t'offline_access',\n\t\t\t\t// 'onedrive.readwrite',\n\t\t\t\t'files.readwrite.all',\n\t\t\t);\n\t\t} else {\n\t\t\t$scope = array(\n\t\t\t\t'wl.signin',\n\t\t\t\t// 'wl.basic',\n\t\t\t\t// 'wl.contacts_skydrive',\n\t\t\t\t// 'wl.skydrive_update',\n\t\t\t\t'wl.offline_access',\n\t\t\t\t'onedrive.readwrite',\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Instantiate OneDrive client\n\t\t$onedrive = new \\Onedrive\\Client(array(\n\t\t\t'client_id' => $client_id,\n\t\t\t'use_msgraph_api' => $use_master,\n\t\t\t'endpoint_tld' => $opts['endpoint_tld'],\n\t\t));\n\n\t\t$url = $onedrive->getLogInUrl($scope, $redirect_uri, array(), $instance_id, $callback_uri);\n\n\t\tif (headers_sent()) {\n\t\t\t$this->log(sprintf(__('The %s authentication could not go ahead, because something else on your site is breaking it. Try disabling your other plugins and switching to a default theme. (Specifically, you are looking for the component that sends output (most likely PHP warnings/errors) before the page begins. Turning off any debugging settings may also help).', 'updraftplus'), 'OneDrive'), 'error');\n\t\t} else {\n\t\t\theader('Location: '.esc_url_raw($url));\n\t\t}\n\t}", "function oAuthRequest($url, $method, $params = array()) {\n\t\tif (strrpos($url, \"https://\") !== 0 && strrpos($url, \"http://\") !== 0) {\n\t\t\t$url = $this->host . $url;\n\t\t}\n\t\n\t\t$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $params);\n\t\t$request->sign_request($this->sha1_method, $this->consumer, $this->token);\n\t\t\n\t\tswitch ($method) {\n\t\t\tcase \"GET\":\n\t\t\t\treturn $this->http($request->to_url(), \"GET\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $this->http($request->get_normalized_http_url(), $method, $request->to_postdata());\n\t\t\tbreak;\n\t\t}\n\t}", "function connect($user_name, $access_token, $account_details) {\n}", "function invite()\r\n\t{\r\n\t\t$data['menu']=$this->dbm->getmenu();\r\n\t\t\t\t\r\n\t\t$data['user']=$user=$this->session->userdata(\"user\");\r\n\t\tif($data['user']==false)\r\n\t\t\tredirect(\"\");\r\n\t\t$data['page']=\"invite\";\r\n\t\t$data['g_site']=$this->g_site;\r\n\t\t$data['g_init']=true;\r\n\t\t$data['g_specialnext']='showsendinvite()';\r\n\t\t$data['g_invitemsg']='Please click the following url to get signed up with LocalSquare and become my friend. <a href=\"'.site_url(\"invite/{$user['inviteid']}\").'\">'.site_url(\"invite/{$user['inviteid']}\").'</a> Exclusive private deals are available in LocalSquare. I want to share this with you.</div>';\r\n\t\t$this->load->view(\"index\",$data);\r\n\t}", "public function actionIndex()\n {\n $request = \\Phpfox::get('mvc.request');\n $tokenId = $request->get('token', null);\n\n $verifyService = \\Phpfox::get('user.verify_email');\n $browseService = \\Phpfox::get('user.browse');\n\n $token = $verifyService->findTokenById($tokenId);\n\n\n if (!$token) { // token invalid ?\n return $this->forward(null, 'resend');\n }\n\n if ($token['expires_at'] < time()) { // is token expired ?\n return $this->forward(null, 'resend');\n }\n\n // validate user exists\n $user = $browseService->findUserById($token['user_id']);\n\n if (!$user) {\n\n }\n\n if (!$user['is_verified']) { // is user verified\n\n }\n\n return null;\n }", "public function userInfo(\n string $accessToken,\n ): ResponseInterface;", "function getSteamUser($sUser){\r\n $oUser = getAPIResult('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=2BC45C48A6E5BC5C9D043C701E191EC3&steamids=' . $sUser);\r\n \r\n return $oUser;\r\n}", "protected function requestToken() {\n\t\t$input = [\n\t\t\t'lifetime' => $this->opts['lifetime'] ?? 'renewable_auto',\n\t\t\t'interval' => $this->opts['interval'] ?? 300,\n\t\t];\n\n\t\tforeach ($this->getRequestCredentials() as $param) {\n\t\t\tif (isSet($this->opts[$param]))\n\t\t\t\t$input[$param] = $this->opts[$param];\n\t\t}\n\n\t\t$this->runAuthentication('request', $input);\n\t}", "public function join($user, Invite $code): Response\n {\n return $code->isValid()\n && $code->thread->canJoinWithInvite()\n ? $this->allow()\n : $this->deny('Not authorized to join with that invite.');\n }", "public function getIncidentsByUser(Request $request){\n try{\n $user = \\Auth::user();\n $incidents = $user->incidents;\n return response()->json(['status'=>true, 'incidents'=>$incidents], 200);\n }\n catch(Exception $exception) {\n return reportAndRespond($exception, 400);\n }\n }" ]
[ "0.57124126", "0.55073595", "0.53830445", "0.5382341", "0.53213924", "0.53178114", "0.53106576", "0.52755636", "0.5252386", "0.52206016", "0.5187878", "0.5172296", "0.5161919", "0.5154369", "0.51525575", "0.5142898", "0.51405585", "0.51368123", "0.5134308", "0.513404", "0.5133127", "0.5101256", "0.50689787", "0.5059574", "0.5052587", "0.5049125", "0.5035319", "0.50210536", "0.50136775", "0.5001345", "0.500042", "0.49976823", "0.4994595", "0.49828857", "0.49730566", "0.49435526", "0.49326792", "0.49169737", "0.4911747", "0.49043494", "0.4903875", "0.4889701", "0.48870656", "0.4885854", "0.4879681", "0.48724577", "0.48724577", "0.48523867", "0.48442075", "0.4840371", "0.48387992", "0.48359603", "0.48326987", "0.48187298", "0.4812649", "0.48122665", "0.4811071", "0.48109233", "0.4803375", "0.48029244", "0.48013106", "0.4787912", "0.47870332", "0.47812057", "0.47774488", "0.47774488", "0.47774488", "0.477677", "0.47695434", "0.47691295", "0.4756203", "0.47530985", "0.47491398", "0.47444275", "0.47436878", "0.47426045", "0.47398686", "0.4736729", "0.4736113", "0.47341144", "0.47270566", "0.47242174", "0.472145", "0.47207662", "0.47178328", "0.47142574", "0.47043255", "0.4703868", "0.46995226", "0.46992838", "0.46986756", "0.46980414", "0.46970665", "0.46962178", "0.4692035", "0.46846753", "0.46813542", "0.46795282", "0.46737942", "0.4668433" ]
0.8000302
0
Remove unused column `sales_methods`
Удалить неиспользуемую колонку `sales_methods`
protected function removeSalesMethodsColumn(SchemaSetupInterface $setup) { $connection = $setup->getConnection(); $connection->dropColumn($setup->getTable('mageworx_multifees_fee'), 'sales_methods'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uninstallSalesData()\n {\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('sales_order'),\n CustomFieldsInterface::CHECKOUT_BUYER_NAME\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('sales_order'),\n CustomFieldsInterface::CHECKOUT_BUYER_EMAIL\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('sales_order'),\n CustomFieldsInterface::CHECKOUT_PURCHASE_ORDER_NO\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('sales_order'),\n CustomFieldsInterface::CHECKOUT_GOODS_MARK\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('sales_order'),\n CustomFieldsInterface::CHECKOUT_COMMENT\n );\n }", "public function withoutColumnMethods()\n {\n return $this->methods->reject(function (Method $method) {\n return in_array($method->name, ['nullable', 'index', 'unique', 'uuid']);\n });\n }", "function remove_unused_santri_cols(){\n \t$santri = 'santri';\n \t//! remove constrain first\n \t$names = array('santri_ibfk_1' , 'santri_ibfk_2','santri_ibfk_3','santri_ibfk_4','santri_ibfk_5','santri_ibfk_6','santri_ibfk_7');\n \tforeach ($names as $name) {\n \t\t$this->del_constraint( $santri , $name);\n \t}\n \t//! then remove unique name \n \t$this->del_unique($santri , 'nama');\n \t// finally\n \t$cols = array(\n \t\t'nama',\n \t\t'nama_',\n \t\t'jenis',\n \t\t'idtempat',\n \t\t'lahir',\n \t\t'iddesa',\n \t\t'detail',\n \t\t'idsekolah',\n \t\t'masuk',\n \t\t'nisa',\n \t\t'idsuratin',\n \t\t'awalsession',\n \t\t'idsuratout',\n \t\t'idkelasakhir',\n \t\t'idkelasawal',\n \t\t'idreason',\n \t\t'idayah',\n \t\t'idibu',\n \t\t'idwali',\n \t\t'lanjutke',\n \t\t'foto',\n \t\t'perkiraansantri'\n \t);\n \tforeach($cols as $col){\n \techo sprintf('Try to remove %1$s <br>',$col);\n \t$this->del_column($santri , $col );\n }\n }", "protected function rejectVirtualColumns()\n {\n $this->columns = array_filter($this->columns, function ($column) {\n return !isset($column['Extra']) || !Str::contains($column['Extra'], 'VIRTUAL');\n });\n }", "public function cols_remove($table,$name){ return false; }", "function removeGlobalPartnerSpecificColumns($columns)\n{\n unset($columns['title']);\n return $columns;\n}", "public function uninstallQuoteData()\n {\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('quote'),\n CustomFieldsInterface::CHECKOUT_BUYER_NAME\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('quote'),\n CustomFieldsInterface::CHECKOUT_BUYER_EMAIL\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('quote'),\n CustomFieldsInterface::CHECKOUT_PURCHASE_ORDER_NO\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('quote'),\n CustomFieldsInterface::CHECKOUT_GOODS_MARK\n );\n $this->setup->getConnection()->dropColumn(\n $this->setup->getTable('quote'),\n CustomFieldsInterface::CHECKOUT_COMMENT\n );\n }", "private function removeObsoleteMetadata()\n {\n // 1 pass through $mySources make new array with routine_name is key.\n $clean = [];\n foreach ($this->mySources as $source)\n {\n $routine_name = $source['routine_name'];\n if (isset($this->myPhpStratumMetadata[$routine_name]))\n {\n $clean[$routine_name] = $this->myPhpStratumMetadata[$routine_name];\n }\n }\n\n $this->myPhpStratumMetadata = $clean;\n }", "function devvn_reviews_columns_filter( $columns ) {\n unset($columns['wpseo-title']);\n unset($columns['wpseo-score']);\n unset($columns['wpseo-metadesc']);\n unset($columns['wpseo-focuskw']);\n unset($columns['wpseo-score-readability']);\n return $columns;\n}", "function removeColumn( $prop )\r\n\t{\r\n\t\t$nova = array();\r\n\t\tforeach( $this->columns as $column )\r\n\t\t{\r\n\t\t\tif( $column != $prop )\r\n\t\t\t{\r\n\t\t\t\t$nova[] = $column;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->columns = $nova;\r\n\t}", "function good_food_rating_columns_remove_init() {\n\t\tfunction good_food_rating_columns_remove($columns) {\n\t\t\tunset($columns['ratings']);\n\t\t\t\n\t\t\treturn $columns;\n\t\t}\n\t\t\n\t\t\n\t\t$post_types = get_post_types('','names');\n\t\t\n\t\tforeach($post_types as $post_type) {\n\t\t\tif($post_type != 'project') {\n\t\t\t\t$filter = 'manage_' . esc_html($post_type) . '_posts_columns';\n\t\t\t\t\n\t\t\t\tadd_filter($filter, 'good_food_rating_columns_remove');\n\t\t\t}\n\t\t}\n\t\t\n\t\tadd_filter('manage_pages_columns' , 'good_food_rating_columns_remove');\n\t}", "function remove_columns( $columns ) {\n unset( $columns['wpseo-score'] );\n unset( $columns['wpseo-score-readability'] );\n unset( $columns['wpseo-title'] );\n unset( $columns['wpseo-metadesc'] );\n unset( $columns['wpseo-focuskw'] );\n unset( $columns['wpseo-links'] );\n unset( $columns['wpseo-linked'] );\n\n return $columns;\n}", "function kleefaan_remove_yoast_columns( $columns ) {\n unset( $columns['wpseo-score'] );\n unset( $columns['wpseo-title'] );\n unset( $columns['wpseo-metadesc'] );\n unset( $columns['wpseo-focuskw'] );\n unset( $columns['wpseo-score-readability'] );\n unset( $columns['wpseo-links']);\n return $columns;\n }", "function my_columns_filter( $columns ) {\n\t\t unset($columns['author']);\n\t\t unset($columns['date']);\n\t\t return $columns;\n\t\t }", "function dropColumn($table, $name) {\n\t \t$name = Inflect::propertyToColumn($name);\n\t\t$sql = \"ALTER TABLE $table DROP COLUMN $name\";\n\t\t$this->connection->execute($sql);\n\t}", "public static function dropViewsWithInstalls()\n {\n $createTempTable = 'CREATE TABLE '.parent::tableName().'temporaryViews AS '.self::tableName();\n $insertQuery = 'INSERT INTO '.parent::tableName().'temporaryViews';\n self::updateFieldList();\n $insertValues =\n 'SELECT '.implode(',',self::$FIELD_LIST).'\n FROM\n (\n SELECT *\n FROM '.self::tableName().'\n )\n ANY LEFT JOIN\n (\n SELECT tracking_id,publisher_id,ios_ifa,android_id\n FROM '.Installation::tableName().'\n ) USING (android_id, ios_ifa)\n WHERE publisher_id=\\'\\' AND tracking_id=\\'\\'';\n Yii::$app->clickhouse->execute($createTempTable);\n Yii::$app->clickhouse->execute($insertQuery.' '.$insertValues);\n Yii::$app->clickhouse->execute('DROP TABLE '.self::tableName());\n Yii::$app->clickhouse->execute('RENAME TABLE '.parent::tableName().'temporaryViews TO '.self::tableName());\n }", "public function removeAllBillingMethods() {\n\t\t$this->Record->from($this->database_name)->\n\t\t\twhere('gateway_name', '=', $this->gateway_identifier)->\n\t\t\tdelete();\n\t}", "function resetColumns()\n {\n $this->columns = [];\n }", "public function getDownSQL()\n {\n return array(\n 'propel' => '\n ALTER TABLE `collector_email`\n DROP UNIQUE INDEX `unq_collector_email`\n ',\n );\n }", "function remove_delhivery_table() {\n}", "public function remove_custom_table_support() {\n $current_version = get_option( 'laterpay_plugin_version' );\n\n if ( laterpay_check_is_vip() || version_compare( $current_version, '0.10.0', '<' ) ) {\n return;\n }\n\n global $wpdb;\n\n // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- Not run on VIP-GO env, used to remove custom tables after migration.\n $table = $wpdb->prefix . 'laterpay_terms_price';\n $table_terms = $wpdb->get_results( 'SHOW TABLES LIKE \\'' . $table . '\\';' );\n\n if ( $table_terms && laterpay_is_migration_complete() ) {\n\n $timepass_table = $wpdb->prefix . 'laterpay_passes';\n $subscription_table = $wpdb->prefix . 'laterpay_subscriptions';\n $term_table = $wpdb->prefix . 'laterpay_terms_price';\n\n $wpdb->query( 'DROP TABLE IF EXISTS ' . $timepass_table . ';' );\n $wpdb->query( 'DROP TABLE IF EXISTS ' . $subscription_table . ';' );\n $wpdb->query( 'DROP TABLE IF EXISTS ' . $term_table . ';' );\n\n }\n // phpcs:enable\n\n }", "public function testRemovedColumn()\n {\n $this->schema->addTable(\\Test\\Schema\\Table\\Country::class);\n\n $tableConfig = $this->schema->getTable('order')->getConfiguration();\n // should be ignored as no change in db detected\n $tableConfig->getColumn('first_name')->setRenamedFrom('name');\n\n $this->outputBegin();\n $this->rundDbog();\n $this->outputEndEquals($this->getRemovedColumnOutput(), true);\n }", "function dysign_yoast_columns_clean( $columns ) {\n unset($columns['wpseo-title']);\n unset($columns['wpseo-score']);\n unset($columns['wpseo-metadesc']);\n unset($columns['wpseo-focuskw']);\n return $columns;\n}", "function custom_columns($columns) {\n unset($columns['author']);\n unset($columns['comments']);\n unset($columns['date']);\n return $columns;\n}", "public function down()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE `esq_customers` DROP `sales_person_id`;\");\r\n }", "public function down()\n {\n $this->dbforge->drop_column('invitations', 'user_name');\n }", "protected function _unInstallSql() {\n /*$sqlInstall = \"ALTER TABLE \" . _DB_PREFIX_ . \"product \"\n . \"DROP how_to_use_video\";\n $sqlInstallLang = \"ALTER TABLE \" . _DB_PREFIX_ . \"product_lang \"\n . \"DROP how_to_use_details\";\n\n $returnSql = Db::getInstance()->execute($sqlInstall);\n $returnSqlLang = Db::getInstance()->execute($sqlInstallLang);\n \n return $returnSql && $returnSqlLang;*/\n }", "public function dropColumnHistorical($table, $name) {\r\n\t\tif (!$this->getDbConnection()->logHistorical) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$this->setDbToHistorical();\r\n\t\tparent::dropColumn($table, $name);\r\n\t\t$this->setDbToOriginal();\r\n\t}", "public function removeColumns($columns)\n {\n $this->columns = $this->remove('columns', $columns);\n }", "public function uninstall()\n\t{\n\t\t$this->db->query('DROP TABLE `'.$this->table.'`');\n\t\t$this->db->query('DROP TABLE `'.$this->table_white.'`');\n\t}", "function clearOutputColumns()\n {\n $this->_arrColumnInfo['blnUseAllColumns'] = true;\n $this->_arrColumnInfo['arrColumnsToUse'] = array();\n return;\n }", "private function dropObsoleteRoutines()\n {\n // Make a lookup table from routine name to source.\n $lookup = [];\n foreach ($this->mySources as $source)\n {\n $lookup[$source['routine_name']] = $source;\n }\n\n // Drop all routines not longer in sources.\n foreach ($this->myRdbmsOldMetadata as $old_routine)\n {\n if (!isset($lookup[$old_routine['routine_name']]))\n {\n echo sprintf(\"Dropping %s %s\\n\",\n strtolower($old_routine['routine_type']),\n $old_routine['routine_name']);\n\n $sql = sprintf(\"drop %s if exists %s\", $old_routine['routine_type'], $old_routine['routine_name']);\n DataLayer::executeNone($sql);\n }\n }\n }", "public function truncateColumnsTable()\n {\n DB::table('columns')->truncate();\n }", "public function __unset($name)\n {\n if (isset($this->columns[$name])) {\n unset($this->columns[$name]);\n }\n }", "public function __unset($name) {\n $column = $this->searchColumn($name);\n $column->setAccessible(FALSE);\n }", "public function down()\n\t{\n\t\tYii::app()->db->createCommand('delete from tblauditoriaexcecao where codauditoriaexcecao in (10, 11, 12, 13)')->execute();\n\t\t\n\t\tYii::app()->db->createCommand('DROP TRIGGER tblnegocioaiau_valorprodutos_valoraprazo_valordesconto ON tblnegocio')->execute();\n\t\tYii::app()->db->createCommand('DROP TRIGGER tblnegocioformapagamentoaiauad ON tblnegocioformapagamento')->execute();\n\t\tYii::app()->db->createCommand('DROP TRIGGER tblnegocioprodutobarraaiauad ON tblnegocioprodutobarra')->execute();\n\t\t\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocioformapagamentoaiauad()')->execute();\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocioaiau_valorprodutos_valoraprazo_valordesconto()')->execute();\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocioprodutobarraaiauad()')->execute();\n\t\t\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocio_atualiza_valorprodutos(pCodNegocio BIGINT)')->execute();\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocio_atualiza_valortotal(pCodNegocio BIGINT)')->execute();\n\t\tYii::app()->db->createCommand('DROP FUNCTION fntblnegocio_atualiza_valoraprazo(pCodNegocio BIGINT)')->execute();\n\n\t\tYii::app()->db->createCommand('alter table tblnegocio drop column codnaturezaoperacao')->execute();\n\t\tYii::app()->db->createCommand('alter table tblnegocio drop column valorprodutos')->execute();\n\t\tYii::app()->db->createCommand('alter table tblnegocio drop column valortotal')->execute();\n\t\tYii::app()->db->createCommand('alter table tblnegocio drop column valoraprazo')->execute();\n\t\tYii::app()->db->createCommand('alter table tblnegocio drop column valoravista')->execute();\n\t\t\n\t\treturn true;\n\t}", "public function removeReuseMetaTable()\n {\n $this->di->db->statement(\"DROP TABLE IF EXISTS `\" . Settings::REUSE_TABLE . \"`\");\n }", "function del_column($table_name , $column_name){\n $sql = sprintf('ALTER TABLE %1$s DROP %2$s' , $table_name , $column_name);\n $this->exe_non_query( $sql );\n }", "public function uninstall() {\n $this->dao->query(sprintf('DROP TABLE %s', $this->getTable_Stats()) ) ;\n $this->dao->query(sprintf('DROP TABLE %s', $this->getTable_Files()) ) ;\n $this->dao->query(sprintf('DROP TABLE %s', $this->getTable()) ) ;\n $this->dao->delete(sprintf(\"%st_plugin_category\", DB_TABLE_PREFIX), \"s_plugin_name = 'market'\");\n }", "public function removeHiddenFields()\n {\n foreach ($this->tableInspectorMap as $tableName => $model) {\n foreach ($model->getHidden() as $hidden) {\n $this->info(\"$tableName hiding \".$hidden, 'vvv');\n unset($this->tableMap[$tableName]['attributes'][$hidden]);\n }\n }\n }", "public function safeDown()\n {\n $this->dropColumn($this->tableName, 'new_position');\n $this->dropColumn($this->tableName, 'top_position');\n $this->dropColumn($this->tableName, 'top_category_position');\n }", "public function RemoveFieldIndex()\n {\n parent::RemoveFieldIndex();\n\n $this->dropIndexByName($this->name.'_combined');\n }", "public function __call($method, $parameters)\n {\n // Unset method\n if ($method == 'unset')\n {\n return call_user_func_array(array($this, 'dropColumn'), $parameters);\n }\n\n return parent::__call($method, $parameters);\n }", "public function compileTableDropFields()\n\t{\n\t\treturn 'ALTER TABLE '.\n\t\t\t$this->quoteIdentifier($this->query['table']).\n\t\t\t' DROP '.\n\t\t\tjoin(', ', array_map(array($this, 'quoteIdentifier'), $this->query['fields']));\n\t}", "public function getDownSQL()\n {\n return array(\n 'propel' => '\n SET FOREIGN_KEY_CHECKS = 0;\n\n ALTER TABLE `collector_identifier` DROP `provider`;\n ALTER TABLE `collector_identifier_archive` DROP `provider`;\n\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n 'blog' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n '\n );\n }", "protected function drop()\n {\n if ($this->table === null) {\n throw new IncorrectMethodUsageException('Wrong use of method drop(). Use method table() first.');\n }\n \n $queryBuilder = $this->adapter->getQueryBuilder();\n $queries = $queryBuilder->dropTable($this->table);\n $this->queries = array_merge($this->queries, $queries);\n $this->table = null;\n }", "static function uninstall() {\n SQL::current()->drop(\"likes\");\n }", "public function down()\n {\n \n $this->dropTable('stats_general');\n \n return false;\n }", "public function down()\n\t{\n\t\tSchema::drop('l_distributors_table');\n\t}", "static function uninstall(): void {\n SQL::current()->drop(\"likes\");\n }", "public function getDownSQL()\n {\n return array(\n 'propel' => '\n # This is a fix for InnoDB in MySQL >= 4.1.x\n # It \"suspends judgement\" for fkey relationships until are tables are set.\n SET FOREIGN_KEY_CHECKS = 0;\n\n ALTER TABLE `shopping_cart_collectible`\n CHANGE `shipping_country_iso3166` `shipping_country_iso3166` CHAR(2);\n\n ALTER TABLE `shopping_cart_collectible`\n CHANGE `shipping_fee_amount` `shipping_fee_amount` INTEGER DEFAULT 0 NOT NULL;\n\n ALTER TABLE `shopping_cart_collectible` DROP `shipping_type`;\n\n # This restores the fkey checks, after having unset them earlier\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n 'blog' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n '\n );\n }", "public function down()\n {\n Schema::table('result', function (Blueprint $table) {\n $table->dropColumn('state');\n });\n }", "function removeResolutionField() {\n if(in_array('resolution', $this->utility->db->listTableFields(TABLE_PREFIX . 'project_objects'))) {\n $this->utility->db->execute(\"alter table \" . TABLE_PREFIX . \"project_objects drop resolution\");\n } // if\n \n return true;\n }", "public function getDownSQL()\n {\n return array (\n 'feed' => '\nBEGIN;\n\nALTER TABLE \"feed_collection\"\n\n DROP COLUMN \"websocket_module\",\n\n DROP COLUMN \"badges_collection\",\n\n DROP COLUMN \"badges_prefix\";\n\nCOMMIT;\n',\n );\n }", "public function dropColumn($columns)\n {\n if (!is_array($columns)) $columns = array($columns);\n\n // Unset attributes\n foreach ($columns as $column)\n {\n $this->__unset($column);\n }\n\n // Perform unset only on current document\n return $query = $this->newQuery()->where($this->getKeyName(), $this->getKey())->unset($columns);\n }", "public function getDownSQL()\n {\n return array(\n 'propel' => \"ALTER TABLE `tag` DROP IF EXISTS `slug`;\",\n );\n }", "public function __unset($key)\n {\n // if ($this->hDatabase->columnExists($key, $this->table))\n // {\n // $this->hDatabase->query(\"ALTER TABLE `{$this->table}` DROP COLUMN `{$key}`\");\n // }\n }", "public function hide_yoast_columns( $columns ) {\n\n\t\tunset( $columns['wpseo-score'] );\n\t\tunset( $columns['wpseo-title'] );\n\t\tunset( $columns['wpseo-metadesc'] );\n\t\tunset( $columns['wpseo-focuskw'] );\n\n\t\treturn $columns;\n\n\t}", "public function removeColumn(): self\n {\n $this->getColumn()->setType(new FallbackType());\n \n return $this;\n }", "public function drop($columns){\n if(!is_array($columns)){\n $columns = [$columns];\n }\n\n $this->updateType = \"drop\";\n\n return $this->update(array_flip($columns));\n }", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS nm_outdata');\n parent::uninstall();\n }", "function unInstall() {\n $query=\"DROP TABLE IF EXISTS \".sql_table('plugin_earthquakemonitor');\n sql_query($query);\n }", "function upgrade_module_1_2_0()\n{\n if (class_exists('DB')) {\n Db::getInstance()->Execute('ALTER TABLE IF EXISTS `' . _DB_PREFIX_ . 'conekta_transaction` DROP COLUMN `id_conekta_customer`, DROP COLUMN `fee`;');\n }\n}", "function uninstall()\n {\n $query = new DB_Table_Delete(Shipping_Module_Free_Shipping::getTables());\n global $application;\n $application->db->getDB_Result($query);\n }", "private static function drop_custom_table() {\n\t global $wpdb;\n\t $table_name = VSPI_CACHE_TABLE;\n $query = \"DROP TABLE IF EXISTS {$table_name}\";\n $wpdb->query($query);\n }", "public function down()\n {\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile DROP INDEX `facebook_uid_index`\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile DROP INDEX `email_index`\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile DROP INDEX `email_hash_index`\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile DROP COLUMN `facebook_uid`\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile DROP COLUMN `email_hash`\");\n }", "public function addColumnSalesService()\n {\n \n if (!Schema::hasColumn('point_sales_service_payment_collection', 'payment_type')) {\n Schema::table('point_sales_service_payment_collection', function ($table) {\n $table->string('payment_type')->nullable()->default('bank');\n });\n }\n\n /**\n * TABLE PAYMENT COLLECTION DETAIL\n * + Column coa_id\n * + Column form_reference_id\n */\n if (!Schema::hasColumn('point_sales_service_payment_collection_detail', 'coa_id')) {\n Schema::table('point_sales_service_payment_collection_detail', function ($table) {\n $table->integer('coa_id')->unsigned()->index('sales_pc_service_detail_coa_index');\n $table->foreign('coa_id', 'sales_pc_service_detail_coa_foreign')\n ->references('id')->on('coa')\n ->onUpdate('restrict')\n ->onDelete('restrict');\n });\n }\n\n if (!Schema::hasColumn('point_sales_service_payment_collection_detail', 'form_reference_id')) {\n Schema::table('point_sales_service_payment_collection_detail', function ($table) {\n $table->integer('form_reference_id')->unsigned()->index('sales_pc_service_detail_form_reference_index');\n $table->foreign('form_reference_id', 'sales_pc_service_detail_form_reference_foreign')\n ->references('id')->on('formulir')\n ->onUpdate('cascade')\n ->onDelete('cascade');\n });\n }\n }", "public function hookUninstall()\n {\n // NeatlineFeatures_Functions::flog('/tmp/nlfeatures.log', \"(hook) uninstall\");\n $sql = \"DROP TABLE IF EXISTS `{$this->_db->prefix}neatline_features`;\";\n $this->_db->query($sql);\n }", "public static function ignoreMigrations(): void\n {\n static::$runsMigrations = false;\n }", "public static function getIgnoredColumnsForImportExport()\n {\n return static::IMPORT_EXPORT_IGNORE_COLUMNS;\n }", "public function removeColumn($name)\r\n {\r\n return $this->dataSource->removeColumn($name);\r\n }", "function disable_extension()\n {\n $this->EE->db->where('class', __CLASS__);\n $this->EE->db->delete('extensions');\n\n $this->EE->db->where('publisher_status !=', PUBLISHER_STATUS_OPEN)\n ->where('publisher_lang_id !=', $this->EE->publisher_lib->default_lang_id)\n ->delete('low_search_indexes');\n\n if ($this->EE->db->table_exists($this->table) AND $this->EE->db->field_exists('publisher_lang_id', $this->table)) \n {\n $this->EE->dbforge->drop_column($this->table, 'publisher_status');\n $this->EE->dbforge->drop_column($this->table, 'publisher_lang_id');\n }\n }", "public function down()\n\t{\n\t\tSchema::table('accounts', function($table) {\n\t\t\t$table->drop_column(array('permissions', 'treasurer'));\n\t\t});\n\t}", "public function uninstall()\n\t{\n\t\t$this->db->query(\"\n\t\t\tDROP TABLE \".Kohana::config('database.default.table_prefix').\"custombaselayer;\");\n\t}", "public function down()\n\t{\n\t\tSchema::table('sms', function($table)\n\t\t{\n\t\t\t$table->drop_column('type');\n\t\t\t$table->drop_column('received_at');\n\t\t});\n\t}", "public static function dropAllTypes()\n {\n /** @var \\Illuminate\\Database\\Schema\\PostgresBuilder $instance */\n $instance->dropAllTypes();\n }", "public function dropSchema();", "public function clearChangedColumns()\n {\n if ($this->valid()) {\n $this->rows[key($this->rows)][self::CHANGED_COLUMNS] = [];\n }\n }", "public function down()\n {\n Schema::table('postpress_data', function ($table) {\n $table->dropColumn('ppprice');\n $table->dropColumn('ppprice_count');\n $table->dropColumn('ppprice_desc');\n });\n }", "function ceo_uninstall() {\n // variables\n global $wpdb;\n $tableName = $wpdb->prefix . \"ceobfuscationrecords\";\n \n // remove options\n delete_option( 'ceo_preventpublish' );\n delete_option( 'ceo_defaultcontent' );\n \n // remove custom table\n $dropSql = \"DROP TABLE $tableName;\";\n $wpdb->query($dropSql);\n}", "function give_v241_remove_sale_logs_callback() {\n\tglobal $wpdb;\n\n\t$log_table = Give()->logs->log_db->table_name;\n\t$log_meta_table = Give()->logs->logmeta_db->table_name;\n\n\t$sql = \"DELETE {$log_table}, {$log_meta_table}\n\t\tFROM {$log_table}\n\t\tINNER JOIN {$log_meta_table} ON {$log_meta_table}.log_id={$log_table}.ID\n\t\tWHERE log_type='sale'\n\t\t\";\n\n\t// Remove donation logs.\n\t$wpdb->query( $sql );\n\n\tgive_set_upgrade_complete( 'v241_remove_sale_logs' );\n}", "protected function downSql(){\n\t}", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'role');\n }", "public function getLogIgnoredColumns();", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE packages DROP provider_group');\n $this->addSql('DROP INDEX package_is_active_idx');\n }", "public function down(Schema $schema): void\n {\n $this->addSql('ALTER TABLE material ADD purchaseprice DOUBLE PRECISION NOT NULL, ADD saleprice DOUBLE PRECISION NOT NULL, DROP purchase_price, DROP sale_price, CHANGE minimum_limit minimumlimit DOUBLE PRECISION DEFAULT NULL');\n }", "function arrange_statistics_remove($key)\n\t{\n\t\tglobal $fields, $type_info, $f_key, $allLangs, $rlActions;\n\n\t\t$field_info = $fields[$key];\n\t\t$field_values = explode(',', $field_info['Values']);\n\t\t\n\t\tforeach ($field_values as $value)\n\t\t{\n\t\t\t$column_key = $f_key .'_column'. $value;\n\t\t\t$this -> query(\"DELETE FROM `\". RL_DBPREFIX .\"lang_keys` WHERE `Key` = 'stats+name+{$column_key}'\");\n\t\t}\n\t}", "public function addColumnSalesInventory()\n {\n \n if (!Schema::hasColumn('point_sales_payment_collection', 'payment_type')) {\n Schema::table('point_sales_payment_collection', function ($table) {\n $table->string('payment_type')->nullable()->default('bank');\n });\n }\n\n /**\n * TABLE PAYMENT COLLECTION DETAIL\n * + Column coa_id\n * + Column form_reference_id\n */\n if (!Schema::hasColumn('point_sales_payment_collection_detail', 'coa_id')) {\n Schema::table('point_sales_payment_collection_detail', function ($table) {\n $table->integer('coa_id')->unsigned()->index('sales_pc_detail_coa_index');\n $table->foreign('coa_id', 'sales_pc_detail_coa_foreign')\n ->references('id')->on('coa')\n ->onUpdate('restrict')\n ->onDelete('restrict');\n });\n }\n\n if (!Schema::hasColumn('point_sales_payment_collection_detail', 'form_reference_id')) {\n Schema::table('point_sales_payment_collection_detail', function ($table) {\n $table->integer('form_reference_id')->unsigned()->index('sales_pc_detail_form_reference_index');\n $table->foreign('form_reference_id', 'sales_pc_detail_form_reference_foreign')\n ->references('id')->on('formulir')\n ->onUpdate('cascade')\n ->onDelete('cascade');\n });\n }\n }", "public function down()\n {\n // DB::statement(\"DROP VIEW selling_view\");\n Schema::dropIfExists('selling_view');\n }", "public function dropViewIfExists(string $table): void\n {\n }", "function helix_remove_tag_posts_column($column_headers) {\n\tunset($column_headers['tags']);\n\t\n\treturn $column_headers;\n}", "function maybe_drop_column($table_name, $column_name, $drop_ddl)\n{\n}", "function remove_columns_from_post_list($columns) {\n unset($columns['date']);\n unset($columns['author']);\n unset($columns['comments']);\n return $columns;\n}", "public function down(Schema $schema) : void\n {\n /* $this->addSql('ALTER TABLE customers DROP FOREIGN KEY FK_62534E219749932E');\n $this->addSql('ALTER TABLE customers DROP FOREIGN KEY FK_62534E215E418E53');\n $this->addSql('DROP INDEX IDX_62534E219749932E ON customers');\n $this->addSql('DROP INDEX IDX_62534E215E418E53 ON customers');\n $this->addSql('ALTER TABLE customers CHANGE employee_id_id employee_id INT DEFAULT NULL, CHANGE categorietva_id_id categorietva_id INT NOT NULL');\n $this->addSql('ALTER TABLE customers ADD CONSTRAINT FK_62534E219749932E FOREIGN KEY (employee_id) REFERENCES employee (id)');\n $this->addSql('ALTER TABLE customers ADD CONSTRAINT FK_62534E215E418E53 FOREIGN KEY (categorietva_id) REFERENCES categorietva (id)');\n $this->addSql('CREATE INDEX IDX_62534E219749932E ON customers (employee_id)');\n $this->addSql('CREATE INDEX IDX_62534E215E418E53 ON customers (categorietva_id)');\n */ $this->addSql('ALTER TABLE orderdetail DROP FOREIGN KEY FK_27A0E7F26BF977FF');\n $this->addSql('ALTER TABLE orderdetail DROP FOREIGN KEY FK_27A0E7F29F1D6087');\n $this->addSql('DROP INDEX IDX_27A0E7F26BF977FF ON orderdetail');\n $this->addSql('DROP INDEX IDX_27A0E7F29F1D6087 ON orderdetail');\n $this->addSql('ALTER TABLE orderdetail DROP totalorder_id, DROP products_id');\n /* $this->addSql('ALTER TABLE totalorder DROP FOREIGN KEY FK_D614707E4CA4FD72');\n $this->addSql('DROP INDEX IDX_D614707E4CA4FD72 ON totalorder');\n $this->addSql('ALTER TABLE totalorder CHANGE customers_id_id customers_id INT NOT NULL');\n $this->addSql('ALTER TABLE totalorder ADD CONSTRAINT FK_D614707E4CA4FD72 FOREIGN KEY (customers_id) REFERENCES customers (id)');\n $this->addSql('CREATE INDEX IDX_D614707E4CA4FD72 ON totalorder (customers_id)');*/\n }", "public function removeUnusedHashColumns(array $mapping) {\n\t\t$hashables = $this->hashable;\n\n\t\tforeach ($hashables as $key => $field) {\n\t\t\tif (!in_array($field, $mapping)) {\n\t\t\t\tunset($hashables[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $hashables;\n\t}", "public function down()\n {\n $sql = <<<'SQL'\n \n-- Drop the indexes\ndrop index ix1 on css_networking_network_tree_map;\ndrop index idx_css_networking_network_tree_map_breadcrumb on css_networking_network_tree_map;\n\n-- Drop the Procedure\ndrop procedure sp_gridDataQuery;\nSQL;\n DB::unprepared($sql);\n }", "public function removePaymentLimitation() {\n\t\tunset($this->whereClauseParts['paid']);\n\t}", "public function down()\n\t{\n\t\tSchema::drop('pdo_adjustments');\n\t}", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('competences');\n\t}", "public function dropColumn($table, $name, $dropHistorical=false) {\r\n\t\tparent::dropColumn($table, $name);\r\n\t\tif (!$this->getDbConnection()->logHistorical || !$dropHistorical) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$historicalTable = $this->getHistoricalTableName($table);\r\n\t\tif ($historicalTable) {\r\n\t\t\t$this->setDbToHistorical();\r\n\t\t\tparent::dropColumn($historicalTable, $name);\r\n\t\t\t$this->setDbToOriginal();\r\n\t\t}\r\n\t}" ]
[ "0.6794716", "0.6715027", "0.6039653", "0.5922968", "0.5805446", "0.57876676", "0.5672022", "0.5654059", "0.56412387", "0.56345767", "0.56336254", "0.56115544", "0.5589795", "0.55863076", "0.5547152", "0.5493787", "0.5488529", "0.54804105", "0.5477713", "0.5464804", "0.5444917", "0.5443896", "0.5374285", "0.53595716", "0.53319913", "0.53251284", "0.52955335", "0.52948564", "0.52893806", "0.5280024", "0.52434754", "0.5229629", "0.52239025", "0.5221714", "0.5220647", "0.52114516", "0.52026224", "0.5168802", "0.51571417", "0.515332", "0.5146024", "0.51406306", "0.513757", "0.51373196", "0.5125106", "0.5121315", "0.5118208", "0.51114875", "0.51056206", "0.50982046", "0.508433", "0.5069506", "0.5057428", "0.5053088", "0.50526536", "0.50503886", "0.5048423", "0.50483936", "0.50456053", "0.504241", "0.50368404", "0.5033927", "0.50325143", "0.50291663", "0.5026359", "0.50221264", "0.5006832", "0.5001883", "0.49963948", "0.49891242", "0.4983218", "0.49825877", "0.49684066", "0.4949585", "0.49494806", "0.4941162", "0.49330476", "0.49273622", "0.49206647", "0.49196184", "0.49174124", "0.49172443", "0.49144727", "0.4912037", "0.49070415", "0.49061993", "0.49046242", "0.49041104", "0.49030066", "0.49009037", "0.48942977", "0.48891306", "0.48791802", "0.48768196", "0.4874412", "0.48733678", "0.4869212", "0.486065", "0.4860403", "0.4859284" ]
0.7232772
0